예제 #1
0
 protected override void OnActivate(CancelEventArgs e)
 {
     if (settings == null)
     {
         settings = new GeneralSettings();
         settings.CloneFrom(SettingsService.GetGeneralSettings());
         PropertyChangedEventManager.AddHandler(settings, SettingModelPropertyChanged, "");
     }
     else
     {
         settings.CloneFrom(SettingsService.GetGeneralSettings());
     }
 }
예제 #2
0
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            var newSettings = SettingsService.GetGeneralSettings();

            settings.CloneFrom(newSettings);
        }
예제 #3
0
        public static void SaveToStorage(GeneralSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            SettingsRepository.SaveToStorage(settings, ServiceProvider.GlobalProvider);
            generalSettingsCache.CloneFrom(settings);
        }
예제 #4
0
 private void RefreshSettings()
 {
     generalSettings.CloneFrom(SettingsService.GetGeneralSettings());
     comboModeSettings.CloneFrom(SettingsService.GetComboModeSettings());
 }