public void Init() { _view.ShowCountdown(_configSettings.ShowCountdown); _skinLoader.Load(new Skin(_configSettings.SkinName)); UpdateScreen(); _configFileWatcher.Start(); }
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); }); } } }