private void StopEngine() { if (engineClient != null) { engineClient.Stop(); engineClient = null; } }
public void Stop() { StopFaintAlarm(); if (engineClient != null) { engineClient.NewAlarmsFired -= EngineClient_NewAlarmsFired;//不取消的话,事件会重复绑定 engineClient.Stop(); engineClient = null; } }
private void StopConnectEngine() { if (engineClient != null) { engineClient.Stop(); engineClient = null; } if (_stopwatchTextBox != null) { _stopwatchTextBox.Stop(); _stopwatchTextBox = null; } }