diff options
author | emkael <emkael@tlen.pl> | 2019-10-27 20:54:15 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-10-27 20:54:15 +0100 |
commit | d5dcad97780a7bdac8bb52dca810ef7230727c8f (patch) | |
tree | eed1f64e4f382f266a64bce4fdbea8ae41d156c2 | |
parent | 0706c1f906649fde7112d5e6e428f3972bfa1dc6 (diff) |
Storing timer interval value between program runs
-rw-r--r-- | spedytor/Form1.cs | 2 | ||||
-rw-r--r-- | spedytor/Properties/OptionSettings.Designer.cs | 12 | ||||
-rw-r--r-- | spedytor/Properties/OptionSettings.settings | 3 | ||||
-rw-r--r-- | spedytor/app.config | 3 |
4 files changed, 20 insertions, 0 deletions
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<string>().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 @@ <Setting Name="SEND_FLAG" Type="System.Boolean" Scope="User"> <Value Profile="(Default)">False</Value> </Setting> + <Setting Name="RUN_INTERVAL" Type="System.Decimal" Scope="User"> + <Value Profile="(Default)">5</Value> + </Setting> </Settings> </SettingsFile>
\ 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 @@ <setting name="SEND_FLAG" serializeAs="String"> <value>False</value> </setting> + <setting name="RUN_INTERVAL" serializeAs="String"> + <value>5</value> + </setting> </spedytor.Properties.OptionSettings> <spedytor.Properties.S3Settings> <setting name="AWS_ACCESS_KEY" serializeAs="String"> |