Beispiel #1
0
        public void CloseConnection()
        {
            try
            {
                _serialPort.Close();
            }
            catch (Exception ex)
            {
                _log.Warning("RS232Transport: Error closing port, exception omitted: {0}", ex);
            }

            _buffer.Clear();
        }
Beispiel #2
0
 private void btnConnect1_Click_1(object sender, EventArgs e)
 {
     if (btnConnect1.Text == Languages.Lang.lgConnect)
     {
         if (!OpenComm())
         {
             Tls.ShowHelp("Could not open comm port.", this.Text, 3000);
         }
     }
     else
     {
         CommPort.Close();
     }
     UpdateForm();
 }
Beispiel #3
0
 internal void ReConnectSerial()
 {
     serialComm.Close();
     serialComm = new SerialComm(SerialParam, DetectParam.CameraNo);
 }