Upgrade settings only once.

- VERBESSERT: Benutzereinstellungen werden nicht mehr jedes Mal zurückgesetzt.
This commit is contained in:
Daniel Kraus 2015-10-28 08:17:10 +01:00
parent 578c126a20
commit 08640363a2
4 changed files with 26 additions and 1 deletions

View File

@ -264,5 +264,17 @@ namespace zaaReloaded2.Properties {
return ((string)(this["Repository"]));
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool NeedUpgrade {
get {
return ((bool)(this["NeedUpgrade"]));
}
set {
this["NeedUpgrade"] = value;
}
}
}
}

View File

@ -77,5 +77,8 @@
<Setting Name="Repository" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://git.bovender.de</Value>
</Setting>
<Setting Name="NeedUpgrade" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -46,7 +46,14 @@ namespace zaaReloaded2
{
Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback += CentralHandler_ManageExceptionCallback;
Bovender.WpfHelpers.RegisterTextBoxSelectAll();
Properties.Settings.Default.Upgrade();
if (Properties.Settings.Default.NeedUpgrade)
{
Properties.Settings.Default.Upgrade();
Properties.Settings.Default.NeedUpgrade = false;
Properties.Settings.Default.Save();
}
CheckForUpdates();
_oldCaption = Globals.ThisAddIn.Application.Caption;
Globals.ThisAddIn.Application.Caption =

View File

@ -108,6 +108,9 @@
<setting name="FirstRunWizardShown" serializeAs="String">
<value>False</value>
</setting>
<setting name="NeedUpgrade" serializeAs="String">
<value>True</value>
</setting>
</zaaReloaded2.Properties.Settings>
</userSettings>
</configuration>