Merge pull request 'Port to VS2022+.NET6' (#14) from VS2022 into master

Reviewed-on: #14
This commit is contained in:
Jens True 2022-05-02 08:35:32 +00:00
commit 44c3d9d4f5
27 changed files with 380 additions and 884 deletions

@ -1,22 +1,25 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.30330.147 VisualStudioVersion = 17.0.31808.319
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tidstagning", "Tidstagning\Tidstagning.csproj", "{DFE0844B-9986-4623-8188-7F4A828FBB02}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tidstagning", "Tidstagning\Tidstagning.csproj", "{5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86 Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DFE0844B-9986-4623-8188-7F4A828FBB02}.Debug|x86.ActiveCfg = Debug|x86 {5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFE0844B-9986-4623-8188-7F4A828FBB02}.Debug|x86.Build.0 = Debug|x86 {5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {37B43424-1917-4948-A936-67BBE67DED35} SolutionGuid = {FF5491E4-A9E1-4EA9-86F1-3CF119710682}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

Binary file not shown.

@ -53,7 +53,8 @@
this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4);
this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5);
this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); this.tableLayoutPanel.Location = new System.Drawing.Point(10, 10);
this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.tableLayoutPanel.Name = "tableLayoutPanel"; this.tableLayoutPanel.Name = "tableLayoutPanel";
this.tableLayoutPanel.RowCount = 6; this.tableLayoutPanel.RowCount = 6;
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
@ -62,17 +63,18 @@
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel.Size = new System.Drawing.Size(417, 265); this.tableLayoutPanel.Size = new System.Drawing.Size(487, 307);
this.tableLayoutPanel.TabIndex = 0; this.tableLayoutPanel.TabIndex = 0;
// //
// logoPictureBox // logoPictureBox
// //
this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image"))); this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image")));
this.logoPictureBox.Location = new System.Drawing.Point(3, 3); this.logoPictureBox.Location = new System.Drawing.Point(4, 3);
this.logoPictureBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.logoPictureBox.Name = "logoPictureBox"; this.logoPictureBox.Name = "logoPictureBox";
this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6);
this.logoPictureBox.Size = new System.Drawing.Size(131, 259); this.logoPictureBox.Size = new System.Drawing.Size(152, 301);
this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.logoPictureBox.TabIndex = 12; this.logoPictureBox.TabIndex = 12;
this.logoPictureBox.TabStop = false; this.logoPictureBox.TabStop = false;
@ -80,11 +82,11 @@
// labelProductName // labelProductName
// //
this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelProductName.Location = new System.Drawing.Point(143, 0); this.labelProductName.Location = new System.Drawing.Point(167, 0);
this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelProductName.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); this.labelProductName.MaximumSize = new System.Drawing.Size(0, 20);
this.labelProductName.Name = "labelProductName"; this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(271, 17); this.labelProductName.Size = new System.Drawing.Size(316, 20);
this.labelProductName.TabIndex = 19; this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "Tidstagning"; this.labelProductName.Text = "Tidstagning";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -92,11 +94,11 @@
// labelVersion // labelVersion
// //
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelVersion.Location = new System.Drawing.Point(143, 26); this.labelVersion.Location = new System.Drawing.Point(167, 30);
this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelVersion.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0);
this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); this.labelVersion.MaximumSize = new System.Drawing.Size(0, 20);
this.labelVersion.Name = "labelVersion"; this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(271, 17); this.labelVersion.Size = new System.Drawing.Size(316, 20);
this.labelVersion.TabIndex = 0; this.labelVersion.TabIndex = 0;
this.labelVersion.Text = "Version 1.0"; this.labelVersion.Text = "Version 1.0";
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -104,11 +106,11 @@
// labelCopyright // labelCopyright
// //
this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCopyright.Location = new System.Drawing.Point(143, 52); this.labelCopyright.Location = new System.Drawing.Point(167, 60);
this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelCopyright.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0);
this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 20);
this.labelCopyright.Name = "labelCopyright"; this.labelCopyright.Name = "labelCopyright";
this.labelCopyright.Size = new System.Drawing.Size(271, 17); this.labelCopyright.Size = new System.Drawing.Size(316, 20);
this.labelCopyright.TabIndex = 21; this.labelCopyright.TabIndex = 21;
this.labelCopyright.Text = "Copyright © 2021"; this.labelCopyright.Text = "Copyright © 2021";
this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -116,11 +118,11 @@
// labelCompanyName // labelCompanyName
// //
this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCompanyName.Location = new System.Drawing.Point(143, 78); this.labelCompanyName.Location = new System.Drawing.Point(167, 90);
this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelCompanyName.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0);
this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17); this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 20);
this.labelCompanyName.Name = "labelCompanyName"; this.labelCompanyName.Name = "labelCompanyName";
this.labelCompanyName.Size = new System.Drawing.Size(271, 17); this.labelCompanyName.Size = new System.Drawing.Size(316, 20);
this.labelCompanyName.TabIndex = 22; this.labelCompanyName.TabIndex = 22;
this.labelCompanyName.Text = "LEAX A/S"; this.labelCompanyName.Text = "LEAX A/S";
this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -128,13 +130,13 @@
// textBoxDescription // textBoxDescription
// //
this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxDescription.Location = new System.Drawing.Point(143, 107); this.textBoxDescription.Location = new System.Drawing.Point(167, 123);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); this.textBoxDescription.Margin = new System.Windows.Forms.Padding(7, 3, 4, 3);
this.textBoxDescription.Multiline = true; this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription"; this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true; this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBoxDescription.Size = new System.Drawing.Size(271, 126); this.textBoxDescription.Size = new System.Drawing.Size(316, 147);
this.textBoxDescription.TabIndex = 23; this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false; this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = "Kontakt jens.chr.true@gmail.com\r\nhttps://jcktrue.dk"; this.textBoxDescription.Text = "Kontakt jens.chr.true@gmail.com\r\nhttps://jcktrue.dk";
@ -143,9 +145,10 @@
// //
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.okButton.Location = new System.Drawing.Point(339, 239); this.okButton.Location = new System.Drawing.Point(395, 277);
this.okButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.okButton.Name = "okButton"; this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23); this.okButton.Size = new System.Drawing.Size(88, 27);
this.okButton.TabIndex = 24; this.okButton.TabIndex = 24;
this.okButton.Text = "&OK"; this.okButton.Text = "&OK";
this.okButton.Click += new System.EventHandler(this.okButton_Click); this.okButton.Click += new System.EventHandler(this.okButton_Click);
@ -153,15 +156,16 @@
// AboutBox // AboutBox
// //
this.AcceptButton = this.okButton; this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(435, 283); this.ClientSize = new System.Drawing.Size(507, 327);
this.Controls.Add(this.tableLayoutPanel); this.Controls.Add(this.tableLayoutPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "AboutBox"; this.Name = "AboutBox";
this.Padding = new System.Windows.Forms.Padding(9); this.Padding = new System.Windows.Forms.Padding(10);
this.ShowIcon = false; this.ShowIcon = false;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;

@ -32,7 +32,7 @@ namespace Tidstagning
return titleAttribute.Title; return titleAttribute.Title;
} }
} }
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location);
} }
} }
@ -40,7 +40,16 @@ namespace Tidstagning
{ {
get get
{ {
return Assembly.GetExecutingAssembly().GetName().Version.ToString(); Version? version = Assembly.GetExecutingAssembly().GetName().Version;
if (version is not null)
{
return version.ToString();
}
else
{
return "N/A";
}
} }
} }

