diff --git a/App.config b/App.config index 0e382d6..18f8bfa 100644 --- a/App.config +++ b/App.config @@ -29,6 +29,9 @@ False + + 30 + diff --git a/Form1.Designer.cs b/Form1.Designer.cs index 260cbe2..b71d12f 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -1,4 +1,4 @@ -using System.Windows.Forms; +using System.Windows.Forms; namespace Process_Auto_Relaunch { @@ -82,6 +82,7 @@ namespace Process_Auto_Relaunch // // numericUpDown1 // + this.numericUpDown1.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::RelaunchProcess.Properties.Settings.Default, "timer", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); this.numericUpDown1.Increment = new decimal(new int[] { 5, 0, @@ -103,11 +104,7 @@ namespace Process_Auto_Relaunch this.numericUpDown1.Size = new System.Drawing.Size(72, 22); this.numericUpDown1.TabIndex = 5; this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.numericUpDown1.Value = new decimal(new int[] { - 30, - 0, - 0, - 0}); + this.numericUpDown1.Value = global::RelaunchProcess.Properties.Settings.Default.timer; // // label1 // diff --git a/Form1.cs b/Form1.cs index a02abea..7333ca4 100644 --- a/Form1.cs +++ b/Form1.cs @@ -189,11 +189,6 @@ namespace Process_Auto_Relaunch var processes = Process.GetProcessesByName(name); foreach (var process in processes) { - if (!process.Responding) - { - MessageBox.Show($" {process.ProcessName} ."); - } - Debug.WriteLine($"Found proces: {process.ProcessName}. Session Id: {process.SessionId}. Current Session Id: {sessionid}"); if (process.SessionId == sessionid) return true; diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 0b13f91..166738f 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Номер сборки // Редакция // -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs index 1221589..c388999 100644 --- a/Properties/Settings.Designer.cs +++ b/Properties/Settings.Designer.cs @@ -106,5 +106,17 @@ namespace RelaunchProcess.Properties { this["restartNow"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("30")] + public decimal timer { + get { + return ((decimal)(this["timer"])); + } + set { + this["timer"] = value; + } + } } } diff --git a/Properties/Settings.settings b/Properties/Settings.settings index 77ec372..ad9cd31 100644 --- a/Properties/Settings.settings +++ b/Properties/Settings.settings @@ -1,5 +1,5 @@  - + @@ -23,5 +23,8 @@ False + + 30 + \ No newline at end of file