From 7831e510d8d9c93fcd89649a604ca3def67e1544 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 26 May 2015 14:12:37 +0200 Subject: [PATCH] More bug-fixes in DataEntry.Standard24, version 1.5.50. --- .../DataEntry/Standard24/TestStartEndForm.cs | 63 +++++++++---------- TestBenchFramework/Properties/AssemblyInfo.cs | 4 +- 2 files changed, 31 insertions(+), 36 deletions(-) diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard24/TestStartEndForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard24/TestStartEndForm.cs index ef7b46703..48688f601 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard24/TestStartEndForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard24/TestStartEndForm.cs @@ -49,14 +49,39 @@ namespace TBF.BenchControl.DataEntry.Standard24 public TestStartEndForm(int waterMetersCount, bool[] disabled) { endStates = false; - this.WaterMetersCount = waterMetersCount; this.disabled = disabled; - InitializeComponent(); WMStartState = new float[waterMetersCount]; WMStartStateStr = new string[waterMetersCount]; - completed = false; + } + + /// + /// Constructor to fill in end states + /// + /// Number of text boxes for serial numbers + public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled, + float refVolume, float errLimLo, float errLimHi) + { + endStates = true; + + this.WaterMetersCount = waterMetersCount; + if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount) + throw (new Exception("Invalid 'wmStartStateStr' argument")); + this.WMStartStateStr = wmStartStateStr; + this.disabled = disabled; + this.refVolume = refVolume; + this.warningLimLo = 2 * errLimLo; + this.warningLimHi = 2 * errLimHi; + + WMEndState = new float[waterMetersCount]; + } + + /// Parameterless constructor for all watermeters + public TestStartEndForm() + : this(Program.WMsCount, null) + { + InitializeComponent(); startTextBoxes = new TextBox[] { @@ -74,40 +99,10 @@ namespace TBF.BenchControl.DataEntry.Standard24 }; enabledTextBoxes = new List(); + completed = false; StartForceCloseHandler(); } - /// - /// Constructor to fill in end states - /// - /// Number of text boxes for serial numbers - public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled, - float refVolume, float errLimLo, float errLimHi) - { - endStates = true; - - this.WaterMetersCount = waterMetersCount; - this.WMStartStateStr = wmStartStateStr; - if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount) - throw (new Exception("Invalid 'wmStartStateStr' argument")); - this.disabled = disabled; - this.refVolume = refVolume; - this.warningLimLo = 2 * errLimLo; - this.warningLimHi = 2 * errLimHi; - - InitializeComponent(); - WMEndState = new float[waterMetersCount]; - completed = false; - - StartForceCloseHandler(); - } - - /// Parameterless constructor for all watermeters - public TestStartEndForm() - : this(Program.WMsCount, null) - { - } - private void CycleEndForm_Load(object sender, EventArgs e) { Localize(); diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 922a04733..7fa2eb4b8 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.5.49.1")] -[assembly: AssemblyFileVersion("1.5.49.1")] +[assembly: AssemblyVersion("1.5.50.1")] +[assembly: AssemblyFileVersion("1.5.50.1")]