@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <root>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">

@ -48,25 +48,26 @@ namespace Tidstagning
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.comboBoxBaudRate = new System.Windows.Forms.ComboBox(); this.comboBoxBaudRate = new System.Windows.Forms.ComboBox();
this.panelRelaySettings = new System.Windows.Forms.Panel(); this.panelRelaySettings = new System.Windows.Forms.Panel();
this.textBox3 = new System.Windows.Forms.TextBox();
this.panelRelaySettings.SuspendLayout(); this.panelRelaySettings.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(4, 12); this.label1.Location = new System.Drawing.Point(5, 14);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(131, 13); this.label1.Size = new System.Drawing.Size(148, 15);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "Select folder for input files."; this.label1.Text = "Select folder for input files.";
// //
// checkBoxRelay // checkBoxRelay
// //
this.checkBoxRelay.AutoSize = true; this.checkBoxRelay.AutoSize = true;
this.checkBoxRelay.Location = new System.Drawing.Point(7, 98); this.checkBoxRelay.Location = new System.Drawing.Point(8, 113);
this.checkBoxRelay.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.checkBoxRelay.Name = "checkBoxRelay"; this.checkBoxRelay.Name = "checkBoxRelay";
this.checkBoxRelay.Size = new System.Drawing.Size(95, 17); this.checkBoxRelay.Size = new System.Drawing.Size(97, 19);
this.checkBoxRelay.TabIndex = 2; this.checkBoxRelay.TabIndex = 2;
this.checkBoxRelay.Text = "Enable Relay?"; this.checkBoxRelay.Text = "Enable Relay?";
this.checkBoxRelay.UseVisualStyleBackColor = true; this.checkBoxRelay.UseVisualStyleBackColor = true;
@ -78,9 +79,10 @@ namespace Tidstagning
// //
// buttonFolderOutput // buttonFolderOutput
// //
this.buttonFolderOutput.Location = new System.Drawing.Point(314, 72); this.buttonFolderOutput.Location = new System.Drawing.Point(366, 83);
this.buttonFolderOutput.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.buttonFolderOutput.Name = "buttonFolderOutput"; this.buttonFolderOutput.Name = "buttonFolderOutput";
this.buttonFolderOutput.Size = new System.Drawing.Size(75, 23); this.buttonFolderOutput.Size = new System.Drawing.Size(88, 27);
this.buttonFolderOutput.TabIndex = 3; this.buttonFolderOutput.TabIndex = 3;
this.buttonFolderOutput.Text = "Pick output folder"; this.buttonFolderOutput.Text = "Pick output folder";
this.buttonFolderOutput.UseVisualStyleBackColor = true; this.buttonFolderOutput.UseVisualStyleBackColor = true;
@ -92,9 +94,10 @@ namespace Tidstagning
// //
// buttonFolderInput // buttonFolderInput
// //
this.buttonFolderInput.Location = new System.Drawing.Point(314, 28); this.buttonFolderInput.Location = new System.Drawing.Point(366, 32);
this.buttonFolderInput.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.buttonFolderInput.Name = "buttonFolderInput"; this.buttonFolderInput.Name = "buttonFolderInput";
this.buttonFolderInput.Size = new System.Drawing.Size(75, 23); this.buttonFolderInput.Size = new System.Drawing.Size(88, 27);
this.buttonFolderInput.TabIndex = 4; this.buttonFolderInput.TabIndex = 4;
this.buttonFolderInput.Text = "Pick input folder"; this.buttonFolderInput.Text = "Pick input folder";
this.buttonFolderInput.UseVisualStyleBackColor = true; this.buttonFolderInput.UseVisualStyleBackColor = true;
@ -102,24 +105,27 @@ namespace Tidstagning
// //
// textPathInput // textPathInput
// //
this.textPathInput.Location = new System.Drawing.Point(7, 28); this.textPathInput.Location = new System.Drawing.Point(8, 32);
this.textPathInput.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.textPathInput.Name = "textPathInput"; this.textPathInput.Name = "textPathInput";
this.textPathInput.Size = new System.Drawing.Size(301, 20); this.textPathInput.Size = new System.Drawing.Size(350, 23);
this.textPathInput.TabIndex = 5; this.textPathInput.TabIndex = 5;
// //
// textPathOutput // textPathOutput
// //
this.textPathOutput.Location = new System.Drawing.Point(7, 72); this.textPathOutput.Location = new System.Drawing.Point(8, 83);
this.textPathOutput.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.textPathOutput.Name = "textPathOutput"; this.textPathOutput.Name = "textPathOutput";
this.textPathOutput.Size = new System.Drawing.Size(301, 20); this.textPathOutput.Size = new System.Drawing.Size(350, 23);
this.textPathOutput.TabIndex = 6; this.textPathOutput.TabIndex = 6;
// //
// buttonSave // buttonSave
// //
this.buttonSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonSave.Location = new System.Drawing.Point(318, 280); this.buttonSave.Location = new System.Drawing.Point(371, 323);
this.buttonSave.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.buttonSave.Name = "buttonSave"; this.buttonSave.Name = "buttonSave";
this.buttonSave.Size = new System.Drawing.Size(75, 23); this.buttonSave.Size = new System.Drawing.Size(88, 27);
this.buttonSave.TabIndex = 7; this.buttonSave.TabIndex = 7;
this.buttonSave.Text = "Save"; this.buttonSave.Text = "Save";
this.buttonSave.UseVisualStyleBackColor = true; this.buttonSave.UseVisualStyleBackColor = true;
@ -129,9 +135,10 @@ namespace Tidstagning
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(13, 280); this.buttonCancel.Location = new System.Drawing.Point(15, 323);
this.buttonCancel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.Size = new System.Drawing.Size(88, 27);
this.buttonCancel.TabIndex = 8; this.buttonCancel.TabIndex = 8;
this.buttonCancel.Text = "Cancel"; this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
@ -140,42 +147,46 @@ namespace Tidstagning
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(4, 56); this.label2.Location = new System.Drawing.Point(5, 65);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(138, 13); this.label2.Size = new System.Drawing.Size(156, 15);
this.label2.TabIndex = 9; this.label2.TabIndex = 9;
this.label2.Text = "Select folder for output files."; this.label2.Text = "Select folder for output files.";
// //
// textBox2 // textBox2
// //
this.textBox2.Location = new System.Drawing.Point(259, 17); this.textBox2.Location = new System.Drawing.Point(299, 18);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.textBox2.Name = "textBox2"; this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 20); this.textBox2.Size = new System.Drawing.Size(116, 23);
this.textBox2.TabIndex = 5; this.textBox2.TabIndex = 5;
// //
// textBox1 // textBox1
// //
this.textBox1.Location = new System.Drawing.Point(141, 17); this.textBox1.Location = new System.Drawing.Point(161, 18);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.textBox1.Name = "textBox1"; this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20); this.textBox1.Size = new System.Drawing.Size(116, 23);
this.textBox1.TabIndex = 4; this.textBox1.TabIndex = 4;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
// //
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(256, 0); this.label5.Location = new System.Drawing.Point(299, 0);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(71, 13); this.label5.Size = new System.Drawing.Size(84, 15);
this.label5.TabIndex = 3; this.label5.TabIndex = 3;
this.label5.Text = "Off Command"; this.label5.Text = "Off Command";
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(138, 0); this.label4.Location = new System.Drawing.Point(161, 0);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(71, 13); this.label4.Size = new System.Drawing.Size(83, 15);
this.label4.TabIndex = 2; this.label4.TabIndex = 2;
this.label4.Text = "On Command"; this.label4.Text = "On Command";
// //
@ -183,8 +194,9 @@ namespace Tidstagning
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(2, 0); this.label3.Location = new System.Drawing.Point(2, 0);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(50, 13); this.label3.Size = new System.Drawing.Size(54, 15);
this.label3.TabIndex = 1; this.label3.TabIndex = 1;
this.label3.Text = "Baudrate"; this.label3.Text = "Baudrate";
// //
@ -206,14 +218,14 @@ namespace Tidstagning
"230400", "230400",
"460800", "460800",
"921600"}); "921600"});
this.comboBoxBaudRate.Location = new System.Drawing.Point(0, 16); this.comboBoxBaudRate.Location = new System.Drawing.Point(0, 18);
this.comboBoxBaudRate.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.comboBoxBaudRate.Name = "comboBoxBaudRate"; this.comboBoxBaudRate.Name = "comboBoxBaudRate";
this.comboBoxBaudRate.Size = new System.Drawing.Size(121, 21); this.comboBoxBaudRate.Size = new System.Drawing.Size(140, 23);
this.comboBoxBaudRate.TabIndex = 0; this.comboBoxBaudRate.TabIndex = 0;
// //
// panelRelaySettings // panelRelaySettings
// //
this.panelRelaySettings.Controls.Add(this.textBox3);
this.panelRelaySettings.Controls.Add(this.textBox2); this.panelRelaySettings.Controls.Add(this.textBox2);
this.panelRelaySettings.Controls.Add(this.label5); this.panelRelaySettings.Controls.Add(this.label5);
this.panelRelaySettings.Controls.Add(this.textBox1); this.panelRelaySettings.Controls.Add(this.textBox1);
@ -221,25 +233,19 @@ namespace Tidstagning
this.panelRelaySettings.Controls.Add(this.label3); this.panelRelaySettings.Controls.Add(this.label3);
this.panelRelaySettings.Controls.Add(this.label4); this.panelRelaySettings.Controls.Add(this.label4);
this.panelRelaySettings.Enabled = false; this.panelRelaySettings.Enabled = false;
this.panelRelaySettings.Location = new System.Drawing.Point(7, 121); this.panelRelaySettings.Location = new System.Drawing.Point(8, 140);
this.panelRelaySettings.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.panelRelaySettings.Name = "panelRelaySettings"; this.panelRelaySettings.Name = "panelRelaySettings";
this.panelRelaySettings.Size = new System.Drawing.Size(386, 68); this.panelRelaySettings.Size = new System.Drawing.Size(450, 60);
this.panelRelaySettings.TabIndex = 11; this.panelRelaySettings.TabIndex = 11;
// //
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(20, 44);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(100, 20);
this.textBox3.TabIndex = 6;
//
// ConfigUI // ConfigUI
// //
this.AcceptButton = this.buttonSave; this.AcceptButton = this.buttonSave;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel; this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(405, 315); this.ClientSize = new System.Drawing.Size(472, 363);
this.Controls.Add(this.panelRelaySettings); this.Controls.Add(this.panelRelaySettings);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonCancel);
@ -252,6 +258,7 @@ namespace Tidstagning
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "ConfigUI"; this.Name = "ConfigUI";
@ -284,6 +291,5 @@ namespace Tidstagning
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox comboBoxBaudRate; private System.Windows.Forms.ComboBox comboBoxBaudRate;
private System.Windows.Forms.Panel panelRelaySettings; private System.Windows.Forms.Panel panelRelaySettings;
private System.Windows.Forms.TextBox textBox3;
} }
} }

