public void Kill() { if (_bridge != null) { _bridge.Kill(); _bridge = null; } }
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(); }