From 3a50cf3c38f422aa94872f37271b38a75ed7f3b0 Mon Sep 17 00:00:00 2001 From: Jens True Date: Sat, 12 Jun 2021 13:16:16 +0200 Subject: [PATCH] Resize clock. Move comport selector --- Tidstagning/Form1.Designer.cs | 113 ++++++++++++++++++---------------- Tidstagning/Form1.cs | 5 ++ Tidstagning/Form1.resx | 3 - 3 files changed, 65 insertions(+), 56 deletions(-) diff --git a/Tidstagning/Form1.Designer.cs b/Tidstagning/Form1.Designer.cs index cafb097..b730aa1 100644 --- a/Tidstagning/Form1.Designer.cs +++ b/Tidstagning/Form1.Designer.cs @@ -34,7 +34,6 @@ this.countdowntimer = new System.Windows.Forms.Timer(this.components); this.btnTest = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); - this.comboComport = new System.Windows.Forms.ComboBox(); this.txtDebug = new System.Windows.Forms.TextBox(); this.panel2 = new System.Windows.Forms.Panel(); this.btnEditList = new System.Windows.Forms.Button(); @@ -42,26 +41,27 @@ this.btnMoveDown = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); this.checkStartProcedure = new System.Windows.Forms.CheckBox(); - this.lblClock = new System.Windows.Forms.Label(); this.btnAutoStart = new System.Windows.Forms.Button(); this.btnStop = new System.Windows.Forms.Button(); this.txtHeader = new System.Windows.Forms.TextBox(); this.grid = new System.Windows.Forms.DataGridView(); this.Complete = new System.Windows.Forms.DataGridViewButtonColumn(); - this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.DNF = new System.Windows.Forms.DataGridViewButtonColumn(); - this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components); this.txtLog = new System.Windows.Forms.TableLayoutPanel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.comboSoundTime = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); this.Clock = new System.Windows.Forms.Timer(this.components); + this.comboComport = new System.Windows.Forms.ComboBox(); + this.lblClock = new System.Windows.Forms.Label(); + this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components); this.panel2.SuspendLayout(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit(); this.txtLog.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit(); this.SuspendLayout(); // // countdowntimer @@ -82,7 +82,7 @@ // // button1 // - this.button1.Location = new System.Drawing.Point(907, 3); + this.button1.Location = new System.Drawing.Point(966, 3); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 14; @@ -90,25 +90,16 @@ this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // - // comboComport - // - this.comboComport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboComport.FormattingEnabled = true; - this.comboComport.Location = new System.Drawing.Point(907, 311); - this.comboComport.Name = "comboComport"; - this.comboComport.Size = new System.Drawing.Size(121, 21); - this.comboComport.TabIndex = 12; - // // 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(203, 311); + this.txtDebug.Location = new System.Drawing.Point(203, 557); 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(698, 73); + this.txtDebug.Size = new System.Drawing.Size(757, 134); this.txtDebug.TabIndex = 10; // // panel2 @@ -117,9 +108,9 @@ this.panel2.Controls.Add(this.btnMoveUp); this.panel2.Controls.Add(this.btnMoveDown); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(3, 41); + this.panel2.Location = new System.Drawing.Point(3, 72); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(194, 264); + this.panel2.Size = new System.Drawing.Size(194, 479); this.panel2.TabIndex = 9; // // btnEditList @@ -160,13 +151,12 @@ // panel1 // this.panel1.Controls.Add(this.checkStartProcedure); - this.panel1.Controls.Add(this.lblClock); this.panel1.Controls.Add(this.btnAutoStart); this.panel1.Controls.Add(this.btnStop); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(907, 41); + this.panel1.Location = new System.Drawing.Point(966, 72); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(194, 264); + this.panel1.Size = new System.Drawing.Size(346, 479); this.panel1.TabIndex = 8; // // checkStartProcedure @@ -179,16 +169,6 @@ this.checkStartProcedure.Text = "Start Procedure"; this.checkStartProcedure.UseVisualStyleBackColor = true; // - // lblClock - // - this.lblClock.AutoSize = true; - this.lblClock.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); - this.lblClock.Location = new System.Drawing.Point(0, 222); - this.lblClock.Name = "lblClock"; - this.lblClock.Size = new System.Drawing.Size(75, 29); - this.lblClock.TabIndex = 7; - this.lblClock.Text = "--:--:--"; - // // btnAutoStart // this.btnAutoStart.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F); @@ -242,7 +222,7 @@ this.grid.RowsDefaultCellStyle = dataGridViewCellStyle1; this.txtLog.SetRowSpan(this.grid, 2); this.grid.RowTemplate.Height = 30; - this.grid.Size = new System.Drawing.Size(698, 302); + this.grid.Size = new System.Drawing.Size(757, 548); this.grid.TabIndex = 0; this.grid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grid_Click); this.grid.MouseMove += new System.Windows.Forms.MouseEventHandler(this.grid_MouseMove); @@ -256,13 +236,6 @@ 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"; @@ -271,24 +244,20 @@ 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, 200F)); 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, 200F)); + this.txtLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 352F)); this.txtLog.Controls.Add(this.grid, 1, 0); this.txtLog.Controls.Add(this.txtHeader, 0, 0); this.txtLog.Controls.Add(this.panel1, 2, 1); this.txtLog.Controls.Add(this.panel2, 0, 1); this.txtLog.Controls.Add(this.txtDebug, 1, 2); - this.txtLog.Controls.Add(this.comboComport, 2, 2); this.txtLog.Controls.Add(this.button1, 2, 0); this.txtLog.Controls.Add(this.flowLayoutPanel1, 0, 2); + this.txtLog.Controls.Add(this.lblClock, 2, 2); this.txtLog.Dock = System.Windows.Forms.DockStyle.Fill; this.txtLog.Location = new System.Drawing.Point(0, 0); this.txtLog.Name = "txtLog"; @@ -296,7 +265,7 @@ this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70F)); this.txtLog.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.txtLog.Size = new System.Drawing.Size(1104, 387); + this.txtLog.Size = new System.Drawing.Size(1315, 694); this.txtLog.TabIndex = 8; // // flowLayoutPanel1 @@ -304,9 +273,10 @@ this.flowLayoutPanel1.Controls.Add(this.btnTest); this.flowLayoutPanel1.Controls.Add(this.comboSoundTime); this.flowLayoutPanel1.Controls.Add(this.label1); - this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 311); + this.flowLayoutPanel1.Controls.Add(this.comboComport); + this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 557); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(194, 73); + this.flowLayoutPanel1.Size = new System.Drawing.Size(194, 125); this.flowLayoutPanel1.TabIndex = 15; // // comboSoundTime @@ -341,11 +311,48 @@ this.Clock.Enabled = true; this.Clock.Tick += new System.EventHandler(this.Clock_Tick); // + // comboComport + // + this.comboComport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboComport.FormattingEnabled = true; + this.comboComport.Location = new System.Drawing.Point(3, 73); + this.comboComport.Name = "comboComport"; + this.comboComport.Size = new System.Drawing.Size(121, 21); + this.comboComport.TabIndex = 28; + // + // lblClock + // + this.lblClock.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblClock.AutoSize = true; + this.lblClock.Font = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblClock.Location = new System.Drawing.Point(966, 554); + this.lblClock.Name = "lblClock"; + this.lblClock.Size = new System.Drawing.Size(346, 140); + this.lblClock.TabIndex = 16; + this.lblClock.Text = "--:--:--"; + this.lblClock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblClock.Click += new System.EventHandler(this.lblClock_Click); + // + // nameDataGridViewTextBoxColumn + // + this.nameDataGridViewTextBoxColumn.DataPropertyName = "SailNumber"; + this.nameDataGridViewTextBoxColumn.HeaderText = "Sejlnummer"; + this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn"; + this.nameDataGridViewTextBoxColumn.ReadOnly = true; + // + // entryBindingSource + // + this.entryBindingSource.DataSource = typeof(Tidstagning.Entry); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1104, 387); + this.AutoSize = true; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.ClientSize = new System.Drawing.Size(1315, 694); this.Controls.Add(this.txtLog); this.HelpButton = true; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -358,11 +365,11 @@ this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).EndInit(); this.txtLog.ResumeLayout(false); this.txtLog.PerformLayout(); this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).EndInit(); this.ResumeLayout(false); } @@ -373,7 +380,6 @@ private System.Windows.Forms.Timer countdowntimer; private System.Windows.Forms.Button btnTest; private System.Windows.Forms.Button button1; - private System.Windows.Forms.ComboBox comboComport; private System.Windows.Forms.TextBox txtDebug; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Button btnMoveUp; @@ -390,10 +396,11 @@ private System.Windows.Forms.DataGridViewButtonColumn Complete; private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewButtonColumn DNF; - private System.Windows.Forms.Label lblClock; private System.Windows.Forms.CheckBox checkStartProcedure; private System.Windows.Forms.Timer Clock; private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox comboComport; + private System.Windows.Forms.Label lblClock; } } diff --git a/Tidstagning/Form1.cs b/Tidstagning/Form1.cs index e26efb9..65e9e12 100644 --- a/Tidstagning/Form1.cs +++ b/Tidstagning/Form1.cs @@ -235,5 +235,10 @@ namespace Tidstagning { lblClock.Text = DateTime.Now.ToString("HH:mm:ss"); } + + private void lblClock_Click(object sender, EventArgs e) + { + + } } } diff --git a/Tidstagning/Form1.resx b/Tidstagning/Form1.resx index 6ffc091..073064f 100644 --- a/Tidstagning/Form1.resx +++ b/Tidstagning/Form1.resx @@ -120,9 +120,6 @@ 165, 17 - - True - True