Upgrade Settings from previous revision
Save config changes once
This commit is contained in:
@@ -315,5 +315,17 @@ namespace VEPROMS.Properties {
|
||||
this["SMTPUser"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool UpdateSettings {
|
||||
get {
|
||||
return ((bool)(this["UpdateSettings"]));
|
||||
}
|
||||
set {
|
||||
this["UpdateSettings"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -77,5 +77,8 @@
|
||||
<Setting Name="SMTPUser" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="UpdateSettings" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
@@ -111,6 +111,12 @@ namespace VEPROMS
|
||||
#endregion
|
||||
public frmVEPROMS()
|
||||
{
|
||||
if (Properties.Settings.Default.UpdateSettings)
|
||||
{
|
||||
Properties.Settings.Default.Upgrade();
|
||||
Properties.Settings.Default.UpdateSettings = false;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
// cleanup from previous run:
|
||||
Volian.Base.Library.TmpFile.RemoveAllTmps();
|
||||
|
||||
|
Reference in New Issue
Block a user