public void QueryButton_Click(object sender, EventArgs args) { try { ErrorBox.Clear(); OutputBox.Clear(); qh.SetQuery(QueryBox.Text); } catch (Exception e) { ErrorBox.Text = e.Message; } }
//포트 오픈 실행 private void SerialPortOpen() { try { //시리얼 포트에 내용 적용 serialPort1.PortName = com_str; serialPort1.Open(); //포트관련 설정 serialPort1.BaudRate = baudrate; serialPort1.Parity = Parity_to_Serial(parity_str); serialPort1.StopBits = StopBit_to_Serial(stopbit); serialPort1.DataBits = databit; PortInfo_Box.Text += "Port Open" + "\r\n"; ErrorBox.Clear(); } catch (Exception e) { ErrorBox.Text = string.Format("Error: {0}", e); PortInfo_Box.Text += "Error\r\n"; } }
private void ErrorBox_Click(object sender, EventArgs e) { ErrorBox.Clear(); }