DataEntry.Combined.TestStartEndForm (for fixed start method) added.

This commit is contained in:
Milan Hanajik 2015-06-12 11:47:48 +02:00
parent 8fff9e86c5
commit 376367d0b2
8 changed files with 1060 additions and 1 deletions

View File

@ -1,3 +1,5 @@
- vysledky z Logs do Results (podla rokov/mesiacov)
- dokoncenie process obrazovky + rozsirenie pre 12 a 24 meracov
- stranka pre analyzy
- vypustanie malej vahy v Toruni pred Testom !!!

View File

@ -0,0 +1,422 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using log4net;
using TBF.Resources;
namespace TBF.BenchControl.DataEntry.Combined
{
public partial class TestStartEndForm : Form, GenericDevices.IHasCompleted
{
private static readonly ILog log = LogManager.GetLogger(typeof(TestStartEndForm));
// Set to 'true' when the form closes
public bool Completed { get { return completed; } }
bool completed;
/// <summary> Number of water meters </summary>
public readonly int WaterMetersCount; /// Main + Aux water meter count as one (combined) water meter
readonly bool[] disabled;
// To be retrieved after the form closes
public float[] MainStartState;
public float[] AuxStartState;
// To be retrieved after the form closes
public readonly string[] MainStartStateStr;
public readonly string[] AuxStartStateStr;
// To be retrieved after the form closes
public float[] MainEndState;
public float[] AuxEndState;
bool endStates; /// false=start states, true=end states
float refVolume;
float warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
float warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
int TextBoxesCount;
///
Label[] mainLabels;
Label[] auxLabels;
TextBox[] mainStartTextBoxes;
TextBox[] auxStartTextBoxes;
TextBox[] mainEndTextBoxes;
TextBox[] auxEndTextBoxes;
IList<TextBox> enabledTextBoxes;
/// <summary>
/// Parameterless constructor initializing common part for start and endstate form
/// </summary>
public TestStartEndForm()
{
InitializeComponent();
TextBoxesCount = 3;
endStates = false;
mainLabels = new Label[] { main1Label, main2Label, main3Label, };
auxLabels = new Label[] { aux1Label, aux2Label, aux3Label, };
mainStartTextBoxes = new TextBox[] { main1StartTextBox, main2StartTextBox, main3StartTextBox, };
auxStartTextBoxes = new TextBox[] { aux1StartTextBox, aux2StartTextBox, aux3StartTextBox, };
mainEndTextBoxes = new TextBox[] { main1EndTextBox, main2EndTextBox, main3EndTextBox, };
auxEndTextBoxes = new TextBox[] { aux1EndTextBox, aux2EndTextBox, aux3EndTextBox, };
enabledTextBoxes = new List<TextBox>();
completed = false;
StartForceCloseHandler();
}
/// <summary>
/// Constructor to fill in start states
/// </summary>
/// <param name="waterMetersCount">Number of water meters</param>
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
public TestStartEndForm(int waterMetersCount, bool[] disabled)
: this()
{
endStates = false;
this.WaterMetersCount = waterMetersCount;
this.disabled = disabled;
ShuffleTextBoxes();
MainStartState = new float[waterMetersCount];
AuxStartState = new float[waterMetersCount];
MainStartStateStr = new string[waterMetersCount];
AuxStartStateStr = new string[waterMetersCount];
}
/// <summary>
/// Constructor to fill in end states
/// </summary>
/// <param name="waterMetersCount">Number of water meters</param>
/// <param name="mainStartStateStr">Information entered on test start (main)</param>
/// <param name="auxStartStateStr">Information entered on test start (aux)</param>
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
public TestStartEndForm(int waterMetersCount, string[] mainStartStateStr, string[] auxStartStateStr,
bool[] disabled, float refVolume, float errLimLo, float errLimHi)
: this()
{
endStates = true;
this.WaterMetersCount = waterMetersCount;
if (mainStartStateStr == null || mainStartStateStr.Length != waterMetersCount)
throw (new Exception("Invalid 'mainStartStateStr' argument"));
this.MainStartStateStr = mainStartStateStr;
if (auxStartStateStr == null || auxStartStateStr.Length != waterMetersCount)
throw (new Exception("Invalid 'auxStartStateStr' argument"));
this.AuxStartStateStr = auxStartStateStr;
this.disabled = disabled;
this.refVolume = refVolume;
this.warningLimLo = 2 * errLimLo;
this.warningLimHi = 2 * errLimHi;
ShuffleTextBoxes();
MainEndState = new float[waterMetersCount];
AuxEndState = new float[waterMetersCount];
}
/// <summary>
/// Make sure the layout of labels/text boxes on the screen
/// corresponds to the layout of watermeters of the test bench.
/// </summary>
void ShuffleTextBoxes()
{
if (Program.WMsCount / 2 < TextBoxesCount)
{
TextBoxesCount = Program.WMsCount / 2;
}
}
private void CycleEndForm_Load(object sender, EventArgs e)
{
Localize();
//Height = 115 + 90 * WaterMetersCount;
for (int i = 0; i < TextBoxesCount; i++)
{
if (i < WaterMetersCount)
{
mainLabels[i].Visible = mainStartTextBoxes[i].Visible = mainEndTextBoxes[i].Visible = true;
auxLabels[i].Visible = auxStartTextBoxes[i].Visible = auxEndTextBoxes[i].Visible = true;
}
}
if (TextBoxesCount >= 1) groupBox1.Visible = true;
if (TextBoxesCount >= 2) groupBox2.Visible = true;
if (TextBoxesCount >= 3) groupBox2.Visible = true;
if (endStates)
{
for (int i = 0; i < TextBoxesCount; i++)
{
if (MainStartStateStr != null && i < MainStartStateStr.Length)
{
mainStartTextBoxes[i].Text = MainStartStateStr[i];
}
if (AuxStartStateStr != null && i < AuxStartStateStr.Length)
{
auxStartTextBoxes[i].Text = AuxStartStateStr[i];
}
if (disabled != null && i < disabled.Length && disabled[i])
{
mainEndTextBoxes[i].Enabled = false;
auxEndTextBoxes[i].Enabled = false;
}
else
{
mainEndTextBoxes[i].Enabled = true;
auxEndTextBoxes[i].Enabled = true;
enabledTextBoxes.Add(mainEndTextBoxes[i]);
enabledTextBoxes.Add(auxEndTextBoxes[i]);
}
}
}
else
{
for (int i = 0; i < TextBoxesCount; i++)
{
if (disabled != null && i < disabled.Length && disabled[i])
{
mainStartTextBoxes[i].Enabled = false;
auxStartTextBoxes[i].Enabled = false;
}
else
{
mainStartTextBoxes[i].Enabled = true;
auxStartTextBoxes[i].Enabled = true;
enabledTextBoxes.Add(mainStartTextBoxes[i]);
enabledTextBoxes.Add(auxStartTextBoxes[i]);
}
}
}
}
void Localize()
{
Text = Strings.Water_Meter_States;
groupBox1.Text = Strings.Water_Meter + " 1";
groupBox2.Text = Strings.Water_Meter + " 2";
groupBox2.Text = Strings.Water_Meter + " 3";
for (int i = 0; i < TextBoxesCount; i++)
{
mainLabels[i].Text = Strings.Main_;
auxLabels[i].Text = Strings.Aux_;
}
startLabel.Text = Strings.Start;
endLabel.Text = Strings.End;
okButton.Text = Strings.OkBtnText;
}
private void okButton_Click(object sender, EventArgs eArgs)
{
try
{
if (endStates)
{
for (int i = 0; i < Math.Min(WaterMetersCount, TextBoxesCount); i++)
{
if (mainEndTextBoxes[i].Visible && mainEndTextBoxes[i].Enabled)
{
MainEndState[i] = Utils.ParseUFloat(mainEndTextBoxes[i].Text);
}
if (auxEndTextBoxes[i].Visible && auxEndTextBoxes[i].Enabled)
{
AuxEndState[i] = Utils.ParseUFloat(auxEndTextBoxes[i].Text);
}
}
}
else
{
for (int i = 0; i < Math.Min(WaterMetersCount, TextBoxesCount); i++)
{
if (mainStartTextBoxes[i].Visible && mainStartTextBoxes[i].Enabled)
{
MainStartStateStr[i] = mainStartTextBoxes[i].Text;
MainStartState[i] = Utils.ParseUFloat(mainStartTextBoxes[i].Text);
}
if (auxStartTextBoxes[i].Visible && auxStartTextBoxes[i].Enabled)
{
AuxStartStateStr[i] = auxStartTextBoxes[i].Text;
AuxStartState[i] = Utils.ParseUFloat(auxStartTextBoxes[i].Text);
}
}
}
}
catch (Exception e)
{
log.ErrorFormat("Exception: {0}", e.Message);
return;
}
completed = true;
Close();
}
#region Forced close handling
public void StartForceCloseHandler()
{
UiBridge.Bridge.CloseModelessFormHandler += delegate(object sender, EventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<EventArgs>(OnForceClose), sender, args); }
else OnForceClose(sender, args);
};
}
void OnForceClose(object sender, EventArgs args)
{
DialogResult = DialogResult.Cancel;
Close();
}
#endregion
/// <summary>
/// Calculate the approximate error and verify whether it is within limits.
/// Make an exclamation mark visible if out of range.
/// Similar event handler is implemented for all main/auxEndTextBoxes (1..3).
/// </summary>
private void main1EndTextBox_TextChanged(object sender, EventArgs e)
{
//float err = 0;
//try
//{
// float endState = Utils.ParseUFloat(main1EndTextBox.Text);
// float startState = Utils.ParseUFloat(main1StartTextBox.Text);
// err = 100.0f * (endState - startState - refVolume) / refVolume;
//}
//catch { };
//main1Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void aux1EndTextBox_TextChanged(object sender, EventArgs e)
{
//float err = 0;
//try
//{
// float endState = Utils.ParseUFloat(aux1EndTextBox.Text);
// float startState = Utils.ParseUFloat(aux1StartTextBox.Text);
// err = 100.0f * (endState - startState - refVolume) / refVolume;
//}
//catch { err = 1000.0f; };
//aux1Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void main2EndTextBox_TextChanged(object sender, EventArgs e)
{
//float err = 0;
//try
//{
// float endState = Utils.ParseUFloat(main2EndTextBox.Text);
// float startState = Utils.ParseUFloat(main2StartTextBox.Text);
// err = 100.0f * (endState - startState - refVolume) / refVolume;
//}
//catch { err = 1000.0f; };
//main2Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void aux2EndTextBox_TextChanged(object sender, EventArgs e)
{
//float err = 0;
//try
//{
// float endState = Utils.ParseUFloat(aux2EndTextBox.Text);
// float startState = Utils.ParseUFloat(aux2StartTextBox.Text);
// err = 100.0f * (endState - startState - refVolume) / refVolume;
//}
//catch { err = 1000.0f; };
//aux2Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void main3EndTextBox_TextChanged(object sender, EventArgs e)
{
//float err = 0;
//try
//{
// float endState = Utils.ParseUFloat(main3EndTextBox.Text);
// float startState = Utils.ParseUFloat(main3StartTextBox.Text);
// err = 100.0f * (endState - startState - refVolume) / refVolume;
//}
//catch { err = 1000.0f; };
//main3Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
}
private void aux3EndTextBox_TextChanged(object sender, EventArgs e)
{
//float err = 0;
//try
//{
// float endState = Utils.ParseUFloat(aux3EndTextBox.Text);
// float startState = Utils.ParseUFloat(aux3StartTextBox.Text);
// err = 100.0f * (endState - startState - refVolume) / refVolume;
//}
//catch { err = 1000.0f; };
//aux3Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
}
/// <summary>
/// Process a key press within any enabled text boxe
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <param name="currentFocusOwner">TextBox control which received the event</param>
private void ProcKeyPress(object sender, KeyPressEventArgs e, TextBox currentFocusOwner)
{
if (e.KeyChar == '+')
{
/// Process '+' key ..... Form completed
okButton_Click(sender, e);
}
if (e.KeyChar == '\r')
{
/// Process <enter> key ..... Next text field
if (enabledTextBoxes.Count < 2) return; /// There is just one enabled textbox
for (int i = 0; i < enabledTextBoxes.Count; i++)
{
if (enabledTextBoxes[i] == currentFocusOwner)
{
/// Change focus to the next enabled text box
enabledTextBoxes[(i + 1) % enabledTextBoxes.Count].Focus();
return;
}
}
}
}
private void main1StartTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, main1StartTextBox); }
private void main2StartTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, main2StartTextBox); }
private void main3StartTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, main3StartTextBox); }
private void aux1StartTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, aux1StartTextBox); }
private void aux2StartTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, aux2StartTextBox); }
private void aux3StartTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, aux3StartTextBox); }
private void main1EndTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, main1EndTextBox); }
private void main2EndTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, main2EndTextBox); }
private void main3EndTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, main3EndTextBox); }
private void aux1EndTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, aux1EndTextBox); }
private void aux2EndTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, aux2EndTextBox); }
private void aux3EndTextBox_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, aux3EndTextBox); }
}
}