@ -12,10 +12,6 @@ namespace Tidstagning
{ {
public partial class ConfigUI : Form public partial class ConfigUI : Form
{ {
private String OnCommand = "";
private String OffCommand = "";
public ConfigUI() public ConfigUI()
{ {
InitializeComponent(); InitializeComponent();
@ -46,19 +42,7 @@ namespace Tidstagning
private void checkBoxRelay_CheckedChanged(object sender, EventArgs e) private void checkBoxRelay_CheckedChanged(object sender, EventArgs e)
{ {
panelRelaySettings.Enabled = checkBoxRelay.Enabled; panelRelaySettings.Enabled = checkBoxRelay.Checked;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
try
{
textBox3.Text = Regex.Unescape(textBox1.Text);
}
catch
{
textBox3.Text = "";
}
} }
} }
} }

@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <root>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">

@ -1,16 +0,0 @@
Opus,1
Cartan,13
Dixi,26
Grace,28
Sanus,19
Blup,12
Fønix,16
Krone 2,99
Den sorte enke,38
Havfruen,18
Nicoline,66
Mamse,99
Mallue,11
Buggabo,9
Marie,2
Splinten,11

@ -41,7 +41,9 @@
this.txtHeader = new System.Windows.Forms.TextBox(); this.txtHeader = new System.Windows.Forms.TextBox();
this.grid = new System.Windows.Forms.DataGridView(); this.grid = new System.Windows.Forms.DataGridView();
this.Complete = new System.Windows.Forms.DataGridViewButtonColumn(); this.Complete = new System.Windows.Forms.DataGridViewButtonColumn();
this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DNF = new System.Windows.Forms.DataGridViewButtonColumn(); this.DNF = new System.Windows.Forms.DataGridViewButtonColumn();
this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.txtLog = new System.Windows.Forms.TableLayoutPanel(); this.txtLog = new System.Windows.Forms.TableLayoutPanel();
this.lblClock = new System.Windows.Forms.Label(); this.lblClock = new System.Windows.Forms.Label();
this.flowLayoutPanelConfiguration = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanelConfiguration = new System.Windows.Forms.FlowLayoutPanel();
@ -51,23 +53,22 @@
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.buttonConfig = new System.Windows.Forms.Button(); this.buttonConfig = new System.Windows.Forms.Button();
this.Clock = new System.Windows.Forms.Timer(this.components); 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(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit();
this.txtLog.SuspendLayout(); this.txtLog.SuspendLayout();
this.flowLayoutPanelConfiguration.SuspendLayout(); this.flowLayoutPanelConfiguration.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericSignalLength)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericSignalLength)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnTest // btnTest
// //
this.btnTest.Dock = System.Windows.Forms.DockStyle.Bottom; this.btnTest.Dock = System.Windows.Forms.DockStyle.Bottom;
this.btnTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); this.btnTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.btnTest.Location = new System.Drawing.Point(0, 464); this.btnTest.Location = new System.Drawing.Point(0, 542);
this.btnTest.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.btnTest.Name = "btnTest"; this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(264, 37); this.btnTest.Size = new System.Drawing.Size(307, 43);
this.btnTest.TabIndex = 3; this.btnTest.TabIndex = 3;
this.btnTest.Text = "HORN 🔊"; this.btnTest.Text = "HORN 🔊";
this.btnTest.UseVisualStyleBackColor = true; this.btnTest.UseVisualStyleBackColor = true;
@ -75,9 +76,10 @@
// //
// buttonHelp // buttonHelp
// //
this.buttonHelp.Location = new System.Drawing.Point(3, 56); this.buttonHelp.Location = new System.Drawing.Point(4, 61);
this.buttonHelp.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.buttonHelp.Name = "buttonHelp"; this.buttonHelp.Name = "buttonHelp";
this.buttonHelp.Size = new System.Drawing.Size(75, 23); this.buttonHelp.Size = new System.Drawing.Size(88, 27);
this.buttonHelp.TabIndex = 14; this.buttonHelp.TabIndex = 14;
this.buttonHelp.Text = "Hjælp mm."; this.buttonHelp.Text = "Hjælp mm.";
this.buttonHelp.UseVisualStyleBackColor = true; this.buttonHelp.UseVisualStyleBackColor = true;
@ -86,13 +88,14 @@
// txtDebug // txtDebug
// //
this.txtDebug.Dock = System.Windows.Forms.DockStyle.Fill; this.txtDebug.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtDebug.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); this.txtDebug.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtDebug.Location = new System.Drawing.Point(273, 551); this.txtDebug.Location = new System.Drawing.Point(319, 635);
this.txtDebug.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.txtDebug.Multiline = true; this.txtDebug.Multiline = true;
this.txtDebug.Name = "txtDebug"; this.txtDebug.Name = "txtDebug";
this.txtDebug.ReadOnly = true; this.txtDebug.ReadOnly = true;
this.txtDebug.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtDebug.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtDebug.Size = new System.Drawing.Size(489, 140); this.txtDebug.Size = new System.Drawing.Size(569, 163);
this.txtDebug.TabIndex = 10; this.txtDebug.TabIndex = 10;
// //
// panel1 // panel1
@ -103,31 +106,34 @@
this.panel1.Controls.Add(this.btnStart); this.panel1.Controls.Add(this.btnStart);
this.panel1.Controls.Add(this.btnStop); this.panel1.Controls.Add(this.btnStop);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 44); this.panel1.Location = new System.Drawing.Point(4, 44);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(264, 501); this.panel1.Size = new System.Drawing.Size(307, 585);
this.panel1.TabIndex = 8; this.panel1.TabIndex = 8;
// //
// textStartProcedure // textStartProcedure
// //
this.textStartProcedure.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.textStartProcedure.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.textStartProcedure.Font = new System.Drawing.Font("Lucida Sans Typewriter", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textStartProcedure.Font = new System.Drawing.Font("Lucida Sans Typewriter", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.textStartProcedure.Location = new System.Drawing.Point(3, 137); this.textStartProcedure.Location = new System.Drawing.Point(4, 158);
this.textStartProcedure.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.textStartProcedure.Multiline = true; this.textStartProcedure.Multiline = true;
this.textStartProcedure.Name = "textStartProcedure"; this.textStartProcedure.Name = "textStartProcedure";
this.textStartProcedure.ReadOnly = true; this.textStartProcedure.ReadOnly = true;
this.textStartProcedure.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.textStartProcedure.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textStartProcedure.Size = new System.Drawing.Size(258, 321); this.textStartProcedure.Size = new System.Drawing.Size(300, 377);
this.textStartProcedure.TabIndex = 10; this.textStartProcedure.TabIndex = 10;
this.textStartProcedure.WordWrap = false; this.textStartProcedure.WordWrap = false;
// //
// checkStartProcedure // checkStartProcedure
// //
this.checkStartProcedure.AutoSize = true; this.checkStartProcedure.AutoSize = true;
this.checkStartProcedure.Location = new System.Drawing.Point(7, 114); this.checkStartProcedure.Location = new System.Drawing.Point(8, 132);
this.checkStartProcedure.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.checkStartProcedure.Name = "checkStartProcedure"; this.checkStartProcedure.Name = "checkStartProcedure";
this.checkStartProcedure.Size = new System.Drawing.Size(155, 17); this.checkStartProcedure.Size = new System.Drawing.Size(171, 19);
this.checkStartProcedure.TabIndex = 8; this.checkStartProcedure.TabIndex = 8;
this.checkStartProcedure.Text = "Automatisk Start Procedure"; this.checkStartProcedure.Text = "Automatisk Start Procedure";
this.checkStartProcedure.UseVisualStyleBackColor = true; this.checkStartProcedure.UseVisualStyleBackColor = true;
@ -135,10 +141,11 @@
// //
// btnStart // btnStart
// //
this.btnStart.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); this.btnStart.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.btnStart.Location = new System.Drawing.Point(3, 3); this.btnStart.Location = new System.Drawing.Point(4, 3);
this.btnStart.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.btnStart.Name = "btnStart"; this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(258, 37); this.btnStart.Size = new System.Drawing.Size(301, 43);
this.btnStart.TabIndex = 4; this.btnStart.TabIndex = 4;
this.btnStart.Text = "Start ▶"; this.btnStart.Text = "Start ▶";
this.btnStart.UseVisualStyleBackColor = true; this.btnStart.UseVisualStyleBackColor = true;
@ -147,10 +154,11 @@
// btnStop // btnStop
// //
this.btnStop.Enabled = false; this.btnStop.Enabled = false;
this.btnStop.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); this.btnStop.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.btnStop.Location = new System.Drawing.Point(3, 46); this.btnStop.Location = new System.Drawing.Point(4, 53);
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.btnStop.Name = "btnStop"; this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(258, 40); this.btnStop.Size = new System.Drawing.Size(301, 46);
this.btnStop.TabIndex = 6; this.btnStop.TabIndex = 6;
this.btnStop.Text = "Stop ■"; this.btnStop.Text = "Stop ■";
this.btnStop.UseVisualStyleBackColor = true; this.btnStop.UseVisualStyleBackColor = true;
@ -159,10 +167,11 @@
// txtHeader // txtHeader
// //
this.txtHeader.Dock = System.Windows.Forms.DockStyle.Fill; this.txtHeader.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); this.txtHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtHeader.Location = new System.Drawing.Point(3, 3); this.txtHeader.Location = new System.Drawing.Point(4, 3);
this.txtHeader.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.txtHeader.Name = "txtHeader"; this.txtHeader.Name = "txtHeader";
this.txtHeader.Size = new System.Drawing.Size(264, 35); this.txtHeader.Size = new System.Drawing.Size(307, 35);
this.txtHeader.TabIndex = 3; this.txtHeader.TabIndex = 3;
// //
// grid // grid
@ -183,17 +192,18 @@
this.grid.DataSource = this.entryBindingSource; this.grid.DataSource = this.entryBindingSource;
this.grid.Dock = System.Windows.Forms.DockStyle.Fill; this.grid.Dock = System.Windows.Forms.DockStyle.Fill;
this.grid.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.grid.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.grid.Location = new System.Drawing.Point(273, 3); this.grid.Location = new System.Drawing.Point(319, 3);
this.grid.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.grid.MultiSelect = false; this.grid.MultiSelect = false;
this.grid.Name = "grid"; this.grid.Name = "grid";
this.grid.ReadOnly = true; this.grid.ReadOnly = true;
this.grid.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; this.grid.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
this.txtLog.SetRowSpan(this.grid, 2); this.txtLog.SetRowSpan(this.grid, 2);
this.grid.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.grid.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.grid.RowTemplate.Height = 30; this.grid.RowTemplate.Height = 30;
this.grid.RowTemplate.ReadOnly = true; this.grid.RowTemplate.ReadOnly = true;
this.grid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.grid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.grid.Size = new System.Drawing.Size(1039, 542); this.grid.Size = new System.Drawing.Size(1211, 626);
this.grid.TabIndex = 0; this.grid.TabIndex = 0;
this.grid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grid_Click); this.grid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grid_Click);
this.grid.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.grid_CellMouseEnter); this.grid.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.grid_CellMouseEnter);
@ -208,6 +218,13 @@
this.Complete.ReadOnly = true; this.Complete.ReadOnly = true;
this.Complete.Text = "Mål"; this.Complete.Text = "Mål";
// //
// nameDataGridViewTextBoxColumn
//
this.nameDataGridViewTextBoxColumn.DataPropertyName = "SailNumber";
this.nameDataGridViewTextBoxColumn.HeaderText = "Sejlnummer";
this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn";
this.nameDataGridViewTextBoxColumn.ReadOnly = true;
//
// DNF // DNF
// //
this.DNF.HeaderText = "DNF"; this.DNF.HeaderText = "DNF";
@ -216,12 +233,16 @@
this.DNF.Text = "Udgået"; this.DNF.Text = "Udgået";
this.DNF.UseColumnTextForButtonValue = true; this.DNF.UseColumnTextForButtonValue = true;
// //
// entryBindingSource
//
this.entryBindingSource.DataSource = typeof(Tidstagning.Entry);
//
// txtLog // txtLog
// //
this.txtLog.ColumnCount = 3; this.txtLog.ColumnCount = 3;
this.txtLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 270F)); this.txtLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 315F));
this.txtLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.txtLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.txtLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 550F)); this.txtLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 642F));
this.txtLog.Controls.Add(this.grid, 1, 0); this.txtLog.Controls.Add(this.grid, 1, 0);
this.txtLog.Controls.Add(this.txtHeader, 0, 0); this.txtLog.Controls.Add(this.txtHeader, 0, 0);
this.txtLog.Controls.Add(this.txtDebug, 1, 2); this.txtLog.Controls.Add(this.txtDebug, 1, 2);
@ -230,13 +251,14 @@
this.txtLog.Controls.Add(this.flowLayoutPanelConfiguration, 0, 2); this.txtLog.Controls.Add(this.flowLayoutPanelConfiguration, 0, 2);
this.txtLog.Dock = System.Windows.Forms.DockStyle.Fill; this.txtLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtLog.Location = new System.Drawing.Point(0, 0); this.txtLog.Location = new System.Drawing.Point(0, 0);
this.txtLog.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.txtLog.Name = "txtLog"; this.txtLog.Name = "txtLog";
this.txtLog.RowCount = 3; this.txtLog.RowCount = 3;
this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 77.77778F)); this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 77.77778F));
this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 22.22222F)); this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 22.22222F));
this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
this.txtLog.Size = new System.Drawing.Size(1315, 694); this.txtLog.Size = new System.Drawing.Size(1534, 801);
this.txtLog.TabIndex = 8; this.txtLog.TabIndex = 8;
// //
// lblClock // lblClock
@ -245,10 +267,11 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.lblClock.AutoSize = true; this.lblClock.AutoSize = true;
this.lblClock.Font = new System.Drawing.Font("Lucida Sans Typewriter", 72F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblClock.Font = new System.Drawing.Font("Lucida Sans Typewriter", 72F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.lblClock.Location = new System.Drawing.Point(768, 548); this.lblClock.Location = new System.Drawing.Point(896, 632);
this.lblClock.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblClock.Name = "lblClock"; this.lblClock.Name = "lblClock";
this.lblClock.Size = new System.Drawing.Size(544, 146); this.lblClock.Size = new System.Drawing.Size(634, 169);
this.lblClock.TabIndex = 16; this.lblClock.TabIndex = 16;
this.lblClock.Text = "--:--:--"; this.lblClock.Text = "--:--:--";
this.lblClock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblClock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -262,9 +285,10 @@
this.flowLayoutPanelConfiguration.Controls.Add(this.buttonHelp); this.flowLayoutPanelConfiguration.Controls.Add(this.buttonHelp);
this.flowLayoutPanelConfiguration.Controls.Add(this.buttonConfig); this.flowLayoutPanelConfiguration.Controls.Add(this.buttonConfig);
this.flowLayoutPanelConfiguration.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanelConfiguration.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanelConfiguration.Location = new System.Drawing.Point(3, 551); this.flowLayoutPanelConfiguration.Location = new System.Drawing.Point(4, 635);
this.flowLayoutPanelConfiguration.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.flowLayoutPanelConfiguration.Name = "flowLayoutPanelConfiguration"; this.flowLayoutPanelConfiguration.Name = "flowLayoutPanelConfiguration";
this.flowLayoutPanelConfiguration.Size = new System.Drawing.Size(264, 140); this.flowLayoutPanelConfiguration.Size = new System.Drawing.Size(307, 163);
this.flowLayoutPanelConfiguration.TabIndex = 15; this.flowLayoutPanelConfiguration.TabIndex = 15;
// //
// numericSignalLength // numericSignalLength
@ -274,7 +298,8 @@
0, 0,
0, 0,
0}); 0});
this.numericSignalLength.Location = new System.Drawing.Point(3, 3); this.numericSignalLength.Location = new System.Drawing.Point(4, 3);
this.numericSignalLength.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.numericSignalLength.Maximum = new decimal(new int[] { this.numericSignalLength.Maximum = new decimal(new int[] {
5000, 5000,
0, 0,
@ -286,7 +311,7 @@
0, 0,
0}); 0});
this.numericSignalLength.Name = "numericSignalLength"; this.numericSignalLength.Name = "numericSignalLength";
this.numericSignalLength.Size = new System.Drawing.Size(121, 20); this.numericSignalLength.Size = new System.Drawing.Size(141, 23);
this.numericSignalLength.TabIndex = 30; this.numericSignalLength.TabIndex = 30;
this.numericSignalLength.Value = new decimal(new int[] { this.numericSignalLength.Value = new decimal(new int[] {
500, 500,
@ -298,8 +323,9 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label1.Location = new System.Drawing.Point(130, 0); this.label1.Location = new System.Drawing.Point(153, 0);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(121, 24); this.label1.Size = new System.Drawing.Size(121, 24);
this.label1.TabIndex = 27; this.label1.TabIndex = 27;
@ -309,17 +335,19 @@
// //
this.comboComport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboComport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboComport.FormattingEnabled = true; this.comboComport.FormattingEnabled = true;
this.comboComport.Location = new System.Drawing.Point(3, 29); this.comboComport.Location = new System.Drawing.Point(4, 32);
this.comboComport.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.comboComport.Name = "comboComport"; this.comboComport.Name = "comboComport";
this.comboComport.Size = new System.Drawing.Size(121, 21); this.comboComport.Size = new System.Drawing.Size(140, 23);
this.comboComport.TabIndex = 28; this.comboComport.TabIndex = 28;
this.comboComport.SelectedIndexChanged += new System.EventHandler(this.comboComport_SelectedIndexChanged); this.comboComport.SelectedIndexChanged += new System.EventHandler(this.comboComport_SelectedIndexChanged);
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label2.Location = new System.Drawing.Point(130, 26); this.label2.Location = new System.Drawing.Point(152, 29);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(88, 24); this.label2.Size = new System.Drawing.Size(88, 24);
this.label2.TabIndex = 31; this.label2.TabIndex = 31;
@ -327,13 +355,13 @@
// //
// buttonConfig // buttonConfig
// //
this.buttonConfig.Location = new System.Drawing.Point(84, 56); this.buttonConfig.Location = new System.Drawing.Point(100, 61);
this.buttonConfig.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.buttonConfig.Name = "buttonConfig"; this.buttonConfig.Name = "buttonConfig";
this.buttonConfig.Size = new System.Drawing.Size(90, 23); this.buttonConfig.Size = new System.Drawing.Size(105, 27);
this.buttonConfig.TabIndex = 29; this.buttonConfig.TabIndex = 29;
this.buttonConfig.Text = "Konfiguration"; this.buttonConfig.Text = "Konfiguration";
this.buttonConfig.UseVisualStyleBackColor = true; this.buttonConfig.UseVisualStyleBackColor = true;
this.buttonConfig.Visible = false;
this.buttonConfig.Click += new System.EventHandler(this.buttonConfig_Click); this.buttonConfig.Click += new System.EventHandler(this.buttonConfig_Click);
// //
// Clock // Clock
@ -341,27 +369,17 @@
this.Clock.Enabled = true; this.Clock.Enabled = true;
this.Clock.Tick += new System.EventHandler(this.Clock_Tick); 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);
//
// MainUI // MainUI
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true; this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(1315, 694); this.ClientSize = new System.Drawing.Size(1534, 801);
this.Controls.Add(this.txtLog); this.Controls.Add(this.txtLog);
this.DoubleBuffered = true; this.DoubleBuffered = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.Name = "MainUI"; this.Name = "MainUI";
this.Text = "Tidstagning"; this.Text = "Tidstagning";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
@ -369,12 +387,12 @@
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).EndInit();
this.txtLog.ResumeLayout(false); this.txtLog.ResumeLayout(false);
this.txtLog.PerformLayout(); this.txtLog.PerformLayout();
this.flowLayoutPanelConfiguration.ResumeLayout(false); this.flowLayoutPanelConfiguration.ResumeLayout(false);
this.flowLayoutPanelConfiguration.PerformLayout(); this.flowLayoutPanelConfiguration.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericSignalLength)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericSignalLength)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }

