Munich.EntryForms support 4 protocols, ver.2.7.286

This commit is contained in:
Milan Hanajik
2016-05-19 15:51:06 +02:00
parent cd43aa2f42
commit af0de8734a
11 changed files with 387 additions and 243 deletions
@@ -63,6 +63,7 @@ namespace TBF.BenchControl.DataEntry.Munich
this.mainState3Label = new System.Windows.Forms.Label();
this.auxState3TextBox = new System.Windows.Forms.TextBox();
this.auxState3Label = new System.Windows.Forms.Label();
this.radioButton4 = new System.Windows.Forms.RadioButton();
this.groupBox1.SuspendLayout();
this.protocolGroupBox.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -156,9 +157,9 @@ namespace TBF.BenchControl.DataEntry.Munich
//
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(699, 33);
this.okButton.Location = new System.Drawing.Point(699, 23);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(98, 63);
this.okButton.Size = new System.Drawing.Size(98, 55);
this.okButton.TabIndex = 0;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
@@ -166,13 +167,14 @@ namespace TBF.BenchControl.DataEntry.Munich
//
// protocolGroupBox
//
this.protocolGroupBox.Controls.Add(this.radioButton4);
this.protocolGroupBox.Controls.Add(this.radioButton3);
this.protocolGroupBox.Controls.Add(this.radioButton2);
this.protocolGroupBox.Controls.Add(this.radioButton1);
this.protocolGroupBox.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.protocolGroupBox.Location = new System.Drawing.Point(422, 118);
this.protocolGroupBox.Location = new System.Drawing.Point(422, 87);
this.protocolGroupBox.Name = "protocolGroupBox";
this.protocolGroupBox.Size = new System.Drawing.Size(375, 142);
this.protocolGroupBox.Size = new System.Drawing.Size(375, 173);
this.protocolGroupBox.TabIndex = 4;
this.protocolGroupBox.TabStop = false;
this.protocolGroupBox.Text = "Protocol";
@@ -375,6 +377,16 @@ namespace TBF.BenchControl.DataEntry.Munich
this.auxState3Label.TabIndex = 2;
this.auxState3Label.Text = "Aux. WM State";
//
// radioButton4
//
this.radioButton4.AutoSize = true;
this.radioButton4.Location = new System.Drawing.Point(34, 133);
this.radioButton4.Name = "radioButton4";
this.radioButton4.Size = new System.Drawing.Size(152, 27);
this.radioButton4.TabIndex = 3;
this.radioButton4.Text = "radioButton4";
this.radioButton4.UseVisualStyleBackColor = true;
//
// CycleEndForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -438,6 +450,7 @@ namespace TBF.BenchControl.DataEntry.Munich
private System.Windows.Forms.Label mainState3Label;
private System.Windows.Forms.TextBox auxState3TextBox;
private System.Windows.Forms.Label auxState3Label;
private System.Windows.Forms.RadioButton radioButton4;
}
}
@@ -18,6 +18,7 @@ namespace TBF.BenchControl.DataEntry.Munich
public string ProtocolName1;
public string ProtocolName2;
public string ProtocolName3;
public string ProtocolName4;
// To be retrieved after the form closes
public string[] MainStateText;
@@ -72,14 +73,18 @@ namespace TBF.BenchControl.DataEntry.Munich
radioButton1.Text = ProtocolName1;
radioButton2.Text = ProtocolName2;
radioButton3.Text = ProtocolName3;
radioButton4.Text = ProtocolName4;
qRise1TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
qFall1TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
if (Config.Data.CompoundWMsCount >= 2)
if (Sequences.ProcessData.BatchRslts.WaterMeters.Length >= 1)
{
qRise2TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
qFall2TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
qRise1TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.WaterMeters[0].QRise, 3);
qFall1TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.WaterMeters[0].QFall, 3);
}
if (Sequences.ProcessData.BatchRslts.WaterMeters.Length >= 2)
{
qRise2TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.WaterMeters[1].QRise, 3);
qFall2TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.WaterMeters[1].QFall, 3);
}
else
{
@@ -87,10 +92,10 @@ namespace TBF.BenchControl.DataEntry.Munich
Height = 305;
}
if (Config.Data.CompoundWMsCount >= 3)
if (Sequences.ProcessData.BatchRslts.WaterMeters.Length >= 3)
{
qRise3TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
qFall3TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
qRise3TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.WaterMeters[2].QRise, 3);
qFall3TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.WaterMeters[2].QFall, 3);
}
else
{
@@ -127,6 +132,7 @@ namespace TBF.BenchControl.DataEntry.Munich
if (radioButton1.Checked) ProtocolTitle = ProtocolName1;
else if (radioButton2.Checked) ProtocolTitle = ProtocolName2;
else if (radioButton3.Checked) ProtocolTitle = ProtocolName3;
else if (radioButton4.Checked) ProtocolTitle = ProtocolName4;
if (allOK)
{
@@ -144,10 +144,31 @@
<metadata name="auxState1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="okButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="qFall1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="protocolGroupBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="qFall1TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qRise1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qRise1TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="auxState1TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="auxState1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="radioButton3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="radioButton2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="radioButton1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="radioButton3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -186,6 +207,30 @@
<metadata name="auxState2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qFall2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qFall2TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qRise2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qRise2TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="mainState2TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="mainState2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="auxState2TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="auxState2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="groupBox3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -213,7 +258,28 @@
<metadata name="auxState3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="qFall3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qFall3TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qRise3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="qRise3TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="mainState3TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="mainState3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="auxState3TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="auxState3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -110,6 +110,7 @@ namespace TBF.BenchControl.DataEntry.Munich
endForm.ProtocolName1 = entryFormCfg.ProtocolTitle1;
endForm.ProtocolName2 = entryFormCfg.ProtocolTitle2;
endForm.ProtocolName3 = entryFormCfg.ProtocolTitle3;
endForm.ProtocolName4 = entryFormCfg.ProtocolTitle4;
myRef.modelessDlg = endForm;
modelessDlg.Show();
}
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -20,15 +20,17 @@ namespace TBF.BenchControl.DataEntry.Munich
public string ProtocolTitle1;
public string ProtocolTitle2;
public string ProtocolTitle3;
public string ProtocolTitle4;
/// Private parameterless constructor invoked by all other (public) constructors
EntryFormCfg()
{
Name = "DataEntryForm-Munich";
ParentName = string.Empty;
ProtocolTitle1 = "Protokoll Werkprüfung";
ProtocolTitle1 = "Protokoll 1";
ProtocolTitle2 = "Protokoll 2";
ProtocolTitle3 = "Protokoll 3";
ProtocolTitle4 = "Protokoll 4";
}
public EntryFormCfg(IComponentFactory factory)
@@ -39,11 +41,12 @@ namespace TBF.BenchControl.DataEntry.Munich
public string ToString(int i)
{
return string.Format("Name={0}, Protocol1={1}, Protocol2={2}, Protocol3={3}",
return string.Format("Name={0}, P1={1}, P2={2}, P3={3}, P4={4}",
Name,
(string.IsNullOrEmpty(ProtocolTitle1) ? "-" : ProtocolTitle1),
(string.IsNullOrEmpty(ProtocolTitle2) ? "-" : ProtocolTitle2),
(string.IsNullOrEmpty(ProtocolTitle3) ? "-" : ProtocolTitle3));
(string.IsNullOrEmpty(ProtocolTitle3) ? "-" : ProtocolTitle3),
(string.IsNullOrEmpty(ProtocolTitle4) ? "-" : ProtocolTitle4));
}
}
}
@@ -47,6 +47,7 @@ namespace TBF.BenchControl.DataEntry.Munich
protocolTitle1TextBox.Text = config.ProtocolTitle1;
protocolTitle2TextBox.Text = config.ProtocolTitle2;
protocolTitle3TextBox.Text = config.ProtocolTitle3;
protocolTitle4TextBox.Text = config.ProtocolTitle4;
}
public void Unlock()
@@ -55,6 +56,7 @@ namespace TBF.BenchControl.DataEntry.Munich
protocolTitle1TextBox.Enabled = true;
protocolTitle2TextBox.Enabled = true;
protocolTitle3TextBox.Enabled = true;
protocolTitle4TextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
@@ -73,6 +75,7 @@ namespace TBF.BenchControl.DataEntry.Munich
config.ProtocolTitle1 = protocolTitle1TextBox.Text;
config.ProtocolTitle2 = protocolTitle2TextBox.Text;
config.ProtocolTitle3 = protocolTitle3TextBox.Text;
config.ProtocolTitle4 = protocolTitle4TextBox.Text;
return flags;
}
@@ -40,6 +40,8 @@ namespace TBF.BenchControl.DataEntry.Munich
this.protocolTitle1TextBox = new System.Windows.Forms.TextBox();
this.protocolTitle2TextBox = new System.Windows.Forms.TextBox();
this.protocolTitle3TextBox = new System.Windows.Forms.TextBox();
this.protocolTitle4TextBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
@@ -119,10 +121,29 @@ namespace TBF.BenchControl.DataEntry.Munich
this.protocolTitle3TextBox.Size = new System.Drawing.Size(130, 20);
this.protocolTitle3TextBox.TabIndex = 11;
//
// protocolTitle4TextBox
//
this.protocolTitle4TextBox.Enabled = false;
this.protocolTitle4TextBox.Location = new System.Drawing.Point(137, 161);
this.protocolTitle4TextBox.Name = "protocolTitle4TextBox";
this.protocolTitle4TextBox.Size = new System.Drawing.Size(130, 20);
this.protocolTitle4TextBox.TabIndex = 13;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(27, 164);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(74, 13);
this.label4.TabIndex = 12;
this.label4.Text = "Protocol title 4";
//
// EntryFormCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.protocolTitle4TextBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.protocolTitle3TextBox);
this.Controls.Add(this.protocolTitle2TextBox);
this.Controls.Add(this.protocolTitle1TextBox);
@@ -151,5 +172,7 @@ namespace TBF.BenchControl.DataEntry.Munich
private System.Windows.Forms.TextBox protocolTitle1TextBox;
private System.Windows.Forms.TextBox protocolTitle2TextBox;
private System.Windows.Forms.TextBox protocolTitle3TextBox;
private System.Windows.Forms.TextBox protocolTitle4TextBox;
private System.Windows.Forms.Label label4;
}
}
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -20,15 +20,17 @@ namespace TBF.BenchControl.DataEntry.Munich3
public string ProtocolTitle1;
public string ProtocolTitle2;
public string ProtocolTitle3;
public string ProtocolTitle4;
/// Private parameterless constructor invoked by all other (public) constructors
EntryFormCfg()
{
Name = "DataEntryForm-3";
ParentName = string.Empty;
ProtocolTitle1 = "Protokoll Werkprüfung";
ProtocolTitle1 = "Protokoll 1";
ProtocolTitle2 = "Protokoll 2";
ProtocolTitle3 = "Protokoll 3";
ProtocolTitle4 = "Protokoll 4";
}
public EntryFormCfg(IComponentFactory factory)
@@ -39,11 +41,12 @@ namespace TBF.BenchControl.DataEntry.Munich3
public string ToString(int i)
{
return string.Format("Name={0}, Protocol1={1}, Protocol2={2}, Protocol3={3}",
return string.Format("Name={0}, P1={1}, P2={2}, P3={3}, P4={4}",
Name,
(string.IsNullOrEmpty(ProtocolTitle1) ? "-" : ProtocolTitle1),
(string.IsNullOrEmpty(ProtocolTitle2) ? "-" : ProtocolTitle2),
(string.IsNullOrEmpty(ProtocolTitle3) ? "-" : ProtocolTitle3));
(string.IsNullOrEmpty(ProtocolTitle3) ? "-" : ProtocolTitle3),
(string.IsNullOrEmpty(ProtocolTitle4) ? "-" : ProtocolTitle4));
}
}
}
@@ -47,6 +47,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
protocolTitle1TextBox.Text = config.ProtocolTitle1;
protocolTitle2TextBox.Text = config.ProtocolTitle2;
protocolTitle3TextBox.Text = config.ProtocolTitle3;
protocolTitle4TextBox.Text = config.ProtocolTitle4;
}
public void Unlock()
@@ -55,6 +56,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
protocolTitle1TextBox.Enabled = true;
protocolTitle2TextBox.Enabled = true;
protocolTitle3TextBox.Enabled = true;
protocolTitle4TextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
@@ -73,6 +75,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
config.ProtocolTitle1 = protocolTitle1TextBox.Text;
config.ProtocolTitle2 = protocolTitle2TextBox.Text;
config.ProtocolTitle3 = protocolTitle3TextBox.Text;
config.ProtocolTitle4 = protocolTitle4TextBox.Text;
return flags;
}
@@ -40,6 +40,8 @@ namespace TBF.BenchControl.DataEntry.Munich3
this.protocolTitle1TextBox = new System.Windows.Forms.TextBox();
this.protocolTitle2TextBox = new System.Windows.Forms.TextBox();
this.protocolTitle3TextBox = new System.Windows.Forms.TextBox();
this.protocolTitle4TextBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
@@ -119,10 +121,29 @@ namespace TBF.BenchControl.DataEntry.Munich3
this.protocolTitle3TextBox.Size = new System.Drawing.Size(130, 20);
this.protocolTitle3TextBox.TabIndex = 11;
//
// protocolTitle4TextBox
//
this.protocolTitle4TextBox.Enabled = false;
this.protocolTitle4TextBox.Location = new System.Drawing.Point(137, 161);
this.protocolTitle4TextBox.Name = "protocolTitle4TextBox";
this.protocolTitle4TextBox.Size = new System.Drawing.Size(130, 20);
this.protocolTitle4TextBox.TabIndex = 13;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(27, 164);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(74, 13);
this.label4.TabIndex = 12;
this.label4.Text = "Protocol title 4";
//
// EntryFormCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.protocolTitle4TextBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.protocolTitle3TextBox);
this.Controls.Add(this.protocolTitle2TextBox);
this.Controls.Add(this.protocolTitle1TextBox);
@@ -151,5 +172,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
private System.Windows.Forms.TextBox protocolTitle1TextBox;
private System.Windows.Forms.TextBox protocolTitle2TextBox;
private System.Windows.Forms.TextBox protocolTitle3TextBox;
private System.Windows.Forms.TextBox protocolTitle4TextBox;
private System.Windows.Forms.Label label4;
}
}
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.7.285.1")]
[assembly: AssemblyFileVersion("2.7.285.1")]
[assembly: AssemblyVersion("2.7.286.1")]
[assembly: AssemblyFileVersion("2.7.286.1")]