this.comboBox1.Items.Add(com);
//默认设置
comboBox1.SelectedIndex = 0;//选择第一个com口
comboBox2.SelectedIndex = 4;//波特率4800
comboBox3.SelectedIndex = 0;//校验位NONE
comboBox4.SelectedIndex = 0;//停止位为1
comboBox5.SelectedIndex = 0;//数据位为8
}
catch
{
MessageBox.Show(\助手\
}
}
private void timer1_Tick(object sender, EventArgs e)
{
label6.Text = DateTime.Now.ToString();
}
private void button2_Click(object sender, EventArgs e)
\\串口调试
{
try {
if (button2.Text == \开启\
{
groupBox6.Enabled = true;
radioButton1.Checked = false;
radioButton2.Checked = false;
radioButton3.Checked = false;
radioButton4.Checked = false;
checkBox1.Checked = false;
checkBox2.Checked =
checkBox3.Checked = false;
false;
checkBox4.Checked = false;
checkBox5.Checked = false;
checkBox6.Checked = false;
checkBox7.Checked = false;
checkBox8.Checked = false;
button3.Enabled = true;
textBox2.Text = String.Empty;
button2.Text = \关闭\
}
else
{
groupBox6.Enabled = false;
button3.Enabled = false;
button2.Text = \开启\
textBox2.Text = String.Empty;
}
}
catch (Exception er)
{
MessageBox.Show(\
return;