From d5dcad97780a7bdac8bb52dca810ef7230727c8f Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 27 Oct 2019 20:54:15 +0100 Subject: Storing timer interval value between program runs --- spedytor/Form1.cs | 2 ++ spedytor/Properties/OptionSettings.Designer.cs | 12 ++++++++++++ spedytor/Properties/OptionSettings.settings | 3 +++ spedytor/app.config | 3 +++ 4 files changed, 20 insertions(+) diff --git a/spedytor/Form1.cs b/spedytor/Form1.cs index 1deb7f7..ce82b80 100644 --- a/spedytor/Form1.cs +++ b/spedytor/Form1.cs @@ -389,6 +389,7 @@ namespace spedytor { this.setSelectedDBs(Properties.OptionSettings.Default.DB_NAMES.Cast().ToList()); this.cSend.Checked = Properties.OptionSettings.Default.SEND_FLAG; + this.nInterval.Value = Properties.OptionSettings.Default.RUN_INTERVAL; } private void saveSettings() @@ -400,6 +401,7 @@ namespace spedytor } Properties.OptionSettings.Default.DB_NAMES.Clear(); Properties.OptionSettings.Default.DB_NAMES.AddRange(this.selectedDBs.ToArray()); + Properties.OptionSettings.Default.RUN_INTERVAL = this.nInterval.Value; Properties.OptionSettings.Default.Save(); } diff --git a/spedytor/Properties/OptionSettings.Designer.cs b/spedytor/Properties/OptionSettings.Designer.cs index 2c7f273..4c5a946 100644 --- a/spedytor/Properties/OptionSettings.Designer.cs +++ b/spedytor/Properties/OptionSettings.Designer.cs @@ -45,5 +45,17 @@ namespace spedytor.Properties { this["SEND_FLAG"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("5")] + public decimal RUN_INTERVAL { + get { + return ((decimal)(this["RUN_INTERVAL"])); + } + set { + this["RUN_INTERVAL"] = value; + } + } } } diff --git a/spedytor/Properties/OptionSettings.settings b/spedytor/Properties/OptionSettings.settings index cebc34f..7830e6b 100644 --- a/spedytor/Properties/OptionSettings.settings +++ b/spedytor/Properties/OptionSettings.settings @@ -8,5 +8,8 @@ False + + 5 + \ No newline at end of file diff --git a/spedytor/app.config b/spedytor/app.config index 882e20e..0b615b3 100644 --- a/spedytor/app.config +++ b/spedytor/app.config @@ -12,6 +12,9 @@ False + + 5 + -- cgit v1.2.3