moved Settings to Properties folder.

This commit is contained in:
morkt
2018-01-08 19:56:31 +04:00
parent a3ce27da5f
commit 2e2e447c42

View File

@@ -1,44 +1,44 @@
using System; using System;
using System.Windows; using System.Windows;
using System.Windows.Threading; using System.Windows.Threading;
namespace GameRes.Formats.Properties { namespace GameRes.Formats.Properties {
// This class allows you to handle specific events on the settings class: // This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed. // The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed. // The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded. // The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved. // The SettingsSaving event is raised before the setting values are saved.
public sealed partial class Settings { public sealed partial class Settings {
public Settings() { public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below: // // To add event handlers for saving and changing settings, uncomment the lines below:
// //
// this.SettingChanging += this.SettingChangingEventHandler; // this.SettingChanging += this.SettingChangingEventHandler;
// //
// this.SettingsSaving += this.SettingsSavingEventHandler; // this.SettingsSaving += this.SettingsSavingEventHandler;
// //
if (null != Application.Current) if (null != Application.Current)
{ {
Application.Current.Dispatcher.BeginInvoke (DispatcherPriority.Normal, new Action(() => { Application.Current.Dispatcher.BeginInvoke (DispatcherPriority.Normal, new Action(() => {
Application.Current.Exit += ApplicationExitHandler; Application.Current.Exit += ApplicationExitHandler;
})); }));
} }
} }
void ApplicationExitHandler (object sender, System.Windows.ExitEventArgs args) void ApplicationExitHandler (object sender, System.Windows.ExitEventArgs args)
{ {
Default.Save(); Default.Save();
} }
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here. // Add code to handle the SettingChangingEvent event here.
} }
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here. // Add code to handle the SettingsSaving event here.
} }
} }
} }