diff --git a/Tidstagning/AboutBox.Designer.cs b/Tidstagning/AboutBox.Designer.cs index a1b7ff8..6c14dbb 100644 --- a/Tidstagning/AboutBox.Designer.cs +++ b/Tidstagning/AboutBox.Designer.cs @@ -53,7 +53,8 @@ this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); 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.RowCount = 6; 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, 50F)); 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; // // logoPictureBox // this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.TabIndex = 12; this.logoPictureBox.TabStop = false; @@ -80,11 +82,11 @@ // labelProductName // this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelProductName.Location = new System.Drawing.Point(143, 0); - this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); - this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); + this.labelProductName.Location = new System.Drawing.Point(167, 0); + this.labelProductName.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0); + this.labelProductName.MaximumSize = new System.Drawing.Size(0, 20); 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.Text = "Tidstagning"; this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -92,11 +94,11 @@ // labelVersion // this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelVersion.Location = new System.Drawing.Point(143, 26); - this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); - this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); + this.labelVersion.Location = new System.Drawing.Point(167, 30); + this.labelVersion.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0); + this.labelVersion.MaximumSize = new System.Drawing.Size(0, 20); 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.Text = "Version 1.0"; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -104,11 +106,11 @@ // labelCopyright // this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelCopyright.Location = new System.Drawing.Point(143, 52); - this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); - this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); + this.labelCopyright.Location = new System.Drawing.Point(167, 60); + this.labelCopyright.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0); + this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 20); 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.Text = "Copyright © 2021"; this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -116,11 +118,11 @@ // labelCompanyName // this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelCompanyName.Location = new System.Drawing.Point(143, 78); - this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); - this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17); + this.labelCompanyName.Location = new System.Drawing.Point(167, 90); + this.labelCompanyName.Margin = new System.Windows.Forms.Padding(7, 0, 4, 0); + this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 20); 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.Text = "LEAX A/S"; this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -128,13 +130,13 @@ // textBoxDescription // this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBoxDescription.Location = new System.Drawing.Point(143, 107); - this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); + this.textBoxDescription.Location = new System.Drawing.Point(167, 123); + this.textBoxDescription.Margin = new System.Windows.Forms.Padding(7, 3, 4, 3); this.textBoxDescription.Multiline = true; this.textBoxDescription.Name = "textBoxDescription"; this.textBoxDescription.ReadOnly = true; 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.TabStop = false; 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.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.Size = new System.Drawing.Size(75, 23); + this.okButton.Size = new System.Drawing.Size(88, 27); this.okButton.TabIndex = 24; this.okButton.Text = "&OK"; this.okButton.Click += new System.EventHandler(this.okButton_Click); @@ -153,15 +156,16 @@ // AboutBox // 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.ClientSize = new System.Drawing.Size(435, 283); + this.ClientSize = new System.Drawing.Size(507, 327); this.Controls.Add(this.tableLayoutPanel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AboutBox"; - this.Padding = new System.Windows.Forms.Padding(9); + this.Padding = new System.Windows.Forms.Padding(10); this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Tidstagning/AboutBox.resx b/Tidstagning/AboutBox.resx index 76cc9af..119d188 100644 --- a/Tidstagning/AboutBox.resx +++ b/Tidstagning/AboutBox.resx @@ -1,64 +1,4 @@ - - - + diff --git a/Tidstagning/ConfigUI.Designer.cs b/Tidstagning/ConfigUI.Designer.cs index 2b0dc4b..4777e9a 100644 --- a/Tidstagning/ConfigUI.Designer.cs +++ b/Tidstagning/ConfigUI.Designer.cs @@ -48,25 +48,26 @@ namespace Tidstagning this.label3 = new System.Windows.Forms.Label(); this.comboBoxBaudRate = new System.Windows.Forms.ComboBox(); this.panelRelaySettings = new System.Windows.Forms.Panel(); - this.textBox3 = new System.Windows.Forms.TextBox(); this.panelRelaySettings.SuspendLayout(); this.SuspendLayout(); // // label1 // 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.Size = new System.Drawing.Size(131, 13); + this.label1.Size = new System.Drawing.Size(148, 15); this.label1.TabIndex = 0; this.label1.Text = "Select folder for input files."; // // checkBoxRelay // 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.Size = new System.Drawing.Size(95, 17); + this.checkBoxRelay.Size = new System.Drawing.Size(97, 19); this.checkBoxRelay.TabIndex = 2; this.checkBoxRelay.Text = "Enable Relay?"; this.checkBoxRelay.UseVisualStyleBackColor = true; @@ -78,9 +79,10 @@ namespace Tidstagning // // 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.Size = new System.Drawing.Size(75, 23); + this.buttonFolderOutput.Size = new System.Drawing.Size(88, 27); this.buttonFolderOutput.TabIndex = 3; this.buttonFolderOutput.Text = "Pick output folder"; this.buttonFolderOutput.UseVisualStyleBackColor = true; @@ -92,9 +94,10 @@ namespace Tidstagning // // 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.Size = new System.Drawing.Size(75, 23); + this.buttonFolderInput.Size = new System.Drawing.Size(88, 27); this.buttonFolderInput.TabIndex = 4; this.buttonFolderInput.Text = "Pick input folder"; this.buttonFolderInput.UseVisualStyleBackColor = true; @@ -102,24 +105,27 @@ namespace Tidstagning // // 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.Size = new System.Drawing.Size(301, 20); + this.textPathInput.Size = new System.Drawing.Size(350, 23); this.textPathInput.TabIndex = 5; // // 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.Size = new System.Drawing.Size(301, 20); + this.textPathOutput.Size = new System.Drawing.Size(350, 23); this.textPathOutput.TabIndex = 6; // // buttonSave // 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.Size = new System.Drawing.Size(75, 23); + this.buttonSave.Size = new System.Drawing.Size(88, 27); this.buttonSave.TabIndex = 7; this.buttonSave.Text = "Save"; 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.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.Size = new System.Drawing.Size(75, 23); + this.buttonCancel.Size = new System.Drawing.Size(88, 27); this.buttonCancel.TabIndex = 8; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; @@ -140,42 +147,46 @@ namespace Tidstagning // label2 // 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.Size = new System.Drawing.Size(138, 13); + this.label2.Size = new System.Drawing.Size(156, 15); this.label2.TabIndex = 9; this.label2.Text = "Select folder for output files."; // // 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.Size = new System.Drawing.Size(100, 20); + this.textBox2.Size = new System.Drawing.Size(116, 23); this.textBox2.TabIndex = 5; // // 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.Size = new System.Drawing.Size(100, 20); + this.textBox1.Size = new System.Drawing.Size(116, 23); this.textBox1.TabIndex = 4; - this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // // label5 // 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.Size = new System.Drawing.Size(71, 13); + this.label5.Size = new System.Drawing.Size(84, 15); this.label5.TabIndex = 3; this.label5.Text = "Off Command"; // // label4 // 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.Size = new System.Drawing.Size(71, 13); + this.label4.Size = new System.Drawing.Size(83, 15); this.label4.TabIndex = 2; this.label4.Text = "On Command"; // @@ -183,8 +194,9 @@ namespace Tidstagning // this.label3.AutoSize = true; 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.Size = new System.Drawing.Size(50, 13); + this.label3.Size = new System.Drawing.Size(54, 15); this.label3.TabIndex = 1; this.label3.Text = "Baudrate"; // @@ -206,14 +218,14 @@ namespace Tidstagning "230400", "460800", "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.Size = new System.Drawing.Size(121, 21); + this.comboBoxBaudRate.Size = new System.Drawing.Size(140, 23); this.comboBoxBaudRate.TabIndex = 0; // // panelRelaySettings // - this.panelRelaySettings.Controls.Add(this.textBox3); this.panelRelaySettings.Controls.Add(this.textBox2); this.panelRelaySettings.Controls.Add(this.label5); this.panelRelaySettings.Controls.Add(this.textBox1); @@ -221,25 +233,19 @@ namespace Tidstagning this.panelRelaySettings.Controls.Add(this.label3); this.panelRelaySettings.Controls.Add(this.label4); 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.Size = new System.Drawing.Size(386, 68); + this.panelRelaySettings.Size = new System.Drawing.Size(450, 60); 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 // 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.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.label2); this.Controls.Add(this.buttonCancel); @@ -252,6 +258,7 @@ namespace Tidstagning this.Controls.Add(this.label1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ConfigUI"; @@ -284,6 +291,5 @@ namespace Tidstagning private System.Windows.Forms.Label label3; private System.Windows.Forms.ComboBox comboBoxBaudRate; private System.Windows.Forms.Panel panelRelaySettings; - private System.Windows.Forms.TextBox textBox3; } } \ No newline at end of file diff --git a/Tidstagning/ConfigUI.cs b/Tidstagning/ConfigUI.cs index 89a112b..fc42f85 100644 --- a/Tidstagning/ConfigUI.cs +++ b/Tidstagning/ConfigUI.cs @@ -46,19 +46,7 @@ namespace Tidstagning private void checkBoxRelay_CheckedChanged(object sender, EventArgs e) { - panelRelaySettings.Enabled = checkBoxRelay.Enabled; - } - - private void textBox1_TextChanged(object sender, EventArgs e) - { - try - { - textBox3.Text = Regex.Unescape(textBox1.Text); - } - catch - { - textBox3.Text = ""; - } + panelRelaySettings.Enabled = checkBoxRelay.Checked; } } } diff --git a/Tidstagning/ConfigUI.resx b/Tidstagning/ConfigUI.resx index 2ea699c..4592154 100644 --- a/Tidstagning/ConfigUI.resx +++ b/Tidstagning/ConfigUI.resx @@ -1,64 +1,4 @@ - - - + diff --git a/Tidstagning/MainUI.Designer.cs b/Tidstagning/MainUI.Designer.cs index d3adb85..0d722f4 100644 --- a/Tidstagning/MainUI.Designer.cs +++ b/Tidstagning/MainUI.Designer.cs @@ -41,7 +41,9 @@ this.txtHeader = new System.Windows.Forms.TextBox(); this.grid = new System.Windows.Forms.DataGridView(); this.Complete = new System.Windows.Forms.DataGridViewButtonColumn(); + this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.DNF = new System.Windows.Forms.DataGridViewButtonColumn(); + this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components); this.txtLog = new System.Windows.Forms.TableLayoutPanel(); this.lblClock = new System.Windows.Forms.Label(); this.flowLayoutPanelConfiguration = new System.Windows.Forms.FlowLayoutPanel(); @@ -51,23 +53,22 @@ this.label2 = new System.Windows.Forms.Label(); this.buttonConfig = new System.Windows.Forms.Button(); this.Clock = new System.Windows.Forms.Timer(this.components); - this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit(); this.txtLog.SuspendLayout(); this.flowLayoutPanelConfiguration.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericSignalLength)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit(); this.SuspendLayout(); // // btnTest // this.btnTest.Dock = System.Windows.Forms.DockStyle.Bottom; - this.btnTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); - this.btnTest.Location = new System.Drawing.Point(0, 464); + 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, 542); + this.btnTest.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 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.Text = "HORN 🔊"; this.btnTest.UseVisualStyleBackColor = true; @@ -75,9 +76,10 @@ // // 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.Size = new System.Drawing.Size(75, 23); + this.buttonHelp.Size = new System.Drawing.Size(88, 27); this.buttonHelp.TabIndex = 14; this.buttonHelp.Text = "Hjælp mm."; this.buttonHelp.UseVisualStyleBackColor = true; @@ -86,13 +88,14 @@ // txtDebug // this.txtDebug.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtDebug.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); - this.txtDebug.Location = new System.Drawing.Point(273, 551); + 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(319, 635); + this.txtDebug.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.txtDebug.Multiline = true; this.txtDebug.Name = "txtDebug"; this.txtDebug.ReadOnly = true; 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; // // panel1 @@ -103,31 +106,34 @@ this.panel1.Controls.Add(this.btnStart); this.panel1.Controls.Add(this.btnStop); 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.Size = new System.Drawing.Size(264, 501); + this.panel1.Size = new System.Drawing.Size(307, 585); this.panel1.TabIndex = 8; // // textStartProcedure // this.textStartProcedure.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | 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.Location = new System.Drawing.Point(3, 137); + 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(4, 158); + this.textStartProcedure.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.textStartProcedure.Multiline = true; this.textStartProcedure.Name = "textStartProcedure"; this.textStartProcedure.ReadOnly = true; 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.WordWrap = false; // // checkStartProcedure // 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.Size = new System.Drawing.Size(155, 17); + this.checkStartProcedure.Size = new System.Drawing.Size(171, 19); this.checkStartProcedure.TabIndex = 8; this.checkStartProcedure.Text = "Automatisk Start Procedure"; this.checkStartProcedure.UseVisualStyleBackColor = true; @@ -135,10 +141,11 @@ // // btnStart // - this.btnStart.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); - this.btnStart.Location = new System.Drawing.Point(3, 3); + 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(4, 3); + this.btnStart.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 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.Text = "Start ▶"; this.btnStart.UseVisualStyleBackColor = true; @@ -147,10 +154,11 @@ // btnStop // this.btnStop.Enabled = false; - this.btnStop.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); - this.btnStop.Location = new System.Drawing.Point(3, 46); + 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(4, 53); + this.btnStop.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 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.Text = "Stop ■"; this.btnStop.UseVisualStyleBackColor = true; @@ -159,10 +167,11 @@ // txtHeader // this.txtHeader.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); - this.txtHeader.Location = new System.Drawing.Point(3, 3); + 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(4, 3); + this.txtHeader.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 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; // // grid @@ -183,17 +192,18 @@ this.grid.DataSource = this.entryBindingSource; this.grid.Dock = System.Windows.Forms.DockStyle.Fill; 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.Name = "grid"; this.grid.ReadOnly = true; this.grid.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; 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.ReadOnly = true; 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.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grid_Click); this.grid.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.grid_CellMouseEnter); @@ -208,6 +218,13 @@ this.Complete.ReadOnly = true; this.Complete.Text = "Mål"; // + // nameDataGridViewTextBoxColumn + // + this.nameDataGridViewTextBoxColumn.DataPropertyName = "SailNumber"; + this.nameDataGridViewTextBoxColumn.HeaderText = "Sejlnummer"; + this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn"; + this.nameDataGridViewTextBoxColumn.ReadOnly = true; + // // DNF // this.DNF.HeaderText = "DNF"; @@ -216,12 +233,16 @@ this.DNF.Text = "Udgået"; this.DNF.UseColumnTextForButtonValue = true; // + // entryBindingSource + // + this.entryBindingSource.DataSource = typeof(Tidstagning.Entry); + // // txtLog // 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.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.txtHeader, 0, 0); this.txtLog.Controls.Add(this.txtDebug, 1, 2); @@ -230,13 +251,14 @@ this.txtLog.Controls.Add(this.flowLayoutPanelConfiguration, 0, 2); this.txtLog.Dock = System.Windows.Forms.DockStyle.Fill; 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.RowCount = 3; 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, 22.22222F)); - this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.txtLog.Size = new System.Drawing.Size(1315, 694); + this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F)); + this.txtLog.Size = new System.Drawing.Size(1534, 801); this.txtLog.TabIndex = 8; // // lblClock @@ -245,10 +267,11 @@ | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); 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.Location = new System.Drawing.Point(768, 548); + 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(896, 632); + this.lblClock.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 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.Text = "--:--:--"; this.lblClock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -262,9 +285,10 @@ this.flowLayoutPanelConfiguration.Controls.Add(this.buttonHelp); this.flowLayoutPanelConfiguration.Controls.Add(this.buttonConfig); 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.Size = new System.Drawing.Size(264, 140); + this.flowLayoutPanelConfiguration.Size = new System.Drawing.Size(307, 163); this.flowLayoutPanelConfiguration.TabIndex = 15; // // numericSignalLength @@ -274,7 +298,8 @@ 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[] { 5000, 0, @@ -286,7 +311,7 @@ 0, 0}); 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.Value = new decimal(new int[] { 500, @@ -298,8 +323,9 @@ // label1 // 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.Location = new System.Drawing.Point(130, 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(153, 0); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(121, 24); this.label1.TabIndex = 27; @@ -309,17 +335,19 @@ // this.comboComport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 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.Size = new System.Drawing.Size(121, 21); + this.comboComport.Size = new System.Drawing.Size(140, 23); this.comboComport.TabIndex = 28; this.comboComport.SelectedIndexChanged += new System.EventHandler(this.comboComport_SelectedIndexChanged); // // label2 // 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.Location = new System.Drawing.Point(130, 26); + 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(152, 29); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(88, 24); this.label2.TabIndex = 31; @@ -327,13 +355,13 @@ // // 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.Size = new System.Drawing.Size(90, 23); + this.buttonConfig.Size = new System.Drawing.Size(105, 27); this.buttonConfig.TabIndex = 29; this.buttonConfig.Text = "Konfiguration"; this.buttonConfig.UseVisualStyleBackColor = true; - this.buttonConfig.Visible = false; this.buttonConfig.Click += new System.EventHandler(this.buttonConfig_Click); // // Clock @@ -341,27 +369,17 @@ this.Clock.Enabled = true; this.Clock.Tick += new System.EventHandler(this.Clock_Tick); // - // nameDataGridViewTextBoxColumn - // - this.nameDataGridViewTextBoxColumn.DataPropertyName = "SailNumber"; - this.nameDataGridViewTextBoxColumn.HeaderText = "Sejlnummer"; - this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn"; - this.nameDataGridViewTextBoxColumn.ReadOnly = true; - // - // entryBindingSource - // - this.entryBindingSource.DataSource = typeof(Tidstagning.Entry); - // // 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.AutoSize = true; 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.DoubleBuffered = true; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); this.Name = "MainUI"; this.Text = "Tidstagning"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; @@ -369,12 +387,12 @@ this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).EndInit(); this.txtLog.ResumeLayout(false); this.txtLog.PerformLayout(); this.flowLayoutPanelConfiguration.ResumeLayout(false); this.flowLayoutPanelConfiguration.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericSignalLength)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).EndInit(); this.ResumeLayout(false); } diff --git a/Tidstagning/MainUI.cs b/Tidstagning/MainUI.cs index 7268d5f..de9d867 100644 --- a/Tidstagning/MainUI.cs +++ b/Tidstagning/MainUI.cs @@ -15,7 +15,7 @@ namespace Tidstagning Relay? horn; Procedure startprocedure = new Procedure(); - public MainUI() + public MainUI(bool ShowConfig = false) { InitializeComponent(); System.IO.StreamReader deltager_handle = new System.IO.StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + "Deltager.txt"); @@ -45,6 +45,9 @@ namespace Tidstagning { comboComport.SelectedIndex = index; } + + buttonConfig.Visible = ShowConfig; + } diff --git a/Tidstagning/MainUI.resx b/Tidstagning/MainUI.resx index 570edf9..bff6362 100644 --- a/Tidstagning/MainUI.resx +++ b/Tidstagning/MainUI.resx @@ -1,64 +1,4 @@ - - - + diff --git a/Tidstagning/Program.cs b/Tidstagning/Program.cs index 813bdbc..3431f90 100644 --- a/Tidstagning/Program.cs +++ b/Tidstagning/Program.cs @@ -1,19 +1,37 @@ -using System; +using CommandLine; +using System; +using System.Collections.Generic; using System.Windows.Forms; namespace Tidstagning { static class Program { - /// - /// The main entry point for the application. - /// + + public class Options + { + [Option('c', "config", Required = false, HelpText = "Enable configuration menu.")] + public bool Config { get; set; } + } + [STAThread] - static void Main() + static void Main(string[] args) + { + CommandLine.Parser.Default.ParseArguments(args) + .WithParsed(RunOptions) + .WithNotParsed(HandleParseError); + + } + static void RunOptions(Options opts) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new MainUI()); + Application.Run(new MainUI(opts.Config)); } + static void HandleParseError(IEnumerable errs) + { + MessageBox.Show("Failed to start\n" + errs.ToString()); + } + } } diff --git a/Tidstagning/Tidstagning.csproj b/Tidstagning/Tidstagning.csproj index 5986309..d2b19d9 100644 --- a/Tidstagning/Tidstagning.csproj +++ b/Tidstagning/Tidstagning.csproj @@ -23,7 +23,8 @@ - + +