public void Update() { _countdownTimer.Stop(); _pollTimer.Stop(); _view.ShowProgress = true; _worker.RunWorkerAsync(); }
void IConfigChangeHandler.ConfigUpdated(ConfigSettings newSettings) { lock (_pollTimer) { if (_pollTimer.Interval != newSettings.PollFrequencyTimeSpan) { _pollTimer.Stop(); _pollTimer.Interval = newSettings.PollFrequencyTimeSpan; lock (_countdownTimer) { _countdownTimer.PollFrequency = newSettings.PollFrequencyTimeSpan; _countdownTimer.Reset(); } _pollTimer.Start(); } } }