private void optionsButton_Checked(object sender, RoutedEventArgs e) { if (_optionsControl == null) { Window.GetWindow(this).Cursor = Cursors.Wait; OptionsControl optionsControl = new OptionsControl(); optionsControl.OnBackgroundChangedEvent += _optionsControl_OnBackgroundChangedEvent; optionsControl.OnThemeChangedEvent += _optionsControl_OnThemeChangedEvent; optionsControl.OnCEIPChangedEvent += _optionsControl_OnCEIPChangedEvent; optionsControl.OnPrintingChangedEvent += _optionsControl_OnPrintingChangedEvent; _optionsControl = optionsControl; } SwitchTo(_optionsControl); }
public void InvokeForceUpdate() { if (_optionsControl != null) { OptionsControl optns = (OptionsControl)_optionsControl; BackstageEvents.StaticUpdater.InvokeForceUpdate(this, new ForceUpdateEventArgs( optns.UpdateTheme, optns.UpdateBackground, optns.UpdateHours, optns.UpdateTimeFormat, optns.UpdateAutoSave, optns.UpdateWeatherMetric ) ); } }