private void buttonStart_Click(object sender, EventArgs e) { if (!_communicate_start) { deficomout1.PortName = comboBox_COMPortSelect.Text; deficomout1.communicate_realtime_start(); _communicate_start = true; buttonStart.Text = "Stop"; } else { buttonStart.Text = "Start"; deficomout1.communicate_realtime_stop(); _communicate_start = false; } }
private void buttonStart_Click(object sender, EventArgs e) { if (!_communicate_start) { buttonStart.Text = "Stop"; deficomout1.PortName = (int)numericUpDown_Portname.Value; deficomout1.communicate_realtime_start(); _communicate_start = true; } else { buttonStart.Text = "Start"; deficomout1.communicate_realtime_stop(); _communicate_start = false; } }