@ -11,15 +11,15 @@ namespace Tidstagning
{ {
}; };
ResultList liste; ResultList? liste;
Relay horn; Relay? horn;
Procedure startprocedure = new Procedure(); Procedure startprocedure = new Procedure();
public MainUI() public MainUI(bool ShowConfig = false)
{ {
InitializeComponent(); InitializeComponent();
System.IO.StreamReader deltager_handle = new System.IO.StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + "Deltager.txt"); System.IO.StreamReader deltager_handle = new System.IO.StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + "Deltager.txt");
string deltager; string? deltager;
while ((deltager = deltager_handle.ReadLine()) != null) while ((deltager = deltager_handle.ReadLine()) != null)
{ {
string[] dele = deltager.Split(','); string[] dele = deltager.Split(',');
@ -45,6 +45,9 @@ namespace Tidstagning
{ {
comboComport.SelectedIndex = index; comboComport.SelectedIndex = index;
} }
buttonConfig.Visible = ShowConfig;
} }
@ -74,6 +77,7 @@ namespace Tidstagning
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["DNF"].Index) if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["DNF"].Index)
{ {
entries[e.RowIndex].DNF(); entries[e.RowIndex].DNF();
if(liste is not null)
liste.WriteDNF(entries[e.RowIndex]); liste.WriteDNF(entries[e.RowIndex]);
grid.ClearSelection(); grid.ClearSelection();
@ -83,12 +87,14 @@ namespace Tidstagning
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["Complete"].Index) if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["Complete"].Index)
{ {
entries[e.RowIndex].Complete(); entries[e.RowIndex].Complete();
if(liste is not null)
liste.WriteComplete(entries[e.RowIndex]); liste.WriteComplete(entries[e.RowIndex]);
grid.ClearSelection(); grid.ClearSelection();
grid.CurrentCell = null; grid.CurrentCell = null;
entries.RemoveAt(e.RowIndex); entries.RemoveAt(e.RowIndex);
if(horn is not null)
horn.Sound((uint)numericSignalLength.Value); horn.Sound((uint)numericSignalLength.Value);
} }
grid.Refresh(); grid.Refresh();
@ -110,6 +116,7 @@ namespace Tidstagning
if (checkStartProcedure.Checked) if (checkStartProcedure.Checked)
{ {
liste.Write("Automatisk Start Procedure er aktiv."); liste.Write("Automatisk Start Procedure er aktiv.");
if(horn is not null)
startprocedure.setObjects(horn, liste); startprocedure.setObjects(horn, liste);
} }
else else
@ -123,8 +130,11 @@ namespace Tidstagning
{ {
btnStop.Enabled = false; btnStop.Enabled = false;
btnStart.Enabled = true; btnStart.Enabled = true;
if (liste is not null)
{
liste.WriteFooter(); liste.WriteFooter();
liste.Close(); liste.Close();
}
checkStartProcedure.Enabled = true; checkStartProcedure.Enabled = true;
flowLayoutPanelConfiguration.Enabled = true; flowLayoutPanelConfiguration.Enabled = true;
} }
@ -137,6 +147,7 @@ namespace Tidstagning
private void btnTest_Click(object sender, EventArgs e) private void btnTest_Click(object sender, EventArgs e)
{ {
if(horn is not null)
horn.Sound((uint)numericSignalLength.Value); horn.Sound((uint)numericSignalLength.Value);
} }
@ -151,7 +162,7 @@ namespace Tidstagning
private void comboComport_SelectedIndexChanged(object sender, EventArgs e) private void comboComport_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (comboComport.Items.Count != 0) if (comboComport is not null && comboComport.Items.Count != 0 && comboComport.SelectedItem is not null)
{ {
horn = new Relay(comboComport.SelectedItem.ToString()); horn = new Relay(comboComport.SelectedItem.ToString());
Properties.Settings.Default.ComPort = comboComport.SelectedItem.ToString(); Properties.Settings.Default.ComPort = comboComport.SelectedItem.ToString();

@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <root>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">

@ -2,17 +2,16 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Threading; using System.Threading;
namespace Tidstagning namespace Tidstagning
{ {
class Procedure class Procedure
{ {
Relay horn; Relay? horn;
ResultList log; ResultList? log;
List<DateTime> signaler; List<DateTime> signaler;
uint signalLength = 500; uint signalLength = 500;
Timer timer; Timer? delayTimer;
Int16 idx = 0; Int16 idx = 0;
public Procedure() public Procedure()
@ -23,7 +22,7 @@ namespace Tidstagning
public void ReadFile(string file) public void ReadFile(string file)
{ {
System.IO.StreamReader procedure_handle = new System.IO.StreamReader(file); System.IO.StreamReader procedure_handle = new System.IO.StreamReader(file);
string line; string? line;
while ((line = procedure_handle.ReadLine()) != null) while ((line = procedure_handle.ReadLine()) != null)
{ {
addEntry(line); addEntry(line);
@ -77,8 +76,8 @@ namespace Tidstagning
{ {
signaler = new List<DateTime>(); signaler = new List<DateTime>();
idx = 0; idx = 0;
if (timer != null) if (delayTimer != null)
timer.Dispose(); delayTimer.Dispose();
} }
public void setObjects(Relay horn_obj, ResultList log_obj) public void setObjects(Relay horn_obj, ResultList log_obj)
@ -115,17 +114,21 @@ namespace Tidstagning
Run(); Run();
return;//time already passed return;//time already passed
} }
if (log is not null)
{
log.Write("Næste signal: " + alertTime.ToString(@"HH\:mm\:ss") + " Om: " + timeToGo.ToString(@"hh\:mm\:ss")); log.Write("Næste signal: " + alertTime.ToString(@"HH\:mm\:ss") + " Om: " + timeToGo.ToString(@"hh\:mm\:ss"));
timer = new System.Threading.Timer(x => }
delayTimer = new Timer(x =>
{ {
this.Alarm(); this.Alarm();
}, null, timeToGo, new System.TimeSpan(0)); }, null, timeToGo, new TimeSpan(0));
} }
private void Alarm() private void Alarm()
{ {
if(log is not null)
log.Write("HORN!"); log.Write("HORN!");
if(horn is not null)
horn.Sound(signalLength); horn.Sound(signalLength);
next(); next();
Run(); Run();

@ -1,19 +1,35 @@
using System; using CommandLine;
using System;
using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
namespace Tidstagning namespace Tidstagning
{ {
static class Program class Program
{ {
/// <summary> public class Options
/// The main entry point for the application. {
/// </summary> [Option('c', "config", Required = false, HelpText = "Enable configuration menu.")]
public bool Config { get; set; }
}
[STAThread] [STAThread]
static void Main() static void Main(string[] args)
{
CommandLine.Parser.Default.ParseArguments<Options>(args)
.WithParsed(RunOptions)
.WithNotParsed(HandleParseError);
}
static void RunOptions(Options opts)
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainUI()); Application.Run(new MainUI(opts.Config));
} }
static void HandleParseError(IEnumerable<Error> errs)
{
MessageBox.Show("Failed to start\n" + errs.ToString());
}
} }
} }

@ -1,35 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tidstagning")]
[assembly: AssemblyDescription("Kontakt jens.chr.true@gmail.com - https://jcktrue.dk")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("LEAX")]
[assembly: AssemblyProduct("Tidstagning")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1f547dc7-1ba1-4877-9e70-dc09cc1d3f64")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Tidstagning.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tidstagning.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -12,7 +12,7 @@ namespace Tidstagning.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel node will disable file and registry virtualization.
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of all Windows versions that this application is designed to work with. Windows will automatically select the most compatible environment.-->
<!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
</application>
</compatibility>
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!-- <dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>-->
</asmv1:assembly>

@ -3,12 +3,12 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO.Ports; using System.IO.Ports;
using System.Threading; using System.Threading;
namespace Tidstagning namespace Tidstagning
{ {
class Relay class Relay
{ {
SerialPort com; SerialPort com;
Timer cooldownTimer;
struct SignalSpec struct SignalSpec
{ {
@ -17,7 +17,7 @@ namespace Tidstagning
}; };
Queue<SignalSpec> signals = new Queue<SignalSpec>(); Queue<SignalSpec> signals = new Queue<SignalSpec>();
bool processing_queue = false; bool processing_queue = false;
public Relay(string ComPort = null) public Relay(string ComPort)
{ {
com = new SerialPort(); com = new SerialPort();
com.PortName = ComPort; com.PortName = ComPort;
@ -88,7 +88,7 @@ namespace Tidstagning
Off(); Off();
} }
cooldownTimer = new System.Threading.Timer(x => System.Threading.Timer cooldownTimer = new System.Threading.Timer(x =>
{ {
signals.Dequeue(); signals.Dequeue();
Run(); Run();

@ -4,16 +4,15 @@ namespace Tidstagning
{ {
class ResultList class ResultList
{ {
System.IO.StreamWriter filehandle_log;
System.IO.StreamWriter filehandle; System.IO.StreamWriter filehandle_results;
System.IO.StreamWriter filehandle2;
Tidstagning.MainUI parentForm; Tidstagning.MainUI parentForm;
string racenumber; string racenumber = "";
public ResultList(string filename, Tidstagning.MainUI log_object) public ResultList(string filename, Tidstagning.MainUI log_object)
{ {
filename = MakeSafeFilename(filename, '_'); filename = MakeSafeFilename(filename, '_');
filehandle = new System.IO.StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + filename + "_" + DateTime.Now.ToString(" dd-MM-yyyy HH-mm-ss") + ".txt"); filehandle_log = new System.IO.StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + filename + "_" + DateTime.Now.ToString(" dd-MM-yyyy HH-mm-ss") + ".txt");
filehandle2 = new System.IO.StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + filename + "_" + DateTime.Now.ToString(" dd-MM-yyyy HH-mm-ss") + ".csv"); filehandle_results = new System.IO.StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + filename + "_" + DateTime.Now.ToString(" dd-MM-yyyy HH-mm-ss") + ".csv");
parentForm = log_object; parentForm = log_object;
} }
@ -58,21 +57,21 @@ namespace Tidstagning
public void Write(string textstring) public void Write(string textstring)
{ {
filehandle.WriteLine(textstring); filehandle_log.WriteLine(textstring);
parentForm.LogAppend(textstring + "\r\n"); parentForm.LogAppend(textstring + "\r\n");
filehandle.Flush(); filehandle_log.Flush();
} }
public void WriteCSV(string textstring) public void WriteCSV(string textstring)
{ {
filehandle2.WriteLine(textstring); filehandle_results.WriteLine(textstring);
filehandle2.Flush(); filehandle_results.Flush();
} }
public void Close() public void Close()
{ {
filehandle.Close(); filehandle_log.Close();
filehandle2.Close(); filehandle_results.Close();
} }
} }

62
Tidstagning/Settings.Designer.cs generated Normal file

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Tidstagning {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("N/A")]
public string ComPort {
get {
return ((string)(this["ComPort"]));
}
set {
this["ComPort"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool AutoStartProcedure {
get {
return ((bool)(this["AutoStartProcedure"]));
}
set {
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;
}
}
}
}

@ -1,4 +0,0 @@
18:00:00
18:01:00
18:04:00
18:05:00

@ -1,186 +1,54 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DFE0844B-9986-4623-8188-7F4A828FBB02}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <TargetFramework>net6.0-windows</TargetFramework>
<RootNamespace>Tidstagning</RootNamespace> <Nullable>enable</Nullable>
<AssemblyName>Tidstagning</AssemblyName> <UseWindowsForms>True</UseWindowsForms>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <ImplicitUsings>disable</ImplicitUsings>
<TargetFrameworkProfile> <StartupObject>Tidstagning.Program</StartupObject>
</TargetFrameworkProfile> <DebugType>portable</DebugType>
<FileAlignment>512</FileAlignment> <SignAssembly>False</SignAssembly>
<IsWebBootstrapper>false</IsWebBootstrapper> <ErrorReport>none</ErrorReport>
<PublishUrl>C:\Users\JCT\Documents\Tidstagning\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>false</MapFileExtensions>
<ProductName>Tidstagning</ProductName>
<PublisherName>LEAX</PublisherName>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>27</ApplicationRevision>
<ApplicationVersion>1.1.2.%2a</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>false</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols> <NoWarn />
<DebugType>full</DebugType> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>pdbonly</DebugType> <NoWarn />
<Optimize>true</Optimize> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>86AFBD08924E61031114EAB5B6DF6585A43E2B5F</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>Tidstagning_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<TargetZone>Custom</TargetZone>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<ItemGroup> <ItemGroup>
<Reference Include="PresentationCore" /> <PackageReference Include="CommandLineParser" Version="2.9.0-preview1" />
<Reference Include="PresentationFramework" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0-preview.3.22175.4" />
<Reference Include="System" /> <PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="7.0.0-preview.3.22175.4" />
<Reference Include="System.Core" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0-preview.3.22175.4" />
<Reference Include="System.Data.DataSetExtensions" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0-preview.3.22175.4" />
<Reference Include="System.Data" /> <PackageReference Include="System.IO.Ports" Version="7.0.0-preview.3.22175.4" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AboutBox.cs"> <Compile Update="Properties\Settings.Designer.cs">
<SubType>Form</SubType> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="AboutBox.Designer.cs">
<DependentUpon>AboutBox.cs</DependentUpon>
</Compile>
<Compile Include="ConfigUI.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ConfigUI.Designer.cs">
<DependentUpon>ConfigUI.cs</DependentUpon>
</Compile>
<Compile Include="Entry.cs" />
<Compile Include="MainUI.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainUI.Designer.cs">
<DependentUpon>MainUI.cs</DependentUpon>
</Compile>
<Compile Include="Procedure.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Relay.cs" />
<Compile Include="ResultList.cs" />
<Compile Include="Settings.cs" />
<EmbeddedResource Include="AboutBox.resx">
<DependentUpon>AboutBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ConfigUI.resx">
<DependentUpon>ConfigUI.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainUI.resx">
<DependentUpon>MainUI.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="app.config" /> <Compile Update="Settings.Designer.cs">
<None Include="Properties\app.manifest" /> <DesignTimeSharedInput>True</DesignTimeSharedInput>
<None Include="Properties\Settings.settings"> <AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None> </None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
<Content Include="Deltager.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project> </Project>

@ -1,17 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <ItemGroup>
<PublishUrlHistory>C:\Users\JCT\Documents\Tidstagning\|G:\Tidstagning\|G:\|publish\</PublishUrlHistory> <Compile Update="AboutBox.cs">
<InstallUrlHistory /> <SubType>Form</SubType>
<SupportUrlHistory /> </Compile>
<UpdateUrlHistory /> <Compile Update="ConfigUI.cs">
<BootstrapperUrlHistory /> <SubType>Form</SubType>
<ErrorReportUrlHistory /> </Compile>
<FallbackCulture>en-US</FallbackCulture> <Compile Update="MainUI.cs">
<VerifyUploadedFiles>false</VerifyUploadedFiles> <SubType>Form</SubType>
<ProjectView>ProjectFiles</ProjectView> </Compile>
</PropertyGroup> </ItemGroup>
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
</Project> </Project>

@ -1,22 +0,0 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Tidstagning.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup>
<userSettings>
<Tidstagning.Properties.Settings>
<setting name="ComPort" serializeAs="String">
<value>N/A</value>
</setting>
<setting name="AutoStartProcedure" serializeAs="String">
<value>False</value>
</setting>
<setting name="SignalLength" serializeAs="String">
<value>500</value>
</setting>
</Tidstagning.Properties.Settings>
</userSettings>
</configuration>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB