diff --git a/Tidstagning/Form1.Designer.cs b/Tidstagning/Form1.Designer.cs
index 21202e6..306a586 100644
--- a/Tidstagning/Form1.Designer.cs
+++ b/Tidstagning/Form1.Designer.cs
@@ -41,7 +41,9 @@
this.txtHeader = new System.Windows.Forms.TextBox();
this.grid = new System.Windows.Forms.DataGridView();
this.Complete = new System.Windows.Forms.DataGridViewButtonColumn();
+ this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DNF = new System.Windows.Forms.DataGridViewButtonColumn();
+ this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.txtLog = new System.Windows.Forms.TableLayoutPanel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.comboSoundTime = new System.Windows.Forms.ComboBox();
@@ -49,13 +51,11 @@
this.comboComport = new System.Windows.Forms.ComboBox();
this.lblClock = new System.Windows.Forms.Label();
this.Clock = new System.Windows.Forms.Timer(this.components);
- this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit();
this.txtLog.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit();
this.SuspendLayout();
//
// btnTest
@@ -203,6 +203,13 @@
this.Complete.ReadOnly = true;
this.Complete.Text = "Mål";
//
+ // nameDataGridViewTextBoxColumn
+ //
+ this.nameDataGridViewTextBoxColumn.DataPropertyName = "SailNumber";
+ this.nameDataGridViewTextBoxColumn.HeaderText = "Sejlnummer";
+ this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn";
+ this.nameDataGridViewTextBoxColumn.ReadOnly = true;
+ //
// DNF
//
this.DNF.HeaderText = "DNF";
@@ -211,6 +218,10 @@
this.DNF.Text = "Udgået";
this.DNF.UseColumnTextForButtonValue = true;
//
+ // entryBindingSource
+ //
+ this.entryBindingSource.DataSource = typeof(Tidstagning.Entry);
+ //
// txtLog
//
this.txtLog.ColumnCount = 3;
@@ -262,7 +273,7 @@
this.comboSoundTime.Name = "comboSoundTime";
this.comboSoundTime.Size = new System.Drawing.Size(97, 21);
this.comboSoundTime.TabIndex = 26;
- this.comboSoundTime.SelectedIndexChanged += new System.EventHandler(this.comboSoundTime_SelectedIndexChanged);
+ this.comboSoundTime.SelectionChangeCommitted += new System.EventHandler(this.comboSoundTime_SelectedIndexChanged);
//
// label1
//
@@ -302,17 +313,6 @@
this.Clock.Enabled = true;
this.Clock.Tick += new System.EventHandler(this.Clock_Tick);
//
- // nameDataGridViewTextBoxColumn
- //
- this.nameDataGridViewTextBoxColumn.DataPropertyName = "SailNumber";
- this.nameDataGridViewTextBoxColumn.HeaderText = "Sejlnummer";
- this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn";
- this.nameDataGridViewTextBoxColumn.ReadOnly = true;
- //
- // entryBindingSource
- //
- this.entryBindingSource.DataSource = typeof(Tidstagning.Entry);
- //
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -330,11 +330,11 @@
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).EndInit();
this.txtLog.ResumeLayout(false);
this.txtLog.PerformLayout();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).EndInit();
this.ResumeLayout(false);
}
diff --git a/Tidstagning/Form1.cs b/Tidstagning/Form1.cs
index 5cdbbd1..ab16b9a 100644
--- a/Tidstagning/Form1.cs
+++ b/Tidstagning/Form1.cs
@@ -34,8 +34,19 @@ namespace Tidstagning
checkStartProcedure.Checked = Properties.Settings.Default.AutoStartProcedure;
+ uint signalLength = Properties.Settings.Default.SignalLength;
+ int index = comboSoundTime.Items.IndexOf(signalLength.ToString());
+ if (index == -1)
+ {
+ comboSoundTime.SelectedIndex = 0;
+ }
+ else
+ {
+ comboSoundTime.SelectedIndex = index;
+ }
+
string comport = Properties.Settings.Default.ComPort;
- int index = comboComport.Items.IndexOf(comport);
+ index = comboComport.Items.IndexOf(comport);
if (index == -1)
{
comboComport.SelectedIndex = 0;
@@ -153,6 +164,9 @@ namespace Tidstagning
private void comboSoundTime_SelectedIndexChanged(object sender, EventArgs e)
{
startprocedure.adjustSignalLength(int.Parse(comboSoundTime.SelectedItem.ToString()));
+ uint signalLength = uint.Parse(comboSoundTime.SelectedItem.ToString());
+ Properties.Settings.Default.SignalLength = signalLength;
+ Properties.Settings.Default.Save();
}
private void comboComport_SelectedIndexChanged(object sender, EventArgs e)
diff --git a/Tidstagning/Properties/Settings.Designer.cs b/Tidstagning/Properties/Settings.Designer.cs
index 7fdedd4..98984e9 100644
--- a/Tidstagning/Properties/Settings.Designer.cs
+++ b/Tidstagning/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace Tidstagning.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -46,5 +46,17 @@ namespace Tidstagning.Properties {
this["AutoStartProcedure"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("500")]
+ public uint SignalLength {
+ get {
+ return ((uint)(this["SignalLength"]));
+ }
+ set {
+ this["SignalLength"] = value;
+ }
+ }
}
}
diff --git a/Tidstagning/Properties/Settings.settings b/Tidstagning/Properties/Settings.settings
index 276cee6..964c46a 100644
--- a/Tidstagning/Properties/Settings.settings
+++ b/Tidstagning/Properties/Settings.settings
@@ -8,5 +8,8 @@
False
+
+ 500
+
\ No newline at end of file
diff --git a/Tidstagning/app.config b/Tidstagning/app.config
index a978df3..99db4d3 100644
--- a/Tidstagning/app.config
+++ b/Tidstagning/app.config
@@ -14,6 +14,9 @@
False
+
+ 500
+