diff --git a/SimpleDnsCrypt/App.config b/SimpleDnsCrypt/App.config index 7799dd98..4c150b61 100644 --- a/SimpleDnsCrypt/App.config +++ b/SimpleDnsCrypt/App.config @@ -65,6 +65,9 @@ + + True + \ No newline at end of file diff --git a/SimpleDnsCrypt/Properties/Settings.Designer.cs b/SimpleDnsCrypt/Properties/Settings.Designer.cs index 830ecd07..308fc309 100644 --- a/SimpleDnsCrypt/Properties/Settings.Designer.cs +++ b/SimpleDnsCrypt/Properties/Settings.Designer.cs @@ -178,5 +178,17 @@ public string QueryLogFile { this["QueryLogFile"] = 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; + } + } } } diff --git a/SimpleDnsCrypt/Properties/Settings.settings b/SimpleDnsCrypt/Properties/Settings.settings index f7795e12..15796823 100644 --- a/SimpleDnsCrypt/Properties/Settings.settings +++ b/SimpleDnsCrypt/Properties/Settings.settings @@ -41,5 +41,8 @@ + + True + \ No newline at end of file diff --git a/SimpleDnsCrypt/ViewModels/LoaderViewModel.cs b/SimpleDnsCrypt/ViewModels/LoaderViewModel.cs index 061ebe2f..65410454 100644 --- a/SimpleDnsCrypt/ViewModels/LoaderViewModel.cs +++ b/SimpleDnsCrypt/ViewModels/LoaderViewModel.cs @@ -182,6 +182,13 @@ private async void InitializeApplication() [ImportingConstructor] public LoaderViewModel(IWindowManager windowManager, IEventAggregator events) { + if (Properties.Settings.Default.UpgradeRequired) + { + Properties.Settings.Default.Upgrade(); + Properties.Settings.Default.UpgradeRequired = false; + Properties.Settings.Default.Save(); + } + _windowManager = windowManager; _events = events; _events.Subscribe(this);