diff --git a/App.config b/App.config
index 379efdc..1da09fe 100644
--- a/App.config
+++ b/App.config
@@ -47,6 +47,9 @@
True
+
+ True
+
diff --git a/Form1.cs b/Form1.cs
index 1d9b0e8..a29e69d 100644
--- a/Form1.cs
+++ b/Form1.cs
@@ -15,7 +15,7 @@ using RelaunchProcess;
using System.Timers;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;
-
+using System.Configuration;
namespace Process_Auto_Relaunch
{
@@ -47,6 +47,24 @@ namespace Process_Auto_Relaunch
public Form1()
{
InitializeComponent();
+ if (Settings.Default.upgradeSettings)
+ {
+ Debug.WriteLine("Обновление настроек.");
+ try
+ {
+ Settings.Default.Upgrade();
+ }
+ catch (ConfigurationErrorsException ex)
+ {
+ Debug.WriteLine($"Ошибка обновления настроек: {ex.Message}");
+ Settings.Default.Reset();
+ }
+ finally
+ {
+ Settings.Default.upgradeSettings = false;
+ Settings.Default.Save();
+ }
+ }
this.updateLogDelegate = this.UpdateStatus;
this.updateLogDelegate += this.SendDiscordMessage;
this.updateLogDelegate += this.HistoryLog;
diff --git a/Process Auto Relaunch.csproj b/Process Auto Relaunch.csproj
index d9789f4..4bd7346 100644
--- a/Process Auto Relaunch.csproj
+++ b/Process Auto Relaunch.csproj
@@ -82,14 +82,11 @@
true
-
- False
- .\CSharpDiscordWebhook.dll
-
packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll
+
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index a125594..fe55b4e 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -29,7 +29,7 @@ using System.Runtime.InteropServices;
// Номер сборки
// Редакция
//
-[assembly: AssemblyVersion("1.6.0.0")]
-[assembly: AssemblyFileVersion("1.6.0.0")]
+[assembly: AssemblyVersion("1.6.0.21")]
+[assembly: AssemblyFileVersion("1.6.0.21")]
-[assembly: AssemblyInformationalVersion("1.6.0.0")]
\ No newline at end of file
+[assembly: AssemblyInformationalVersion("1.6.0.21")]
\ No newline at end of file
diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs
index 7be96f2..b9a3b21 100644
--- a/Properties/Settings.Designer.cs
+++ b/Properties/Settings.Designer.cs
@@ -1,4 +1,4 @@
-//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
//
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
@@ -12,7 +12,7 @@ namespace RelaunchProcess.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -179,5 +179,17 @@ namespace RelaunchProcess.Properties {
this["closeFreezeProcess"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool upgradeSettings {
+ get {
+ return ((bool)(this["upgradeSettings"]));
+ }
+ set {
+ this["upgradeSettings"] = value;
+ }
+ }
}
}
diff --git a/Properties/Settings.settings b/Properties/Settings.settings
index aa69502..71525a6 100644
--- a/Properties/Settings.settings
+++ b/Properties/Settings.settings
@@ -41,5 +41,8 @@
True
+
+ True
+
\ No newline at end of file