private void StopBackgroundWorkers() { if (null != _mOverlay) { _mOverlay.Stop(); _mOverlay = null; } if (null != _mSerialStream) { _mSerialStream.Stop(); _mSerialStream = null; } }
private void RefreshTransferState() { if (null == _mSerialStream) { _mSerialStream = new SerialStream(); } if (Settings.TransferActive) { comboBoxComPort.Enabled = false; _mSerialStream.Start(); } else { _mSerialStream.Stop(); _mSerialStream = null; comboBoxComPort.Enabled = true; } }
private static void RefreshTransferState() { if (null == _mSerialStream) { _mSerialStream = new SerialStream(); } if (Settings.TransferActive && !_mSerialStream.IsRunning) { //start it _log.Debug("starting the serial stream"); _mSerialStream.Start(); } else if (!Settings.TransferActive && _mSerialStream.IsRunning) { //stop it _log.Debug("stopping the serial stream"); _mSerialStream.Stop(); } }