Beispiel #1
0
 public WApplicationSettings(
     WApplicationSettingsViewModel viewModel,
     IEventAggregator eventAggregator,
     IEnumerable <ISettingProvider> settingProviders)
 {
     InitializeComponent();
     DataContext = viewModel;
     SettingContent.SetEventAggregator(eventAggregator);
     SettingContent.SetSettingProviders(settingProviders);
     SettingContent.SetViewModel(viewModel.SettingViewModel);
     SettingContent.OnLoaded();
     this.eventAggregator = eventAggregator;
 }
Beispiel #2
0
 public WApplicationSettings(
     WApplicationSettingsViewModel viewModel,
     IEventAggregator eventAggregator,
     ResolverFactory resolverFactory)
 {
     InitializeComponent();
     DataContext = viewModel;
     SettingContent.SetEventAggregator(eventAggregator);
     //
     SettingContent.SetViewModel(viewModel.SettingViewModel);
     SettingContent.OnLoaded();
     this.eventAggregator = eventAggregator;
     this.resolverFactory = resolverFactory;
     //,
     //IEnumerable<ISettingProvider> settingProviders
 }
Beispiel #3
0
 public void SetProviders(IEnumerable <ISettingProvider> providers)
 {
     SettingContent.SetSettingProviders(providers);
     SettingContent.OnLoaded();
 }
Beispiel #4
0
 private static SettingContent InitializeContent(FileStream settingFileStream)
 {
     var newSettingContent = new SettingContent();
     new XmlSerializer(typeof(SettingContent)).Serialize(settingFileStream, newSettingContent);
     return new SettingContent();
 }
Beispiel #5
0
 /// <summary>
 /// Схораняет настройки, переданные в SettingContent
 /// </summary>
 /// <param name="settingContent">Схораняемые настройки</param>
 public static void SaveSettings(SettingContent settingContent)
 {
     currentSetting = settingContent;
     SaveSettings();
 }