/// <summary> /// 포트 접속 해제 /// </summary> private void RS232_Close() { if (RS232.IsOpen) { RS232.Close(); } }
// 포트 접속 해제 private void RS232_Close() { if (RS232.IsOpen) { RS232.Close(); state.Text = "상태 : 포트 닫힘"; } }
private static void StopRead() { if (paramcom.IsOpen) { paramcom.Close(); } timer.Stop(); }
private void prepareUserEnvironment() { try { if (RS232.IsOpen) { RS232.Close(); } RS232.NewLine = "<EOM>"; RS232.BaudRate = 19200; RS232.Open(); } catch (Exception) { MessageBox.Show("Seri Port Açılamadı", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
public void Close() => RS.Close();