Merge branch 'Dark-raven-lab:master' into working

This commit is contained in:
SlothDpal
2024-05-21 10:29:18 +03:00
committed by GitHub
6 changed files with 24 additions and 14 deletions

View File

@@ -29,6 +29,9 @@
<setting name="restartNow" serializeAs="String">
<value>False</value>
</setting>
<setting name="timer" serializeAs="String">
<value>30</value>
</setting>
</RelaunchProcess.Properties.Settings>
<Process_Auto_Relaunch.Properties.Settings>
<setting name="startProgramPath" serializeAs="String">

9
Form1.Designer.cs generated
View File

@@ -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
//

View File

@@ -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;

View File

@@ -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")]

View File

@@ -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;
}
}
}
}

View File

@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="WindowsFormsApp1.Properties" GeneratedClassName="Settings">
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="RelaunchProcess.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="startProgramPath" Type="System.String" Scope="User">
@@ -23,5 +23,8 @@
<Setting Name="restartNow" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="timer" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">30</Value>
</Setting>
</Settings>
</SettingsFile>