我有一个名为“customer.cs”的窗体,其中我有一个名为“phonetxt”的文本框,我有一个名为myclass.cs的模型中的类,我有一些代码行 在“customer.cs”中,
dcos package install --package-version=0.9.4.0 kafka
我想要一个将在customer.cs中调用的方法
private void customerphone_Leave(object sender, EventArgs e)
{
if (customerphone.Text != "Enter Phone Number" && customerphone.Text == "")
{
this.customerphone.Text = "Enter Phone Number";
this.customerphone.ForeColor = Color.DarkGray;
errorcustomerphone.Icon = Properties.Resources.err;
errorcustomerphone.SetError(customerphone, "Enter Phone Number");
}
else
{
errorcustomerphone.Icon = Properties.Resources.ok;
errorcustomerphone.SetError(customerphone, "Enter Phone Number");
}
}
有人帮助我,我是c#的新手。希望你能得到我想要的东西。
答案 0 :(得分:0)
这可以是一个很好的起点。
let threshold: Float = 0.05 // Experiment with this to see what feels best.
let lowerBoundary: Float = 1.0 - threshold
let upperBoundary: Float = 1.0 + threshold
if middleSlider.value < lowerBoundary {
player.volume = 1
player2.volume = 0
}
else if middleSlider.value <= upperBoundary {
player.volume = 1
player2.volume = 1
}
else /* must be middleSlider.value > upperBoundary */ {
player.volume = 0
player2.volume = 1
}