From d7363c773ff7b1987a0af6e7e14c5133969232fa Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 26 May 2015 14:34:56 +0200 Subject: [PATCH] MOre bug-fixes in DataEntry.Standard24, version 1.5.51. --- .../DataEntry/Standard24/TestStartEndForm.cs | 75 ++++++++++--------- TestBenchFramework/Properties/AssemblyInfo.cs | 4 +- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard24/TestStartEndForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard24/TestStartEndForm.cs index 48688f601..705cb3d2a 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard24/TestStartEndForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard24/TestStartEndForm.cs @@ -43,44 +43,10 @@ namespace TBF.BenchControl.DataEntry.Standard24 IList enabledTextBoxes; /// - /// Constructor to fill in start states + /// Parameterless constructor iniitalizing common part /// - /// Number of text boxes for serial numbers - public TestStartEndForm(int waterMetersCount, bool[] disabled) + public TestStartEndForm() { - endStates = false; - this.WaterMetersCount = waterMetersCount; - this.disabled = disabled; - - WMStartState = new float[waterMetersCount]; - WMStartStateStr = new string[waterMetersCount]; - } - - /// - /// 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[] @@ -103,6 +69,43 @@ namespace TBF.BenchControl.DataEntry.Standard24 StartForceCloseHandler(); } + /// + /// Constructor to fill in start states + /// + /// Number of text boxes for serial numbers + public TestStartEndForm(int waterMetersCount, bool[] disabled) + : this() + { + endStates = false; + this.WaterMetersCount = waterMetersCount; + this.disabled = disabled; + + WMStartState = new float[waterMetersCount]; + WMStartStateStr = new string[waterMetersCount]; + } + + /// + /// 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) + : this() + { + 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]; + } + private void CycleEndForm_Load(object sender, EventArgs e) { Localize(); diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 7fa2eb4b8..c475ba8c4 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.50.1")] -[assembly: AssemblyFileVersion("1.5.50.1")] +[assembly: AssemblyVersion("1.5.51.1")] +[assembly: AssemblyFileVersion("1.5.51.1")]