예제 #1
0
        public void Update()
        {
            _countdownTimer.Stop();
            _pollTimer.Stop();
            _view.ShowProgress = true;

            _worker.RunWorkerAsync();
        }
예제 #2
0
        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();
                }
            }
        }