private void StopBackgroundWorkers() { if (null != mOverlay) { mOverlay.Stop(); mOverlay = null; } if (null != mSerialStream) { mSerialStream.Stop(); mSerialStream = null; } if (null != mDxScreenCapture) { mDxScreenCapture.Stop(); mDxScreenCapture = 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; } }