110,499
社区成员
发帖
与我相关
我的任务
分享
private void textBox19_TextChanged(object sender, EventArgs e)
{
dvoltage = Convert.ToInt32(textBox19.Text);
}
private int dvoltage = 0;
case 18:
aa = double.Parse(textBox19.Text) + 0.1;
if (aa > 50)
aa = 50;
aa = Math.Round(aa, 1);
textBox19.Text = aa.ToString();
break;
case 18:
aa = double.Parse(textBox19.Text) - 0.1;
if (aa > 50)
aa = 50;
if (aa < 0)
aa = 0;
aa = Math.Round(aa, 1);
textBox19.Text = aa.ToString();
break;
private void button1_MouseUp(object sender, MouseEventArgs e)
{
this.timer1.Enabled=false ;
SendBuffer[0] = TAG_CMD;
SendBuffer[1] = 0x07;
SendBuffer[2] = CMD_SET_PARAM_VALUE;
SendBuffer[3] = PARAM_NUM_POLES;
SendBuffer[4] = (byte)(pole & 0xff);
SendBuffer[5] = (byte)(pole >> 8);
SendBuffer[6] = (byte)(checksum(6));
frm1.serialPort1.Write(SendBuffer, 0, SendBuffer[1]);
}