public override bool Stop()
 {
     if (_device != null)
     {
         _device.Dispose();
     }
     return(true);
 }
Beispiel #2
0
 private void Disconnect()
 {
     _connected           = false;
     connectBtn.Text      = "Connect";
     connectBtn.BackColor = _defaultColor;
     connectBtn.UseVisualStyleBackColor = true;
     if (_device != null)
     {
         _device.Dispose();
         _device = null;
     }
     alarmsDataGrid.Rows.Clear();
     getStateBtn.Enabled       = false;
     downloadConfigBtn.Enabled = false;
     ResetPorts();
     this.Text = "DCController - Disconnected";
 }