Save old value time

This commit is contained in:
Vladimir
2024-05-20 19:56:41 +04:00
parent 5c48e9803f
commit 0e69ee8e09
4 changed files with 22 additions and 7 deletions

View File

@@ -29,6 +29,9 @@
<setting name="restartNow" serializeAs="String"> <setting name="restartNow" serializeAs="String">
<value>False</value> <value>False</value>
</setting> </setting>
<setting name="timer" serializeAs="String">
<value>30</value>
</setting>
</RelaunchProcess.Properties.Settings> </RelaunchProcess.Properties.Settings>
<Process_Auto_Relaunch.Properties.Settings> <Process_Auto_Relaunch.Properties.Settings>
<setting name="startProgramPath" serializeAs="String"> <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 namespace Process_Auto_Relaunch
{ {
@@ -82,6 +82,7 @@ namespace Process_Auto_Relaunch
// //
// numericUpDown1 // 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[] { this.numericUpDown1.Increment = new decimal(new int[] {
5, 5,
0, 0,
@@ -103,11 +104,7 @@ namespace Process_Auto_Relaunch
this.numericUpDown1.Size = new System.Drawing.Size(72, 22); this.numericUpDown1.Size = new System.Drawing.Size(72, 22);
this.numericUpDown1.TabIndex = 5; this.numericUpDown1.TabIndex = 5;
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown1.Value = new decimal(new int[] { this.numericUpDown1.Value = global::RelaunchProcess.Properties.Settings.Default.timer;
30,
0,
0,
0});
// //
// label1 // label1
// //

View File

@@ -106,5 +106,17 @@ namespace RelaunchProcess.Properties {
this["restartNow"] = value; 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'?> <?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 /> <Profiles />
<Settings> <Settings>
<Setting Name="startProgramPath" Type="System.String" Scope="User"> <Setting Name="startProgramPath" Type="System.String" Scope="User">
@@ -23,5 +23,8 @@
<Setting Name="restartNow" Type="System.Boolean" Scope="User"> <Setting Name="restartNow" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
<Setting Name="timer" Type="System.Decimal" Scope="User">
<Value Profile="(Default)">30</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>