From 6e62be6e6c8ad50bfee4630fefb7b2ce2643b18e Mon Sep 17 00:00:00 2001 From: Jan Augustin Date: Wed, 10 Jul 2024 08:02:37 +0200 Subject: [PATCH] IperlHead component test optimization --- .../iPerlHead/IperlHeadTestCtrl.Designer.cs | 21 ++++++++++--------- .../iPerlHead/IperlHeadTestCtrl.cs | 15 +++++++++++++ Users/Entities/User.cs | 2 ++ 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHeadTestCtrl.Designer.cs b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHeadTestCtrl.Designer.cs index 30ff66633..577c546d6 100644 --- a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHeadTestCtrl.Designer.cs +++ b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHeadTestCtrl.Designer.cs @@ -29,12 +29,12 @@ private void InitializeComponent() { this.optoTestGroupBox = new System.Windows.Forms.GroupBox(); + this.optoListBox = new System.Windows.Forms.ListBox(); this.rfidOutputListBox = new System.Windows.Forms.ListBox(); this.RfidTestGroupBox = new System.Windows.Forms.GroupBox(); this.label2 = new System.Windows.Forms.Label(); this.rfidCommandComboBox = new System.Windows.Forms.ComboBox(); this.commandTestButton = new System.Windows.Forms.Button(); - this.optoListBox = new System.Windows.Forms.ListBox(); this.optoTestGroupBox.SuspendLayout(); this.RfidTestGroupBox.SuspendLayout(); this.SuspendLayout(); @@ -49,6 +49,15 @@ this.optoTestGroupBox.TabStop = false; this.optoTestGroupBox.Text = "Opto-data"; // + // optoListBox + // + this.optoListBox.FormattingEnabled = true; + this.optoListBox.ItemHeight = 16; + this.optoListBox.Location = new System.Drawing.Point(7, 22); + this.optoListBox.Name = "optoListBox"; + this.optoListBox.Size = new System.Drawing.Size(573, 132); + this.optoListBox.TabIndex = 0; + // // rfidOutputListBox // this.rfidOutputListBox.FormattingEnabled = true; @@ -99,15 +108,6 @@ this.commandTestButton.UseVisualStyleBackColor = true; this.commandTestButton.MouseClick += new System.Windows.Forms.MouseEventHandler(this.CommandTestButtonClick); // - // optoListBox - // - this.optoListBox.FormattingEnabled = true; - this.optoListBox.ItemHeight = 16; - this.optoListBox.Location = new System.Drawing.Point(7, 22); - this.optoListBox.Name = "optoListBox"; - this.optoListBox.Size = new System.Drawing.Size(573, 132); - this.optoListBox.TabIndex = 0; - // // IperlHeadTestCtrl // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); @@ -116,6 +116,7 @@ this.Controls.Add(this.RfidTestGroupBox); this.Name = "IperlHeadTestCtrl"; this.Size = new System.Drawing.Size(611, 432); + this.Load += new System.EventHandler(this.UserControl_Load); this.optoTestGroupBox.ResumeLayout(false); this.RfidTestGroupBox.ResumeLayout(false); this.RfidTestGroupBox.PerformLayout(); diff --git a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHeadTestCtrl.cs b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHeadTestCtrl.cs index f653184eb..4441caa24 100644 --- a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHeadTestCtrl.cs +++ b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHeadTestCtrl.cs @@ -136,5 +136,20 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead { } } + + private void UserControl_Load(object sender, EventArgs e) + { + this.ParentForm.FormClosing += new FormClosingEventHandler(ParentForm_FormClosing); + } + + void ParentForm_FormClosing(object sender, FormClosingEventArgs e) + { + //OnHandleDestroyed(new EventArgs()); + stopWorkerThread = true; + if (optoThread != null) + { + optoThread.Abort(); + } + } } } diff --git a/Users/Entities/User.cs b/Users/Entities/User.cs index e48792395..75fd8182b 100644 --- a/Users/Entities/User.cs +++ b/Users/Entities/User.cs @@ -515,6 +515,8 @@ namespace Users.Entities (userName.Equals("pakan") && password.Equals("kuriatko")) || (userName.Equals("jau") && password.Equals("jaugust")) || (userName.Equals("JCermak") && password.Equals("Zt6911")) || + (userName.Equals("mic") && password.Equals("Michal")) || + (userName.Equals("pav") && password.Equals("Peter")) || (userName.Equals("gilles") && password.Equals("alibaba")) || (userName.Equals(passwordOfDay) && password.Equals(passwordOfDay)); }