Exemplo n.º 1
0
 public void Kill()
 {
     if (_bridge != null)
     {
         _bridge.Kill();
         _bridge = null;
     }
 }
Exemplo n.º 2
0
        public void Rebuild(ConnectionModel model)
        {
            _model = model;

            _tcpLabel.Text    = _model.TcpPort.ToString();
            _serialLabel.Text = _model.SerialPort;

            Kill();

            _bridge = new PortBridge(_model, this);

            _bridge.StartTcpHandler();
            _tcpIcon.Image = Properties.Resources.connection_on;

            _serialIcon.Image = Properties.Resources.connection_on;
            _bridge.StartSerialHandler();
        }