added ISettingsManager implementation.

This commit is contained in:
morkt
2018-01-11 18:39:43 +04:00
parent 21f2529e97
commit d8389d2289
6 changed files with 40 additions and 12 deletions

View File

@@ -705,5 +705,17 @@ namespace GameRes.Formats.Properties {
this["RCTApplyMask"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool UpgradeRequired {
get {
return ((bool)(this["UpgradeRequired"]));
}
set {
this["UpgradeRequired"] = value;
}
}
}
}

View File

@@ -19,18 +19,6 @@ namespace GameRes.Formats.Properties {
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
if (null != Application.Current)
{
Application.Current.Dispatcher.BeginInvoke (DispatcherPriority.Normal, new Action(() => {
Application.Current.Exit += ApplicationExitHandler;
}));
}
}
void ApplicationExitHandler (object sender, System.Windows.ExitEventArgs args)
{
Default.Save();
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {

View File

@@ -173,5 +173,8 @@
<Setting Name="RCTApplyMask" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="UpgradeRequired" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>