void IConfigChangeHandler.ConfigUpdated(ConfigSettings newSettings) { lock (_countdownTimer) { if (newSettings.ShowCountdown != _countdownTimer.IsSwitchedOn) { if (newSettings.ShowCountdown) { _countdownTimer.SwitchOn(); _countdownTimer.Start(); } else { _countdownTimer.Stop(); _countdownTimer.SwitchOff(); } _view.Invoke(() => { _countdownTimer.Execute(); // ensure the countdown is set/executed before making visible _view.ShowCountdown(newSettings.ShowCountdown); }); } } }
public void Update() { _countdownTimer.Stop(); _pollTimer.Stop(); _view.ShowProgress = true; _worker.RunWorkerAsync(); }