diff --git a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs
index 2d60f91e1..6ceba4251 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs
@@ -29,7 +29,7 @@ namespace TBF.BenchControl.DataEntry.Combined
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
string[] wmEndState;
- public string WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
+ public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
public float WMState(int wmNr)
{
@@ -92,11 +92,17 @@ namespace TBF.BenchControl.DataEntry.Combined
}
/// Reference to the operation
- public IOperation ShowWMStatesFormOp()
+ public IOperation ShowTestStartFormOp()
{
return null;
}
+ /// Reference to the operation
+ public IOperation ShowTestEndFormOp()
+ {
+ return null;
+ }
+
delegate void EntryFormDlgt(EntryForm myRef);
///
void OpenBeginningDlg(EntryForm myRef)
diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs
index f0b7698d3..d9fa8d67f 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs
@@ -30,7 +30,7 @@ namespace TBF.BenchControl.DataEntry.Munich
public bool Disabled(int wmNr) { return false; } /// Not supported in Munich
string[] wmEndState;
- public string WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
+ public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
public float WMState(int wmNr)
{
@@ -91,12 +91,6 @@ namespace TBF.BenchControl.DataEntry.Munich
return null;
}
- /// Reference to the operation
- public IOperation ShowWMStatesFormOp()
- {
- return null;
- }
-
delegate void EntryFormDlgt(EntryForm myRef);
///
void OpenBeginningDlg(EntryForm myRef)
diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs
index e52944a80..42af18b17 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs
@@ -30,7 +30,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
public bool Disabled(int wmNr) { return false; } /// Not supported in Munich
string[] wmEndState;
- public string WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
+ public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
public float WMState(int wmNr)
{
@@ -91,12 +91,6 @@ namespace TBF.BenchControl.DataEntry.Munich3
return null;
}
- /// Reference to the operation
- public IOperation ShowWMStatesFormOp()
- {
- return null;
- }
-
delegate void EntryFormDlgt(EntryForm myRef);
///
void OpenBeginningDlg(EntryForm myRef)
diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard/EntryForm.cs
index ace08c67b..ba1c5c7f2 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Standard/EntryForm.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Standard/EntryForm.cs
@@ -28,11 +28,16 @@ namespace TBF.BenchControl.DataEntry.Standard
bool[] disabled;
public bool Disabled(int wmNr) { return (wmNr >= 0 && wmNr < disabled.Length) ? disabled[wmNr] : false; }
- string[] wmEndState;
- public string WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
+ string[] wmCycleEndState;
+ public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
- float[] wmState;
- public float WMState(int wmNr) { return (wmNr >= 0 && wmNr < wmState.Length) ? wmState[wmNr] : 0; }
+ float[] wmStartState;
+ public float WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
+
+ float[] wmEndState;
+ public float WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
+
+ string[] wmStartStateStr;
System.Windows.Forms.Form modelessDlg;
@@ -46,7 +51,8 @@ namespace TBF.BenchControl.DataEntry.Standard
None,
ShowFormAtCycleBeginning,
ShowFormAtCycleEnd,
- EnterWMStates,
+ EnterTestStartStates,
+ EnterTestEndStates,
}
CurrentOp currentOp;
@@ -57,8 +63,10 @@ namespace TBF.BenchControl.DataEntry.Standard
{
serialNr = new string[Program.WMsCount];
disabled = new bool[Program.WMsCount];
- wmEndState = new string[Program.WMsCount];
- wmState = new float[Program.WMsCount];
+ wmStartState = new float[Program.WMsCount];
+ wmStartStateStr = new string[Program.WMsCount];
+ wmEndState = new float[Program.WMsCount];
+ wmCycleEndState = new string[Program.WMsCount];
entryFormCfg = cfg;
currentOp = CurrentOp.None;
@@ -84,10 +92,18 @@ namespace TBF.BenchControl.DataEntry.Standard
}
/// Reference to the operation
- public IOperation ShowWMStatesFormOp()
+ public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
- currentOp = CurrentOp.EnterWMStates;
+ currentOp = CurrentOp.EnterTestStartStates;
+ return this;
+ }
+
+ /// Reference to the operation
+ public IOperation ShowTestEndFormOp()
+ {
+ if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
+ currentOp = CurrentOp.EnterTestEndStates;
return this;
}
@@ -105,9 +121,15 @@ namespace TBF.BenchControl.DataEntry.Standard
modelessDlg.Show();
}
///
- void OpenWMStatesDlg(EntryForm myRef)
+ void OpenTestStartStatesDlg(EntryForm myRef)
{
- myRef.modelessDlg = new WMStatesForm(Program.WMsCount, entryFormCfg.Units);
+ myRef.modelessDlg = new TestStartForm(Program.WMsCount, entryFormCfg.Units);
+ modelessDlg.Show();
+ }
+ ///
+ void OpenTestEndStatesDlg(EntryForm myRef)
+ {
+ myRef.modelessDlg = new TestEndForm(Program.WMsCount, entryFormCfg.Units, wmStartStateStr);
modelessDlg.Show();
}
@@ -123,8 +145,11 @@ namespace TBF.BenchControl.DataEntry.Standard
case CurrentOp.ShowFormAtCycleEnd:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
break;
- case CurrentOp.EnterWMStates:
- Program.MainWnd.Invoke(new EntryFormDlgt(OpenWMStatesDlg), this);
+ case CurrentOp.EnterTestStartStates:
+ Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
+ break;
+ case CurrentOp.EnterTestEndStates:
+ Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
break;
}
}
@@ -163,17 +188,27 @@ namespace TBF.BenchControl.DataEntry.Standard
{
if (waterMeters[i] != null)
{
- wmEndState[i] = waterMeters[i].EndState = dlg.EndStateText[i];
+ wmCycleEndState[i] = waterMeters[i].EndState = dlg.EndStateText[i];
}
}
}
- else if (modelessDlg is WMStatesForm)
+ else if (modelessDlg is TestStartForm)
{
- WMStatesForm dlg = (modelessDlg as WMStatesForm);
+ TestStartForm dlg = (modelessDlg as TestStartForm);
for (int i = 0; i < dlg.WaterMetersCount; i++)
{
- wmState[i] = dlg.WMState[i];
+ wmStartState[i] = dlg.WMStartState[i];
+ wmStartStateStr[i] = dlg.WMStartStateStr[i];
+ }
+ }
+ else if (modelessDlg is TestEndForm)
+ {
+ TestEndForm dlg = (modelessDlg as TestEndForm);
+
+ for (int i = 0; i < dlg.WaterMetersCount; i++)
+ {
+ wmEndState[i] = dlg.WMEndState[i];
}
}
resultSaved = true;
@@ -211,7 +246,7 @@ namespace TBF.BenchControl.DataEntry.Standard
{
testRslt.Meters[i].SerialNr = SerialNr(i);
testRslt.Meters[i].Disabled = Disabled(i);
- testRslt.Meters[i].EndState = WMEndState(i);
+ testRslt.Meters[i].EndState = WMCycleEndState(i);
}
}
}
diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard/TestEndForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard/TestEndForm.cs
new file mode 100644
index 000000000..ed0b7cf94
--- /dev/null
+++ b/TestBenchFramework/BenchControl/DataEntry/Standard/TestEndForm.cs
@@ -0,0 +1,158 @@
+///
+/// Copyright (c) 2013-2015 Sensus Metering Systems
+///
+using System;
+using System.Windows.Forms;
+using log4net;
+using TBF.Resources;
+
+namespace TBF.BenchControl.DataEntry.Standard
+{
+ public partial class TestEndForm : Form, GenericDevices.IHasCompleted
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(TestEndForm));
+
+ /// Number of text boxes for serial numbers
+ public readonly int WaterMetersCount;
+ public readonly Entities.UnitsVolume Units;
+
+ // To be retrieved after the form closes
+ public readonly string[] WMStartStateStr;
+
+ // To be retrieved after the form closes
+ public float[] WMEndState;
+
+ // Set to 'true' when the form closes
+ public bool Completed { get { return completed; } }
+ bool completed;
+
+ ///
+ /// Constructor
+ ///
+ /// Number of text boxes for serial numbers
+ public TestEndForm(int waterMetersCount, Entities.UnitsVolume units, string[] wmStartStateStr)
+ {
+ this.WaterMetersCount = waterMetersCount;
+ this.Units = units;
+ this.WMStartStateStr = wmStartStateStr;
+ if (wmStartStateStr == null || wmStartStateStr.Length != WaterMetersCount)
+ throw (new Exception("Invalid 3rd argument"));
+ InitializeComponent();
+ WMEndState = new float[WaterMetersCount];
+ completed = false;
+ StartForceCloseHandler();
+ }
+
+ /// Parameterless constructor for all watermeters
+ public TestEndForm()
+ : this(Program.WMsCount, Entities.UnitsVolume.CubicMtr, new string[Program.WMsCount])
+ {
+ for (int i = 0; i < Program.WMsCount; i++) WMStartStateStr[i] = string.Empty;
+ }
+
+ private void CycleEndForm_Load(object sender, EventArgs e)
+ {
+ Localize();
+
+ Height = 95 + 90 * WaterMetersCount;
+
+ groupBox1.Visible = false;
+ groupBox2.Visible = false;
+ groupBox3.Visible = false;
+ groupBox4.Visible = false;
+ groupBox5.Visible = false;
+ groupBox6.Visible = false;
+
+ if (WaterMetersCount >= 1)
+ {
+ groupBox1.Visible = true;
+ wmStartStateTextBox1.Text = WMStartStateStr[0];
+ }
+ if (WaterMetersCount >= 2)
+ {
+ groupBox2.Visible = true;
+ wmStartStateTextBox2.Text = WMStartStateStr[1];
+ }
+ if (WaterMetersCount >= 3)
+ {
+ groupBox3.Visible = true;
+ wmStartStateTextBox3.Text = WMStartStateStr[2];
+ }
+ if (WaterMetersCount >= 4)
+ {
+ groupBox4.Visible = true;
+ wmStartStateTextBox4.Text = WMStartStateStr[3];
+ }
+ if (WaterMetersCount >= 5)
+ {
+ groupBox5.Visible = true;
+ wmStartStateTextBox5.Text = WMStartStateStr[4];
+ }
+ if (WaterMetersCount >= 6)
+ {
+ groupBox6.Visible = true;
+ wmStartStateTextBox6.Text = WMStartStateStr[5];
+ }
+ }
+
+ void Localize()
+ {
+ Text = Strings.Water_Meter_States;
+ groupBox1.Text = Strings.Water_Meter + " 1";
+ groupBox2.Text = Strings.Water_Meter + " 2";
+ groupBox3.Text = Strings.Water_Meter + " 3";
+ groupBox4.Text = Strings.Water_Meter + " 4";
+ groupBox5.Text = Strings.Water_Meter + " 5";
+ groupBox6.Text = Strings.Water_Meter + " 6";
+ wmStateLabel1.Text = Strings.WMState;
+ wmStateLabel2.Text = Strings.WMState;
+ wmStateLabel3.Text = Strings.WMState;
+ wmStateLabel4.Text = Strings.WMState;
+ wmStateLabel5.Text = Strings.WMState;
+ wmStateLabel6.Text = Strings.WMState;
+ okButton.Text = Strings.OkBtnText;
+ }
+
+ private void okButton_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ /// Factor to convert the entered volume to liters
+ float factor = (Units == Entities.UnitsVolume.CubicMtr) ? 1000.0f : 1.0f;
+
+ if (WaterMetersCount >= 1) WMEndState[0] = factor * Utils.ParseUFloat(wmEndStateTextBox1.Text);
+ if (WaterMetersCount >= 2) WMEndState[1] = factor * Utils.ParseUFloat(wmEndStateTextBox2.Text);
+ if (WaterMetersCount >= 3) WMEndState[2] = factor * Utils.ParseUFloat(wmEndStateTextBox3.Text);
+ if (WaterMetersCount >= 4) WMEndState[3] = factor * Utils.ParseUFloat(wmEndStateTextBox4.Text);
+ if (WaterMetersCount >= 5) WMEndState[4] = factor * Utils.ParseUFloat(wmEndStateTextBox5.Text);
+ if (WaterMetersCount >= 6) WMEndState[5] = factor * Utils.ParseUFloat(wmEndStateTextBox6.Text);
+ }
+ catch
+ {
+ return;
+ }
+
+ completed = true;
+ Close();
+ }
+
+ #region Forced close handling
+
+ public void StartForceCloseHandler()
+ {
+ UiBridge.Bridge.CloseModelessFormHandler += delegate(object sender, EventArgs args)
+ {
+ if (InvokeRequired) { Invoke(new EventHandler(OnForceClose), sender, args); }
+ else OnForceClose(sender, args);
+ };
+ }
+
+ void OnForceClose(object sender, EventArgs args)
+ {
+ DialogResult = DialogResult.Cancel;
+ Close();
+ }
+
+ #endregion
+ }
+}
diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard/TestEndForm.designer.cs b/TestBenchFramework/BenchControl/DataEntry/Standard/TestEndForm.designer.cs
new file mode 100644
index 000000000..4962ab126
--- /dev/null
+++ b/TestBenchFramework/BenchControl/DataEntry/Standard/TestEndForm.designer.cs
@@ -0,0 +1,371 @@
+///
+/// Copyright (c) 2013-2015 Sensus Metering Systems
+///
+namespace TBF.BenchControl.DataEntry.Standard
+{
+ partial class TestEndForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.wmStartStateTextBox2 = new System.Windows.Forms.TextBox();
+ this.wmEndStateTextBox2 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel2 = new System.Windows.Forms.Label();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.wmStartStateTextBox1 = new System.Windows.Forms.TextBox();
+ this.wmEndStateTextBox1 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel1 = new System.Windows.Forms.Label();
+ this.okButton = new System.Windows.Forms.Button();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.wmStartStateTextBox3 = new System.Windows.Forms.TextBox();
+ this.wmEndStateTextBox3 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel3 = new System.Windows.Forms.Label();
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.wmStartStateTextBox4 = new System.Windows.Forms.TextBox();
+ this.wmEndStateTextBox4 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel4 = new System.Windows.Forms.Label();
+ this.groupBox5 = new System.Windows.Forms.GroupBox();
+ this.wmStartStateTextBox5 = new System.Windows.Forms.TextBox();
+ this.wmEndStateTextBox5 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel5 = new System.Windows.Forms.Label();
+ this.groupBox6 = new System.Windows.Forms.GroupBox();
+ this.wmStartStateTextBox6 = new System.Windows.Forms.TextBox();
+ this.wmEndStateTextBox6 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel6 = new System.Windows.Forms.Label();
+ this.groupBox2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.groupBox3.SuspendLayout();
+ this.groupBox4.SuspendLayout();
+ this.groupBox5.SuspendLayout();
+ this.groupBox6.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.wmStartStateTextBox2);
+ this.groupBox2.Controls.Add(this.wmEndStateTextBox2);
+ this.groupBox2.Controls.Add(this.wmStateLabel2);
+ this.groupBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox2.ForeColor = System.Drawing.Color.Black;
+ this.groupBox2.Location = new System.Drawing.Point(25, 102);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(538, 81);
+ this.groupBox2.TabIndex = 2;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Water Meter 2";
+ //
+ // wmStartStateTextBox2
+ //
+ this.wmStartStateTextBox2.Enabled = false;
+ this.wmStartStateTextBox2.Location = new System.Drawing.Point(174, 31);
+ this.wmStartStateTextBox2.Name = "wmStartStateTextBox2";
+ this.wmStartStateTextBox2.Size = new System.Drawing.Size(163, 31);
+ this.wmStartStateTextBox2.TabIndex = 3;
+ //
+ // wmEndStateTextBox2
+ //
+ this.wmEndStateTextBox2.Location = new System.Drawing.Point(355, 31);
+ this.wmEndStateTextBox2.Name = "wmEndStateTextBox2";
+ this.wmEndStateTextBox2.Size = new System.Drawing.Size(163, 31);
+ this.wmEndStateTextBox2.TabIndex = 1;
+ //
+ // wmStateLabel2
+ //
+ this.wmStateLabel2.AutoSize = true;
+ this.wmStateLabel2.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel2.Name = "wmStateLabel2";
+ this.wmStateLabel2.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel2.TabIndex = 0;
+ this.wmStateLabel2.Text = "State:";
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.wmStartStateTextBox1);
+ this.groupBox1.Controls.Add(this.wmEndStateTextBox1);
+ this.groupBox1.Controls.Add(this.wmStateLabel1);
+ this.groupBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox1.ForeColor = System.Drawing.Color.Black;
+ this.groupBox1.Location = new System.Drawing.Point(25, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(538, 81);
+ this.groupBox1.TabIndex = 1;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Water Meter 1";
+ //
+ // wmStartStateTextBox1
+ //
+ this.wmStartStateTextBox1.Enabled = false;
+ this.wmStartStateTextBox1.Location = new System.Drawing.Point(174, 31);
+ this.wmStartStateTextBox1.Name = "wmStartStateTextBox1";
+ this.wmStartStateTextBox1.Size = new System.Drawing.Size(163, 31);
+ this.wmStartStateTextBox1.TabIndex = 2;
+ //
+ // wmEndStateTextBox1
+ //
+ this.wmEndStateTextBox1.Location = new System.Drawing.Point(355, 31);
+ this.wmEndStateTextBox1.Name = "wmEndStateTextBox1";
+ this.wmEndStateTextBox1.Size = new System.Drawing.Size(163, 31);
+ this.wmEndStateTextBox1.TabIndex = 1;
+ //
+ // wmStateLabel1
+ //
+ this.wmStateLabel1.AutoSize = true;
+ this.wmStateLabel1.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel1.Name = "wmStateLabel1";
+ this.wmStateLabel1.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel1.TabIndex = 0;
+ this.wmStateLabel1.Text = "State:";
+ //
+ // okButton
+ //
+ this.okButton.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.okButton.ForeColor = System.Drawing.Color.Black;
+ this.okButton.Location = new System.Drawing.Point(593, 26);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(98, 63);
+ this.okButton.TabIndex = 7;
+ this.okButton.Text = "OK";
+ this.okButton.UseVisualStyleBackColor = true;
+ this.okButton.Click += new System.EventHandler(this.okButton_Click);
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.wmStartStateTextBox3);
+ this.groupBox3.Controls.Add(this.wmEndStateTextBox3);
+ this.groupBox3.Controls.Add(this.wmStateLabel3);
+ this.groupBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox3.ForeColor = System.Drawing.Color.Black;
+ this.groupBox3.Location = new System.Drawing.Point(25, 192);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(538, 81);
+ this.groupBox3.TabIndex = 3;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Water Meter 3";
+ //
+ // wmStartStateTextBox3
+ //
+ this.wmStartStateTextBox3.Enabled = false;
+ this.wmStartStateTextBox3.Location = new System.Drawing.Point(174, 31);
+ this.wmStartStateTextBox3.Name = "wmStartStateTextBox3";
+ this.wmStartStateTextBox3.Size = new System.Drawing.Size(163, 31);
+ this.wmStartStateTextBox3.TabIndex = 4;
+ //
+ // wmEndStateTextBox3
+ //
+ this.wmEndStateTextBox3.Location = new System.Drawing.Point(355, 31);
+ this.wmEndStateTextBox3.Name = "wmEndStateTextBox3";
+ this.wmEndStateTextBox3.Size = new System.Drawing.Size(163, 31);
+ this.wmEndStateTextBox3.TabIndex = 1;
+ //
+ // wmStateLabel3
+ //
+ this.wmStateLabel3.AutoSize = true;
+ this.wmStateLabel3.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel3.Name = "wmStateLabel3";
+ this.wmStateLabel3.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel3.TabIndex = 0;
+ this.wmStateLabel3.Text = "State:";
+ //
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.wmStartStateTextBox4);
+ this.groupBox4.Controls.Add(this.wmEndStateTextBox4);
+ this.groupBox4.Controls.Add(this.wmStateLabel4);
+ this.groupBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox4.ForeColor = System.Drawing.Color.Black;
+ this.groupBox4.Location = new System.Drawing.Point(25, 282);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(538, 81);
+ this.groupBox4.TabIndex = 4;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Water Meter 4";
+ //
+ // wmStartStateTextBox4
+ //
+ this.wmStartStateTextBox4.Enabled = false;
+ this.wmStartStateTextBox4.Location = new System.Drawing.Point(174, 31);
+ this.wmStartStateTextBox4.Name = "wmStartStateTextBox4";
+ this.wmStartStateTextBox4.Size = new System.Drawing.Size(163, 31);
+ this.wmStartStateTextBox4.TabIndex = 4;
+ //
+ // wmEndStateTextBox4
+ //
+ this.wmEndStateTextBox4.Location = new System.Drawing.Point(355, 31);
+ this.wmEndStateTextBox4.Name = "wmEndStateTextBox4";
+ this.wmEndStateTextBox4.Size = new System.Drawing.Size(163, 31);
+ this.wmEndStateTextBox4.TabIndex = 1;
+ //
+ // wmStateLabel4
+ //
+ this.wmStateLabel4.AutoSize = true;
+ this.wmStateLabel4.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel4.Name = "wmStateLabel4";
+ this.wmStateLabel4.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel4.TabIndex = 0;
+ this.wmStateLabel4.Text = "State:";
+ //
+ // groupBox5
+ //
+ this.groupBox5.Controls.Add(this.wmStartStateTextBox5);
+ this.groupBox5.Controls.Add(this.wmEndStateTextBox5);
+ this.groupBox5.Controls.Add(this.wmStateLabel5);
+ this.groupBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox5.ForeColor = System.Drawing.Color.Black;
+ this.groupBox5.Location = new System.Drawing.Point(25, 372);
+ this.groupBox5.Name = "groupBox5";
+ this.groupBox5.Size = new System.Drawing.Size(538, 81);
+ this.groupBox5.TabIndex = 5;
+ this.groupBox5.TabStop = false;
+ this.groupBox5.Text = "Water Meter 5";
+ //
+ // wmStartStateTextBox5
+ //
+ this.wmStartStateTextBox5.Enabled = false;
+ this.wmStartStateTextBox5.Location = new System.Drawing.Point(174, 31);
+ this.wmStartStateTextBox5.Name = "wmStartStateTextBox5";
+ this.wmStartStateTextBox5.Size = new System.Drawing.Size(163, 31);
+ this.wmStartStateTextBox5.TabIndex = 4;
+ //
+ // wmEndStateTextBox5
+ //
+ this.wmEndStateTextBox5.Location = new System.Drawing.Point(355, 31);
+ this.wmEndStateTextBox5.Name = "wmEndStateTextBox5";
+ this.wmEndStateTextBox5.Size = new System.Drawing.Size(163, 31);
+ this.wmEndStateTextBox5.TabIndex = 1;
+ //
+ // wmStateLabel5
+ //
+ this.wmStateLabel5.AutoSize = true;
+ this.wmStateLabel5.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel5.Name = "wmStateLabel5";
+ this.wmStateLabel5.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel5.TabIndex = 0;
+ this.wmStateLabel5.Text = "State:";
+ //
+ // groupBox6
+ //
+ this.groupBox6.Controls.Add(this.wmStartStateTextBox6);
+ this.groupBox6.Controls.Add(this.wmEndStateTextBox6);
+ this.groupBox6.Controls.Add(this.wmStateLabel6);
+ this.groupBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox6.ForeColor = System.Drawing.Color.Black;
+ this.groupBox6.Location = new System.Drawing.Point(25, 462);
+ this.groupBox6.Name = "groupBox6";
+ this.groupBox6.Size = new System.Drawing.Size(538, 81);
+ this.groupBox6.TabIndex = 6;
+ this.groupBox6.TabStop = false;
+ this.groupBox6.Text = "Water Meter 6";
+ //
+ // wmStartStateTextBox6
+ //
+ this.wmStartStateTextBox6.Enabled = false;
+ this.wmStartStateTextBox6.Location = new System.Drawing.Point(174, 31);
+ this.wmStartStateTextBox6.Name = "wmStartStateTextBox6";
+ this.wmStartStateTextBox6.Size = new System.Drawing.Size(163, 31);
+ this.wmStartStateTextBox6.TabIndex = 4;
+ //
+ // wmEndStateTextBox6
+ //
+ this.wmEndStateTextBox6.Location = new System.Drawing.Point(355, 31);
+ this.wmEndStateTextBox6.Name = "wmEndStateTextBox6";
+ this.wmEndStateTextBox6.Size = new System.Drawing.Size(163, 31);
+ this.wmEndStateTextBox6.TabIndex = 1;
+ //
+ // wmStateLabel6
+ //
+ this.wmStateLabel6.AutoSize = true;
+ this.wmStateLabel6.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel6.Name = "wmStateLabel6";
+ this.wmStateLabel6.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel6.TabIndex = 0;
+ this.wmStateLabel6.Text = "State:";
+ //
+ // TestEndForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.DarkGoldenrod;
+ this.ClientSize = new System.Drawing.Size(718, 565);
+ this.Controls.Add(this.groupBox6);
+ this.Controls.Add(this.groupBox5);
+ this.Controls.Add(this.groupBox4);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.okButton);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+ this.Name = "TestEndForm";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.Text = "End States";
+ this.TopMost = true;
+ this.Load += new System.EventHandler(this.CycleEndForm_Load);
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.groupBox5.ResumeLayout(false);
+ this.groupBox5.PerformLayout();
+ this.groupBox6.ResumeLayout(false);
+ this.groupBox6.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.TextBox wmEndStateTextBox2;
+ private System.Windows.Forms.Label wmStateLabel2;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox wmEndStateTextBox1;
+ private System.Windows.Forms.Label wmStateLabel1;
+ private System.Windows.Forms.Button okButton;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.TextBox wmEndStateTextBox3;
+ private System.Windows.Forms.Label wmStateLabel3;
+ private System.Windows.Forms.GroupBox groupBox4;
+ private System.Windows.Forms.TextBox wmEndStateTextBox4;
+ private System.Windows.Forms.Label wmStateLabel4;
+ private System.Windows.Forms.GroupBox groupBox5;
+ private System.Windows.Forms.TextBox wmEndStateTextBox5;
+ private System.Windows.Forms.Label wmStateLabel5;
+ private System.Windows.Forms.GroupBox groupBox6;
+ private System.Windows.Forms.TextBox wmEndStateTextBox6;
+ private System.Windows.Forms.Label wmStateLabel6;
+ private System.Windows.Forms.TextBox wmStartStateTextBox2;
+ private System.Windows.Forms.TextBox wmStartStateTextBox1;
+ private System.Windows.Forms.TextBox wmStartStateTextBox3;
+ private System.Windows.Forms.TextBox wmStartStateTextBox4;
+ private System.Windows.Forms.TextBox wmStartStateTextBox5;
+ private System.Windows.Forms.TextBox wmStartStateTextBox6;
+
+ }
+}
\ No newline at end of file
diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard/WMStatesForm.resx b/TestBenchFramework/BenchControl/DataEntry/Standard/TestEndForm.resx
similarity index 100%
rename from TestBenchFramework/BenchControl/DataEntry/Standard/WMStatesForm.resx
rename to TestBenchFramework/BenchControl/DataEntry/Standard/TestEndForm.resx
diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard/WMStatesForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.cs
similarity index 69%
rename from TestBenchFramework/BenchControl/DataEntry/Standard/WMStatesForm.cs
rename to TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.cs
index 0492aeaad..4cdb14fd8 100644
--- a/TestBenchFramework/BenchControl/DataEntry/Standard/WMStatesForm.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.cs
@@ -8,16 +8,17 @@ using TBF.Resources;
namespace TBF.BenchControl.DataEntry.Standard
{
- public partial class WMStatesForm : Form, GenericDevices.IHasCompleted
+ public partial class TestStartForm : Form, GenericDevices.IHasCompleted
{
- private static readonly ILog log = LogManager.GetLogger(typeof(WMStatesForm));
+ private static readonly ILog log = LogManager.GetLogger(typeof(TestStartForm));
/// Number of text boxes for serial numbers
public readonly int WaterMetersCount;
public readonly Entities.UnitsVolume Units;
// To be retrieved after the form closes
- public float[] WMState;
+ public float[] WMStartState;
+ public string[] WMStartStateStr;
// Set to 'true' when the form closes
public bool Completed { get { return completed; } }
@@ -27,18 +28,19 @@ namespace TBF.BenchControl.DataEntry.Standard
/// Constructor
///
/// Number of text boxes for serial numbers
- public WMStatesForm(int waterMetersCount, Entities.UnitsVolume units)
+ public TestStartForm(int waterMetersCount, Entities.UnitsVolume units)
{
this.WaterMetersCount = waterMetersCount;
this.Units = units;
InitializeComponent();
- WMState = new float[WaterMetersCount];
+ WMStartState = new float[WaterMetersCount];
+ WMStartStateStr = new string[WaterMetersCount];
completed = false;
StartForceCloseHandler();
}
/// Parameterless constructor for all watermeters
- public WMStatesForm()
+ public TestStartForm()
: this(Program.WMsCount, Entities.UnitsVolume.CubicMtr)
{
}
@@ -82,12 +84,36 @@ namespace TBF.BenchControl.DataEntry.Standard
/// Factor to convert the entered volume to liters
float factor = (Units == Entities.UnitsVolume.CubicMtr) ? 1000.0f : 1.0f;
- if (WaterMetersCount >= 1) WMState[0] = factor * Utils.ParseUFloat(wmStateTextBox1.Text);
- if (WaterMetersCount >= 2) WMState[1] = factor * Utils.ParseUFloat(wmStateTextBox2.Text);
- if (WaterMetersCount >= 3) WMState[2] = factor * Utils.ParseUFloat(wmStateTextBox3.Text);
- if (WaterMetersCount >= 4) WMState[3] = factor * Utils.ParseUFloat(wmStateTextBox4.Text);
- if (WaterMetersCount >= 5) WMState[4] = factor * Utils.ParseUFloat(wmStateTextBox5.Text);
- if (WaterMetersCount >= 6) WMState[5] = factor * Utils.ParseUFloat(wmStateTextBox6.Text);
+ if (WaterMetersCount >= 1)
+ {
+ WMStartStateStr[0] = wmStateTextBox1.Text;
+ WMStartState[0] = factor * Utils.ParseUFloat(wmStateTextBox1.Text);
+ }
+ if (WaterMetersCount >= 2)
+ {
+ WMStartStateStr[1] = wmStateTextBox2.Text;
+ WMStartState[1] = factor * Utils.ParseUFloat(wmStateTextBox2.Text);
+ }
+ if (WaterMetersCount >= 3)
+ {
+ WMStartStateStr[2] = wmStateTextBox3.Text;
+ WMStartState[2] = factor * Utils.ParseUFloat(wmStateTextBox3.Text);
+ }
+ if (WaterMetersCount >= 4)
+ {
+ WMStartStateStr[3] = wmStateTextBox4.Text;
+ WMStartState[3] = factor * Utils.ParseUFloat(wmStateTextBox4.Text);
+ }
+ if (WaterMetersCount >= 5)
+ {
+ WMStartStateStr[4] = wmStateTextBox5.Text;
+ WMStartState[4] = factor * Utils.ParseUFloat(wmStateTextBox5.Text);
+ }
+ if (WaterMetersCount >= 6)
+ {
+ WMStartStateStr[5] = wmStateTextBox6.Text;
+ WMStartState[5] = factor * Utils.ParseUFloat(wmStateTextBox6.Text);
+ }
}
catch
{
diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.designer.cs b/TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.designer.cs
new file mode 100644
index 000000000..629554c4c
--- /dev/null
+++ b/TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.designer.cs
@@ -0,0 +1,305 @@
+///
+/// Copyright (c) 2013-2015 Sensus Metering Systems
+///
+namespace TBF.BenchControl.DataEntry.Standard
+{
+ partial class TestStartForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.wmStateTextBox2 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel2 = new System.Windows.Forms.Label();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.wmStateTextBox1 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel1 = new System.Windows.Forms.Label();
+ this.okButton = new System.Windows.Forms.Button();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.wmStateTextBox3 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel3 = new System.Windows.Forms.Label();
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.wmStateTextBox4 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel4 = new System.Windows.Forms.Label();
+ this.groupBox5 = new System.Windows.Forms.GroupBox();
+ this.wmStateTextBox5 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel5 = new System.Windows.Forms.Label();
+ this.groupBox6 = new System.Windows.Forms.GroupBox();
+ this.wmStateTextBox6 = new System.Windows.Forms.TextBox();
+ this.wmStateLabel6 = new System.Windows.Forms.Label();
+ this.groupBox2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.groupBox3.SuspendLayout();
+ this.groupBox4.SuspendLayout();
+ this.groupBox5.SuspendLayout();
+ this.groupBox6.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.wmStateTextBox2);
+ this.groupBox2.Controls.Add(this.wmStateLabel2);
+ this.groupBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox2.ForeColor = System.Drawing.Color.Black;
+ this.groupBox2.Location = new System.Drawing.Point(25, 102);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(362, 81);
+ this.groupBox2.TabIndex = 2;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Water Meter 2";
+ //
+ // wmStateTextBox2
+ //
+ this.wmStateTextBox2.Location = new System.Drawing.Point(183, 31);
+ this.wmStateTextBox2.Name = "wmStateTextBox2";
+ this.wmStateTextBox2.Size = new System.Drawing.Size(163, 31);
+ this.wmStateTextBox2.TabIndex = 1;
+ //
+ // wmStateLabel2
+ //
+ this.wmStateLabel2.AutoSize = true;
+ this.wmStateLabel2.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel2.Name = "wmStateLabel2";
+ this.wmStateLabel2.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel2.TabIndex = 0;
+ this.wmStateLabel2.Text = "State:";
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.wmStateTextBox1);
+ this.groupBox1.Controls.Add(this.wmStateLabel1);
+ this.groupBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox1.ForeColor = System.Drawing.Color.Black;
+ this.groupBox1.Location = new System.Drawing.Point(25, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(362, 81);
+ this.groupBox1.TabIndex = 1;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Water Meter 1";
+ //
+ // wmStateTextBox1
+ //
+ this.wmStateTextBox1.Location = new System.Drawing.Point(183, 31);
+ this.wmStateTextBox1.Name = "wmStateTextBox1";
+ this.wmStateTextBox1.Size = new System.Drawing.Size(163, 31);
+ this.wmStateTextBox1.TabIndex = 1;
+ //
+ // wmStateLabel1
+ //
+ this.wmStateLabel1.AutoSize = true;
+ this.wmStateLabel1.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel1.Name = "wmStateLabel1";
+ this.wmStateLabel1.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel1.TabIndex = 0;
+ this.wmStateLabel1.Text = "State:";
+ //
+ // okButton
+ //
+ this.okButton.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.okButton.ForeColor = System.Drawing.Color.Black;
+ this.okButton.Location = new System.Drawing.Point(425, 21);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(98, 63);
+ this.okButton.TabIndex = 7;
+ this.okButton.Text = "OK";
+ this.okButton.UseVisualStyleBackColor = true;
+ this.okButton.Click += new System.EventHandler(this.okButton_Click);
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.wmStateTextBox3);
+ this.groupBox3.Controls.Add(this.wmStateLabel3);
+ this.groupBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox3.ForeColor = System.Drawing.Color.Black;
+ this.groupBox3.Location = new System.Drawing.Point(25, 192);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(362, 81);
+ this.groupBox3.TabIndex = 3;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Water Meter 3";
+ //
+ // wmStateTextBox3
+ //
+ this.wmStateTextBox3.Location = new System.Drawing.Point(183, 31);
+ this.wmStateTextBox3.Name = "wmStateTextBox3";
+ this.wmStateTextBox3.Size = new System.Drawing.Size(163, 31);
+ this.wmStateTextBox3.TabIndex = 1;
+ //
+ // wmStateLabel3
+ //
+ this.wmStateLabel3.AutoSize = true;
+ this.wmStateLabel3.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel3.Name = "wmStateLabel3";
+ this.wmStateLabel3.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel3.TabIndex = 0;
+ this.wmStateLabel3.Text = "State:";
+ //
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.wmStateTextBox4);
+ this.groupBox4.Controls.Add(this.wmStateLabel4);
+ this.groupBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox4.ForeColor = System.Drawing.Color.Black;
+ this.groupBox4.Location = new System.Drawing.Point(25, 282);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(362, 81);
+ this.groupBox4.TabIndex = 4;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Water Meter 4";
+ //
+ // wmStateTextBox4
+ //
+ this.wmStateTextBox4.Location = new System.Drawing.Point(183, 31);
+ this.wmStateTextBox4.Name = "wmStateTextBox4";
+ this.wmStateTextBox4.Size = new System.Drawing.Size(163, 31);
+ this.wmStateTextBox4.TabIndex = 1;
+ //
+ // wmStateLabel4
+ //
+ this.wmStateLabel4.AutoSize = true;
+ this.wmStateLabel4.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel4.Name = "wmStateLabel4";
+ this.wmStateLabel4.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel4.TabIndex = 0;
+ this.wmStateLabel4.Text = "State:";
+ //
+ // groupBox5
+ //
+ this.groupBox5.Controls.Add(this.wmStateTextBox5);
+ this.groupBox5.Controls.Add(this.wmStateLabel5);
+ this.groupBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox5.ForeColor = System.Drawing.Color.Black;
+ this.groupBox5.Location = new System.Drawing.Point(25, 372);
+ this.groupBox5.Name = "groupBox5";
+ this.groupBox5.Size = new System.Drawing.Size(362, 81);
+ this.groupBox5.TabIndex = 5;
+ this.groupBox5.TabStop = false;
+ this.groupBox5.Text = "Water Meter 5";
+ //
+ // wmStateTextBox5
+ //
+ this.wmStateTextBox5.Location = new System.Drawing.Point(183, 31);
+ this.wmStateTextBox5.Name = "wmStateTextBox5";
+ this.wmStateTextBox5.Size = new System.Drawing.Size(163, 31);
+ this.wmStateTextBox5.TabIndex = 1;
+ //
+ // wmStateLabel5
+ //
+ this.wmStateLabel5.AutoSize = true;
+ this.wmStateLabel5.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel5.Name = "wmStateLabel5";
+ this.wmStateLabel5.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel5.TabIndex = 0;
+ this.wmStateLabel5.Text = "State:";
+ //
+ // groupBox6
+ //
+ this.groupBox6.Controls.Add(this.wmStateTextBox6);
+ this.groupBox6.Controls.Add(this.wmStateLabel6);
+ this.groupBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
+ this.groupBox6.ForeColor = System.Drawing.Color.Black;
+ this.groupBox6.Location = new System.Drawing.Point(25, 462);
+ this.groupBox6.Name = "groupBox6";
+ this.groupBox6.Size = new System.Drawing.Size(362, 81);
+ this.groupBox6.TabIndex = 6;
+ this.groupBox6.TabStop = false;
+ this.groupBox6.Text = "Water Meter 6";
+ //
+ // wmStateTextBox6
+ //
+ this.wmStateTextBox6.Location = new System.Drawing.Point(183, 31);
+ this.wmStateTextBox6.Name = "wmStateTextBox6";
+ this.wmStateTextBox6.Size = new System.Drawing.Size(163, 31);
+ this.wmStateTextBox6.TabIndex = 1;
+ //
+ // wmStateLabel6
+ //
+ this.wmStateLabel6.AutoSize = true;
+ this.wmStateLabel6.Location = new System.Drawing.Point(18, 34);
+ this.wmStateLabel6.Name = "wmStateLabel6";
+ this.wmStateLabel6.Size = new System.Drawing.Size(68, 23);
+ this.wmStateLabel6.TabIndex = 0;
+ this.wmStateLabel6.Text = "State:";
+ //
+ // TestStartForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.DarkGoldenrod;
+ this.ClientSize = new System.Drawing.Size(559, 565);
+ this.Controls.Add(this.groupBox6);
+ this.Controls.Add(this.groupBox5);
+ this.Controls.Add(this.groupBox4);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.okButton);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+ this.Name = "TestStartForm";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.Text = "Start States";
+ this.TopMost = true;
+ this.Load += new System.EventHandler(this.CycleEndForm_Load);
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.groupBox5.ResumeLayout(false);
+ this.groupBox5.PerformLayout();
+ this.groupBox6.ResumeLayout(false);
+ this.groupBox6.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.TextBox wmStateTextBox2;
+ private System.Windows.Forms.Label wmStateLabel2;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox wmStateTextBox1;
+ private System.Windows.Forms.Label wmStateLabel1;
+ private System.Windows.Forms.Button okButton;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.TextBox wmStateTextBox3;
+ private System.Windows.Forms.Label wmStateLabel3;
+ private System.Windows.Forms.GroupBox groupBox4;
+ private System.Windows.Forms.TextBox wmStateTextBox4;
+ private System.Windows.Forms.Label wmStateLabel4;
+ private System.Windows.Forms.GroupBox groupBox5;
+ private System.Windows.Forms.TextBox wmStateTextBox5;
+ private System.Windows.Forms.Label wmStateLabel5;
+ private System.Windows.Forms.GroupBox groupBox6;
+ private System.Windows.Forms.TextBox wmStateTextBox6;
+ private System.Windows.Forms.Label wmStateLabel6;
+
+ }
+}
\ No newline at end of file
diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.resx b/TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/TestBenchFramework/BenchControl/DataEntry/Standard/TestStartForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard/WMStatesForm.designer.cs b/TestBenchFramework/BenchControl/DataEntry/Standard/WMStatesForm.designer.cs
deleted file mode 100644
index 55f375c1c..000000000
--- a/TestBenchFramework/BenchControl/DataEntry/Standard/WMStatesForm.designer.cs
+++ /dev/null
@@ -1,305 +0,0 @@
-///
-/// Copyright (c) 2013-2015 Sensus Metering Systems
-///
-namespace TBF.BenchControl.DataEntry.Standard
-{
- partial class WMStatesForm
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.wmStateTextBox2 = new System.Windows.Forms.TextBox();
- this.wmStateLabel2 = new System.Windows.Forms.Label();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.wmStateTextBox1 = new System.Windows.Forms.TextBox();
- this.wmStateLabel1 = new System.Windows.Forms.Label();
- this.okButton = new System.Windows.Forms.Button();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.wmStateTextBox3 = new System.Windows.Forms.TextBox();
- this.wmStateLabel3 = new System.Windows.Forms.Label();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.wmStateTextBox4 = new System.Windows.Forms.TextBox();
- this.wmStateLabel4 = new System.Windows.Forms.Label();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.wmStateTextBox5 = new System.Windows.Forms.TextBox();
- this.wmStateLabel5 = new System.Windows.Forms.Label();
- this.groupBox6 = new System.Windows.Forms.GroupBox();
- this.wmStateTextBox6 = new System.Windows.Forms.TextBox();
- this.wmStateLabel6 = new System.Windows.Forms.Label();
- this.groupBox2.SuspendLayout();
- this.groupBox1.SuspendLayout();
- this.groupBox3.SuspendLayout();
- this.groupBox4.SuspendLayout();
- this.groupBox5.SuspendLayout();
- this.groupBox6.SuspendLayout();
- this.SuspendLayout();
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.wmStateTextBox2);
- this.groupBox2.Controls.Add(this.wmStateLabel2);
- this.groupBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
- this.groupBox2.ForeColor = System.Drawing.Color.Black;
- this.groupBox2.Location = new System.Drawing.Point(25, 102);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(362, 81);
- this.groupBox2.TabIndex = 2;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "Water Meter 2";
- //
- // wmStateTextBox2
- //
- this.wmStateTextBox2.Location = new System.Drawing.Point(183, 31);
- this.wmStateTextBox2.Name = "wmStateTextBox2";
- this.wmStateTextBox2.Size = new System.Drawing.Size(163, 31);
- this.wmStateTextBox2.TabIndex = 1;
- //
- // wmStateLabel2
- //
- this.wmStateLabel2.AutoSize = true;
- this.wmStateLabel2.Location = new System.Drawing.Point(18, 34);
- this.wmStateLabel2.Name = "wmStateLabel2";
- this.wmStateLabel2.Size = new System.Drawing.Size(68, 23);
- this.wmStateLabel2.TabIndex = 0;
- this.wmStateLabel2.Text = "State:";
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.wmStateTextBox1);
- this.groupBox1.Controls.Add(this.wmStateLabel1);
- this.groupBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
- this.groupBox1.ForeColor = System.Drawing.Color.Black;
- this.groupBox1.Location = new System.Drawing.Point(25, 12);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(362, 81);
- this.groupBox1.TabIndex = 1;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Water Meter 1";
- //
- // wmStateTextBox1
- //
- this.wmStateTextBox1.Location = new System.Drawing.Point(183, 31);
- this.wmStateTextBox1.Name = "wmStateTextBox1";
- this.wmStateTextBox1.Size = new System.Drawing.Size(163, 31);
- this.wmStateTextBox1.TabIndex = 1;
- //
- // wmStateLabel1
- //
- this.wmStateLabel1.AutoSize = true;
- this.wmStateLabel1.Location = new System.Drawing.Point(18, 34);
- this.wmStateLabel1.Name = "wmStateLabel1";
- this.wmStateLabel1.Size = new System.Drawing.Size(68, 23);
- this.wmStateLabel1.TabIndex = 0;
- this.wmStateLabel1.Text = "State:";
- //
- // okButton
- //
- this.okButton.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
- this.okButton.ForeColor = System.Drawing.Color.Black;
- this.okButton.Location = new System.Drawing.Point(425, 21);
- this.okButton.Name = "okButton";
- this.okButton.Size = new System.Drawing.Size(98, 63);
- this.okButton.TabIndex = 7;
- this.okButton.Text = "OK";
- this.okButton.UseVisualStyleBackColor = true;
- this.okButton.Click += new System.EventHandler(this.okButton_Click);
- //
- // groupBox3
- //
- this.groupBox3.Controls.Add(this.wmStateTextBox3);
- this.groupBox3.Controls.Add(this.wmStateLabel3);
- this.groupBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
- this.groupBox3.ForeColor = System.Drawing.Color.Black;
- this.groupBox3.Location = new System.Drawing.Point(25, 192);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(362, 81);
- this.groupBox3.TabIndex = 3;
- this.groupBox3.TabStop = false;
- this.groupBox3.Text = "Water Meter 3";
- //
- // wmStateTextBox3
- //
- this.wmStateTextBox3.Location = new System.Drawing.Point(183, 31);
- this.wmStateTextBox3.Name = "wmStateTextBox3";
- this.wmStateTextBox3.Size = new System.Drawing.Size(163, 31);
- this.wmStateTextBox3.TabIndex = 1;
- //
- // wmStateLabel3
- //
- this.wmStateLabel3.AutoSize = true;
- this.wmStateLabel3.Location = new System.Drawing.Point(18, 34);
- this.wmStateLabel3.Name = "wmStateLabel3";
- this.wmStateLabel3.Size = new System.Drawing.Size(68, 23);
- this.wmStateLabel3.TabIndex = 0;
- this.wmStateLabel3.Text = "State:";
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.wmStateTextBox4);
- this.groupBox4.Controls.Add(this.wmStateLabel4);
- this.groupBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
- this.groupBox4.ForeColor = System.Drawing.Color.Black;
- this.groupBox4.Location = new System.Drawing.Point(25, 282);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(362, 81);
- this.groupBox4.TabIndex = 4;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "Water Meter 4";
- //
- // wmStateTextBox4
- //
- this.wmStateTextBox4.Location = new System.Drawing.Point(183, 31);
- this.wmStateTextBox4.Name = "wmStateTextBox4";
- this.wmStateTextBox4.Size = new System.Drawing.Size(163, 31);
- this.wmStateTextBox4.TabIndex = 1;
- //
- // wmStateLabel4
- //
- this.wmStateLabel4.AutoSize = true;
- this.wmStateLabel4.Location = new System.Drawing.Point(18, 34);
- this.wmStateLabel4.Name = "wmStateLabel4";
- this.wmStateLabel4.Size = new System.Drawing.Size(68, 23);
- this.wmStateLabel4.TabIndex = 0;
- this.wmStateLabel4.Text = "State:";
- //
- // groupBox5
- //
- this.groupBox5.Controls.Add(this.wmStateTextBox5);
- this.groupBox5.Controls.Add(this.wmStateLabel5);
- this.groupBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
- this.groupBox5.ForeColor = System.Drawing.Color.Black;
- this.groupBox5.Location = new System.Drawing.Point(25, 372);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(362, 81);
- this.groupBox5.TabIndex = 5;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "Water Meter 5";
- //
- // wmStateTextBox5
- //
- this.wmStateTextBox5.Location = new System.Drawing.Point(183, 31);
- this.wmStateTextBox5.Name = "wmStateTextBox5";
- this.wmStateTextBox5.Size = new System.Drawing.Size(163, 31);
- this.wmStateTextBox5.TabIndex = 1;
- //
- // wmStateLabel5
- //
- this.wmStateLabel5.AutoSize = true;
- this.wmStateLabel5.Location = new System.Drawing.Point(18, 34);
- this.wmStateLabel5.Name = "wmStateLabel5";
- this.wmStateLabel5.Size = new System.Drawing.Size(68, 23);
- this.wmStateLabel5.TabIndex = 0;
- this.wmStateLabel5.Text = "State:";
- //
- // groupBox6
- //
- this.groupBox6.Controls.Add(this.wmStateTextBox6);
- this.groupBox6.Controls.Add(this.wmStateLabel6);
- this.groupBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
- this.groupBox6.ForeColor = System.Drawing.Color.Black;
- this.groupBox6.Location = new System.Drawing.Point(25, 462);
- this.groupBox6.Name = "groupBox6";
- this.groupBox6.Size = new System.Drawing.Size(362, 81);
- this.groupBox6.TabIndex = 6;
- this.groupBox6.TabStop = false;
- this.groupBox6.Text = "Water Meter 6";
- //
- // wmStateTextBox6
- //
- this.wmStateTextBox6.Location = new System.Drawing.Point(183, 31);
- this.wmStateTextBox6.Name = "wmStateTextBox6";
- this.wmStateTextBox6.Size = new System.Drawing.Size(163, 31);
- this.wmStateTextBox6.TabIndex = 1;
- //
- // wmStateLabel6
- //
- this.wmStateLabel6.AutoSize = true;
- this.wmStateLabel6.Location = new System.Drawing.Point(18, 34);
- this.wmStateLabel6.Name = "wmStateLabel6";
- this.wmStateLabel6.Size = new System.Drawing.Size(68, 23);
- this.wmStateLabel6.TabIndex = 0;
- this.wmStateLabel6.Text = "State:";
- //
- // CycleEndForm
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.BackColor = System.Drawing.Color.DarkGoldenrod;
- this.ClientSize = new System.Drawing.Size(559, 565);
- this.Controls.Add(this.groupBox6);
- this.Controls.Add(this.groupBox5);
- this.Controls.Add(this.groupBox4);
- this.Controls.Add(this.groupBox3);
- this.Controls.Add(this.okButton);
- this.Controls.Add(this.groupBox2);
- this.Controls.Add(this.groupBox1);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
- this.Name = "CycleEndForm";
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
- this.Text = "Water Meter States";
- this.TopMost = true;
- this.Load += new System.EventHandler(this.CycleEndForm_Load);
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
- this.groupBox3.ResumeLayout(false);
- this.groupBox3.PerformLayout();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
- this.groupBox6.ResumeLayout(false);
- this.groupBox6.PerformLayout();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.TextBox wmStateTextBox2;
- private System.Windows.Forms.Label wmStateLabel2;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.TextBox wmStateTextBox1;
- private System.Windows.Forms.Label wmStateLabel1;
- private System.Windows.Forms.Button okButton;
- private System.Windows.Forms.GroupBox groupBox3;
- private System.Windows.Forms.TextBox wmStateTextBox3;
- private System.Windows.Forms.Label wmStateLabel3;
- private System.Windows.Forms.GroupBox groupBox4;
- private System.Windows.Forms.TextBox wmStateTextBox4;
- private System.Windows.Forms.Label wmStateLabel4;
- private System.Windows.Forms.GroupBox groupBox5;
- private System.Windows.Forms.TextBox wmStateTextBox5;
- private System.Windows.Forms.Label wmStateLabel5;
- private System.Windows.Forms.GroupBox groupBox6;
- private System.Windows.Forms.TextBox wmStateTextBox6;
- private System.Windows.Forms.Label wmStateLabel6;
-
- }
-}
\ No newline at end of file
diff --git a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryForm.cs
index 29d508a51..09aaa7a8a 100644
--- a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryForm.cs
+++ b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryForm.cs
@@ -26,17 +26,25 @@ namespace TBF.BenchControl.DataEntry.WMStates
return serialNr[wmNr];
}
-
///
- /// Water meter states set by forms
+ /// Test start water meter states set by forms
///
- float[] wmState;
- public float WMState(int wmNr)
+ float[] wmStartState;
+ public float WMStartState(int wmNr)
{
- if (wmState == null || wmState.Length <= wmNr) return 0;
- return wmState[wmNr];
+ if (wmStartState == null || wmStartState.Length <= wmNr) return 0;
+ return wmStartState[wmNr];
}
+ ///
+ /// Test end water meter states set by forms
+ ///
+ float[] wmEndState;
+ public float WMEndState(int wmNr)
+ {
+ if (wmEndState == null || wmEndState.Length <= wmNr) return 0;
+ return wmEndState[wmNr];
+ }
/// Not supported
public void UpdateTestResults(IList waterMeters, IList results)
@@ -52,7 +60,8 @@ namespace TBF.BenchControl.DataEntry.WMStates
{
None,
EnterWMSNsAndStates,
- EnterWMStates,
+ EnterTestStartStates,
+ EnterTestEndStates,
}
CurrentOp currentOp;
@@ -63,7 +72,7 @@ namespace TBF.BenchControl.DataEntry.WMStates
{
entryFormCfg = cfg;
serialNr = new string[Program.WMsCount];
- wmState = new float[Program.WMsCount];
+ wmStartState = new float[Program.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
@@ -89,10 +98,18 @@ namespace TBF.BenchControl.DataEntry.WMStates
}
/// Reference to the operation
- public IOperation ShowWMStatesFormOp()
+ public IOperation ShowTestStartFormOp()
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
- currentOp = CurrentOp.EnterWMStates;
+ currentOp = CurrentOp.EnterTestStartStates;
+ return this;
+ }
+
+ /// Reference to the operation
+ public IOperation ShowTestEndFormOp()
+ {
+ if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
+ currentOp = CurrentOp.EnterTestEndStates;
return this;
}
@@ -119,10 +136,13 @@ namespace TBF.BenchControl.DataEntry.WMStates
case CurrentOp.EnterWMSNsAndStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenWMSNsAndStatesDlg), this);
break;
- case CurrentOp.EnterWMStates:
+ case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenWMStatesDlg), this);
break;
- }
+ case CurrentOp.EnterTestEndStates:
+ Program.MainWnd.Invoke(new EntryFormDlgt(OpenWMStatesDlg), this);
+ break;
+ }
}
/// Run this operation
@@ -140,12 +160,12 @@ namespace TBF.BenchControl.DataEntry.WMStates
{
WMSNsAndStatesForm dlg = (modelessDlg as WMSNsAndStatesForm);
- if (dlg.WaterMetersCount > 0) wmState[0] = dlg.WMState[0];
- if (dlg.WaterMetersCount > 1) wmState[1] = dlg.WMState[1];
- if (dlg.WaterMetersCount > 2) wmState[2] = dlg.WMState[2];
- if (dlg.WaterMetersCount > 3) wmState[3] = dlg.WMState[3];
- if (dlg.WaterMetersCount > 4) wmState[4] = dlg.WMState[4];
- if (dlg.WaterMetersCount > 5) wmState[5] = dlg.WMState[5];
+ if (dlg.WaterMetersCount > 0) wmStartState[0] = dlg.WMState[0];
+ if (dlg.WaterMetersCount > 1) wmStartState[1] = dlg.WMState[1];
+ if (dlg.WaterMetersCount > 2) wmStartState[2] = dlg.WMState[2];
+ if (dlg.WaterMetersCount > 3) wmStartState[3] = dlg.WMState[3];
+ if (dlg.WaterMetersCount > 4) wmStartState[4] = dlg.WMState[4];
+ if (dlg.WaterMetersCount > 5) wmStartState[5] = dlg.WMState[5];
if (dlg.WaterMetersCount > 0) serialNr[0] = dlg.SNText[0];
if (dlg.WaterMetersCount > 1) serialNr[1] = dlg.SNText[1];
@@ -154,16 +174,27 @@ namespace TBF.BenchControl.DataEntry.WMStates
if (dlg.WaterMetersCount > 4) serialNr[4] = dlg.SNText[4];
if (dlg.WaterMetersCount > 5) serialNr[5] = dlg.SNText[5];
}
- else if (modelessDlg is WMStatesForm)
+ else if (modelessDlg is WMStatesForm && currentOp == CurrentOp.EnterTestStartStates)
{
WMStatesForm dlg = (modelessDlg as WMStatesForm);
- if (dlg.WaterMetersCount > 0) wmState[0] = dlg.WMState[0];
- if (dlg.WaterMetersCount > 1) wmState[1] = dlg.WMState[1];
- if (dlg.WaterMetersCount > 2) wmState[2] = dlg.WMState[2];
- if (dlg.WaterMetersCount > 3) wmState[3] = dlg.WMState[3];
- if (dlg.WaterMetersCount > 4) wmState[4] = dlg.WMState[4];
- if (dlg.WaterMetersCount > 5) wmState[5] = dlg.WMState[5];
+ if (dlg.WaterMetersCount > 0) wmStartState[0] = dlg.WMState[0];
+ if (dlg.WaterMetersCount > 1) wmStartState[1] = dlg.WMState[1];
+ if (dlg.WaterMetersCount > 2) wmStartState[2] = dlg.WMState[2];
+ if (dlg.WaterMetersCount > 3) wmStartState[3] = dlg.WMState[3];
+ if (dlg.WaterMetersCount > 4) wmStartState[4] = dlg.WMState[4];
+ if (dlg.WaterMetersCount > 5) wmStartState[5] = dlg.WMState[5];
+ }
+ else if (modelessDlg is WMStatesForm && currentOp == CurrentOp.EnterTestEndStates)
+ {
+ WMStatesForm dlg = (modelessDlg as WMStatesForm);
+
+ if (dlg.WaterMetersCount > 0) wmEndState[0] = dlg.WMState[0];
+ if (dlg.WaterMetersCount > 1) wmEndState[1] = dlg.WMState[1];
+ if (dlg.WaterMetersCount > 2) wmEndState[2] = dlg.WMState[2];
+ if (dlg.WaterMetersCount > 3) wmEndState[3] = dlg.WMState[3];
+ if (dlg.WaterMetersCount > 4) wmEndState[4] = dlg.WMState[4];
+ if (dlg.WaterMetersCount > 5) wmEndState[5] = dlg.WMState[5];
}
resultSaved = true;
modelessDlg = null;
diff --git a/TestBenchFramework/BenchControl/GenericDevices/IHasCycleEndForm.cs b/TestBenchFramework/BenchControl/GenericDevices/IHasCycleEndForm.cs
index 552066e24..97eaaf947 100644
--- a/TestBenchFramework/BenchControl/GenericDevices/IHasCycleEndForm.cs
+++ b/TestBenchFramework/BenchControl/GenericDevices/IHasCycleEndForm.cs
@@ -10,7 +10,7 @@ namespace TBF.BenchControl.GenericDevices
///
/// Water meter states typed in the cycle end form
///
- string WMEndState(int wmNr);
+ string WMCycleEndState(int wmNr);
///
/// Displays form at the end of the cycle (usually to enter the end state).
diff --git a/TestBenchFramework/BenchControl/GenericDevices/IHasWMStatesForm.cs b/TestBenchFramework/BenchControl/GenericDevices/IHasWMStatesForm.cs
index ec015dbef..76afb43e4 100644
--- a/TestBenchFramework/BenchControl/GenericDevices/IHasWMStatesForm.cs
+++ b/TestBenchFramework/BenchControl/GenericDevices/IHasWMStatesForm.cs
@@ -6,15 +6,25 @@ namespace TBF.BenchControl.GenericDevices
public interface IHasWMStatesForm
{
///
- /// Water meter states set by forms
+ /// Water meter states on start of test
///
- float WMState(int wmNr);
-
+ float WMStartState(int wmNr);
+
///
- /// Displays form at the beginning of the cycle (usually to enter S/N).
+ /// Water meter states at the end of test
+ ///
+ float WMEndState(int wmNr);
+
+ ///
+ /// Displays form at the beginning of the test to enter water meter start start.
///
- /// Watermetes to be updated by the operation
/// Operation to be used in the sequence
- IOperation ShowWMStatesFormOp();
- }
+ IOperation ShowTestStartFormOp();
+
+ ///
+ /// Displays form at the end of the test to enter water meter start start.
+ ///
+ /// Operation to be used in the sequence
+ IOperation ShowTestEndFormOp();
+ }
}
diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
index 620619d8e..3e1dc5bf3 100644
--- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
+++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
@@ -227,7 +227,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
{
Bridge.OnActivity(this, "Enter the water meter data");
State.Create("FixedStartMassCollection : Enter begin-state")
- .AddOperation((dataEntryCmpnt as GenericDevices.IHasWMStatesForm).ShowWMStatesFormOp())
+ .AddOperation((dataEntryCmpnt as GenericDevices.IHasWMStatesForm).ShowTestStartFormOp())
.AddOperation(checkUiOp)
.EnterState();
do
@@ -241,16 +241,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
{
BenchControl.Elde.FixedStartRegisterReader.RegisterReader registerReader =
sensPath.RegisterReaders[i] as BenchControl.Elde.FixedStartRegisterReader.RegisterReader;
- if (registerReader != null)
- {
- registerReader.BeginWMState = dataEntryCmpnt.WMState(i);
- registerReader.EndWMState = dataEntryCmpnt.WMState(i);
- tstRslt.Meters[i].VolumeStart = dataEntryCmpnt.WMState(i) / registerReader.PulsesPerLtr; /// liter
- }
- else
- {
- tstRslt.Meters[i].VolumeStart = dataEntryCmpnt.WMState(i); /// Units: 1 liter
- }
+
+ tstRslt.Meters[i].VolumeStart = dataEntryCmpnt.WMStartState(i); /// Units: 1 liter
+
+ if (registerReader != null) registerReader.BeginWMState = dataEntryCmpnt.WMStartState(i);
}
}
@@ -463,7 +457,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
{
Bridge.OnActivity(this, "Enter the water meter data");
State.Create("FixedStartMassCollection : Enter end-state")
- .AddOperation(dataEntryCmpnt.ShowWMStatesFormOp())
+ .AddOperation(dataEntryCmpnt.ShowTestEndFormOp())
.AddOperation(checkUiOp)
.EnterState();
do
@@ -479,15 +473,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
BenchControl.Elde.FixedStartRegisterReader.RegisterReader registerReader =
sensPath.RegisterReaders[i] as BenchControl.Elde.FixedStartRegisterReader.RegisterReader;
- if (registerReader != null)
- {
- registerReader.EndWMState = dataEntryCmpnt.WMState(i);
- tstRslt.Meters[i].VolumeEnd = dataEntryCmpnt.WMState(i) / registerReader.PulsesPerLtr; /// liter
- }
- else
- {
- tstRslt.Meters[i].VolumeEnd = dataEntryCmpnt.WMState(i);
- }
+ tstRslt.Meters[i].VolumeEnd = dataEntryCmpnt.WMEndState(i);
+
+ if (registerReader != null) registerReader.EndWMState = dataEntryCmpnt.WMEndState(i);
}
}
diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj
index 503061c66..a9b00338f 100644
--- a/TestBenchFramework/TBF.csproj
+++ b/TestBenchFramework/TBF.csproj
@@ -150,11 +150,17 @@
AmbientCfgCtrl.cs
-
+
Form
-
- WMStatesForm.cs
+
+ TestEndForm.cs
+
+
+ Form
+
+
+ TestStartForm.cs
@@ -1164,8 +1170,11 @@
EntryFormCfgCtrl.cs
-
- WMStatesForm.cs
+
+ TestEndForm.cs
+
+
+ TestStartForm.cs
WMSNsAndStatesForm.cs