View File

@ -0,0 +1,482 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
namespace TBF.BenchControl.DataEntry.Combined
{
partial class TestStartEndForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.aux1Exclamation = new System.Windows.Forms.Label();
this.aux1StartTextBox = new System.Windows.Forms.TextBox();
this.aux1EndTextBox = new System.Windows.Forms.TextBox();
this.aux1Label = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.main1Exclamation = new System.Windows.Forms.Label();
this.main1StartTextBox = new System.Windows.Forms.TextBox();
this.main1EndTextBox = new System.Windows.Forms.TextBox();
this.main1Label = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.aux2Exclamation = new System.Windows.Forms.Label();
this.main2Exclamation = new System.Windows.Forms.Label();
this.aux2StartTextBox = new System.Windows.Forms.TextBox();
this.main2StartTextBox = new System.Windows.Forms.TextBox();
this.aux2EndTextBox = new System.Windows.Forms.TextBox();
this.aux2Label = new System.Windows.Forms.Label();
this.main2EndTextBox = new System.Windows.Forms.TextBox();
this.main2Label = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.aux3Exclamation = new System.Windows.Forms.Label();
this.main3Exclamation = new System.Windows.Forms.Label();
this.aux3StartTextBox = new System.Windows.Forms.TextBox();
this.main3StartTextBox = new System.Windows.Forms.TextBox();
this.aux3EndTextBox = new System.Windows.Forms.TextBox();
this.aux3Label = new System.Windows.Forms.Label();
this.main3EndTextBox = new System.Windows.Forms.TextBox();
this.main3Label = new System.Windows.Forms.Label();
this.startLabel = new System.Windows.Forms.Label();
this.endLabel = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// aux1Exclamation
//
this.aux1Exclamation.AutoSize = true;
this.aux1Exclamation.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.aux1Exclamation.ForeColor = System.Drawing.Color.Red;
this.aux1Exclamation.Location = new System.Drawing.Point(515, 71);
this.aux1Exclamation.Name = "aux1Exclamation";
this.aux1Exclamation.Size = new System.Drawing.Size(30, 38);
this.aux1Exclamation.TabIndex = 4;
this.aux1Exclamation.Text = "!";
this.aux1Exclamation.Visible = false;
//
// aux1StartTextBox
//
this.aux1StartTextBox.Enabled = false;
this.aux1StartTextBox.Location = new System.Drawing.Point(164, 75);
this.aux1StartTextBox.Name = "aux1StartTextBox";
this.aux1StartTextBox.Size = new System.Drawing.Size(163, 31);
this.aux1StartTextBox.TabIndex = 1;
this.aux1StartTextBox.Visible = false;
this.aux1StartTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux1StartTextBox_KeyPress);
//
// aux1EndTextBox
//
this.aux1EndTextBox.Enabled = false;
this.aux1EndTextBox.Location = new System.Drawing.Point(350, 75);
this.aux1EndTextBox.Name = "aux1EndTextBox";
this.aux1EndTextBox.Size = new System.Drawing.Size(163, 31);
this.aux1EndTextBox.TabIndex = 3;
this.aux1EndTextBox.Visible = false;
this.aux1EndTextBox.TextChanged += new System.EventHandler(this.aux1EndTextBox_TextChanged);
this.aux1EndTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux1EndTextBox_KeyPress);
//
// aux1Label
//
this.aux1Label.AutoSize = true;
this.aux1Label.Location = new System.Drawing.Point(18, 78);
this.aux1Label.Name = "aux1Label";
this.aux1Label.Size = new System.Drawing.Size(55, 23);
this.aux1Label.TabIndex = 0;
this.aux1Label.Text = "Aux:";
this.aux1Label.Visible = false;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.aux1Exclamation);
this.groupBox1.Controls.Add(this.main1Exclamation);
this.groupBox1.Controls.Add(this.aux1StartTextBox);
this.groupBox1.Controls.Add(this.aux1EndTextBox);
this.groupBox1.Controls.Add(this.main1StartTextBox);
this.groupBox1.Controls.Add(this.aux1Label);
this.groupBox1.Controls.Add(this.main1EndTextBox);
this.groupBox1.Controls.Add(this.main1Label);
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, 32);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(547, 124);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Water Meter 1";
this.groupBox1.Visible = false;
//
// main1Exclamation
//
this.main1Exclamation.AutoSize = true;
this.main1Exclamation.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.main1Exclamation.ForeColor = System.Drawing.Color.Red;
this.main1Exclamation.Location = new System.Drawing.Point(515, 27);
this.main1Exclamation.Name = "main1Exclamation";
this.main1Exclamation.Size = new System.Drawing.Size(30, 38);
this.main1Exclamation.TabIndex = 3;
this.main1Exclamation.Text = "!";
this.main1Exclamation.Visible = false;
//
// main1StartTextBox
//
this.main1StartTextBox.Enabled = false;
this.main1StartTextBox.Location = new System.Drawing.Point(164, 31);
this.main1StartTextBox.Name = "main1StartTextBox";
this.main1StartTextBox.Size = new System.Drawing.Size(163, 31);
this.main1StartTextBox.TabIndex = 0;
this.main1StartTextBox.Visible = false;
this.main1StartTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main1StartTextBox_KeyPress);
//
// main1EndTextBox
//
this.main1EndTextBox.Enabled = false;
this.main1EndTextBox.Location = new System.Drawing.Point(350, 31);
this.main1EndTextBox.Name = "main1EndTextBox";
this.main1EndTextBox.Size = new System.Drawing.Size(163, 31);
this.main1EndTextBox.TabIndex = 2;
this.main1EndTextBox.Visible = false;
this.main1EndTextBox.TextChanged += new System.EventHandler(this.main1EndTextBox_TextChanged);
this.main1EndTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main1EndTextBox_KeyPress);
//
// main1Label
//
this.main1Label.AutoSize = true;
this.main1Label.Location = new System.Drawing.Point(18, 34);
this.main1Label.Name = "main1Label";
this.main1Label.Size = new System.Drawing.Size(64, 23);
this.main1Label.TabIndex = 0;
this.main1Label.Text = "Main:";
this.main1Label.Visible = false;
//
// 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(603, 46);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(98, 63);
this.okButton.TabIndex = 4;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.aux2Exclamation);
this.groupBox2.Controls.Add(this.main2Exclamation);
this.groupBox2.Controls.Add(this.aux2StartTextBox);
this.groupBox2.Controls.Add(this.main2StartTextBox);
this.groupBox2.Controls.Add(this.aux2EndTextBox);
this.groupBox2.Controls.Add(this.aux2Label);
this.groupBox2.Controls.Add(this.main2EndTextBox);
this.groupBox2.Controls.Add(this.main2Label);
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, 177);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(547, 124);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Water Meter 2";
this.groupBox2.Visible = false;
//
// aux2Exclamation
//
this.aux2Exclamation.AutoSize = true;
this.aux2Exclamation.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.aux2Exclamation.ForeColor = System.Drawing.Color.Red;
this.aux2Exclamation.Location = new System.Drawing.Point(515, 70);
this.aux2Exclamation.Name = "aux2Exclamation";
this.aux2Exclamation.Size = new System.Drawing.Size(30, 38);
this.aux2Exclamation.TabIndex = 5;
this.aux2Exclamation.Text = "!";
this.aux2Exclamation.Visible = false;
//
// main2Exclamation
//
this.main2Exclamation.AutoSize = true;
this.main2Exclamation.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.main2Exclamation.ForeColor = System.Drawing.Color.Red;
this.main2Exclamation.Location = new System.Drawing.Point(515, 27);
this.main2Exclamation.Name = "main2Exclamation";
this.main2Exclamation.Size = new System.Drawing.Size(30, 38);
this.main2Exclamation.TabIndex = 5;
this.main2Exclamation.Text = "!";
this.main2Exclamation.Visible = false;
//
// aux2StartTextBox
//
this.aux2StartTextBox.Enabled = false;
this.aux2StartTextBox.Location = new System.Drawing.Point(164, 74);
this.aux2StartTextBox.Name = "aux2StartTextBox";
this.aux2StartTextBox.Size = new System.Drawing.Size(163, 31);
this.aux2StartTextBox.TabIndex = 1;
this.aux2StartTextBox.Visible = false;
this.aux2StartTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux2StartTextBox_KeyPress);
//
// main2StartTextBox
//
this.main2StartTextBox.Enabled = false;
this.main2StartTextBox.Location = new System.Drawing.Point(164, 31);
this.main2StartTextBox.Name = "main2StartTextBox";
this.main2StartTextBox.Size = new System.Drawing.Size(163, 31);
this.main2StartTextBox.TabIndex = 0;
this.main2StartTextBox.Visible = false;
this.main2StartTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main2StartTextBox_KeyPress);
//
// aux2EndTextBox
//
this.aux2EndTextBox.Enabled = false;
this.aux2EndTextBox.Location = new System.Drawing.Point(350, 74);
this.aux2EndTextBox.Name = "aux2EndTextBox";
this.aux2EndTextBox.Size = new System.Drawing.Size(163, 31);
this.aux2EndTextBox.TabIndex = 3;
this.aux2EndTextBox.Visible = false;
this.aux2EndTextBox.TextChanged += new System.EventHandler(this.aux2EndTextBox_TextChanged);
this.aux2EndTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux2EndTextBox_KeyPress);
//
// aux2Label
//
this.aux2Label.AutoSize = true;
this.aux2Label.Location = new System.Drawing.Point(18, 77);
this.aux2Label.Name = "aux2Label";
this.aux2Label.Size = new System.Drawing.Size(55, 23);
this.aux2Label.TabIndex = 0;
this.aux2Label.Text = "Aux:";
this.aux2Label.Visible = false;
//
// main2EndTextBox
//
this.main2EndTextBox.Enabled = false;
this.main2EndTextBox.Location = new System.Drawing.Point(350, 31);
this.main2EndTextBox.Name = "main2EndTextBox";
this.main2EndTextBox.Size = new System.Drawing.Size(163, 31);
this.main2EndTextBox.TabIndex = 2;
this.main2EndTextBox.Visible = false;
this.main2EndTextBox.TextChanged += new System.EventHandler(this.main2EndTextBox_TextChanged);
this.main2EndTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main2EndTextBox_KeyPress);
//
// main2Label
//
this.main2Label.AutoSize = true;
this.main2Label.Location = new System.Drawing.Point(18, 34);
this.main2Label.Name = "main2Label";
this.main2Label.Size = new System.Drawing.Size(64, 23);
this.main2Label.TabIndex = 0;
this.main2Label.Text = "Main:";
this.main2Label.Visible = false;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.aux3Exclamation);
this.groupBox3.Controls.Add(this.main3Exclamation);
this.groupBox3.Controls.Add(this.aux3StartTextBox);
this.groupBox3.Controls.Add(this.main3StartTextBox);
this.groupBox3.Controls.Add(this.aux3EndTextBox);
this.groupBox3.Controls.Add(this.aux3Label);
this.groupBox3.Controls.Add(this.main3EndTextBox);
this.groupBox3.Controls.Add(this.main3Label);
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, 321);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(547, 124);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Water Meter 3";
this.groupBox3.Visible = false;
//
// aux3Exclamation
//
this.aux3Exclamation.AutoSize = true;
this.aux3Exclamation.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.aux3Exclamation.ForeColor = System.Drawing.Color.Red;
this.aux3Exclamation.Location = new System.Drawing.Point(515, 70);
this.aux3Exclamation.Name = "aux3Exclamation";
this.aux3Exclamation.Size = new System.Drawing.Size(30, 38);
this.aux3Exclamation.TabIndex = 5;
this.aux3Exclamation.Text = "!";
this.aux3Exclamation.Visible = false;
//
// main3Exclamation
//
this.main3Exclamation.AutoSize = true;
this.main3Exclamation.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.main3Exclamation.ForeColor = System.Drawing.Color.Red;
this.main3Exclamation.Location = new System.Drawing.Point(515, 27);
this.main3Exclamation.Name = "main3Exclamation";
this.main3Exclamation.Size = new System.Drawing.Size(30, 38);
this.main3Exclamation.TabIndex = 5;
this.main3Exclamation.Text = "!";
this.main3Exclamation.Visible = false;
//
// aux3StartTextBox
//
this.aux3StartTextBox.Enabled = false;
this.aux3StartTextBox.Location = new System.Drawing.Point(164, 74);
this.aux3StartTextBox.Name = "aux3StartTextBox";
this.aux3StartTextBox.Size = new System.Drawing.Size(163, 31);
this.aux3StartTextBox.TabIndex = 1;
this.aux3StartTextBox.Visible = false;
this.aux3StartTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux3StartTextBox_KeyPress);
//
// main3StartTextBox
//
this.main3StartTextBox.Enabled = false;
this.main3StartTextBox.Location = new System.Drawing.Point(164, 31);
this.main3StartTextBox.Name = "main3StartTextBox";
this.main3StartTextBox.Size = new System.Drawing.Size(163, 31);
this.main3StartTextBox.TabIndex = 0;
this.main3StartTextBox.Visible = false;
this.main3StartTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main3StartTextBox_KeyPress);
//
// aux3EndTextBox
//
this.aux3EndTextBox.Enabled = false;
this.aux3EndTextBox.Location = new System.Drawing.Point(350, 74);
this.aux3EndTextBox.Name = "aux3EndTextBox";
this.aux3EndTextBox.Size = new System.Drawing.Size(163, 31);
this.aux3EndTextBox.TabIndex = 3;
this.aux3EndTextBox.Visible = false;
this.aux3EndTextBox.TextChanged += new System.EventHandler(this.aux3EndTextBox_TextChanged);
this.aux3EndTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux3EndTextBox_KeyPress);
//
// aux3Label
//
this.aux3Label.AutoSize = true;
this.aux3Label.Location = new System.Drawing.Point(18, 77);
this.aux3Label.Name = "aux3Label";
this.aux3Label.Size = new System.Drawing.Size(55, 23);
this.aux3Label.TabIndex = 0;
this.aux3Label.Text = "Aux:";
this.aux3Label.Visible = false;
//
// main3EndTextBox
//
this.main3EndTextBox.Enabled = false;
this.main3EndTextBox.Location = new System.Drawing.Point(350, 31);
this.main3EndTextBox.Name = "main3EndTextBox";
this.main3EndTextBox.Size = new System.Drawing.Size(163, 31);
this.main3EndTextBox.TabIndex = 2;
this.main3EndTextBox.Visible = false;
this.main3EndTextBox.TextChanged += new System.EventHandler(this.main3EndTextBox_TextChanged);
this.main3EndTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main3EndTextBox_KeyPress);
//
// main3Label
//
this.main3Label.AutoSize = true;
this.main3Label.Location = new System.Drawing.Point(18, 34);
this.main3Label.Name = "main3Label";
this.main3Label.Size = new System.Drawing.Size(64, 23);
this.main3Label.TabIndex = 0;
this.main3Label.Text = "Main:";
this.main3Label.Visible = false;
//
// startLabel
//
this.startLabel.AutoSize = true;
this.startLabel.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.startLabel.Location = new System.Drawing.Point(245, 11);
this.startLabel.Name = "startLabel";
this.startLabel.Size = new System.Drawing.Size(56, 23);
this.startLabel.TabIndex = 5;
this.startLabel.Text = "Start";
//
// endLabel
//
this.endLabel.AutoSize = true;
this.endLabel.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.endLabel.Location = new System.Drawing.Point(431, 11);
this.endLabel.Name = "endLabel";
this.endLabel.Size = new System.Drawing.Size(46, 23);
this.endLabel.TabIndex = 5;
this.endLabel.Text = "End";
//
// TestStartEndForm
//
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(729, 471);
this.Controls.Add(this.endLabel);
this.Controls.Add(this.startLabel);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.okButton);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "TestStartEndForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "End States";
this.TopMost = true;
this.Load += new System.EventHandler(this.CycleEndForm_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox aux1EndTextBox;
private System.Windows.Forms.Label aux1Label;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox main1EndTextBox;
private System.Windows.Forms.Label main1Label;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox main2EndTextBox;
private System.Windows.Forms.Label main2Label;
private System.Windows.Forms.TextBox aux2EndTextBox;
private System.Windows.Forms.Label aux2Label;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox main3EndTextBox;
private System.Windows.Forms.Label main3Label;
private System.Windows.Forms.TextBox aux3EndTextBox;
private System.Windows.Forms.Label aux3Label;
private System.Windows.Forms.TextBox aux1StartTextBox;
private System.Windows.Forms.TextBox main1StartTextBox;
private System.Windows.Forms.TextBox main2StartTextBox;
private System.Windows.Forms.TextBox aux2StartTextBox;
private System.Windows.Forms.TextBox main3StartTextBox;
private System.Windows.Forms.TextBox aux3StartTextBox;
private System.Windows.Forms.Label startLabel;
private System.Windows.Forms.Label endLabel;
private System.Windows.Forms.Label aux1Exclamation;
private System.Windows.Forms.Label main1Exclamation;
private System.Windows.Forms.Label main2Exclamation;
private System.Windows.Forms.Label aux2Exclamation;
private System.Windows.Forms.Label main3Exclamation;
private System.Windows.Forms.Label aux3Exclamation;
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -16,7 +16,7 @@ namespace TBF.BenchControl.DataEntry.Standard
public bool Completed { get { return completed; } }
bool completed;
/// <summary> Number of text boxes for serial numbers </summary>
/// <summary> Number of water meters </summary>
public readonly int WaterMetersCount;
readonly bool[] disabled;

View File

@ -195,6 +195,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Aux:.
/// </summary>
internal static string Aux_ {
get {
return ResourceManager.GetString("Aux_", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Aux Water Meter.
/// </summary>
@ -1041,6 +1050,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Main:.
/// </summary>
internal static string Main_ {
get {
return ResourceManager.GetString("Main_", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Main Water Meter.
/// </summary>

View File

@ -1054,4 +1054,10 @@
<data name="Communication" xml:space="preserve">
<value>Communication</value>
</data>
<data name="Aux_" xml:space="preserve">
<value>Aux:</value>
</data>
<data name="Main_" xml:space="preserve">
<value>Main:</value>
</data>
</root>

View File

@ -150,6 +150,12 @@
<DependentUpon>AmbientCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\Ambient\Greco\Factory.cs" />
<Compile Include="BenchControl\DataEntry\Combined\TestStartEndForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="BenchControl\DataEntry\Combined\TestStartEndForm.designer.cs">
<DependentUpon>TestStartEndForm.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\DataEntry\Standard24\CycleBeginningForm.cs">
<SubType>Form</SubType>
</Compile>
@ -1213,6 +1219,9 @@
<EmbeddedResource Include="BenchControl\DataEntry\Combined\EntryFormCfgCtrl.resx">
<DependentUpon>EntryFormCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BenchControl\DataEntry\Combined\TestStartEndForm.resx">
<DependentUpon>TestStartEndForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BenchControl\DataEntry\Munich3\CycleBeginningForm.resx">
<DependentUpon>CycleBeginningForm.cs</DependentUpon>
</EmbeddedResource>