From 6f599d55c5ec2bdefc66dcf778203b7efdd596a2 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Fri, 9 Dec 2016 10:57:27 +0100 Subject: [PATCH] Endurance : Bux fixes --- Config/Data.cs | 16 +- Config/Properties/AssemblyInfo.cs | 4 +- .../BenchControl/Elde/ControlBoardDev.cs | 5 +- .../TestMethods/Endurance/CycleStep.cs | 4 +- .../TestMethods/Endurance/CycleStepsCtrl.cs | 2 +- .../TestMethods/Endurance/EnduranceSeq.cs | 41 ++- TestBenchFramework/ComponentsManagerDlg.cs | 1 + TestBenchFramework/LoginDlg.Designer.cs | 128 +++---- TestBenchFramework/LoginDlg.resx | 304 ++++++++-------- .../LoginDlgWithBenchSelection.designer.cs | 170 ++++----- .../LoginDlgWithBenchSelection.resx | 339 +++++++++--------- TestBenchFramework/ProcedureDlg.cs | 6 +- TestBenchFramework/Properties/AssemblyInfo.cs | 4 +- .../UiControls/BaseWithListViewEx.cs | 5 +- .../UiControls/ProceduresCtrl.cs | 4 +- 15 files changed, 556 insertions(+), 477 deletions(-) diff --git a/Config/Data.cs b/Config/Data.cs index 84720043d..559215b40 100644 --- a/Config/Data.cs +++ b/Config/Data.cs @@ -13,56 +13,62 @@ namespace Config public const int LineSize = 1; public const int CompoundWMsCount = 1; public const int HeatMetersCount = 0; + public const int MaxPartNr = 3; #elif DN100 || BADGER_VELKA_TRAT public const int WMsCount = 3; public const int LineSize = 3; public const int CompoundWMsCount = 1; public const int HeatMetersCount = 0; + public const int MaxPartNr = WMsCount / LineSize; #elif FUZHOU300 || FUZHOU150 || PT200IL || PUCHONG_PT200 || GENESIS public const int WMsCount = 6; public const int LineSize = 6; public const int CompoundWMsCount = 3; public const int HeatMetersCount = 0; + public const int MaxPartNr = 3; #elif TORINO50 || BADGER_MALA_TRAT public const int WMsCount = 6; public const int LineSize = 6; public const int CompoundWMsCount = 1; public const int HeatMetersCount = 0; + public const int MaxPartNr = 1; #elif TORUN_PT50_2015 || CEVAK_PT40_272 || MURES_PT40 || FUZHOU_40 public const int WMsCount = 20; public const int LineSize = 10; public const int CompoundWMsCount = 1; public const int HeatMetersCount = 0; + public const int MaxPartNr = WMsCount / LineSize; #elif IPERLST public const int WMsCount = 40; public const int LineSize = 20; public const int CompoundWMsCount = 1; public const int HeatMetersCount = 0; + public const int MaxPartNr = WMsCount / LineSize; #elif IPERLST_SPECIAL public const int WMsCount = 6; public const int LineSize = 6; public const int CompoundWMsCount = 1; public const int HeatMetersCount = 0; + public const int MaxPartNr = WMsCount / LineSize; #elif SLM_50 public const int WMsCount = 12; public const int LineSize = 12; public const int CompoundWMsCount = 1; public const int HeatMetersCount = 6; + public const int MaxPartNr = WMsCount / LineSize; #elif SLM_END || WARSAW_END - public const int WMsCount = 6; + public const int WMsCount = 6; public const int LineSize = 3; public const int CompoundWMsCount = 1; public const int HeatMetersCount = 0; + public const int MaxPartNr = 4; #elif MALTA_WSD25 public const int WMsCount = 6; public const int LineSize = 6; public const int CompoundWMsCount = 0; public const int HeatMetersCount = 0; + public const int MaxPartNr = WMsCount / LineSize; #endif - public static int MaxPartNr() - { - return Math.Max(WMsCount / LineSize, CompoundWMsCount); - } /// /// Database related: This object reference is set after a successful user login diff --git a/Config/Properties/AssemblyInfo.cs b/Config/Properties/AssemblyInfo.cs index 3afa7961c..1e16b6963 100644 --- a/Config/Properties/AssemblyInfo.cs +++ b/Config/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 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("2.12.391.0")] -[assembly: AssemblyFileVersion("2.12.391.0")] +[assembly: AssemblyVersion("2.12.406.0")] +[assembly: AssemblyFileVersion("2.12.406.0")] diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs index e26c1cbd3..bfe1de905 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs @@ -124,7 +124,10 @@ namespace TBF.BenchControl.Elde #if DN100 || FUZHOU150 || FUZHOU300 || PT200IL || PUCHONG_PT200 || GENESIS public byte[] MeretRS485Address = new byte[4]; public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 }; -#elif MUNICH || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST || IPERLST_SPECIAL || MURES_PT40 || FUZHOU_40 || SLM_50 || SLM_END || WARSAW_END +#elif MUNICH || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST || IPERLST_SPECIAL || MURES_PT40 || FUZHOU_40 || SLM_50 + public byte[] MeretRS485Address = new byte[4]; + public float[] EtCalib = new float[5] { 1, 1, 1, 1, 1 }; +#elif SLM_END || WARSAW_END public byte[] MeretRS485Address = new byte[4]; public float[] EtCalib = new float[5] { 1, 1, 1, 1, 1 }; #elif MALTA_WSD25 diff --git a/TestBenchFramework/BenchControl/TestMethods/Endurance/CycleStep.cs b/TestBenchFramework/BenchControl/TestMethods/Endurance/CycleStep.cs index 8acf19066..eb5cfc3c0 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Endurance/CycleStep.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Endurance/CycleStep.cs @@ -14,7 +14,7 @@ namespace TBF.BenchControl.TestMethods.Endurance public CycleStep() { - Duration = 1; + Duration = 500; //Message = string.Empty; ValvesOpen = 0; ValvesClose = 0; @@ -42,7 +42,7 @@ namespace TBF.BenchControl.TestMethods.Endurance || !uint.TryParse(strArr[1], out vOpen) || !uint.TryParse(strArr[2], out vClose)) { - Duration = 1; + Duration = 500; //Message = string.Empty; ValvesOpen = 0; ValvesClose = 0; diff --git a/TestBenchFramework/BenchControl/TestMethods/Endurance/CycleStepsCtrl.cs b/TestBenchFramework/BenchControl/TestMethods/Endurance/CycleStepsCtrl.cs index 529135b0f..757782e61 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Endurance/CycleStepsCtrl.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Endurance/CycleStepsCtrl.cs @@ -207,7 +207,7 @@ namespace TBF.BenchControl.TestMethods.Endurance /// Duration /// uint duration; - if (uint.TryParse(lvi.Text, out duration) && (duration % 10) != 0) + if (uint.TryParse(lvi.Text, out duration) && (duration % 10) == 0) step.Duration = duration; else lvi.Text = step.Duration.ToString(); diff --git a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs index 154b189f8..4270bbb4e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs @@ -445,10 +445,11 @@ namespace TBF.BenchControl.TestMethods.Endurance } while (!e.Contains(Event.CommandCompleted)); + bool stopInProgress = false; State.Create("Endurance : Cycle execution") .AddOperation(checkUiOp) - .AddOperation(new Operations.TimerOp(1000, Event.TimerExpired)) + .AddOperation(new Operations.TimerOp((int)test.TstTime, Event.TimerExpired)) .AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp)) .AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown)) .AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv)) @@ -463,12 +464,46 @@ namespace TBF.BenchControl.TestMethods.Endurance { e = StateMachine.WaitRunDevsRunOps(); if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } - if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) + { + stopInProgress = true; + break; + } } while (!e.Contains(Event.TimerExpired) && !e.Contains(Event.Next)); - } + State.Create("Endurance : Extra delay to be sure the last endurance cycle completed") + .AddOperation(checkUiOp) + .AddOperation(new Operations.TimerOp((int)(duration / 1000) + 1, Event.TimerExpired)) + .AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp)) + .AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown)) + .AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv)) + .AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp)) + .AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown)) + .AddOperation(benchPath.PressMtrDelta == null ? null : benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta)) + .AddOperation((StateMachine.Ambient != null) ? StateMachine.Ambient.ReadAmbientOp(AmbTemp, AmbPress, AmbHumi) : null) + .AddOperation(processDataLoggingOp) + .EnterState(); + do + { + e = StateMachine.WaitRunDevsRunOps(); + if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; } + if (TestAndLogUiCmdStop(test, e)) + { + stopInProgress = true; + } + } + while (!e.Contains(Event.TimerExpired) && !e.Contains(Event.Next)); + + + if (stopInProgress) + { + retVal = Event.UiCmdStop; + goto stopTest; + } + } + if (++repetitionNr <= test.Repeats) { diff --git a/TestBenchFramework/ComponentsManagerDlg.cs b/TestBenchFramework/ComponentsManagerDlg.cs index dcdc86aa5..63d608e52 100644 --- a/TestBenchFramework/ComponentsManagerDlg.cs +++ b/TestBenchFramework/ComponentsManagerDlg.cs @@ -213,6 +213,7 @@ namespace TBF } catch (Exception exc) { + log.ErrorFormat("Exception when saving components : {1}", exc.Message); return false; } } diff --git a/TestBenchFramework/LoginDlg.Designer.cs b/TestBenchFramework/LoginDlg.Designer.cs index 605a965e2..af91d7211 100644 --- a/TestBenchFramework/LoginDlg.Designer.cs +++ b/TestBenchFramework/LoginDlg.Designer.cs @@ -31,70 +31,70 @@ namespace TBF /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlg)); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.passwordTextBox = new System.Windows.Forms.TextBox(); - this.cancelButton = new System.Windows.Forms.Button(); - this.okButton = new System.Windows.Forms.Button(); - this.userNameTextBox = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // label1 - // - resources.ApplyResources(this.label1, "label1"); - this.label1.Name = "label1"; - // - // label2 - // - resources.ApplyResources(this.label2, "label2"); - this.label2.Name = "label2"; - // - // passwordTextBox - // - resources.ApplyResources(this.passwordTextBox, "passwordTextBox"); - this.passwordTextBox.Name = "passwordTextBox"; - this.passwordTextBox.UseSystemPasswordChar = true; - // - // cancelButton - // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - resources.ApplyResources(this.cancelButton, "cancelButton"); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // okButton - // - this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - resources.ApplyResources(this.okButton, "okButton"); - this.okButton.Name = "okButton"; - this.okButton.UseVisualStyleBackColor = true; - this.okButton.Click += new System.EventHandler(this.okButton_Click); - // - // userNameTextBox - // - resources.ApplyResources(this.userNameTextBox, "userNameTextBox"); - this.userNameTextBox.Name = "userNameTextBox"; - // - // LoginDlg - // - this.AcceptButton = this.okButton; - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.cancelButton; - this.Controls.Add(this.userNameTextBox); - this.Controls.Add(this.okButton); - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.passwordTextBox); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Name = "LoginDlg"; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.Load += new System.EventHandler(this.LoginDlg_Load); - this.ResumeLayout(false); - this.PerformLayout(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlg)); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.passwordTextBox = new System.Windows.Forms.TextBox(); + this.cancelButton = new System.Windows.Forms.Button(); + this.okButton = new System.Windows.Forms.Button(); + this.userNameTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.Name = "label2"; + // + // passwordTextBox + // + resources.ApplyResources(this.passwordTextBox, "passwordTextBox"); + this.passwordTextBox.Name = "passwordTextBox"; + this.passwordTextBox.UseSystemPasswordChar = true; + // + // cancelButton + // + resources.ApplyResources(this.cancelButton, "cancelButton"); + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Name = "cancelButton"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // okButton + // + resources.ApplyResources(this.okButton, "okButton"); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okButton.Name = "okButton"; + this.okButton.UseVisualStyleBackColor = true; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // userNameTextBox + // + resources.ApplyResources(this.userNameTextBox, "userNameTextBox"); + this.userNameTextBox.Name = "userNameTextBox"; + // + // LoginDlg + // + this.AcceptButton = this.okButton; + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelButton; + this.Controls.Add(this.userNameTextBox); + this.Controls.Add(this.okButton); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.passwordTextBox); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "LoginDlg"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Load += new System.EventHandler(this.LoginDlg_Load); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/TestBenchFramework/LoginDlg.resx b/TestBenchFramework/LoginDlg.resx index c22aed612..c1c0f0090 100644 --- a/TestBenchFramework/LoginDlg.resx +++ b/TestBenchFramework/LoginDlg.resx @@ -118,171 +118,183 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 - - - - 168, 20 - - - - CenterScreen - - - cancelButton - - - 6, 13 - - - 1 - - - 105, 28 - - - passwordTextBox - - - 105, 28 - - - 8, 51 - - - 96, 48 - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - User name - - - 2 - - - $this - - - 5 - - - 3 - - - 8, 24 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - LoginDlg - - - 168, 20 - - - 402, 88 - - - 5 - - - 285, 14 - - - $this - - - label1 - - - label2 - - - Cancel - - - $this - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - okButton - - - Password - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - True - - 53, 13 - - - 2 - - - 285, 48 + + + 8, 24 58, 13 - - 4 - - - 1 - - - $this - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - OK - - + 0 - - $this + + User name - - 96, 22 + + label1 - - True - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 3 - - - User login - - - 4 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this + + 5 + + + True + + + 8, 51 + + + 53, 13 + + + 1 + + + Password + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + + Top, Right + + + 128, 48 + + + 168, 20 + + + 3 + + + passwordTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + Top, Right + + + 317, 48 + + + 105, 28 + + + 5 + + + Cancel + + + cancelButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Top, Right + + + 317, 14 + + + 105, 28 + + + 4 + + + OK + + + okButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Top, Right + + + 128, 22 + + + 168, 20 + + + 2 + userNameTextBox + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + True + + 6, 13 + + + 434, 88 + + + CenterScreen + + + User login + + + LoginDlg + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/TestBenchFramework/LoginDlgWithBenchSelection.designer.cs b/TestBenchFramework/LoginDlgWithBenchSelection.designer.cs index 2f061cf79..899fbfecd 100644 --- a/TestBenchFramework/LoginDlgWithBenchSelection.designer.cs +++ b/TestBenchFramework/LoginDlgWithBenchSelection.designer.cs @@ -31,91 +31,91 @@ namespace TBF /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlgWithBenchSelection)); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.testBenchComboBox = new System.Windows.Forms.ComboBox(); - this.passwordTextBox = new System.Windows.Forms.TextBox(); - this.cancelButton = new System.Windows.Forms.Button(); - this.okButton = new System.Windows.Forms.Button(); - this.userNameTextBox = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // label1 - // - resources.ApplyResources(this.label1, "label1"); - this.label1.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; - this.label1.Name = "label1"; - // - // label2 - // - resources.ApplyResources(this.label2, "label2"); - this.label2.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; - this.label2.Name = "label2"; - // - // label3 - // - resources.ApplyResources(this.label3, "label3"); - this.label3.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; - this.label3.Name = "label3"; - // - // testBenchComboBox - // - resources.ApplyResources(this.testBenchComboBox, "testBenchComboBox"); - this.testBenchComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.testBenchComboBox.FormattingEnabled = true; - this.testBenchComboBox.Name = "testBenchComboBox"; - // - // passwordTextBox - // - resources.ApplyResources(this.passwordTextBox, "passwordTextBox"); - this.passwordTextBox.Name = "passwordTextBox"; - this.passwordTextBox.UseSystemPasswordChar = true; - this.passwordTextBox.TextChanged += new System.EventHandler(this.passwordTextBox_TextChanged); - // - // cancelButton - // - resources.ApplyResources(this.cancelButton, "cancelButton"); - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; - this.cancelButton.Name = "cancelButton"; - this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // okButton - // - resources.ApplyResources(this.okButton, "okButton"); - this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.okButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; - this.okButton.Name = "okButton"; - this.okButton.UseVisualStyleBackColor = true; - this.okButton.Click += new System.EventHandler(this.okButton_Click); - // - // userNameTextBox - // - resources.ApplyResources(this.userNameTextBox, "userNameTextBox"); - this.userNameTextBox.Name = "userNameTextBox"; - this.userNameTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox_KeyPress); - // - // LoginDlgWithBenchSelection - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.userNameTextBox); - this.Controls.Add(this.okButton); - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.passwordTextBox); - this.Controls.Add(this.testBenchComboBox); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Name = "LoginDlgWithBenchSelection"; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.Load += new System.EventHandler(this.LoginDlgWithBenchSelection_Load); - this.ResumeLayout(false); - this.PerformLayout(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlgWithBenchSelection)); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.testBenchComboBox = new System.Windows.Forms.ComboBox(); + this.passwordTextBox = new System.Windows.Forms.TextBox(); + this.cancelButton = new System.Windows.Forms.Button(); + this.okButton = new System.Windows.Forms.Button(); + this.userNameTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; + this.label1.Name = "label1"; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; + this.label2.Name = "label2"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; + this.label3.Name = "label3"; + // + // testBenchComboBox + // + resources.ApplyResources(this.testBenchComboBox, "testBenchComboBox"); + this.testBenchComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.testBenchComboBox.FormattingEnabled = true; + this.testBenchComboBox.Name = "testBenchComboBox"; + // + // passwordTextBox + // + resources.ApplyResources(this.passwordTextBox, "passwordTextBox"); + this.passwordTextBox.Name = "passwordTextBox"; + this.passwordTextBox.UseSystemPasswordChar = true; + this.passwordTextBox.TextChanged += new System.EventHandler(this.passwordTextBox_TextChanged); + // + // cancelButton + // + resources.ApplyResources(this.cancelButton, "cancelButton"); + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; + this.cancelButton.Name = "cancelButton"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // okButton + // + resources.ApplyResources(this.okButton, "okButton"); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.okButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank; + this.okButton.Name = "okButton"; + this.okButton.UseVisualStyleBackColor = true; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // userNameTextBox + // + resources.ApplyResources(this.userNameTextBox, "userNameTextBox"); + this.userNameTextBox.Name = "userNameTextBox"; + this.userNameTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox_KeyPress); + // + // LoginDlgWithBenchSelection + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.userNameTextBox); + this.Controls.Add(this.okButton); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.passwordTextBox); + this.Controls.Add(this.testBenchComboBox); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "LoginDlgWithBenchSelection"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Load += new System.EventHandler(this.LoginDlgWithBenchSelection_Load); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/TestBenchFramework/LoginDlgWithBenchSelection.resx b/TestBenchFramework/LoginDlgWithBenchSelection.resx index 4aa013558..29706ac0d 100644 --- a/TestBenchFramework/LoginDlgWithBenchSelection.resx +++ b/TestBenchFramework/LoginDlgWithBenchSelection.resx @@ -117,220 +117,235 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - User name - - - - 105, 28 - - - OK - - - Cancel - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - LoginDlgWithBenchSelection - - - label1 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 5 - - - $this - - - 96, 15 - - - 61, 13 - - - $this - - - 96, 67 - - - label3 - - + True - - - CenterScreen - - - $this - - - 8, 70 - - - 7 - - - 96, 41 - - - userNameTextBox - - - 1 + + + 8, 17 58, 13 - - 4 + + 0 - + + User name + + + label1 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + $this - - 6, 13 + + 7 - - 6 + + True + + + 8, 44 53, 13 - - testBenchComboBox + + 1 - - 168, 20 + + Password - - 105, 28 + + label2 - + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 168, 21 + + 6 - - 0 + + True - - 168, 20 + + 8, 70 - + + 61, 13 + + 2 - - 285, 14 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - Test bench + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + + Top, Right + + + 128, 67 + + + 168, 21 + + + 5 + + + testBenchComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + Top, Right + + + 128, 41 + + + 168, 20 + + + 4 + + + passwordTextBox + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + Top, Right + + + 317, 48 + + + 105, 28 + + + 7 + + + Cancel + + + cancelButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Top, Right + + + 317, 14 + + + 105, 28 + + + 6 + + + OK + okButton - - 285, 48 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this 1 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Top, Right - - True + + 128, 15 - - $this + + 168, 20 3 - - True + + userNameTextBox - - label2 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - cancelButton - - - 8, 17 - - - User login - - - passwordTextBox - - - Password - - - 2 - - - 8, 44 - - - 7 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 402, 102 - - - 4 - - - 5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 0 True + + 6, 13 + + + 434, 102 + + + CenterScreen + + + User login + + + LoginDlgWithBenchSelection + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/TestBenchFramework/ProcedureDlg.cs b/TestBenchFramework/ProcedureDlg.cs index f0dd6df53..27baff265 100644 --- a/TestBenchFramework/ProcedureDlg.cs +++ b/TestBenchFramework/ProcedureDlg.cs @@ -1162,7 +1162,7 @@ namespace TBF if (e.SubItem == (int)MtrlgyClmn.Part) { if (e.DisplayText.Equals("-")) return; /// OK - if (!int.TryParse(e.DisplayText, out dummy) || dummy < 1 || dummy > 3) + if (!int.TryParse(e.DisplayText, out dummy) || dummy < 1 || dummy > Config.Data.MaxPartNr) { e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; @@ -1295,7 +1295,7 @@ namespace TBF if (e.SubItem == (int)Mtrlgy2Clmn.Part) { if (e.DisplayText.Equals("-")) return; /// OK - if (!int.TryParse(e.DisplayText, out dummy) || dummy < 1 || dummy > Config.Data.MaxPartNr()) + if (!int.TryParse(e.DisplayText, out dummy) || dummy < 1 || dummy > Config.Data.MaxPartNr) { e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; @@ -1712,6 +1712,7 @@ namespace TBF goto done; +#if HEAT_METERS_SUPPORT heat_meters_label: DialogResult dr = heatMetersDlg.ShowDialog(); @@ -1721,6 +1722,7 @@ namespace TBF case DialogResult.Retry: goto methodLabel; } goto flowLabel; +#endif pressure_label: diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index ee5db3277..76eacc5f5 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.12.404.1")] -[assembly: AssemblyFileVersion("2.12.404.1")] +[assembly: AssemblyVersion("2.12.406.1")] +[assembly: AssemblyFileVersion("2.12.406.1")] diff --git a/TestBenchFramework/UiControls/BaseWithListViewEx.cs b/TestBenchFramework/UiControls/BaseWithListViewEx.cs index 95ee82648..1a39b4579 100644 --- a/TestBenchFramework/UiControls/BaseWithListViewEx.cs +++ b/TestBenchFramework/UiControls/BaseWithListViewEx.cs @@ -126,7 +126,10 @@ namespace TBF.UiControls MyItem selectedItem = (MyItem)SelectedItems[0].Tag; - if ((selectedItem as IHasItemNr).Id != 0) ToBeRemovedItems.Add(selectedItem); + if (selectedItem is IHasItemNr && (selectedItem as IHasItemNr).Id != 0) + { + ToBeRemovedItems.Add(selectedItem); + } MyItems.RemoveAt(removeItemNr); if (selectedItem is IHasItemNr) { diff --git a/TestBenchFramework/UiControls/ProceduresCtrl.cs b/TestBenchFramework/UiControls/ProceduresCtrl.cs index d7106dc36..27474af0d 100644 --- a/TestBenchFramework/UiControls/ProceduresCtrl.cs +++ b/TestBenchFramework/UiControls/ProceduresCtrl.cs @@ -185,7 +185,8 @@ namespace TBF.UiControls } catch (Exception exc) { - transaction.Rollback(); + log.ErrorFormat("Exception when saving Procedure '{0}' : {1}", newProcedure.Name, exc.Message); + transaction.Rollback(); } } session.Flush(); @@ -254,6 +255,7 @@ namespace TBF.UiControls } catch (Exception exc) { + log.ErrorFormat("Exception when saving Procedure '{0}' : {1}", modifiedProcedure.Name, exc.Message); transaction.Rollback(); } }