Refactoring : TestBenchFramework --> TBF ver. 2.18.789
This commit is contained in:
Generated
+120
@@ -0,0 +1,120 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TestBenchFramework
|
||||
{
|
||||
partial class AboutDlg
|
||||
{
|
||||
/// <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.copyrightLabel = new System.Windows.Forms.Label();
|
||||
this.versionLabel = new System.Windows.Forms.Label();
|
||||
this.buildDateLabel = new System.Windows.Forms.Label();
|
||||
this.closeButton = new System.Windows.Forms.Button();
|
||||
this.logoPictureBox = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// copyrightLabel
|
||||
//
|
||||
this.copyrightLabel.AutoSize = true;
|
||||
this.copyrightLabel.Location = new System.Drawing.Point(145, 19);
|
||||
this.copyrightLabel.Name = "copyrightLabel";
|
||||
this.copyrightLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.copyrightLabel.TabIndex = 4;
|
||||
this.copyrightLabel.Text = "Copyright © 2013";
|
||||
//
|
||||
// versionLabel
|
||||
//
|
||||
this.versionLabel.AutoSize = true;
|
||||
this.versionLabel.Location = new System.Drawing.Point(145, 41);
|
||||
this.versionLabel.Name = "versionLabel";
|
||||
this.versionLabel.Size = new System.Drawing.Size(105, 13);
|
||||
this.versionLabel.TabIndex = 5;
|
||||
this.versionLabel.Text = "Version _VERSION_";
|
||||
//
|
||||
// buildDateLabel
|
||||
//
|
||||
this.buildDateLabel.AutoSize = true;
|
||||
this.buildDateLabel.Location = new System.Drawing.Point(145, 64);
|
||||
this.buildDateLabel.Name = "buildDateLabel";
|
||||
this.buildDateLabel.Size = new System.Drawing.Size(136, 13);
|
||||
this.buildDateLabel.TabIndex = 6;
|
||||
this.buildDateLabel.Text = "Build date _BUILD_DATE_";
|
||||
//
|
||||
// closeButton
|
||||
//
|
||||
this.closeButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.closeButton.Location = new System.Drawing.Point(341, 36);
|
||||
this.closeButton.Name = "closeButton";
|
||||
this.closeButton.Size = new System.Drawing.Size(105, 28);
|
||||
this.closeButton.TabIndex = 11;
|
||||
this.closeButton.Text = "&Close";
|
||||
this.closeButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// logoPictureBox
|
||||
//
|
||||
this.logoPictureBox.BackgroundImage = global::TestBenchFramework.Properties.Resources.sensus_logo;
|
||||
this.logoPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.logoPictureBox.InitialImage = null;
|
||||
this.logoPictureBox.Location = new System.Drawing.Point(12, 34);
|
||||
this.logoPictureBox.Name = "logoPictureBox";
|
||||
this.logoPictureBox.Size = new System.Drawing.Size(103, 30);
|
||||
this.logoPictureBox.TabIndex = 12;
|
||||
this.logoPictureBox.TabStop = false;
|
||||
//
|
||||
// AboutDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.ClientSize = new System.Drawing.Size(458, 99);
|
||||
this.Controls.Add(this.logoPictureBox);
|
||||
this.Controls.Add(this.closeButton);
|
||||
this.Controls.Add(this.buildDateLabel);
|
||||
this.Controls.Add(this.versionLabel);
|
||||
this.Controls.Add(this.copyrightLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "AboutDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "About Test Bench Framework";
|
||||
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label copyrightLabel;
|
||||
private System.Windows.Forms.Label versionLabel;
|
||||
private System.Windows.Forms.Label buildDateLabel;
|
||||
private System.Windows.Forms.Button closeButton;
|
||||
private System.Windows.Forms.PictureBox logoPictureBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TestBenchFramework
|
||||
{
|
||||
/// <summary>
|
||||
/// About dialog
|
||||
/// </summary>
|
||||
public partial class AboutDlg : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Contsructor
|
||||
/// </summary>
|
||||
/// <param name="version">Language neutral version string</param>
|
||||
/// <param name="buildDate">Regionally formated build date string</param>
|
||||
public AboutDlg(string version, string buildDate)
|
||||
{
|
||||
InitializeComponent();
|
||||
versionLabel.Text = versionLabel.Text.Replace("_VERSION_", version);
|
||||
buildDateLabel.Text = buildDateLabel.Text.Replace("_BUILD_DATE_", buildDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?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>
|
||||
<metadata name="closeButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,176 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF
|
||||
{
|
||||
/// <summary>
|
||||
/// Data types and orientation of the table layout panel attached data.
|
||||
/// </summary>
|
||||
public enum Arrangement
|
||||
{
|
||||
RowOfIntegers,
|
||||
RowOfDoubles,
|
||||
RowOfStrings,
|
||||
ColumnOfIntegers,
|
||||
ColumnOfDoubles,
|
||||
ColumnOfStrings,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class represents TextBox controls and data modified by them
|
||||
/// that are attached to (=displayed inside) a TableLayoutPanel control.
|
||||
/// </summary>
|
||||
public class AttachedTextBoxes
|
||||
{
|
||||
///
|
||||
/// Private fields
|
||||
///
|
||||
int count; /// Number of attached TextBoxes / cells
|
||||
Arrangement arngmnt; /// Type of attachemnt (see above)
|
||||
bool isRow; /// true if it is a row
|
||||
TextBox[] textBoxes; /// TextBox controls to be aded to TableLayoutPanel
|
||||
int[] intData; /// integer data |
|
||||
double[] doubleData; /// double data |-> one of these three arrays is used
|
||||
string[] stringData; /// string data |
|
||||
|
||||
/// <summary>
|
||||
/// Constructor, which creates TextBox controls and adds them to the table layout panel.
|
||||
/// </summary>
|
||||
public AttachedTextBoxes(TableLayoutPanel tblLtPnl, Arrangement arngmnt, int firstColumn, int firstRow, int size)
|
||||
{
|
||||
this.count = size;
|
||||
this.arngmnt = arngmnt;
|
||||
isRow = (arngmnt == Arrangement.RowOfIntegers || arngmnt == Arrangement.RowOfDoubles || arngmnt == Arrangement.RowOfStrings);
|
||||
|
||||
textBoxes = new TextBox[count];
|
||||
intData = new int[count];
|
||||
doubleData = new double[count];
|
||||
stringData = new string[count];
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
textBoxes[i] = new TextBox(); /// Crete a new TextBox control
|
||||
|
||||
if (isRow)
|
||||
{
|
||||
tblLtPnl.Controls.Add(textBoxes[i], firstColumn + i, firstRow);
|
||||
}
|
||||
else
|
||||
{
|
||||
tblLtPnl.Controls.Add(textBoxes[i], firstColumn, firstRow + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attached data array size
|
||||
/// </summary>
|
||||
public int Count { get { return count; } }
|
||||
|
||||
/// <summary>
|
||||
/// Indexer returning a TextBox
|
||||
/// </summary>
|
||||
/// <param name="index">Index</param>
|
||||
/// <returns>TextBox object reference</returns>
|
||||
public TextBox this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (index < 0 || index >= count)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return textBoxes[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves data from the controls or detects a format error.
|
||||
/// Wrong format in a cell interrupts data retrieving, so when the first control
|
||||
/// contains data with wrong format, no data are retrieved at all.
|
||||
/// </summary>
|
||||
/// <returns>true if all data have correct format</returns>
|
||||
public bool ValidateData()
|
||||
{
|
||||
switch (arngmnt)
|
||||
{
|
||||
case Arrangement.RowOfIntegers:
|
||||
case Arrangement.ColumnOfIntegers:
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (!Int32.TryParse(textBoxes[i].Text, out intData[i])) return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
case Arrangement.RowOfDoubles:
|
||||
case Arrangement.ColumnOfDoubles:
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (!Double.TryParse(textBoxes[i].Text, out doubleData[i])) return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
case Arrangement.RowOfStrings:
|
||||
case Arrangement.ColumnOfStrings:
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The following three methods provide initialization of controls with original data.
|
||||
/// </summary>
|
||||
|
||||
public void SetData(int index, int value)
|
||||
{
|
||||
if (index < 0 || index >= count) return;
|
||||
intData[index] = value;
|
||||
textBoxes[index].Text = value.ToString();
|
||||
}
|
||||
|
||||
public void SetData(int index, double value)
|
||||
{
|
||||
if (index < 0 || index >= count) return;
|
||||
doubleData[index] = value;
|
||||
textBoxes[index].Text = value.ToString();
|
||||
}
|
||||
|
||||
public void SetData(int index, string value)
|
||||
{
|
||||
if (index < 0 || index >= count) return;
|
||||
stringData[index] = value;
|
||||
textBoxes[index].Text = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The following three methods provide retrieving data from controls.
|
||||
/// ValidateData() must be called first. The return value must be true.
|
||||
/// </summary>
|
||||
|
||||
public int GetIntData(int index)
|
||||
{
|
||||
if (index < 0 || index >= count) return 0;
|
||||
return intData[index];
|
||||
}
|
||||
|
||||
public double GetDoubleData(int index)
|
||||
{
|
||||
if (index < 0 || index >= count) return 0;
|
||||
return doubleData[index];
|
||||
}
|
||||
|
||||
public string GetStringData(int index)
|
||||
{
|
||||
if (index < 0 || index >= count) return null;
|
||||
return textBoxes[index].Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF
|
||||
{
|
||||
public class BarGraph
|
||||
{
|
||||
int originX; /// Left coordinate of the bar
|
||||
int originY; /// Top coordinate of the bar
|
||||
int barWidth; /// Bar width, the bar is actualy 1 pixel wider
|
||||
int barHeight; /// Bar height the bat is actualy 1 pixel higher
|
||||
Color barColor; /// Bar color
|
||||
Color backColor; /// Background color (above the bar)
|
||||
/// Bar border is always black, 1 pixel wide
|
||||
int barValue; /// The actual bar size (the bar is drawn from bottom)
|
||||
|
||||
System.Windows.Forms.Control control;
|
||||
Rectangle rect;
|
||||
|
||||
|
||||
/// Use this setter to update the bar size
|
||||
public float FValue
|
||||
{
|
||||
get { return (float)barValue/(float)barHeight; }
|
||||
set
|
||||
{
|
||||
Value = (int)(value * (float)barHeight);
|
||||
control.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
/// Use this setter to update the bar size
|
||||
public int Value
|
||||
{
|
||||
get { return barValue; }
|
||||
set
|
||||
{
|
||||
if (value < 0) barValue = 0;
|
||||
else if (value >= barHeight) barValue = barHeight;
|
||||
else barValue = value;
|
||||
control.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public BarGraph(System.Windows.Forms.Control control, int originX, int originY, int barWidth, int barHeight, Color barColor, Color backColor)
|
||||
{
|
||||
this.control = control;
|
||||
this.originX = originX;
|
||||
this.originY = originY;
|
||||
this.barWidth = barWidth;
|
||||
this.barHeight = barHeight;
|
||||
this.barColor = barColor;
|
||||
this.backColor = backColor;
|
||||
rect = new Rectangle(originX, originY, barWidth + 1, barHeight + 1);
|
||||
barValue = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call this function in Form1_Paint(..), pass the arguments without any modifications
|
||||
/// </summary>
|
||||
public void Paint(Graphics g)
|
||||
{
|
||||
g.FillRectangle(new SolidBrush(backColor), originX + 1, originY + 1, barWidth, barHeight - barValue);
|
||||
g.FillRectangle(new SolidBrush(barColor), originX + 1, originY + barHeight + 1 - barValue, barWidth, barValue);
|
||||
g.DrawRectangle(new Pen(Color.Black, 2.0F), originX, originY, barWidth + 1, barHeight + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Ports;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
/// <summary>
|
||||
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
|
||||
/// Connection settings: 9600 Bd 8-bits No-parity 2-stop-bits Flow control: none.
|
||||
/// </summary>
|
||||
public class Ambient : ComponentBase, IDevice, IOperation, GenericDevices.IAmbient
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Ambient));
|
||||
public override string ToString() { return string.Format("Ambient({0})", Cfg.ToString(1)); }
|
||||
|
||||
private readonly AmbientCfg ambientCfg;
|
||||
|
||||
/// Private fields
|
||||
SerialPort serialPort;
|
||||
|
||||
/// <summary>The state of the measurement</summary>
|
||||
MsrmntState msrmntState;
|
||||
|
||||
///
|
||||
/// Measured values when MsrmntState == MsrmntState.Valid
|
||||
///
|
||||
float temperature; /// [deg C]
|
||||
float pressure; /// [bar]
|
||||
float humidity; /// [%]
|
||||
|
||||
/// <summary>Measurement time stamp when MsrmntState == MsrmntState.Valid</summary>
|
||||
int msrmntTimeStamp;
|
||||
|
||||
public Ambient()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
|
||||
/// </summary>
|
||||
public Ambient(AmbientCfg cfg, IList<Generic.IComponent> components)
|
||||
: this(cfg)
|
||||
{
|
||||
}
|
||||
|
||||
public Ambient(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
ambientCfg = cfg as AmbientCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
if (ambientCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
temperature = 20.0f;
|
||||
humidity = 40.0f;
|
||||
pressure = 1.0f;
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
return;
|
||||
}
|
||||
|
||||
string comPortName = "COM" + ambientCfg.ComPortNr.ToString();
|
||||
serialPort = new SerialPort(comPortName, ambientCfg.BaudRate, ambientCfg.Parity, ambientCfg.DataBits, ambientCfg.StopBits);
|
||||
serialPort.Handshake = ambientCfg.Handshake;
|
||||
serialPort.Open();
|
||||
msrmntState = MsrmntState.Busy;
|
||||
|
||||
log.FatalFormat("Successfully initialized device {0}", ToString());
|
||||
}
|
||||
|
||||
/// <summary>Run this device</summary>
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
if (ambientCfg.DebugLevel == DebugMode.Simulate ||
|
||||
ambientCfg.DebugLevel == DebugMode.FailureDuringOperation)
|
||||
{
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
return;
|
||||
}
|
||||
|
||||
if (serialPort == null)
|
||||
{
|
||||
log.ErrorFormat("{0} - RunDeviceBefore() - serial port closed", Name);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
int receivedBytes = serialPort.BytesToRead;
|
||||
|
||||
if (receivedBytes >= 13)
|
||||
{
|
||||
byte[] byteArr = new byte[receivedBytes];
|
||||
for (int i = 0; i < receivedBytes; i++) byteArr[i] = (byte)serialPort.ReadByte();
|
||||
log.Debug(Telegram.LogTelegram("Received ", byteArr));
|
||||
|
||||
if ((receivedBytes == 13) && (byteArr[0] == 1) && (byteArr[1] == 3) && (byteArr[2] == 8) && Telegram.VerifyTelegramCRC(byteArr))
|
||||
{
|
||||
int value = (int)byteArr[3] * 256 + (int)byteArr[4];
|
||||
temperature = (float)value / 10.0f;
|
||||
|
||||
value = (int)byteArr[5] * 256 + (int)byteArr[6];
|
||||
humidity = (float)value / 10.0f;
|
||||
|
||||
value = (int)byteArr[9] * 256 + (int)byteArr[10];
|
||||
pressure = (float)value / 10000.0f;
|
||||
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("Ambient: temperature = {0} C, humidity = {1} %, pressure = {2} mbar", temperature.ToString("F1"), humidity.ToString("F1"), (1000 * pressure).ToString("F0"));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugLevel = DebugMode.FailureDuringOperation;
|
||||
serialPort = null;
|
||||
|
||||
log.FatalFormat("Ambient: Serail port read failure : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this device</summary>
|
||||
public void RunDeviceAfter()
|
||||
{
|
||||
if (ambientCfg.DebugLevel == DebugMode.Simulate ||
|
||||
ambientCfg.DebugLevel == DebugMode.FailureDuringOperation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (serialPort == null)
|
||||
{
|
||||
log.ErrorFormat("{0} - RunDeviceAfter() - serial port closed", Name);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
/// Each 10 seconds
|
||||
if ((StateMachine.Time % 10) == 0)
|
||||
{
|
||||
/// Read four registers: 0x31, 0x32, 0x33, 0x34
|
||||
UInt16 regAddr = 0x0030; /// register addr. = 0x31 (Modbus!)
|
||||
UInt16 count = 4;
|
||||
|
||||
/// Prepare data to be sent
|
||||
byte[] msg = new byte[8];
|
||||
msg[0] = 1; /// (byte)ambientCfg.BusAddress;
|
||||
msg[1] = 3; /// CMD = Read registers
|
||||
msg[2] = (byte)(regAddr >> 8); /// Control Word Hi
|
||||
msg[3] = (byte)(regAddr & 0xFF); /// Control Word Lo
|
||||
msg[4] = (byte)(count >> 8); /// Serial Com Reference Hi
|
||||
msg[5] = (byte)(count & 0xFF); /// Serial Com Reference Lo
|
||||
Telegram.UpdateTelegramCRC(msg);
|
||||
|
||||
log.Debug(Telegram.LogTelegram("Sending ", msg));
|
||||
serialPort.Write(msg, 0, msg.Length);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugLevel = DebugMode.FailureDuringOperation;
|
||||
serialPort = null;
|
||||
|
||||
log.FatalFormat("Ambient: Serail port read failure : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Stop this device</summary>
|
||||
public void StopDevice()
|
||||
{
|
||||
if (serialPort != null)
|
||||
{
|
||||
serialPort.Close();
|
||||
serialPort = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void StopDevice2() { }
|
||||
|
||||
///
|
||||
/// Boxes for the operation result
|
||||
///
|
||||
FloatBox tempBox;
|
||||
FloatBox pressureBox;
|
||||
FloatBox humiBox;
|
||||
|
||||
public IOperation ReadAmbientOp(FloatBox temperature, FloatBox pressure, FloatBox humidity)
|
||||
{
|
||||
this.tempBox = temperature;
|
||||
this.pressureBox = pressure;
|
||||
this.humiBox = humidity;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
if (tempBox != null) tempBox.Val = temperature;
|
||||
if (pressureBox != null) pressureBox.Val = pressure;
|
||||
if (humiBox != null) humiBox.Val = humidity;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>
|
||||
/// Event.FlowInDone or Event.FlowOutDone
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (tempBox != null) tempBox.Val = temperature;
|
||||
if (pressureBox != null) pressureBox.Val = pressure;
|
||||
if (humiBox != null) humiBox.Val = humidity;
|
||||
return Event.AmbientDone;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AmbientCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public int ComPortNr;
|
||||
public int BaudRate;
|
||||
public Parity Parity;
|
||||
public int DataBits;
|
||||
public StopBits StopBits;
|
||||
public Handshake Handshake;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
AmbientCfg()
|
||||
{
|
||||
Name = "Ambient";
|
||||
ParentName = string.Empty;
|
||||
ComPortNr = 6;
|
||||
BaudRate = 9600;
|
||||
Parity = System.IO.Ports.Parity.None;
|
||||
DataBits = 8;
|
||||
StopBits = System.IO.Ports.StopBits.Two;
|
||||
Handshake = System.IO.Ports.Handshake.None;
|
||||
}
|
||||
|
||||
public AmbientCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Com{1}, {2}Bd, {3}-bits, parity={4}, stopBits={5}, {6}",
|
||||
Name, ComPortNr, BaudRate, DataBits, Parity, StopBits, Handshake);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
partial class AmbientCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.comPortNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.baudRateLabel = new System.Windows.Forms.Label();
|
||||
this.baudRateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.partityLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.stopBitsLabel = new System.Windows.Forms.Label();
|
||||
this.handshakeLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.parityComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.stopBitsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.handshakeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// comPortNrTextBox
|
||||
//
|
||||
this.comPortNrTextBox.Enabled = false;
|
||||
this.comPortNrTextBox.Location = new System.Drawing.Point(140, 52);
|
||||
this.comPortNrTextBox.Name = "comPortNrTextBox";
|
||||
this.comPortNrTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.comPortNrTextBox.TabIndex = 4;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(29, 55);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(98, 13);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Serial Port Number:";
|
||||
//
|
||||
// baudRateLabel
|
||||
//
|
||||
this.baudRateLabel.AutoSize = true;
|
||||
this.baudRateLabel.Location = new System.Drawing.Point(29, 79);
|
||||
this.baudRateLabel.Name = "baudRateLabel";
|
||||
this.baudRateLabel.Size = new System.Drawing.Size(58, 13);
|
||||
this.baudRateLabel.TabIndex = 5;
|
||||
this.baudRateLabel.Text = "Baud Rate";
|
||||
//
|
||||
// baudRateTextBox
|
||||
//
|
||||
this.baudRateTextBox.Enabled = false;
|
||||
this.baudRateTextBox.Location = new System.Drawing.Point(140, 76);
|
||||
this.baudRateTextBox.Name = "baudRateTextBox";
|
||||
this.baudRateTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.baudRateTextBox.TabIndex = 6;
|
||||
//
|
||||
// partityLabel
|
||||
//
|
||||
this.partityLabel.AutoSize = true;
|
||||
this.partityLabel.Location = new System.Drawing.Point(29, 103);
|
||||
this.partityLabel.Name = "partityLabel";
|
||||
this.partityLabel.Size = new System.Drawing.Size(33, 13);
|
||||
this.partityLabel.TabIndex = 7;
|
||||
this.partityLabel.Text = "Parity";
|
||||
//
|
||||
// dataBitsLabel
|
||||
//
|
||||
this.dataBitsLabel.AutoSize = true;
|
||||
this.dataBitsLabel.Location = new System.Drawing.Point(29, 127);
|
||||
this.dataBitsLabel.Name = "dataBitsLabel";
|
||||
this.dataBitsLabel.Size = new System.Drawing.Size(50, 13);
|
||||
this.dataBitsLabel.TabIndex = 9;
|
||||
this.dataBitsLabel.Text = "Data Bits";
|
||||
//
|
||||
// dataBitsTextBox
|
||||
//
|
||||
this.dataBitsTextBox.Enabled = false;
|
||||
this.dataBitsTextBox.Location = new System.Drawing.Point(140, 124);
|
||||
this.dataBitsTextBox.Name = "dataBitsTextBox";
|
||||
this.dataBitsTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.dataBitsTextBox.TabIndex = 10;
|
||||
//
|
||||
// stopBitsLabel
|
||||
//
|
||||
this.stopBitsLabel.AutoSize = true;
|
||||
this.stopBitsLabel.Location = new System.Drawing.Point(29, 151);
|
||||
this.stopBitsLabel.Name = "stopBitsLabel";
|
||||
this.stopBitsLabel.Size = new System.Drawing.Size(49, 13);
|
||||
this.stopBitsLabel.TabIndex = 11;
|
||||
this.stopBitsLabel.Text = "Stop Bits";
|
||||
//
|
||||
// handshakeLabel
|
||||
//
|
||||
this.handshakeLabel.AutoSize = true;
|
||||
this.handshakeLabel.Location = new System.Drawing.Point(29, 175);
|
||||
this.handshakeLabel.Name = "handshakeLabel";
|
||||
this.handshakeLabel.Size = new System.Drawing.Size(62, 13);
|
||||
this.handshakeLabel.TabIndex = 13;
|
||||
this.handshakeLabel.Text = "Handshake";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(140, 28);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(30, 31);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(137, 7);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// parityComboBox
|
||||
//
|
||||
this.parityComboBox.Enabled = false;
|
||||
this.parityComboBox.FormattingEnabled = true;
|
||||
this.parityComboBox.Location = new System.Drawing.Point(140, 100);
|
||||
this.parityComboBox.Name = "parityComboBox";
|
||||
this.parityComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.parityComboBox.TabIndex = 8;
|
||||
//
|
||||
// stopBitsComboBox
|
||||
//
|
||||
this.stopBitsComboBox.Enabled = false;
|
||||
this.stopBitsComboBox.FormattingEnabled = true;
|
||||
this.stopBitsComboBox.Location = new System.Drawing.Point(140, 148);
|
||||
this.stopBitsComboBox.Name = "stopBitsComboBox";
|
||||
this.stopBitsComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.stopBitsComboBox.TabIndex = 12;
|
||||
//
|
||||
// handshakeComboBox
|
||||
//
|
||||
this.handshakeComboBox.Enabled = false;
|
||||
this.handshakeComboBox.FormattingEnabled = true;
|
||||
this.handshakeComboBox.Location = new System.Drawing.Point(140, 172);
|
||||
this.handshakeComboBox.Name = "handshakeComboBox";
|
||||
this.handshakeComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.handshakeComboBox.TabIndex = 14;
|
||||
//
|
||||
// AmbientCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Controls.Add(this.handshakeComboBox);
|
||||
this.Controls.Add(this.stopBitsComboBox);
|
||||
this.Controls.Add(this.parityComboBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Controls.Add(this.handshakeLabel);
|
||||
this.Controls.Add(this.stopBitsLabel);
|
||||
this.Controls.Add(this.dataBitsTextBox);
|
||||
this.Controls.Add(this.dataBitsLabel);
|
||||
this.Controls.Add(this.partityLabel);
|
||||
this.Controls.Add(this.baudRateTextBox);
|
||||
this.Controls.Add(this.baudRateLabel);
|
||||
this.Controls.Add(this.comPortNrTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "AmbientCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 240);
|
||||
this.Load += new System.EventHandler(this.AbbientCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox comPortNrTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label baudRateLabel;
|
||||
private System.Windows.Forms.TextBox baudRateTextBox;
|
||||
private System.Windows.Forms.Label partityLabel;
|
||||
private System.Windows.Forms.Label dataBitsLabel;
|
||||
private System.Windows.Forms.TextBox dataBitsTextBox;
|
||||
private System.Windows.Forms.Label stopBitsLabel;
|
||||
private System.Windows.Forms.Label handshakeLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.ComboBox parityComboBox;
|
||||
private System.Windows.Forms.ComboBox stopBitsComboBox;
|
||||
private System.Windows.Forms.ComboBox handshakeComboBox;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO.Ports;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public partial class AmbientCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(AmbientCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
AmbientCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as AmbientCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public AmbientCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
parityComboBox.Items.Add(Parity.None.ToString());
|
||||
parityComboBox.Items.Add(Parity.Even.ToString());
|
||||
parityComboBox.Items.Add(Parity.Odd.ToString());
|
||||
|
||||
stopBitsComboBox.Items.Add(StopBits.None.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.One.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.OnePointFive.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.Two.ToString());
|
||||
|
||||
handshakeComboBox.Items.Add(Handshake.None.ToString());
|
||||
handshakeComboBox.Items.Add(Handshake.RequestToSend.ToString());
|
||||
handshakeComboBox.Items.Add(Handshake.XOnXOff.ToString());
|
||||
}
|
||||
|
||||
int GetParityIx(Parity par)
|
||||
{
|
||||
if (par == Parity.None) return 0;
|
||||
if (par == Parity.Even) return 0;
|
||||
if (par == Parity.Odd) return 0;
|
||||
return -1;
|
||||
}
|
||||
Parity GetParity(string str)
|
||||
{
|
||||
if (str.Equals(Parity.None.ToString())) return Parity.None;
|
||||
if (str.Equals(Parity.Even.ToString())) return Parity.Even;
|
||||
if (str.Equals(Parity.Odd.ToString())) return Parity.Odd;
|
||||
return (Parity)(-1);
|
||||
}
|
||||
|
||||
int GetStopBitsIx(StopBits sb)
|
||||
{
|
||||
if (sb == StopBits.None) return 0;
|
||||
if (sb == StopBits.One) return 1;
|
||||
if (sb == StopBits.OnePointFive) return 2;
|
||||
if (sb == StopBits.Two) return 3;
|
||||
return -1;
|
||||
}
|
||||
StopBits GetStopBits(string str)
|
||||
{
|
||||
if (str.Equals(StopBits.None.ToString())) return StopBits.None;
|
||||
if (str.Equals(StopBits.One.ToString())) return StopBits.One;
|
||||
if (str.Equals(StopBits.OnePointFive.ToString())) return StopBits.OnePointFive;
|
||||
if (str.Equals(StopBits.Two.ToString())) return StopBits.Two;
|
||||
return (StopBits)(-1);
|
||||
}
|
||||
|
||||
int GetHandshakeIx(Handshake par)
|
||||
{
|
||||
if (par == Handshake.None) return 0;
|
||||
if (par == Handshake.RequestToSend) return 0;
|
||||
if (par == Handshake.XOnXOff) return 0;
|
||||
return -1;
|
||||
}
|
||||
Handshake GetHandshake(string str)
|
||||
{
|
||||
if (str.Equals(Handshake.None.ToString())) return Handshake.None;
|
||||
if (str.Equals(Handshake.RequestToSend.ToString())) return Handshake.RequestToSend;
|
||||
if (str.Equals(Handshake.XOnXOff.ToString())) return Handshake.XOnXOff;
|
||||
return (Handshake)(-1);
|
||||
}
|
||||
|
||||
private void AbbientCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
comPortNrTextBox.Text = config.ComPortNr.ToString();
|
||||
baudRateTextBox.Text = config.BaudRate.ToString();
|
||||
parityComboBox.Text = config.Parity.ToString();
|
||||
dataBitsTextBox.Text = config.DataBits.ToString();
|
||||
stopBitsComboBox.Text = config.StopBits.ToString();
|
||||
handshakeComboBox.Text = config.Handshake.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
comPortNrTextBox.Enabled = true;
|
||||
baudRateTextBox.Enabled = true;
|
||||
parityComboBox.Enabled = true;
|
||||
dataBitsTextBox.Enabled = true;
|
||||
stopBitsComboBox.Enabled = true;
|
||||
handshakeComboBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ComPortNr = int.Parse(comPortNrTextBox.Text);
|
||||
config.BaudRate = int.Parse(baudRateTextBox.Text);
|
||||
config.Parity = GetParity(parityComboBox.SelectedItem.ToString());
|
||||
config.DataBits = int.Parse(dataBitsTextBox.Text);
|
||||
config.StopBits = GetStopBits(stopBitsComboBox.SelectedItem.ToString());
|
||||
config.Handshake = GetHandshake(handshakeComboBox.SelectedItem.ToString());
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Serial Port Number' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(baudRateTextBox.Text, out dummy) || dummy < 150 || dummy > 115200)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Baud Rate' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(dataBitsTextBox.Text, out dummy) || dummy < 7 || dummy > 8)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Data Bits' is not valid";
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "Comet-Ambient"; } }
|
||||
|
||||
public void ResetStaticProperties() { Ambient.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Ambient(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Ambient(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new AmbientCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(AmbientCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Ports;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
/// <summary>
|
||||
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
|
||||
/// Connection settings: 19200 Bd 8-bits No-parity 1-stop-bit Flow control: none or hardware.
|
||||
/// </summary>
|
||||
public class Ambient : ComponentBase, IDevice, IOperation, GenericDevices.IAmbient
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Ambient));
|
||||
public override string ToString() { return string.Format("Ambient({0})", Cfg.ToString(1)); }
|
||||
|
||||
private readonly AmbientCfg ambientCfg;
|
||||
|
||||
/// Private fields
|
||||
SerialPort serialPort;
|
||||
StringBuilder measurementBuilder;
|
||||
|
||||
/// <summary>The state of the measurement</summary>
|
||||
MsrmntState msrmntState;
|
||||
|
||||
///
|
||||
/// Measured values when MsrmntState == MsrmntState.Valid
|
||||
///
|
||||
float temperature; /// [deg C]
|
||||
float pressure; /// [bar]
|
||||
float humidity; /// [%]
|
||||
|
||||
/// <summary>Measurement time stamp when MsrmntState == MsrmntState.Valid</summary>
|
||||
int msrmntTimeStamp;
|
||||
|
||||
public Ambient()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
|
||||
/// Connection settings: 19200 Bd 8-bits No-parity 1-stop-bit Flow control: none or hardware.
|
||||
/// </summary>
|
||||
public Ambient(AmbientCfg cfg, IList<Generic.IComponent> components)
|
||||
: this(cfg)
|
||||
{
|
||||
}
|
||||
|
||||
public Ambient(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
ambientCfg = cfg as AmbientCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
if (ambientCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
temperature = 20.0f;
|
||||
humidity = 40.0f;
|
||||
pressure = 1.0f;
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
return;
|
||||
}
|
||||
|
||||
string comPortName = "COM" + ambientCfg.ComPortNr.ToString();
|
||||
serialPort = new SerialPort(comPortName, ambientCfg.BaudRate, ambientCfg.Parity, ambientCfg.DataBits, ambientCfg.StopBits);
|
||||
serialPort.Handshake = ambientCfg.Handshake;
|
||||
serialPort.Open();
|
||||
measurementBuilder = new StringBuilder(40);
|
||||
msrmntState = MsrmntState.Busy;
|
||||
|
||||
log.FatalFormat("Successfully initialized device {0}", ToString());
|
||||
}
|
||||
|
||||
/// <summary>Run this device</summary>
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
if (ambientCfg.DebugLevel == DebugMode.Simulate ||
|
||||
ambientCfg.DebugLevel == DebugMode.FailureDuringOperation)
|
||||
{
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
measurementBuilder.Append(serialPort.ReadExisting());
|
||||
int len = measurementBuilder.Length;
|
||||
|
||||
///
|
||||
/// Device sends each 20 sec one line of ASCII text with data in the following format:
|
||||
/// (temp) 6 characters, two decimal digits, with leading spaces
|
||||
/// TAB 1 character
|
||||
/// (humi) 6 characters, two decimal digits, with leading spaces
|
||||
/// TAB 1 character
|
||||
/// (pressure) 6 characters, one decimal digits, with leading spaces is LT 1000
|
||||
/// CR + LF 2 characters
|
||||
/// Example:
|
||||
/// 23.42 38.08 1061.1
|
||||
/// 23.39 38.04 1060.8
|
||||
/// 23.39 38.08 1061.4
|
||||
///
|
||||
if (len >= 22)
|
||||
{
|
||||
string measurement = measurementBuilder.ToString();
|
||||
measurementBuilder.Clear();
|
||||
|
||||
float t = 0;
|
||||
float h = 0;
|
||||
float p = 0;
|
||||
if (float.TryParse(measurement.Substring(len - 22, 6), NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite,
|
||||
CultureInfo.InvariantCulture, out t) &&
|
||||
measurement[len - 16] == '\t' &&
|
||||
float.TryParse(measurement.Substring(len - 15, 6), NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite,
|
||||
CultureInfo.InvariantCulture, out h) &&
|
||||
measurement[len - 9] == '\t' &&
|
||||
float.TryParse(measurement.Substring(len - 8, 6), NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite,
|
||||
CultureInfo.InvariantCulture, out p) &&
|
||||
measurement[len - 2] == '\r' &&
|
||||
measurement[len - 1] == '\n')
|
||||
{
|
||||
temperature = t;
|
||||
humidity = h;
|
||||
pressure = p / 1000.0F;
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
|
||||
log.InfoFormat("Ambient: temperature = {0} C, humidity = {1} %, pressure = {2} mbar", temperature.ToString("F1"), humidity.ToString("F1"), (1000 * pressure).ToString("F0"));
|
||||
}
|
||||
else
|
||||
{
|
||||
log.Warn("Invalid string received: " + measurement);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugLevel = DebugMode.FailureDuringOperation;
|
||||
serialPort = null;
|
||||
|
||||
log.FatalFormat("Ambient: Serail port read failure : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this device</summary>
|
||||
public void RunDeviceAfter()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Stop this device</summary>
|
||||
public void StopDevice()
|
||||
{
|
||||
if (serialPort != null) serialPort.Close();
|
||||
}
|
||||
|
||||
public void StopDevice2() { }
|
||||
|
||||
///
|
||||
/// Boxes for the operation result
|
||||
///
|
||||
FloatBox tempBox;
|
||||
FloatBox pressureBox;
|
||||
FloatBox humiBox;
|
||||
|
||||
public IOperation ReadAmbientOp(FloatBox temperature, FloatBox pressure, FloatBox humidity)
|
||||
{
|
||||
this.tempBox = temperature;
|
||||
this.pressureBox = pressure;
|
||||
this.humiBox = humidity;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
if (tempBox != null) tempBox.Val = temperature;
|
||||
if (pressureBox != null) pressureBox.Val = pressure;
|
||||
if (humiBox != null) humiBox.Val = humidity;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>
|
||||
/// Event.FlowInDone or Event.FlowOutDone
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (tempBox != null) tempBox.Val = temperature;
|
||||
if (pressureBox != null) pressureBox.Val = pressure;
|
||||
if (humiBox != null) humiBox.Val = humidity;
|
||||
return Event.AmbientDone;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AmbientCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public int ComPortNr;
|
||||
public int BaudRate;
|
||||
public Parity Parity;
|
||||
public int DataBits;
|
||||
public StopBits StopBits;
|
||||
public Handshake Handshake;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
AmbientCfg()
|
||||
{
|
||||
Name = "Ambient";
|
||||
ParentName = string.Empty;
|
||||
ComPortNr = 6;
|
||||
BaudRate = 19200;
|
||||
Parity = System.IO.Ports.Parity.None;
|
||||
DataBits = 8;
|
||||
StopBits = System.IO.Ports.StopBits.One;
|
||||
Handshake = System.IO.Ports.Handshake.None;
|
||||
}
|
||||
|
||||
public AmbientCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Com{1}, {2}Bd, {3}-bits, parity={4}, stopBits={5}, {6}",
|
||||
Name, ComPortNr, BaudRate, DataBits, Parity, StopBits, Handshake);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
partial class AmbientCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.comPortNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.baudRateLabel = new System.Windows.Forms.Label();
|
||||
this.baudRateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.partityLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.stopBitsLabel = new System.Windows.Forms.Label();
|
||||
this.handshakeLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.parityComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.stopBitsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.handshakeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// comPortNrTextBox
|
||||
//
|
||||
this.comPortNrTextBox.Enabled = false;
|
||||
this.comPortNrTextBox.Location = new System.Drawing.Point(140, 52);
|
||||
this.comPortNrTextBox.Name = "comPortNrTextBox";
|
||||
this.comPortNrTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.comPortNrTextBox.TabIndex = 4;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(29, 55);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(98, 13);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Serial Port Number:";
|
||||
//
|
||||
// baudRateLabel
|
||||
//
|
||||
this.baudRateLabel.AutoSize = true;
|
||||
this.baudRateLabel.Location = new System.Drawing.Point(29, 79);
|
||||
this.baudRateLabel.Name = "baudRateLabel";
|
||||
this.baudRateLabel.Size = new System.Drawing.Size(58, 13);
|
||||
this.baudRateLabel.TabIndex = 5;
|
||||
this.baudRateLabel.Text = "Baud Rate";
|
||||
//
|
||||
// baudRateTextBox
|
||||
//
|
||||
this.baudRateTextBox.Enabled = false;
|
||||
this.baudRateTextBox.Location = new System.Drawing.Point(140, 76);
|
||||
this.baudRateTextBox.Name = "baudRateTextBox";
|
||||
this.baudRateTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.baudRateTextBox.TabIndex = 6;
|
||||
//
|
||||
// partityLabel
|
||||
//
|
||||
this.partityLabel.AutoSize = true;
|
||||
this.partityLabel.Location = new System.Drawing.Point(29, 103);
|
||||
this.partityLabel.Name = "partityLabel";
|
||||
this.partityLabel.Size = new System.Drawing.Size(33, 13);
|
||||
this.partityLabel.TabIndex = 7;
|
||||
this.partityLabel.Text = "Parity";
|
||||
//
|
||||
// dataBitsLabel
|
||||
//
|
||||
this.dataBitsLabel.AutoSize = true;
|
||||
this.dataBitsLabel.Location = new System.Drawing.Point(29, 127);
|
||||
this.dataBitsLabel.Name = "dataBitsLabel";
|
||||
this.dataBitsLabel.Size = new System.Drawing.Size(50, 13);
|
||||
this.dataBitsLabel.TabIndex = 9;
|
||||
this.dataBitsLabel.Text = "Data Bits";
|
||||
//
|
||||
// dataBitsTextBox
|
||||
//
|
||||
this.dataBitsTextBox.Enabled = false;
|
||||
this.dataBitsTextBox.Location = new System.Drawing.Point(140, 124);
|
||||
this.dataBitsTextBox.Name = "dataBitsTextBox";
|
||||
this.dataBitsTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.dataBitsTextBox.TabIndex = 10;
|
||||
//
|
||||
// stopBitsLabel
|
||||
//
|
||||
this.stopBitsLabel.AutoSize = true;
|
||||
this.stopBitsLabel.Location = new System.Drawing.Point(29, 151);
|
||||
this.stopBitsLabel.Name = "stopBitsLabel";
|
||||
this.stopBitsLabel.Size = new System.Drawing.Size(49, 13);
|
||||
this.stopBitsLabel.TabIndex = 11;
|
||||
this.stopBitsLabel.Text = "Stop Bits";
|
||||
//
|
||||
// handshakeLabel
|
||||
//
|
||||
this.handshakeLabel.AutoSize = true;
|
||||
this.handshakeLabel.Location = new System.Drawing.Point(29, 175);
|
||||
this.handshakeLabel.Name = "handshakeLabel";
|
||||
this.handshakeLabel.Size = new System.Drawing.Size(62, 13);
|
||||
this.handshakeLabel.TabIndex = 13;
|
||||
this.handshakeLabel.Text = "Handshake";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(140, 28);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(30, 31);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(137, 7);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// parityComboBox
|
||||
//
|
||||
this.parityComboBox.Enabled = false;
|
||||
this.parityComboBox.FormattingEnabled = true;
|
||||
this.parityComboBox.Location = new System.Drawing.Point(140, 100);
|
||||
this.parityComboBox.Name = "parityComboBox";
|
||||
this.parityComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.parityComboBox.TabIndex = 8;
|
||||
//
|
||||
// stopBitsComboBox
|
||||
//
|
||||
this.stopBitsComboBox.Enabled = false;
|
||||
this.stopBitsComboBox.FormattingEnabled = true;
|
||||
this.stopBitsComboBox.Location = new System.Drawing.Point(140, 148);
|
||||
this.stopBitsComboBox.Name = "stopBitsComboBox";
|
||||
this.stopBitsComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.stopBitsComboBox.TabIndex = 12;
|
||||
//
|
||||
// handshakeComboBox
|
||||
//
|
||||
this.handshakeComboBox.Enabled = false;
|
||||
this.handshakeComboBox.FormattingEnabled = true;
|
||||
this.handshakeComboBox.Location = new System.Drawing.Point(140, 172);
|
||||
this.handshakeComboBox.Name = "handshakeComboBox";
|
||||
this.handshakeComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.handshakeComboBox.TabIndex = 14;
|
||||
//
|
||||
// AmbientCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Controls.Add(this.handshakeComboBox);
|
||||
this.Controls.Add(this.stopBitsComboBox);
|
||||
this.Controls.Add(this.parityComboBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Controls.Add(this.handshakeLabel);
|
||||
this.Controls.Add(this.stopBitsLabel);
|
||||
this.Controls.Add(this.dataBitsTextBox);
|
||||
this.Controls.Add(this.dataBitsLabel);
|
||||
this.Controls.Add(this.partityLabel);
|
||||
this.Controls.Add(this.baudRateTextBox);
|
||||
this.Controls.Add(this.baudRateLabel);
|
||||
this.Controls.Add(this.comPortNrTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "AmbientCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 240);
|
||||
this.Load += new System.EventHandler(this.AbbientCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox comPortNrTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label baudRateLabel;
|
||||
private System.Windows.Forms.TextBox baudRateTextBox;
|
||||
private System.Windows.Forms.Label partityLabel;
|
||||
private System.Windows.Forms.Label dataBitsLabel;
|
||||
private System.Windows.Forms.TextBox dataBitsTextBox;
|
||||
private System.Windows.Forms.Label stopBitsLabel;
|
||||
private System.Windows.Forms.Label handshakeLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.ComboBox parityComboBox;
|
||||
private System.Windows.Forms.ComboBox stopBitsComboBox;
|
||||
private System.Windows.Forms.ComboBox handshakeComboBox;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO.Ports;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
public partial class AmbientCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(AmbientCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
AmbientCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as AmbientCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public AmbientCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
parityComboBox.Items.Add(Parity.None.ToString());
|
||||
parityComboBox.Items.Add(Parity.Even.ToString());
|
||||
parityComboBox.Items.Add(Parity.Odd.ToString());
|
||||
|
||||
stopBitsComboBox.Items.Add(StopBits.None.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.One.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.OnePointFive.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.Two.ToString());
|
||||
|
||||
handshakeComboBox.Items.Add(Handshake.None.ToString());
|
||||
handshakeComboBox.Items.Add(Handshake.RequestToSend.ToString());
|
||||
handshakeComboBox.Items.Add(Handshake.XOnXOff.ToString());
|
||||
}
|
||||
|
||||
int GetParityIx(Parity par)
|
||||
{
|
||||
if (par == Parity.None) return 0;
|
||||
if (par == Parity.Even) return 0;
|
||||
if (par == Parity.Odd) return 0;
|
||||
return -1;
|
||||
}
|
||||
Parity GetParity(string str)
|
||||
{
|
||||
if (str.Equals(Parity.None.ToString())) return Parity.None;
|
||||
if (str.Equals(Parity.Even.ToString())) return Parity.Even;
|
||||
if (str.Equals(Parity.Odd.ToString())) return Parity.Odd;
|
||||
return (Parity)(-1);
|
||||
}
|
||||
|
||||
int GetStopBitsIx(StopBits sb)
|
||||
{
|
||||
if (sb == StopBits.None) return 0;
|
||||
if (sb == StopBits.One) return 1;
|
||||
if (sb == StopBits.OnePointFive) return 2;
|
||||
if (sb == StopBits.Two) return 3;
|
||||
return -1;
|
||||
}
|
||||
StopBits GetStopBits(string str)
|
||||
{
|
||||
if (str.Equals(StopBits.None.ToString())) return StopBits.None;
|
||||
if (str.Equals(StopBits.One.ToString())) return StopBits.One;
|
||||
if (str.Equals(StopBits.OnePointFive.ToString())) return StopBits.OnePointFive;
|
||||
if (str.Equals(StopBits.Two.ToString())) return StopBits.Two;
|
||||
return (StopBits)(-1);
|
||||
}
|
||||
|
||||
int GetHandshakeIx(Handshake par)
|
||||
{
|
||||
if (par == Handshake.None) return 0;
|
||||
if (par == Handshake.RequestToSend) return 0;
|
||||
if (par == Handshake.XOnXOff) return 0;
|
||||
return -1;
|
||||
}
|
||||
Handshake GetHandshake(string str)
|
||||
{
|
||||
if (str.Equals(Handshake.None.ToString())) return Handshake.None;
|
||||
if (str.Equals(Handshake.RequestToSend.ToString())) return Handshake.RequestToSend;
|
||||
if (str.Equals(Handshake.XOnXOff.ToString())) return Handshake.XOnXOff;
|
||||
return (Handshake)(-1);
|
||||
}
|
||||
|
||||
private void AbbientCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
comPortNrTextBox.Text = config.ComPortNr.ToString();
|
||||
baudRateTextBox.Text = config.BaudRate.ToString();
|
||||
parityComboBox.Text = config.Parity.ToString();
|
||||
dataBitsTextBox.Text = config.DataBits.ToString();
|
||||
stopBitsComboBox.Text = config.StopBits.ToString();
|
||||
handshakeComboBox.Text = config.Handshake.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
comPortNrTextBox.Enabled = true;
|
||||
baudRateTextBox.Enabled = true;
|
||||
parityComboBox.Enabled = true;
|
||||
dataBitsTextBox.Enabled = true;
|
||||
stopBitsComboBox.Enabled = true;
|
||||
handshakeComboBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ComPortNr = int.Parse(comPortNrTextBox.Text);
|
||||
config.BaudRate = int.Parse(baudRateTextBox.Text);
|
||||
config.Parity = GetParity(parityComboBox.SelectedItem.ToString());
|
||||
config.DataBits = int.Parse(dataBitsTextBox.Text);
|
||||
config.StopBits = GetStopBits(stopBitsComboBox.SelectedItem.ToString());
|
||||
config.Handshake = GetHandshake(handshakeComboBox.SelectedItem.ToString());
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Serial Port Number' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(baudRateTextBox.Text, out dummy) || dummy < 150 || dummy > 115200)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Baud Rate' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(dataBitsTextBox.Text, out dummy) || dummy < 7 || dummy > 8)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Data Bits' is not valid";
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "Greco Ambient"; } }
|
||||
|
||||
public void ResetStaticProperties() { Ambient.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Ambient(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Ambient(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new AmbientCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(AmbientCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Munich
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("BenchInfo({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly ComponentCfg benchInfoCfg;
|
||||
|
||||
public string TestBenchName { get { return benchInfoCfg.TestBenchName; } }
|
||||
public int TestBenchId { get { return benchInfoCfg.TestBenchId; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
benchInfoCfg = cfg as ComponentCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Munich
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string TestBenchName;
|
||||
public int TestBenchId;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg()
|
||||
{
|
||||
Name = "BenchInfo";
|
||||
ParentName = string.Empty;
|
||||
TestBenchName = "1";
|
||||
TestBenchId = 1;
|
||||
}
|
||||
|
||||
public ComponentCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Bench name={1}, Bench Id={2}", Name, TestBenchName, TestBenchId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Munich
|
||||
{
|
||||
public partial class ComponentCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(ComponentCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
ComponentCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as ComponentCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public ComponentCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
nameLabel.Text = Strings.Name;
|
||||
benchNameLabel.Text = Strings.Test_bench_name;
|
||||
benchIdLabel.Text = Strings.Test_bench_number;
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
benchNameTextBox.Text = config.TestBenchName;
|
||||
benchIdTextBox.Text = config.TestBenchId.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
benchNameTextBox.Enabled = true;
|
||||
benchIdTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(benchIdTextBox.Text, out dummy) || dummy < 0)
|
||||
{
|
||||
flags = CfgUpdateFlags.Error;
|
||||
message = string.Format("Invalid {0} parameter", Strings.Test_bench_number);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
///
|
||||
config.Name = nameTextBox.Text;
|
||||
config.TestBenchName = benchNameTextBox.Text;
|
||||
config.TestBenchId = int.Parse(benchIdTextBox.Text);
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.BenchInfo.Munich
|
||||
{
|
||||
partial class ComponentCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.benchNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchIdLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(140, 55);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(25, 58);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(137, 31);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ClassName";
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(25, 84);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.benchNameLabel.TabIndex = 6;
|
||||
this.benchNameLabel.Text = "Test bench name";
|
||||
//
|
||||
// benchNameTextBox
|
||||
//
|
||||
this.benchNameTextBox.Enabled = false;
|
||||
this.benchNameTextBox.Location = new System.Drawing.Point(140, 81);
|
||||
this.benchNameTextBox.Name = "benchNameTextBox";
|
||||
this.benchNameTextBox.Size = new System.Drawing.Size(67, 20);
|
||||
this.benchNameTextBox.TabIndex = 7;
|
||||
//
|
||||
// benchIdTextBox
|
||||
//
|
||||
this.benchIdTextBox.Enabled = false;
|
||||
this.benchIdTextBox.Location = new System.Drawing.Point(140, 107);
|
||||
this.benchIdTextBox.Name = "benchIdTextBox";
|
||||
this.benchIdTextBox.Size = new System.Drawing.Size(67, 20);
|
||||
this.benchIdTextBox.TabIndex = 9;
|
||||
//
|
||||
// benchIdLabel
|
||||
//
|
||||
this.benchIdLabel.AutoSize = true;
|
||||
this.benchIdLabel.Location = new System.Drawing.Point(25, 110);
|
||||
this.benchIdLabel.Name = "benchIdLabel";
|
||||
this.benchIdLabel.Size = new System.Drawing.Size(99, 13);
|
||||
this.benchIdLabel.TabIndex = 8;
|
||||
this.benchIdLabel.Text = "Test bench number";
|
||||
//
|
||||
// ComponentCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.benchIdTextBox);
|
||||
this.Controls.Add(this.benchIdLabel);
|
||||
this.Controls.Add(this.benchNameTextBox);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "ComponentCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Label benchNameLabel;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox;
|
||||
private System.Windows.Forms.TextBox benchIdTextBox;
|
||||
private System.Windows.Forms.Label benchIdLabel;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,27 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Munich
|
||||
{
|
||||
public class ComponentFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "Bench-ID"; } }
|
||||
|
||||
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Component(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new ComponentCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(ComponentCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("BenchInfoEx({0})", Cfg.ToString(1)); }
|
||||
|
||||
public readonly ComponentCfg BenchInfoCfg;
|
||||
|
||||
public string TestBenchName { get { return BenchInfoCfg.TestBenchName; } }
|
||||
public int TestBenchId { get { return BenchInfoCfg.TestBenchId; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
BenchInfoCfg = cfg as ComponentCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string TestBenchName;
|
||||
public int TestBenchId;
|
||||
public string Address1;
|
||||
public string Address2;
|
||||
public string Address3;
|
||||
public string Address4;
|
||||
public string Address5;
|
||||
public string ApprovalId;
|
||||
public string ApprovalDate;
|
||||
public string ApprovedBy;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg()
|
||||
{
|
||||
Name = "BenchInfoEx";
|
||||
ParentName = string.Empty;
|
||||
TestBenchName = "1";
|
||||
TestBenchId = 1;
|
||||
|
||||
Address1 = string.Empty;
|
||||
Address2 = string.Empty;
|
||||
Address3 = string.Empty;
|
||||
Address4 = string.Empty;
|
||||
Address5 = string.Empty;
|
||||
|
||||
ApprovalId = string.Empty;
|
||||
ApprovalDate = string.Empty;
|
||||
ApprovedBy = string.Empty;
|
||||
}
|
||||
|
||||
public ComponentCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Bench name={1}, Bench Id={2}", Name, TestBenchName, TestBenchId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
public partial class ComponentCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(ComponentCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
ComponentCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as ComponentCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public ComponentCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
nameLabel.Text = Strings.Name;
|
||||
benchNameLabel.Text = Strings.Test_bench_name;
|
||||
benchIdLabel.Text = Strings.Test_bench_number;
|
||||
|
||||
address1Label.Text = Strings.Address + " 1";
|
||||
address2Label.Text = Strings.Address + " 2";
|
||||
address3Label.Text = Strings.Address + " 3";
|
||||
address4Label.Text = Strings.Address + " 4";
|
||||
address5Label.Text = Strings.Address + " 5";
|
||||
|
||||
approvalIdLabel.Text = Strings.Approval_ID;
|
||||
approvalDateLabel.Text = Strings.Approval_date;
|
||||
approvedByLabel.Text = Strings.Approved_by;
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
benchNameTextBox.Text = config.TestBenchName;
|
||||
benchIdTextBox.Text = config.TestBenchId.ToString();
|
||||
|
||||
address1TextBox.Text = config.Address1;
|
||||
address2TextBox.Text = config.Address2;
|
||||
address3TextBox.Text = config.Address3;
|
||||
address4TextBox.Text = config.Address4;
|
||||
address5TextBox.Text = config.Address5;
|
||||
|
||||
approvalIdTextBox.Text = config.ApprovalId;
|
||||
approvalDateTextBox.Text = config.ApprovalDate;
|
||||
approvedByTextBox.Text = config.ApprovedBy;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
benchNameTextBox.Enabled = true;
|
||||
benchIdTextBox.Enabled = true;
|
||||
|
||||
address1TextBox.Enabled = true;
|
||||
address2TextBox.Enabled = true;
|
||||
address3TextBox.Enabled = true;
|
||||
address4TextBox.Enabled = true;
|
||||
address5TextBox.Enabled = true;
|
||||
|
||||
approvalIdTextBox.Enabled = true;
|
||||
approvalDateTextBox.Enabled = true;
|
||||
approvedByTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(benchIdTextBox.Text, out dummy) || dummy < 0)
|
||||
{
|
||||
flags = CfgUpdateFlags.Error;
|
||||
message = string.Format("Invalid {0} parameter", Strings.Test_bench_number);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
///
|
||||
config.Name = nameTextBox.Text;
|
||||
config.TestBenchName = benchNameTextBox.Text;
|
||||
config.TestBenchId = int.Parse(benchIdTextBox.Text);
|
||||
|
||||
config.Address1 = address1TextBox.Text;
|
||||
config.Address2 = address2TextBox.Text;
|
||||
config.Address3 = address3TextBox.Text;
|
||||
config.Address4 = address4TextBox.Text;
|
||||
config.Address5 = address5TextBox.Text;
|
||||
|
||||
config.ApprovalId = approvalIdTextBox.Text;
|
||||
config.ApprovalDate = approvalDateTextBox.Text;
|
||||
config.ApprovedBy = approvedByTextBox.Text;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
partial class ComponentCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.benchIdLabel = new System.Windows.Forms.Label();
|
||||
this.benchIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.address1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address1Label = new System.Windows.Forms.Label();
|
||||
this.address2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address2Label = new System.Windows.Forms.Label();
|
||||
this.address3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address3Label = new System.Windows.Forms.Label();
|
||||
this.address4TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address4Label = new System.Windows.Forms.Label();
|
||||
this.address5TextBox = new System.Windows.Forms.TextBox();
|
||||
this.address5Label = new System.Windows.Forms.Label();
|
||||
this.approvedByTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvedByLabel = new System.Windows.Forms.Label();
|
||||
this.approvalDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvalDateLabel = new System.Windows.Forms.Label();
|
||||
this.approvalIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvalIdLabel = new System.Windows.Forms.Label();
|
||||
this.benchNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(113, 24);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(6, 27);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(110, 6);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ClassName";
|
||||
//
|
||||
// benchIdLabel
|
||||
//
|
||||
this.benchIdLabel.AutoSize = true;
|
||||
this.benchIdLabel.Location = new System.Drawing.Point(6, 66);
|
||||
this.benchIdLabel.Name = "benchIdLabel";
|
||||
this.benchIdLabel.Size = new System.Drawing.Size(99, 13);
|
||||
this.benchIdLabel.TabIndex = 5;
|
||||
this.benchIdLabel.Text = "Test bench number";
|
||||
//
|
||||
// benchIdTextBox
|
||||
//
|
||||
this.benchIdTextBox.Enabled = false;
|
||||
this.benchIdTextBox.Location = new System.Drawing.Point(113, 64);
|
||||
this.benchIdTextBox.Name = "benchIdTextBox";
|
||||
this.benchIdTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.benchIdTextBox.TabIndex = 6;
|
||||
//
|
||||
// address1TextBox
|
||||
//
|
||||
this.address1TextBox.Enabled = false;
|
||||
this.address1TextBox.Location = new System.Drawing.Point(73, 86);
|
||||
this.address1TextBox.Name = "address1TextBox";
|
||||
this.address1TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address1TextBox.TabIndex = 8;
|
||||
//
|
||||
// address1Label
|
||||
//
|
||||
this.address1Label.AutoSize = true;
|
||||
this.address1Label.Location = new System.Drawing.Point(6, 89);
|
||||
this.address1Label.Name = "address1Label";
|
||||
this.address1Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address1Label.TabIndex = 7;
|
||||
this.address1Label.Text = "Address 1";
|
||||
//
|
||||
// address2TextBox
|
||||
//
|
||||
this.address2TextBox.Enabled = false;
|
||||
this.address2TextBox.Location = new System.Drawing.Point(73, 106);
|
||||
this.address2TextBox.Name = "address2TextBox";
|
||||
this.address2TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address2TextBox.TabIndex = 10;
|
||||
//
|
||||
// address2Label
|
||||
//
|
||||
this.address2Label.AutoSize = true;
|
||||
this.address2Label.Location = new System.Drawing.Point(6, 109);
|
||||
this.address2Label.Name = "address2Label";
|
||||
this.address2Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address2Label.TabIndex = 9;
|
||||
this.address2Label.Text = "Address 2";
|
||||
//
|
||||
// address3TextBox
|
||||
//
|
||||
this.address3TextBox.Enabled = false;
|
||||
this.address3TextBox.Location = new System.Drawing.Point(73, 126);
|
||||
this.address3TextBox.Name = "address3TextBox";
|
||||
this.address3TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address3TextBox.TabIndex = 12;
|
||||
//
|
||||
// address3Label
|
||||
//
|
||||
this.address3Label.AutoSize = true;
|
||||
this.address3Label.Location = new System.Drawing.Point(6, 129);
|
||||
this.address3Label.Name = "address3Label";
|
||||
this.address3Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address3Label.TabIndex = 11;
|
||||
this.address3Label.Text = "Address 3";
|
||||
//
|
||||
// address4TextBox
|
||||
//
|
||||
this.address4TextBox.Enabled = false;
|
||||
this.address4TextBox.Location = new System.Drawing.Point(73, 146);
|
||||
this.address4TextBox.Name = "address4TextBox";
|
||||
this.address4TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address4TextBox.TabIndex = 14;
|
||||
//
|
||||
// address4Label
|
||||
//
|
||||
this.address4Label.AutoSize = true;
|
||||
this.address4Label.Location = new System.Drawing.Point(6, 149);
|
||||
this.address4Label.Name = "address4Label";
|
||||
this.address4Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address4Label.TabIndex = 13;
|
||||
this.address4Label.Text = "Address 4";
|
||||
//
|
||||
// address5TextBox
|
||||
//
|
||||
this.address5TextBox.Enabled = false;
|
||||
this.address5TextBox.Location = new System.Drawing.Point(73, 166);
|
||||
this.address5TextBox.Name = "address5TextBox";
|
||||
this.address5TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address5TextBox.TabIndex = 16;
|
||||
//
|
||||
// address5Label
|
||||
//
|
||||
this.address5Label.AutoSize = true;
|
||||
this.address5Label.Location = new System.Drawing.Point(6, 169);
|
||||
this.address5Label.Name = "address5Label";
|
||||
this.address5Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address5Label.TabIndex = 15;
|
||||
this.address5Label.Text = "Address 5";
|
||||
//
|
||||
// approvedByTextBox
|
||||
//
|
||||
this.approvedByTextBox.Enabled = false;
|
||||
this.approvedByTextBox.Location = new System.Drawing.Point(113, 227);
|
||||
this.approvedByTextBox.Name = "approvedByTextBox";
|
||||
this.approvedByTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvedByTextBox.TabIndex = 22;
|
||||
//
|
||||
// approvedByLabel
|
||||
//
|
||||
this.approvedByLabel.AutoSize = true;
|
||||
this.approvedByLabel.Location = new System.Drawing.Point(6, 230);
|
||||
this.approvedByLabel.Name = "approvedByLabel";
|
||||
this.approvedByLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.approvedByLabel.TabIndex = 21;
|
||||
this.approvedByLabel.Text = "Approved by";
|
||||
//
|
||||
// approvalDateTextBox
|
||||
//
|
||||
this.approvalDateTextBox.Enabled = false;
|
||||
this.approvalDateTextBox.Location = new System.Drawing.Point(113, 207);
|
||||
this.approvalDateTextBox.Name = "approvalDateTextBox";
|
||||
this.approvalDateTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvalDateTextBox.TabIndex = 20;
|
||||
//
|
||||
// approvalDateLabel
|
||||
//
|
||||
this.approvalDateLabel.AutoSize = true;
|
||||
this.approvalDateLabel.Location = new System.Drawing.Point(6, 210);
|
||||
this.approvalDateLabel.Name = "approvalDateLabel";
|
||||
this.approvalDateLabel.Size = new System.Drawing.Size(73, 13);
|
||||
this.approvalDateLabel.TabIndex = 19;
|
||||
this.approvalDateLabel.Text = "Approval date";
|
||||
//
|
||||
// approvalIdTextBox
|
||||
//
|
||||
this.approvalIdTextBox.Enabled = false;
|
||||
this.approvalIdTextBox.Location = new System.Drawing.Point(113, 187);
|
||||
this.approvalIdTextBox.Name = "approvalIdTextBox";
|
||||
this.approvalIdTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvalIdTextBox.TabIndex = 18;
|
||||
//
|
||||
// approvalIdLabel
|
||||
//
|
||||
this.approvalIdLabel.AutoSize = true;
|
||||
this.approvalIdLabel.Location = new System.Drawing.Point(6, 190);
|
||||
this.approvalIdLabel.Name = "approvalIdLabel";
|
||||
this.approvalIdLabel.Size = new System.Drawing.Size(61, 13);
|
||||
this.approvalIdLabel.TabIndex = 17;
|
||||
this.approvalIdLabel.Text = "Approval Id";
|
||||
//
|
||||
// benchNameTextBox
|
||||
//
|
||||
this.benchNameTextBox.Enabled = false;
|
||||
this.benchNameTextBox.Location = new System.Drawing.Point(113, 44);
|
||||
this.benchNameTextBox.Name = "benchNameTextBox";
|
||||
this.benchNameTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.benchNameTextBox.TabIndex = 4;
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(6, 46);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.benchNameLabel.TabIndex = 3;
|
||||
this.benchNameLabel.Text = "Test bench name";
|
||||
//
|
||||
// ComponentCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.benchNameTextBox);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.approvedByTextBox);
|
||||
this.Controls.Add(this.approvedByLabel);
|
||||
this.Controls.Add(this.approvalDateTextBox);
|
||||
this.Controls.Add(this.approvalDateLabel);
|
||||
this.Controls.Add(this.approvalIdTextBox);
|
||||
this.Controls.Add(this.approvalIdLabel);
|
||||
this.Controls.Add(this.address5TextBox);
|
||||
this.Controls.Add(this.address5Label);
|
||||
this.Controls.Add(this.address4TextBox);
|
||||
this.Controls.Add(this.address4Label);
|
||||
this.Controls.Add(this.address3TextBox);
|
||||
this.Controls.Add(this.address3Label);
|
||||
this.Controls.Add(this.address2TextBox);
|
||||
this.Controls.Add(this.address2Label);
|
||||
this.Controls.Add(this.address1TextBox);
|
||||
this.Controls.Add(this.address1Label);
|
||||
this.Controls.Add(this.benchIdTextBox);
|
||||
this.Controls.Add(this.benchIdLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "ComponentCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 250);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Label benchIdLabel;
|
||||
private System.Windows.Forms.TextBox benchIdTextBox;
|
||||
private System.Windows.Forms.TextBox address1TextBox;
|
||||
private System.Windows.Forms.Label address1Label;
|
||||
private System.Windows.Forms.TextBox address2TextBox;
|
||||
private System.Windows.Forms.Label address2Label;
|
||||
private System.Windows.Forms.TextBox address3TextBox;
|
||||
private System.Windows.Forms.Label address3Label;
|
||||
private System.Windows.Forms.TextBox address4TextBox;
|
||||
private System.Windows.Forms.Label address4Label;
|
||||
private System.Windows.Forms.TextBox address5TextBox;
|
||||
private System.Windows.Forms.Label address5Label;
|
||||
private System.Windows.Forms.TextBox approvedByTextBox;
|
||||
private System.Windows.Forms.Label approvedByLabel;
|
||||
private System.Windows.Forms.TextBox approvalDateTextBox;
|
||||
private System.Windows.Forms.Label approvalDateLabel;
|
||||
private System.Windows.Forms.TextBox approvalIdTextBox;
|
||||
private System.Windows.Forms.Label approvalIdLabel;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox;
|
||||
private System.Windows.Forms.Label benchNameLabel;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
public class ComponentFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "BenchInfoEx"; } }
|
||||
|
||||
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Component(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new ComponentCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(ComponentCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
public class BenchPath
|
||||
{
|
||||
public int ItemNr;
|
||||
public string Name;
|
||||
public float Qfrom;
|
||||
public float Qto;
|
||||
public ITempMeter TempMtrUp;
|
||||
public ITempMeter TempMtrDown;
|
||||
public IPressureMeter PressMtrUp;
|
||||
public IPressureMeter PressMtrDown;
|
||||
public IPressureMeter PressMtrDelta;
|
||||
public IValve StopBFValve;
|
||||
public IList<IValve> ValvesOpen;
|
||||
public IList<IValve> ValvesClose;
|
||||
|
||||
/// Constructor from name, the rest is empty
|
||||
public BenchPath(string name, int itemNr)
|
||||
{
|
||||
ItemNr = itemNr;
|
||||
Name = name;
|
||||
ValvesOpen = new List<IValve>();
|
||||
ValvesClose = new List<IValve>();
|
||||
}
|
||||
|
||||
/// Constructor from data entity
|
||||
public BenchPath(Config.Entities.BenchPath entity, IList<BenchControl.Generic.IComponent> components)
|
||||
: this(entity.Name, entity.ItemNr)
|
||||
{
|
||||
Qfrom = entity.Qfrom;
|
||||
Qto = entity.Qto;
|
||||
TempMtrUp = TbfComponents.FindComponent(entity.TempMtrUp, components) as ITempMeter;
|
||||
TempMtrDown = TbfComponents.FindComponent(entity.TempMtrDown, components) as ITempMeter;
|
||||
PressMtrUp = TbfComponents.FindComponent(entity.PressMtrUp, components) as IPressureMeter;
|
||||
PressMtrDown = TbfComponents.FindComponent(entity.PressMtrDown, components) as IPressureMeter;
|
||||
PressMtrDelta = TbfComponents.FindComponent(entity.PressMtrDelta, components) as IPressureMeter;
|
||||
StopBFValve = TbfComponents.FindComponent(entity.StopBFValve, components) as IValve;
|
||||
|
||||
string[] vOpen = entity.ValvesOpen.Split(new char[] { ';' });
|
||||
ValvesOpen = new List<IValve>();
|
||||
foreach (var vName in vOpen) ValvesOpen.Add((IValve)TbfComponents.FindComponent(vName, components));
|
||||
|
||||
string[] vClose = entity.ValvesClose.Split(new char[] { ';' });
|
||||
ValvesClose = new List<IValve>();
|
||||
foreach (var vName in vClose) ValvesClose.Add((IValve)TbfComponents.FindComponent(vName, components));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} StopBF={1}",
|
||||
Name,
|
||||
(StopBFValve != null) ? StopBFValve.Name : "---");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
public class CfgChangeArgs : EventArgs
|
||||
{
|
||||
public CfgChangeCmd Command;
|
||||
public Generic.IComponentCfg Cfg;
|
||||
|
||||
public CfgChangeArgs(CfgChangeCmd command, Generic.IComponentCfg cfg)
|
||||
{
|
||||
Command = command;
|
||||
Cfg = cfg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
public class CmdResponseArgs : EventArgs
|
||||
{
|
||||
public CfgChangeCmd Command;
|
||||
public int Id; /// Either Idx1(RV) or BitPosition (Div) to identify the component
|
||||
public int Response;
|
||||
|
||||
public CmdResponseArgs(CfgChangeCmd command, int id, int response)
|
||||
{
|
||||
Command = command;
|
||||
Id = id;
|
||||
Response = response;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
public class ComponentBase : IComponent
|
||||
{
|
||||
readonly Generic.IComponentCfg cfg;
|
||||
public Generic.IComponentCfg Cfg { get { return cfg; } }
|
||||
|
||||
public string Name { get { return cfg.Name; } }
|
||||
public string ClassName { get { return cfg.Factory.ClassName; } }
|
||||
public string ParentName { get { return cfg.ParentName; } }
|
||||
public Generic.IComponentFactory Factory { get { return cfg.Factory; } }
|
||||
public int ItemNr { get { return cfg.ItemNr; } }
|
||||
public DebugMode DebugLevel { get { return cfg.DebugLevel; } set { cfg.DebugLevel = value; } }
|
||||
public LogLevel LogLevel { get { return cfg.LogLevel; } }
|
||||
public IList<MeasurementCorrection> Corrections { get { return cfg.Corrections; } }
|
||||
|
||||
|
||||
/// Constructor, components created in this way is used by
|
||||
/// IComponentFactory.DummyComponent() function. Such dummy component should be used
|
||||
/// only for runtime class type identification (e.g. object is iValve)
|
||||
public ComponentBase()
|
||||
{
|
||||
cfg = null;
|
||||
}
|
||||
|
||||
/// Constructor with configuration as an argument
|
||||
public ComponentBase(IComponentCfg cfg)
|
||||
{
|
||||
if (cfg == null) throw new ArgumentNullException("cfg");
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
||||
/// <summary> Empty implementation, might be overriden in derived classes </summary>
|
||||
public static void ResetStaticProperties() { }
|
||||
|
||||
/// <summary> Empty implementation, might be overriden in derived classes </summary>
|
||||
public virtual void StartChangeHandler() { }
|
||||
|
||||
/// <summary> Empty implementation, might be overriden in derived classes </summary>
|
||||
public virtual void StopChangeHandler() { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
public class ComponentCfgBase
|
||||
{
|
||||
[XmlIgnore]
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
set { name = value; }
|
||||
}
|
||||
string name;
|
||||
|
||||
[XmlIgnore]
|
||||
public Generic.IComponentFactory Factory
|
||||
{
|
||||
get { return factory; }
|
||||
set { factory = value; }
|
||||
}
|
||||
Generic.IComponentFactory factory;
|
||||
|
||||
[XmlIgnore]
|
||||
public string ParentName
|
||||
{
|
||||
get { return parentName; }
|
||||
set { parentName = value; }
|
||||
}
|
||||
string parentName;
|
||||
|
||||
[XmlIgnore]
|
||||
public int ItemNr
|
||||
{
|
||||
get { return itemNr; }
|
||||
set { itemNr = value; }
|
||||
}
|
||||
int itemNr;
|
||||
|
||||
[XmlIgnore]
|
||||
public DebugMode DebugLevel
|
||||
{
|
||||
get { return debugLevel; }
|
||||
set { debugLevel = value; }
|
||||
}
|
||||
DebugMode debugLevel;
|
||||
|
||||
[XmlIgnore]
|
||||
public LogLevel LogLevel
|
||||
{
|
||||
get { return logLevel; }
|
||||
set { logLevel = value; }
|
||||
}
|
||||
LogLevel logLevel;
|
||||
|
||||
[XmlIgnore]
|
||||
public IList<MeasurementCorrection> Corrections
|
||||
{
|
||||
get { return corrections; }
|
||||
set { corrections = value; }
|
||||
}
|
||||
IList<MeasurementCorrection> corrections;
|
||||
|
||||
protected ComponentCfgBase()
|
||||
{
|
||||
itemNr = 0;
|
||||
debugLevel = DebugMode.Normal;
|
||||
logLevel = LogLevel.Off;
|
||||
}
|
||||
|
||||
protected ComponentCfgBase(Generic.IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
protected ComponentCfgBase(Generic.IComponentFactory factory, string name)
|
||||
: this(factory)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
protected ComponentCfgBase(Generic.IComponentFactory factory, string name, string parentName)
|
||||
: this(factory, name)
|
||||
{
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
|
||||
protected virtual XmlSerializer GetSerializer() { return new XmlSerializer(GetType()); }
|
||||
|
||||
public Component CreateDbEntity()
|
||||
{
|
||||
using (var writer = new StringWriter())
|
||||
{
|
||||
GetSerializer().Serialize(writer, this);
|
||||
return Component.CreateFromCfg(Name, factory.ClassName, ParentName, ItemNr, DebugLevel, LogLevel, writer.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static IComponentCfg CreateFromDbEntity(XmlSerializer s, Component cmpntEntity, IComponentFactory factory)
|
||||
{
|
||||
using (var reader = new StringReader(cmpntEntity.Parameters))
|
||||
{
|
||||
IComponentCfg config = s.Deserialize(reader) as IComponentCfg;
|
||||
if (config != null)
|
||||
{
|
||||
config.Name = cmpntEntity.Name;
|
||||
config.ParentName = cmpntEntity.ParentName;
|
||||
config.ItemNr = cmpntEntity.ItemNr;
|
||||
config.DebugLevel = cmpntEntity.Mode;
|
||||
config.LogLevel = cmpntEntity.Logging;
|
||||
config.Corrections = cmpntEntity.Corrections;
|
||||
config.Factory = factory;
|
||||
}
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default implementation returning null - no test aprameters.
|
||||
/// In case there are any test parameters, this function override should return
|
||||
/// a reference to a class that implements IParamsProvider and ITestParams.
|
||||
/// </summary>
|
||||
/// <returns>Test parameters obtained by the last UpdateTestParams(test)</returns>
|
||||
public virtual IParamsProvider GetTestParams()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default implementation returning null - no procedure parameters.
|
||||
/// In case there are any procedure parameters, this function override should return
|
||||
/// a reference to a class that implements IParamsProvider and IProcedureParams.
|
||||
/// </summary>
|
||||
/// <returns>Procedure parameters obtained by the last UpdateProcedureParams(procedure)</returns>
|
||||
public virtual IParamsProvider GetProcedureParams()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void UpdateTestParams(Test test)
|
||||
{
|
||||
ITestParams tstPrms = (GetTestParams() as ITestParams);
|
||||
if (tstPrms != null)
|
||||
{
|
||||
tstPrms.UpdateTestParams(Name, test);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateProcedureParams(Procedure procedure)
|
||||
{
|
||||
IProcedureParams procPrms = (GetProcedureParams() as IProcedureParams);
|
||||
if (procPrms != null)
|
||||
{
|
||||
procPrms.UpdateProcedureParams(Name, procedure);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public virtual IParamsProvider CreateTestParams(Test test)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual IParamsProvider CreateProcedureParams(Procedure procedure)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
|
||||
namespace TBF.BenchControl.Configs
|
||||
{
|
||||
public class ConfigCtrlUtils : UserControl
|
||||
{
|
||||
protected PageOrientation GetOrientation(string str)
|
||||
{
|
||||
if (str.Equals(PageOrientation.Landscape.ToString())) return PageOrientation.Landscape;
|
||||
if (str.Equals(PageOrientation.Portrait.ToString())) return PageOrientation.Portrait;
|
||||
return (PageOrientation)(-1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates destination variable when its value differes from the source value.
|
||||
/// Returns appropriate flags
|
||||
/// </summary>
|
||||
/// <param name="cfgVar">Reference to destination variable</param>
|
||||
/// <param name="intVal">Source value</param>
|
||||
/// <param name="flagsWhenUpdated">Flags returned when an update occurs</param>
|
||||
/// <returns>Flags or 0</returns>
|
||||
protected CfgUpdateFlags UpdateDifferent(ref int cfgVar, int intVal, CfgUpdateFlags flagsWhenUpdated)
|
||||
{
|
||||
if (cfgVar != intVal) { cfgVar = intVal; return flagsWhenUpdated; } else return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates destination variable when its value differes from the source value.
|
||||
/// Returns appropriate flags
|
||||
/// </summary>
|
||||
/// <param name="cfgVar">Reference to destination variable</param>
|
||||
/// <param name="toBeParsedString">Source integer value is obtained by parsing this string</param>
|
||||
/// <param name="flagsWhenUpdated">Flags returned when an update occurs</param>
|
||||
/// <returns>Flags or 0</returns>
|
||||
protected CfgUpdateFlags UpdateDifferent(ref int cfgVar, string toBeParsedString, CfgUpdateFlags flagsWhenUpdated)
|
||||
{
|
||||
int itmp = int.Parse(toBeParsedString);
|
||||
if (cfgVar != itmp) { cfgVar = itmp; return flagsWhenUpdated; } else return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates destination variable when its value differes from the source value.
|
||||
/// Returns appropriate flags
|
||||
/// </summary>
|
||||
/// <param name="cfgVar">Reference to destination variable</param>
|
||||
/// <param name="toBeParsedString">Source integer value is obtained by parsing this string</param>
|
||||
/// <param name="flagsWhenUpdated">Flags returned when an update occurs</param>
|
||||
/// <returns>Flags or 0</returns>
|
||||
protected CfgUpdateFlags UpdateDifferent(ref float cfgVar, string toBeParsedString, CfgUpdateFlags flagsWhenUpdated)
|
||||
{
|
||||
float ftmp = Utils.ParseSFloat(toBeParsedString);
|
||||
if (cfgVar != ftmp) { cfgVar = ftmp; return flagsWhenUpdated; } else return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates destination variable when its value differes from the source value.
|
||||
/// Returns appropriate flags
|
||||
/// </summary>
|
||||
/// <param name="cfgVar">Reference to destination variable</param>
|
||||
/// <param name="toBeParsedString">Source integer value is obtained by parsing this string</param>
|
||||
/// <param name="flagsWhenUpdated">Flags returned when an update occurs</param>
|
||||
/// <returns>Flags or 0</returns>
|
||||
protected CfgUpdateFlags UpdateDifferent(ref double cfgVar, string toBeParsedString, CfgUpdateFlags flagsWhenUpdated)
|
||||
{
|
||||
double dtmp = Utils.ParseSDouble(toBeParsedString);
|
||||
if (cfgVar != dtmp) { cfgVar = dtmp; return flagsWhenUpdated; } else return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates destination variable when its value differes from the source value.
|
||||
/// Returns appropriate flags
|
||||
/// </summary>
|
||||
/// <param name="cfgVar">Reference to destination variable</param>
|
||||
/// <param name="boolVal">Source value</param>
|
||||
/// <param name="flagsWhenUpdated">Flags returned when an update occurs</param>
|
||||
/// <returns>Flags or 0</returns>
|
||||
protected CfgUpdateFlags UpdateDifferent(ref bool cfgVar, bool boolVal, CfgUpdateFlags flagsWhenUpdated)
|
||||
{
|
||||
if (cfgVar != boolVal) { cfgVar = boolVal; return flagsWhenUpdated; } else return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates destination variable when its value differes from the source value.
|
||||
/// Returns appropriate flags
|
||||
/// </summary>
|
||||
/// <param name="cfgVar">Reference to destination variable</param>
|
||||
/// <param name="stringVal">Source value</param>
|
||||
/// <param name="flagsWhenUpdated">Flags returned when an update occurs</param>
|
||||
/// <returns>Flags or 0</returns>
|
||||
protected CfgUpdateFlags UpdateDifferent(ref string cfgVar, string stringVal, CfgUpdateFlags flagsWhenUpdated)
|
||||
{
|
||||
if (cfgVar != stringVal) { cfgVar = stringVal; return flagsWhenUpdated; } else return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates destination variable when its value differes from the source value.
|
||||
/// Returns appropriate flags
|
||||
/// </summary>
|
||||
/// <param name="cfgVar">Reference to destination array</param>
|
||||
/// <param name="stringArrVal">Source array of strings</param>
|
||||
/// <param name="flagsWhenUpdated">Flags returned when an update occurs</param>
|
||||
/// <returns>Flags or 0</returns>
|
||||
protected CfgUpdateFlags UpdateDifferent(ref string[] cfgVar, string[] stringArrVal, CfgUpdateFlags flagsWhenUpdated)
|
||||
{
|
||||
if (cfgVar == null && stringArrVal == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (cfgVar == null || stringArrVal == null || !cfgVar.SequenceEqual<string>(stringArrVal))
|
||||
{
|
||||
cfgVar = stringArrVal;
|
||||
return flagsWhenUpdated;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using TBF.BenchControl.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace TBF.BenchControl.Configs.NameOnly
|
||||
{
|
||||
public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); }
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TestMethodCfg() { }
|
||||
|
||||
public TestMethodCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}", Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Configs.NameOnly
|
||||
{
|
||||
public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(TestMethodCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
TestMethodCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as TestMethodCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public TestMethodCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.Configs.NameOnly
|
||||
{
|
||||
partial class TestMethodCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// BasicPrinterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "BasicPrinterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,14 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// A fraction of the tank volume that is considered to be safe.
|
||||
/// When the estimated test end tank volume exceeds this fraction, tank emptying is forced.
|
||||
/// </summary>
|
||||
public const float TankFullFactor = 0.95f;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,90 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DB.SensusOracle
|
||||
{
|
||||
public enum DBUsed
|
||||
{
|
||||
None,
|
||||
Production,
|
||||
Test,
|
||||
Quality,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum Separator
|
||||
{
|
||||
None,
|
||||
Space,
|
||||
Tabulator,
|
||||
Comma,
|
||||
Semicolon,
|
||||
Count
|
||||
}
|
||||
|
||||
public class DatabaseCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(DatabaseCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new DatabaseCfgCtrl(); }
|
||||
|
||||
|
||||
public int TestBenchId;
|
||||
public DBUsed DBUsed;
|
||||
public int Baujahr; /// Written to the database
|
||||
public string DestinationPath; /// Directory path into which the results will be saved
|
||||
public string LogFolderPath; /// Directory path into which the results will be saved
|
||||
public bool YearFolders;
|
||||
public bool MonthFolders;
|
||||
public bool DayFolders;
|
||||
public Separator Separator;
|
||||
public bool EliminateSpaces;
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
DatabaseCfg()
|
||||
{
|
||||
Name = "Sensus-Oracle-DB";
|
||||
ParentName = string.Empty;
|
||||
TestBenchId = 1;
|
||||
DBUsed = DBUsed.Test;
|
||||
Baujahr = 2015;
|
||||
DestinationPath = Program.HomeDir + "Results\\";
|
||||
LogFolderPath = Program.HomeDir + "Logs\\";
|
||||
YearFolders = true;
|
||||
MonthFolders = true;
|
||||
DayFolders = false;
|
||||
Separator = Separator.None;
|
||||
EliminateSpaces = false;
|
||||
}
|
||||
|
||||
public DatabaseCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, BenchId={1}, DBUsed={2}, Baujahr={3}, Results={4}, Logs={5}, Y={6}, M={7}, D={8}, Elim.spaces={9}, Separator={10}",
|
||||
Name,
|
||||
TestBenchId,
|
||||
DBUsed,
|
||||
Baujahr,
|
||||
DestinationPath,
|
||||
LogFolderPath,
|
||||
YearFolders,
|
||||
MonthFolders,
|
||||
DayFolders,
|
||||
EliminateSpaces,
|
||||
Separator);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DB.SensusOracle
|
||||
{
|
||||
public partial class DatabaseCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(DatabaseCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
DatabaseCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as DatabaseCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public DatabaseCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void WriterCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < (int)DBUsed.Count; i++)
|
||||
{
|
||||
dbUsedComboBox.Items.Add(((DBUsed)i).ToString());
|
||||
}
|
||||
for (int i = 0; i < (int)Separator.Count; i++)
|
||||
{
|
||||
separatorComboBox.Items.Add(((Separator)i).ToString());
|
||||
}
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
benchIdTextBox.Text = config.TestBenchId.ToString();
|
||||
dbUsedComboBox.Text = config.DBUsed.ToString();
|
||||
baujahrTextBox.Text = config.Baujahr.ToString();
|
||||
destinationTextBox.Text = config.DestinationPath;
|
||||
logsFolderTextBox.Text = config.LogFolderPath;
|
||||
yearFoldersCheckBox.Checked = config.YearFolders;
|
||||
monthFoldersCheckBox.Checked = config.MonthFolders;
|
||||
dayFoldersCheckBox.Checked = config.DayFolders;
|
||||
separatorComboBox.Text = config.Separator.ToString();
|
||||
eliminateSpacesCheckBox.Checked = config.EliminateSpaces;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
benchIdTextBox.Enabled = true;
|
||||
dbUsedComboBox.Enabled = true;
|
||||
baujahrTextBox.Enabled = true;
|
||||
destinationTextBox.Enabled = true;
|
||||
destinationButton.Enabled = true;
|
||||
logsFolderTextBox.Enabled = true;
|
||||
logsFolderButton.Enabled = true;
|
||||
yearFoldersCheckBox.Enabled = true;
|
||||
monthFoldersCheckBox.Enabled = true;
|
||||
dayFoldersCheckBox.Enabled = true;
|
||||
separatorComboBox.Enabled = true;
|
||||
eliminateSpacesCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int tmp;
|
||||
if (!int.TryParse(benchIdTextBox.Text, out tmp) || tmp <= 0)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid 'Test bench ID'";
|
||||
}
|
||||
|
||||
if (!int.TryParse(baujahrTextBox.Text, out tmp) || tmp < 2015 || tmp > 2099)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid 'Bujahr'";
|
||||
}
|
||||
|
||||
if (!dbUsedComboBox.Items.Contains(dbUsedComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid 'Database used' item";
|
||||
}
|
||||
|
||||
if (!separatorComboBox.Items.Contains(separatorComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid separator";
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None; /// <------------------- !!!
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
if (config.Name != nameTextBox.Text)
|
||||
{
|
||||
config.Name = nameTextBox.Text;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
int benchId = int.Parse(benchIdTextBox.Text);
|
||||
if (config.TestBenchId != benchId)
|
||||
{
|
||||
config.TestBenchId = benchId;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
int baujahr = int.Parse(baujahrTextBox.Text);
|
||||
if (config.Baujahr != baujahr)
|
||||
{
|
||||
config.Baujahr = baujahr;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)DBUsed.Count; i++)
|
||||
{
|
||||
if (((DBUsed)i).ToString().Equals(dbUsedComboBox.Text) && (config.DBUsed != (DBUsed)i))
|
||||
{
|
||||
config.DBUsed = (DBUsed)i;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (config.DestinationPath != destinationTextBox.Text)
|
||||
{
|
||||
config.DestinationPath = destinationTextBox.Text;
|
||||
if (!config.DestinationPath.EndsWith("\\")) config.DestinationPath += "\\";
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
if (config.LogFolderPath != logsFolderTextBox.Text)
|
||||
{
|
||||
config.LogFolderPath = logsFolderTextBox.Text;
|
||||
if (!config.LogFolderPath.EndsWith("\\")) config.LogFolderPath += "\\";
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
if (yearFoldersCheckBox.Checked != config.YearFolders)
|
||||
{
|
||||
config.YearFolders = yearFoldersCheckBox.Checked;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
if (monthFoldersCheckBox.Checked != config.MonthFolders)
|
||||
{
|
||||
config.MonthFolders = monthFoldersCheckBox.Checked;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
if (dayFoldersCheckBox.Checked != config.DayFolders)
|
||||
{
|
||||
config.DayFolders = dayFoldersCheckBox.Checked;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)Separator.Count; i++)
|
||||
{
|
||||
if (((Separator)i).ToString().Equals(separatorComboBox.Text) && (config.Separator != (Separator)i))
|
||||
{
|
||||
config.Separator = (Separator)i;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (eliminateSpacesCheckBox.Checked != config.EliminateSpaces)
|
||||
{
|
||||
config.EliminateSpaces = eliminateSpacesCheckBox.Checked;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
private void destinationButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void logsFolderButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
namespace TBF.BenchControl.DB.SensusOracle
|
||||
{
|
||||
partial class DatabaseCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.destinationTextBox = new System.Windows.Forms.TextBox();
|
||||
this.destinationLabel = new System.Windows.Forms.Label();
|
||||
this.dayFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.destinationButton = new System.Windows.Forms.Button();
|
||||
this.yearFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.monthFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.eliminateSpacesCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.separatorLabel = new System.Windows.Forms.Label();
|
||||
this.separatorComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.benchIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchIdLabel = new System.Windows.Forms.Label();
|
||||
this.dbUsedComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.dbUsedLabel = new System.Windows.Forms.Label();
|
||||
this.baujahrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.baujahrLabel = new System.Windows.Forms.Label();
|
||||
this.logsFolderButton = new System.Windows.Forms.Button();
|
||||
this.logsFolderTextBox = new System.Windows.Forms.TextBox();
|
||||
this.logsFolderLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(110, 30);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(146, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(19, 33);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(107, 8);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// destinationTextBox
|
||||
//
|
||||
this.destinationTextBox.Enabled = false;
|
||||
this.destinationTextBox.Location = new System.Drawing.Point(110, 117);
|
||||
this.destinationTextBox.Name = "destinationTextBox";
|
||||
this.destinationTextBox.Size = new System.Drawing.Size(145, 20);
|
||||
this.destinationTextBox.TabIndex = 10;
|
||||
//
|
||||
// destinationLabel
|
||||
//
|
||||
this.destinationLabel.AutoSize = true;
|
||||
this.destinationLabel.Location = new System.Drawing.Point(19, 120);
|
||||
this.destinationLabel.Name = "destinationLabel";
|
||||
this.destinationLabel.Size = new System.Drawing.Size(71, 13);
|
||||
this.destinationLabel.TabIndex = 9;
|
||||
this.destinationLabel.Text = "Results folder";
|
||||
//
|
||||
// dayFoldersCheckBox
|
||||
//
|
||||
this.dayFoldersCheckBox.AutoSize = true;
|
||||
this.dayFoldersCheckBox.Enabled = false;
|
||||
this.dayFoldersCheckBox.Location = new System.Drawing.Point(207, 166);
|
||||
this.dayFoldersCheckBox.Name = "dayFoldersCheckBox";
|
||||
this.dayFoldersCheckBox.Size = new System.Drawing.Size(79, 17);
|
||||
this.dayFoldersCheckBox.TabIndex = 17;
|
||||
this.dayFoldersCheckBox.Text = "Day folders";
|
||||
this.dayFoldersCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// destinationButton
|
||||
//
|
||||
this.destinationButton.Enabled = false;
|
||||
this.destinationButton.Location = new System.Drawing.Point(261, 117);
|
||||
this.destinationButton.Name = "destinationButton";
|
||||
this.destinationButton.Size = new System.Drawing.Size(30, 20);
|
||||
this.destinationButton.TabIndex = 11;
|
||||
this.destinationButton.Text = "...";
|
||||
this.destinationButton.UseVisualStyleBackColor = true;
|
||||
this.destinationButton.Click += new System.EventHandler(this.destinationButton_Click);
|
||||
//
|
||||
// yearFoldersCheckBox
|
||||
//
|
||||
this.yearFoldersCheckBox.AutoSize = true;
|
||||
this.yearFoldersCheckBox.Enabled = false;
|
||||
this.yearFoldersCheckBox.Location = new System.Drawing.Point(23, 166);
|
||||
this.yearFoldersCheckBox.Name = "yearFoldersCheckBox";
|
||||
this.yearFoldersCheckBox.Size = new System.Drawing.Size(82, 17);
|
||||
this.yearFoldersCheckBox.TabIndex = 15;
|
||||
this.yearFoldersCheckBox.Text = "Year folders";
|
||||
this.yearFoldersCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// monthFoldersCheckBox
|
||||
//
|
||||
this.monthFoldersCheckBox.AutoSize = true;
|
||||
this.monthFoldersCheckBox.Enabled = false;
|
||||
this.monthFoldersCheckBox.Location = new System.Drawing.Point(111, 166);
|
||||
this.monthFoldersCheckBox.Name = "monthFoldersCheckBox";
|
||||
this.monthFoldersCheckBox.Size = new System.Drawing.Size(90, 17);
|
||||
this.monthFoldersCheckBox.TabIndex = 16;
|
||||
this.monthFoldersCheckBox.Text = "Month folders";
|
||||
this.monthFoldersCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// eliminateSpacesCheckBox
|
||||
//
|
||||
this.eliminateSpacesCheckBox.AutoSize = true;
|
||||
this.eliminateSpacesCheckBox.Enabled = false;
|
||||
this.eliminateSpacesCheckBox.Location = new System.Drawing.Point(111, 208);
|
||||
this.eliminateSpacesCheckBox.Name = "eliminateSpacesCheckBox";
|
||||
this.eliminateSpacesCheckBox.Size = new System.Drawing.Size(165, 17);
|
||||
this.eliminateSpacesCheckBox.TabIndex = 20;
|
||||
this.eliminateSpacesCheckBox.Text = "Eliminate spaces in each field";
|
||||
this.eliminateSpacesCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// separatorLabel
|
||||
//
|
||||
this.separatorLabel.AutoSize = true;
|
||||
this.separatorLabel.Location = new System.Drawing.Point(19, 188);
|
||||
this.separatorLabel.Name = "separatorLabel";
|
||||
this.separatorLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.separatorLabel.TabIndex = 18;
|
||||
this.separatorLabel.Text = "Separator";
|
||||
//
|
||||
// separatorComboBox
|
||||
//
|
||||
this.separatorComboBox.Enabled = false;
|
||||
this.separatorComboBox.FormattingEnabled = true;
|
||||
this.separatorComboBox.Location = new System.Drawing.Point(110, 185);
|
||||
this.separatorComboBox.Name = "separatorComboBox";
|
||||
this.separatorComboBox.Size = new System.Drawing.Size(146, 21);
|
||||
this.separatorComboBox.TabIndex = 19;
|
||||
//
|
||||
// benchIdTextBox
|
||||
//
|
||||
this.benchIdTextBox.Enabled = false;
|
||||
this.benchIdTextBox.Location = new System.Drawing.Point(110, 51);
|
||||
this.benchIdTextBox.Name = "benchIdTextBox";
|
||||
this.benchIdTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.benchIdTextBox.TabIndex = 4;
|
||||
//
|
||||
// benchIdLabel
|
||||
//
|
||||
this.benchIdLabel.AutoSize = true;
|
||||
this.benchIdLabel.Location = new System.Drawing.Point(19, 54);
|
||||
this.benchIdLabel.Name = "benchIdLabel";
|
||||
this.benchIdLabel.Size = new System.Drawing.Size(76, 13);
|
||||
this.benchIdLabel.TabIndex = 3;
|
||||
this.benchIdLabel.Text = "Test Bench ID";
|
||||
//
|
||||
// dbUsedComboBox
|
||||
//
|
||||
this.dbUsedComboBox.Enabled = false;
|
||||
this.dbUsedComboBox.FormattingEnabled = true;
|
||||
this.dbUsedComboBox.Location = new System.Drawing.Point(110, 73);
|
||||
this.dbUsedComboBox.Name = "dbUsedComboBox";
|
||||
this.dbUsedComboBox.Size = new System.Drawing.Size(145, 21);
|
||||
this.dbUsedComboBox.TabIndex = 6;
|
||||
//
|
||||
// dbUsedLabel
|
||||
//
|
||||
this.dbUsedLabel.AutoSize = true;
|
||||
this.dbUsedLabel.Location = new System.Drawing.Point(19, 76);
|
||||
this.dbUsedLabel.Name = "dbUsedLabel";
|
||||
this.dbUsedLabel.Size = new System.Drawing.Size(79, 13);
|
||||
this.dbUsedLabel.TabIndex = 5;
|
||||
this.dbUsedLabel.Text = "Database used";
|
||||
//
|
||||
// baujahrTextBox
|
||||
//
|
||||
this.baujahrTextBox.Enabled = false;
|
||||
this.baujahrTextBox.Location = new System.Drawing.Point(110, 95);
|
||||
this.baujahrTextBox.Name = "baujahrTextBox";
|
||||
this.baujahrTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.baujahrTextBox.TabIndex = 8;
|
||||
//
|
||||
// baujahrLabel
|
||||
//
|
||||
this.baujahrLabel.AutoSize = true;
|
||||
this.baujahrLabel.Location = new System.Drawing.Point(19, 98);
|
||||
this.baujahrLabel.Name = "baujahrLabel";
|
||||
this.baujahrLabel.Size = new System.Drawing.Size(43, 13);
|
||||
this.baujahrLabel.TabIndex = 7;
|
||||
this.baujahrLabel.Text = "Baujahr";
|
||||
//
|
||||
// logsFolderButton
|
||||
//
|
||||
this.logsFolderButton.Enabled = false;
|
||||
this.logsFolderButton.Location = new System.Drawing.Point(261, 139);
|
||||
this.logsFolderButton.Name = "logsFolderButton";
|
||||
this.logsFolderButton.Size = new System.Drawing.Size(30, 20);
|
||||
this.logsFolderButton.TabIndex = 14;
|
||||
this.logsFolderButton.Text = "...";
|
||||
this.logsFolderButton.UseVisualStyleBackColor = true;
|
||||
this.logsFolderButton.Click += new System.EventHandler(this.logsFolderButton_Click);
|
||||
//
|
||||
// logsFolderTextBox
|
||||
//
|
||||
this.logsFolderTextBox.Enabled = false;
|
||||
this.logsFolderTextBox.Location = new System.Drawing.Point(110, 139);
|
||||
this.logsFolderTextBox.Name = "logsFolderTextBox";
|
||||
this.logsFolderTextBox.Size = new System.Drawing.Size(145, 20);
|
||||
this.logsFolderTextBox.TabIndex = 13;
|
||||
//
|
||||
// logsFolderLabel
|
||||
//
|
||||
this.logsFolderLabel.AutoSize = true;
|
||||
this.logsFolderLabel.Location = new System.Drawing.Point(19, 142);
|
||||
this.logsFolderLabel.Name = "logsFolderLabel";
|
||||
this.logsFolderLabel.Size = new System.Drawing.Size(59, 13);
|
||||
this.logsFolderLabel.TabIndex = 12;
|
||||
this.logsFolderLabel.Text = "Logs folder";
|
||||
//
|
||||
// DatabaseCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.logsFolderButton);
|
||||
this.Controls.Add(this.logsFolderTextBox);
|
||||
this.Controls.Add(this.logsFolderLabel);
|
||||
this.Controls.Add(this.baujahrTextBox);
|
||||
this.Controls.Add(this.baujahrLabel);
|
||||
this.Controls.Add(this.dbUsedComboBox);
|
||||
this.Controls.Add(this.dbUsedLabel);
|
||||
this.Controls.Add(this.benchIdTextBox);
|
||||
this.Controls.Add(this.benchIdLabel);
|
||||
this.Controls.Add(this.separatorComboBox);
|
||||
this.Controls.Add(this.separatorLabel);
|
||||
this.Controls.Add(this.eliminateSpacesCheckBox);
|
||||
this.Controls.Add(this.monthFoldersCheckBox);
|
||||
this.Controls.Add(this.yearFoldersCheckBox);
|
||||
this.Controls.Add(this.destinationButton);
|
||||
this.Controls.Add(this.dayFoldersCheckBox);
|
||||
this.Controls.Add(this.destinationTextBox);
|
||||
this.Controls.Add(this.destinationLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "DatabaseCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 230);
|
||||
this.Load += new System.EventHandler(this.WriterCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.TextBox destinationTextBox;
|
||||
private System.Windows.Forms.Label destinationLabel;
|
||||
private System.Windows.Forms.CheckBox dayFoldersCheckBox;
|
||||
private System.Windows.Forms.Button destinationButton;
|
||||
private System.Windows.Forms.CheckBox yearFoldersCheckBox;
|
||||
private System.Windows.Forms.CheckBox monthFoldersCheckBox;
|
||||
private System.Windows.Forms.CheckBox eliminateSpacesCheckBox;
|
||||
private System.Windows.Forms.Label separatorLabel;
|
||||
private System.Windows.Forms.ComboBox separatorComboBox;
|
||||
private System.Windows.Forms.TextBox benchIdTextBox;
|
||||
private System.Windows.Forms.Label benchIdLabel;
|
||||
private System.Windows.Forms.ComboBox dbUsedComboBox;
|
||||
private System.Windows.Forms.Label dbUsedLabel;
|
||||
private System.Windows.Forms.TextBox baujahrTextBox;
|
||||
private System.Windows.Forms.Label baujahrLabel;
|
||||
private System.Windows.Forms.Button logsFolderButton;
|
||||
private System.Windows.Forms.TextBox logsFolderTextBox;
|
||||
private System.Windows.Forms.Label logsFolderLabel;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,27 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DB.SensusOracle
|
||||
{
|
||||
public class DatabaseFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "Sensus-Oracle-Database"; } }
|
||||
|
||||
public void ResetStaticProperties() { Database.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Database(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Database(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new DatabaseCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(DatabaseCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,370 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Ports;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using Dirichlet.Numerics;
|
||||
|
||||
namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
{
|
||||
/// <summary>
|
||||
/// See page 20 of MG10S202 Operational Instructions Modbus RTU
|
||||
/// </summary>
|
||||
public enum CW : ushort
|
||||
{
|
||||
PresetRefLsb = (1 << 0),
|
||||
PresetRefMsb = (1 << 1),
|
||||
Not_DcBraking = (1 << 2),
|
||||
Not_CoastingStop = (1 << 3),
|
||||
Not_QuickStop = (1 << 4),
|
||||
Not_FreezeFreq = (1 << 5),
|
||||
Start_NotRampStop = (1 << 6),
|
||||
Reset = (1 << 7),
|
||||
Jog = (1 << 8),
|
||||
Ramp2_NotRamp1 = (1 << 9),
|
||||
DataValid = (1 << 10),
|
||||
Relay01Activ = (1 << 11),
|
||||
DOut46Activ = (1 << 12),
|
||||
SelectSetupLsb = (1 << 13),
|
||||
SelectSetupMsb = (1 << 14),
|
||||
Reversing = (1 << 15),
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// See page 22 of MG10S202 Operational Instructions Modbus RTU
|
||||
/// </summary>
|
||||
public enum SW : ushort
|
||||
{
|
||||
ControlReady = (1 << 0),
|
||||
DriveReady = (1 << 1),
|
||||
CoastingStop = (1 << 2),
|
||||
Trip = (1 << 3),
|
||||
TripLock = (1 << 6),
|
||||
Warning = (1 << 7),
|
||||
SpeedEqRef = (1 << 8),
|
||||
RemoteCtrl = (1 << 9),
|
||||
FreqLimitOK = (1 << 10),
|
||||
MotorRunning = (1 << 11),
|
||||
VoltageWarn = (1 << 13),
|
||||
CurrentLimit = (1 << 14),
|
||||
ThermalWarn = (1 << 15),
|
||||
}
|
||||
|
||||
public enum Function : byte
|
||||
{
|
||||
ReadCoilStatus = 0x01,
|
||||
ForceSingleCoil = 0x05,
|
||||
ForceMultipleCoils = 0x0F,
|
||||
ReadHoldingRegisters = 0x03,
|
||||
PresetSingleRegister = 0x06,
|
||||
PresetMultipleRegisters = 0x10,
|
||||
}
|
||||
|
||||
|
||||
public class Pump : ComponentBase, IDevice, IOperation, GenericDevices.IPumpFM, GenericDevices.IValve
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Pump));
|
||||
public override string ToString() { return string.Format("Pump-Danfoss-VLT2800({0})", Cfg.ToString(1)); }
|
||||
|
||||
private readonly PumpCfg pumpCfg;
|
||||
|
||||
public int Delay { get { return pumpCfg.Delay; } }
|
||||
public ValveCategory Category { get { return ValveCategory.Feeding; } } /// Pump category is Feeding
|
||||
public GenericDevices.IValve CoupledTo { get { return null; } }
|
||||
public bool InvertCouple { get { return false; } }
|
||||
public int LagOpening { get { return 0; } }
|
||||
public int LagClosing { get { return 0; } }
|
||||
|
||||
/// <summary>
|
||||
/// Pump power in [%] in range 0 .. 100.0f
|
||||
/// </summary>
|
||||
private float power;
|
||||
public float Power
|
||||
{
|
||||
get { return power; }
|
||||
}
|
||||
|
||||
|
||||
readonly Elde.ControlBoardDev controlBoard;
|
||||
readonly int bitPosition; /// 0 .. 63
|
||||
|
||||
public readonly UInt128 Mask; /// derived from bitPosition in the constructor
|
||||
|
||||
public bool State
|
||||
{
|
||||
get { return (controlBoard.Route & Mask) != 0; }
|
||||
}
|
||||
|
||||
/// Private fields
|
||||
SerialPort serialPort;
|
||||
bool dataToSendReady;
|
||||
byte[] dataToSend;
|
||||
StringBuilder responseBuilder;
|
||||
|
||||
|
||||
public Pump()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
|
||||
/// Connection settings: 19200 Bd 8-bits No-parity 1-stop-bit Flow control: none or hardware.
|
||||
/// </summary>
|
||||
public Pump(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
pumpCfg = cfg as PumpCfg;
|
||||
|
||||
controlBoard = (Elde.ControlBoardDev)TbfComponents.FindComponent("CB", components); /// TODO: replace "CB"
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
bitPosition = pumpCfg.BitPosition;
|
||||
Mask = (((UInt128)1) << bitPosition);
|
||||
Mask |= (((UInt128)1) << (bitPosition + 1));
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
if (pumpCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string comPortName = "COM" + pumpCfg.ComPortNr.ToString();
|
||||
serialPort = new SerialPort(comPortName, pumpCfg.BaudRate, pumpCfg.Parity, pumpCfg.DataBits, pumpCfg.StopBits);
|
||||
serialPort.Handshake = Handshake.None;
|
||||
serialPort.Open();
|
||||
responseBuilder = new StringBuilder(40);
|
||||
|
||||
log.FatalFormat("Successfully initialized device {0}", ToString());
|
||||
}
|
||||
|
||||
/// <summary>Run this device</summary>
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
if (pumpCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
responseBuilder.Append(serialPort.ReadExisting());
|
||||
|
||||
/// Check if the response is complete
|
||||
if (responseBuilder.Length >= 8)
|
||||
{
|
||||
string response = responseBuilder.ToString();
|
||||
responseBuilder.Clear();
|
||||
|
||||
log.Info(Telegram.LogTelegram("Received ", response));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepares data to be sent in RunDeviceAfter() function
|
||||
/// </summary>
|
||||
bool SendData(byte[] data)
|
||||
{
|
||||
if (dataToSendReady) return false;
|
||||
dataToSend = data;
|
||||
dataToSendReady = true;
|
||||
|
||||
log.Info(Telegram.LogTelegram("Sending ", data));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Run this device</summary>
|
||||
public void RunDeviceAfter()
|
||||
{
|
||||
if (dataToSendReady)
|
||||
{
|
||||
if (pumpCfg.DebugLevel != DebugMode.Simulate)
|
||||
{
|
||||
serialPort.Write(dataToSend, 0, dataToSend.Length);
|
||||
}
|
||||
dataToSendReady = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Stop this device</summary>
|
||||
public void StopDevice()
|
||||
{
|
||||
if (serialPort != null) serialPort.Close();
|
||||
}
|
||||
|
||||
public void StopDevice2() { }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Turn the pmp on using Modbus commad, use the variable frequency
|
||||
/// </summary>
|
||||
/// <param name="powerArg">Frequency in percent (-200.0 .. 200.0)</param>
|
||||
public void TurnOn(float powerArg)
|
||||
{
|
||||
log.DebugFormat("{0}.TurnOn({1})", Name, powerArg);
|
||||
|
||||
this.power = powerArg;
|
||||
|
||||
//UInt16 controlWord = 0x047C;
|
||||
UInt16 controlWord = (UInt16)(CW.Not_DcBraking |
|
||||
CW.Not_CoastingStop |
|
||||
CW.Not_QuickStop |
|
||||
CW.Not_FreezeFreq |
|
||||
CW.Start_NotRampStop |
|
||||
CW.DataValid);
|
||||
|
||||
UInt16 serialComReference = (UInt16)(Int16)((float)0x4000 * powerArg / 100.0f + 0.5f);
|
||||
|
||||
byte[] msg;
|
||||
if (pumpCfg.Protocol == PumpProtocol.Modbus)
|
||||
{
|
||||
msg = new byte[13];
|
||||
msg[0] = (byte)pumpCfg.BusAddress;
|
||||
msg[1] = (byte)Function.ForceMultipleCoils;
|
||||
msg[2] = 0; /// Data Hi
|
||||
msg[3] = 0; /// Data Lo
|
||||
msg[4] = 0; /// Nr. of coils Hi
|
||||
msg[5] = 0x20; /// Nr. of coils Lo
|
||||
msg[6] = 4; /// Byte count
|
||||
msg[7] = (byte)(controlWord & 0xFF); /// Control Word Lo
|
||||
msg[8] = (byte)(controlWord >> 8); /// Control Word Hi
|
||||
msg[9] = (byte)(serialComReference & 0xFF); /// Serial Com Reference Lo
|
||||
msg[10] = (byte)(serialComReference >> 8); /// Serial Com Reference Hi
|
||||
Telegram.UpdateTelegramCRC(msg);
|
||||
}
|
||||
else /// if (pumpCfg.Protocol == PumpProtocol.FC)
|
||||
{
|
||||
msg = new byte[8];
|
||||
msg[0] = 0x02; /// STX
|
||||
msg[1] = 6; /// lenght (6 bytes following this one)
|
||||
msg[2] = (byte)pumpCfg.BusAddress;
|
||||
msg[3] = (byte)(controlWord >> 8); /// Control Word Hi
|
||||
msg[4] = (byte)(controlWord & 0xFF); /// Control Word Lo
|
||||
msg[5] = (byte)(serialComReference >> 8); /// Serial Com Reference Hi
|
||||
msg[6] = (byte)(serialComReference & 0xFF); /// Serial Com Reference Lo
|
||||
Telegram.UpdateTelegramChecksum(msg);
|
||||
}
|
||||
SendData(msg);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Turn the pmp off using Modbus command
|
||||
/// </summary>
|
||||
public void TurnOff()
|
||||
{
|
||||
log.DebugFormat("{0}.TurnOff()", Name);
|
||||
|
||||
this.power = 0;
|
||||
|
||||
UInt16 controlWord = (UInt16)(CW.Not_DcBraking |
|
||||
CW.Not_CoastingStop |
|
||||
CW.Not_QuickStop |
|
||||
CW.Not_FreezeFreq |
|
||||
//CW.Start_NotRampStop |
|
||||
CW.DataValid);
|
||||
|
||||
UInt16 serialComReference = 0;
|
||||
|
||||
byte[] msg;
|
||||
if (pumpCfg.Protocol == PumpProtocol.Modbus)
|
||||
{
|
||||
msg = new byte[13];
|
||||
msg[0] = (byte)pumpCfg.BusAddress;
|
||||
msg[1] = (byte)Function.ForceMultipleCoils;
|
||||
msg[2] = 0; /// Data Hi
|
||||
msg[3] = 0; /// Data Lo
|
||||
msg[4] = 0; /// Nr. of coils Hi
|
||||
msg[5] = 0x20; /// Nr. of coils Lo
|
||||
msg[6] = 4; /// Byte count
|
||||
msg[7] = (byte)(controlWord & 0xFF); /// Control Word Lo
|
||||
msg[8] = (byte)(controlWord >> 8); /// Control Word Hi
|
||||
msg[9] = (byte)(serialComReference & 0xFF); /// Serial Com Reference Lo
|
||||
msg[10] = (byte)(serialComReference >> 8); /// Serial Com Reference Hi
|
||||
Telegram.UpdateTelegramCRC(msg);
|
||||
}
|
||||
else /// if (pumpCfg.Protocol == PumpProtocol.FC)
|
||||
{
|
||||
msg = new byte[8];
|
||||
msg[0] = 0x02; /// STX
|
||||
msg[1] = 6; /// lenght (6 bytes following this one)
|
||||
msg[2] = (byte)pumpCfg.BusAddress;
|
||||
msg[3] = (byte)(controlWord >> 8); /// Control Word Hi
|
||||
msg[4] = (byte)(controlWord & 0xFF); /// Control Word Lo
|
||||
msg[5] = (byte)(serialComReference >> 8); /// Serial Com Reference Hi
|
||||
msg[6] = (byte)(serialComReference & 0xFF); /// Serial Com Reference Lo
|
||||
Telegram.UpdateTelegramChecksum(msg);
|
||||
}
|
||||
SendData(msg);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The currently running operation.
|
||||
/// </summary>
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
TurnOn,
|
||||
TurnOff,
|
||||
}
|
||||
///
|
||||
CurrentOp currentOp;
|
||||
|
||||
float powerForOp;
|
||||
|
||||
/// <summary>
|
||||
/// Turn the pump frequency inverter on.
|
||||
/// </summary>
|
||||
public IOperation TurnOnOp(float powerArg)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.TurnOn;
|
||||
powerForOp = powerArg;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Turn the pump frequency inverter on.
|
||||
/// </summary>
|
||||
public IOperation TurnOffOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.TurnOff;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start the operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.TurnOn:
|
||||
TurnOn(powerForOp);
|
||||
return;
|
||||
case CurrentOp.TurnOff:
|
||||
default:
|
||||
TurnOff();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run the operation</summary>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.TurnPumpOnOffDone;
|
||||
}
|
||||
|
||||
/// <summary>Stop the operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
{
|
||||
public class PumpCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PumpCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public int Delay; // Delay of the pump function in [s] (affects the duration of transition sequence steps)
|
||||
public PumpProtocol Protocol; // Modbus or FC with Siemens address
|
||||
public int BitPosition;
|
||||
public int BusAddress; // Modbus or FC address in range 1..247 (Modbus) or 1..31 (FC with Siemens address)
|
||||
public int ComPortNr;
|
||||
public int BaudRate;
|
||||
public Parity Parity;
|
||||
public int DataBits;
|
||||
public StopBits StopBits;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
PumpCfg()
|
||||
{
|
||||
Name = "Pump-Danfoss";
|
||||
ParentName = string.Empty;
|
||||
Delay = 1;
|
||||
ComPortNr = 3;
|
||||
|
||||
/// Default protocol settings (the same as Danfoss VLT2800 factory settings)
|
||||
Protocol = PumpProtocol.FC;
|
||||
BusAddress = 1;
|
||||
BaudRate = 9600;
|
||||
DataBits = 8;
|
||||
Parity = System.IO.Ports.Parity.Even; /// 'Parity.None' is the default value for Protocol = PumpProtocol.Modbus
|
||||
StopBits = System.IO.Ports.StopBits.One;
|
||||
}
|
||||
|
||||
public PumpCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Delay={1}s, Protocol={2}, BusAddress={3}, Com{4}, {5}Bd, {6}-bits, parity={7}, stopBits={8}",
|
||||
Name, Delay, Protocol, BusAddress, ComPortNr, BaudRate, DataBits, Parity, StopBits);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO.Ports;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
{
|
||||
public partial class PumpCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(PumpCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
PumpCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as PumpCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public PumpCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
protocolComboBox.Items.Add(PumpProtocol.Modbus.ToString());
|
||||
protocolComboBox.Items.Add(PumpProtocol.FC.ToString());
|
||||
|
||||
parityComboBox.Items.Add(Parity.None.ToString());
|
||||
parityComboBox.Items.Add(Parity.Even.ToString());
|
||||
parityComboBox.Items.Add(Parity.Odd.ToString());
|
||||
|
||||
stopBitsComboBox.Items.Add(StopBits.None.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.One.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.OnePointFive.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.Two.ToString());
|
||||
}
|
||||
|
||||
int GetParityIx(Parity par)
|
||||
{
|
||||
if (par == Parity.None) return 0;
|
||||
if (par == Parity.Even) return 0;
|
||||
if (par == Parity.Odd) return 0;
|
||||
return -1;
|
||||
}
|
||||
Parity GetParity(string str)
|
||||
{
|
||||
if (str.Equals(Parity.None.ToString())) return Parity.None;
|
||||
if (str.Equals(Parity.Even.ToString())) return Parity.Even;
|
||||
if (str.Equals(Parity.Odd.ToString())) return Parity.Odd;
|
||||
return (Parity)(-1);
|
||||
}
|
||||
|
||||
int GetStopBitsIx(StopBits sb)
|
||||
{
|
||||
if (sb == StopBits.None) return 0;
|
||||
if (sb == StopBits.One) return 1;
|
||||
if (sb == StopBits.OnePointFive) return 2;
|
||||
if (sb == StopBits.Two) return 3;
|
||||
return -1;
|
||||
}
|
||||
StopBits GetStopBits(string str)
|
||||
{
|
||||
if (str.Equals(StopBits.None.ToString())) return StopBits.None;
|
||||
if (str.Equals(StopBits.One.ToString())) return StopBits.One;
|
||||
if (str.Equals(StopBits.OnePointFive.ToString())) return StopBits.OnePointFive;
|
||||
if (str.Equals(StopBits.Two.ToString())) return StopBits.Two;
|
||||
return (StopBits)(-1);
|
||||
}
|
||||
|
||||
int GetHandshakeIx(Handshake par)
|
||||
{
|
||||
if (par == Handshake.None) return 0;
|
||||
if (par == Handshake.RequestToSend) return 0;
|
||||
if (par == Handshake.XOnXOff) return 0;
|
||||
return -1;
|
||||
}
|
||||
Handshake GetHandshake(string str)
|
||||
{
|
||||
if (str.Equals(Handshake.None.ToString())) return Handshake.None;
|
||||
if (str.Equals(Handshake.RequestToSend.ToString())) return Handshake.RequestToSend;
|
||||
if (str.Equals(Handshake.XOnXOff.ToString())) return Handshake.XOnXOff;
|
||||
return (Handshake)(-1);
|
||||
}
|
||||
|
||||
private void AbbientCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
delayTextBox.Text = config.Delay.ToString();
|
||||
bitPositionTextBox.Text = config.BitPosition.ToString();
|
||||
protocolComboBox.Text = config.Protocol.ToString();
|
||||
busAddressTextBox.Text = config.BusAddress.ToString();
|
||||
comPortNrTextBox.Text = config.ComPortNr.ToString();
|
||||
baudRateTextBox.Text = config.BaudRate.ToString();
|
||||
parityComboBox.Text = config.Parity.ToString();
|
||||
dataBitsTextBox.Text = config.DataBits.ToString();
|
||||
stopBitsComboBox.Text = config.StopBits.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
delayTextBox.Enabled = true;
|
||||
bitPositionTextBox.Enabled = true;
|
||||
protocolComboBox.Enabled = true;
|
||||
busAddressTextBox.Enabled = true;
|
||||
comPortNrTextBox.Enabled = true;
|
||||
baudRateTextBox.Enabled = true;
|
||||
parityComboBox.Enabled = true;
|
||||
dataBitsTextBox.Enabled = true;
|
||||
stopBitsComboBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
config.Delay = int.Parse(delayTextBox.Text);
|
||||
config.BitPosition = int.Parse(bitPositionTextBox.Text);
|
||||
config.Protocol = protocolComboBox.Text.Equals(PumpProtocol.Modbus.ToString()) ? PumpProtocol.Modbus : PumpProtocol.FC;
|
||||
config.BusAddress = int.Parse(busAddressTextBox.Text);
|
||||
config.ComPortNr = int.Parse(comPortNrTextBox.Text);
|
||||
config.BaudRate = int.Parse(baudRateTextBox.Text);
|
||||
config.Parity = GetParity(parityComboBox.SelectedItem.ToString());
|
||||
config.DataBits = int.Parse(dataBitsTextBox.Text);
|
||||
config.StopBits = GetStopBits(stopBitsComboBox.SelectedItem.ToString());
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(delayTextBox.Text, out dummy) || dummy < 0 || dummy > 300)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Delay' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(bitPositionTextBox.Text, out dummy) || dummy < 0 || dummy >= 128)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Bit Position' should be between 0 and 127";
|
||||
}
|
||||
|
||||
if (!protocolComboBox.Items.Contains(protocolComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Protocol' should Modbus or FC";
|
||||
}
|
||||
|
||||
if (!int.TryParse(busAddressTextBox.Text, out dummy) || dummy < 1 || dummy > 247)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Bus Address' should be in range 1..247";
|
||||
}
|
||||
|
||||
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Serial Port Number' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(baudRateTextBox.Text, out dummy) || dummy < 150 || dummy > 115200)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Baud Rate' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(dataBitsTextBox.Text, out dummy) || dummy < 7 || dummy > 8)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Data Bits' is not valid";
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,298 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
{
|
||||
partial class PumpCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.comPortNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.baudRateLabel = new System.Windows.Forms.Label();
|
||||
this.baudRateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.partityLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.stopBitsLabel = new System.Windows.Forms.Label();
|
||||
this.busAddressLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.parityComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.stopBitsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.busAddressTextBox = new System.Windows.Forms.TextBox();
|
||||
this.delayTextBox = new System.Windows.Forms.TextBox();
|
||||
this.delayLabel = new System.Windows.Forms.Label();
|
||||
this.protocolLabel = new System.Windows.Forms.Label();
|
||||
this.protocolComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.bitPositionTextBox = new System.Windows.Forms.TextBox();
|
||||
this.bitPositionLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// comPortNrTextBox
|
||||
//
|
||||
this.comPortNrTextBox.Enabled = false;
|
||||
this.comPortNrTextBox.Location = new System.Drawing.Point(140, 129);
|
||||
this.comPortNrTextBox.Name = "comPortNrTextBox";
|
||||
this.comPortNrTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.comPortNrTextBox.TabIndex = 6;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(29, 132);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(98, 13);
|
||||
this.label1.TabIndex = 5;
|
||||
this.label1.Text = "Serial Port Number:";
|
||||
//
|
||||
// baudRateLabel
|
||||
//
|
||||
this.baudRateLabel.AutoSize = true;
|
||||
this.baudRateLabel.Location = new System.Drawing.Point(29, 153);
|
||||
this.baudRateLabel.Name = "baudRateLabel";
|
||||
this.baudRateLabel.Size = new System.Drawing.Size(58, 13);
|
||||
this.baudRateLabel.TabIndex = 7;
|
||||
this.baudRateLabel.Text = "Baud Rate";
|
||||
//
|
||||
// baudRateTextBox
|
||||
//
|
||||
this.baudRateTextBox.Enabled = false;
|
||||
this.baudRateTextBox.Location = new System.Drawing.Point(140, 150);
|
||||
this.baudRateTextBox.Name = "baudRateTextBox";
|
||||
this.baudRateTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.baudRateTextBox.TabIndex = 8;
|
||||
//
|
||||
// partityLabel
|
||||
//
|
||||
this.partityLabel.AutoSize = true;
|
||||
this.partityLabel.Location = new System.Drawing.Point(29, 174);
|
||||
this.partityLabel.Name = "partityLabel";
|
||||
this.partityLabel.Size = new System.Drawing.Size(33, 13);
|
||||
this.partityLabel.TabIndex = 9;
|
||||
this.partityLabel.Text = "Parity";
|
||||
//
|
||||
// dataBitsLabel
|
||||
//
|
||||
this.dataBitsLabel.AutoSize = true;
|
||||
this.dataBitsLabel.Location = new System.Drawing.Point(29, 196);
|
||||
this.dataBitsLabel.Name = "dataBitsLabel";
|
||||
this.dataBitsLabel.Size = new System.Drawing.Size(50, 13);
|
||||
this.dataBitsLabel.TabIndex = 11;
|
||||
this.dataBitsLabel.Text = "Data Bits";
|
||||
//
|
||||
// dataBitsTextBox
|
||||
//
|
||||
this.dataBitsTextBox.Enabled = false;
|
||||
this.dataBitsTextBox.Location = new System.Drawing.Point(140, 193);
|
||||
this.dataBitsTextBox.Name = "dataBitsTextBox";
|
||||
this.dataBitsTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.dataBitsTextBox.TabIndex = 12;
|
||||
//
|
||||
// stopBitsLabel
|
||||
//
|
||||
this.stopBitsLabel.AutoSize = true;
|
||||
this.stopBitsLabel.Location = new System.Drawing.Point(29, 217);
|
||||
this.stopBitsLabel.Name = "stopBitsLabel";
|
||||
this.stopBitsLabel.Size = new System.Drawing.Size(49, 13);
|
||||
this.stopBitsLabel.TabIndex = 13;
|
||||
this.stopBitsLabel.Text = "Stop Bits";
|
||||
//
|
||||
// busAddressLabel
|
||||
//
|
||||
this.busAddressLabel.AutoSize = true;
|
||||
this.busAddressLabel.Location = new System.Drawing.Point(29, 110);
|
||||
this.busAddressLabel.Name = "busAddressLabel";
|
||||
this.busAddressLabel.Size = new System.Drawing.Size(66, 13);
|
||||
this.busAddressLabel.TabIndex = 3;
|
||||
this.busAddressLabel.Text = "Bus Address";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(140, 23);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(30, 26);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(137, 5);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// parityComboBox
|
||||
//
|
||||
this.parityComboBox.Enabled = false;
|
||||
this.parityComboBox.FormattingEnabled = true;
|
||||
this.parityComboBox.Location = new System.Drawing.Point(140, 171);
|
||||
this.parityComboBox.Name = "parityComboBox";
|
||||
this.parityComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.parityComboBox.TabIndex = 10;
|
||||
//
|
||||
// stopBitsComboBox
|
||||
//
|
||||
this.stopBitsComboBox.Enabled = false;
|
||||
this.stopBitsComboBox.FormattingEnabled = true;
|
||||
this.stopBitsComboBox.Location = new System.Drawing.Point(140, 214);
|
||||
this.stopBitsComboBox.Name = "stopBitsComboBox";
|
||||
this.stopBitsComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.stopBitsComboBox.TabIndex = 14;
|
||||
//
|
||||
// busAddressTextBox
|
||||
//
|
||||
this.busAddressTextBox.Enabled = false;
|
||||
this.busAddressTextBox.Location = new System.Drawing.Point(140, 108);
|
||||
this.busAddressTextBox.Name = "busAddressTextBox";
|
||||
this.busAddressTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.busAddressTextBox.TabIndex = 4;
|
||||
//
|
||||
// delayTextBox
|
||||
//
|
||||
this.delayTextBox.Enabled = false;
|
||||
this.delayTextBox.Location = new System.Drawing.Point(140, 44);
|
||||
this.delayTextBox.Name = "delayTextBox";
|
||||
this.delayTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.delayTextBox.TabIndex = 16;
|
||||
//
|
||||
// delayLabel
|
||||
//
|
||||
this.delayLabel.AutoSize = true;
|
||||
this.delayLabel.Location = new System.Drawing.Point(29, 46);
|
||||
this.delayLabel.Name = "delayLabel";
|
||||
this.delayLabel.Size = new System.Drawing.Size(45, 13);
|
||||
this.delayLabel.TabIndex = 15;
|
||||
this.delayLabel.Text = "Delay[s]";
|
||||
//
|
||||
// protocolLabel
|
||||
//
|
||||
this.protocolLabel.AutoSize = true;
|
||||
this.protocolLabel.Location = new System.Drawing.Point(29, 89);
|
||||
this.protocolLabel.Name = "protocolLabel";
|
||||
this.protocolLabel.Size = new System.Drawing.Size(46, 13);
|
||||
this.protocolLabel.TabIndex = 17;
|
||||
this.protocolLabel.Text = "Protocol";
|
||||
//
|
||||
// protocolComboBox
|
||||
//
|
||||
this.protocolComboBox.Enabled = false;
|
||||
this.protocolComboBox.FormattingEnabled = true;
|
||||
this.protocolComboBox.Location = new System.Drawing.Point(140, 86);
|
||||
this.protocolComboBox.Name = "protocolComboBox";
|
||||
this.protocolComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.protocolComboBox.TabIndex = 18;
|
||||
//
|
||||
// bitPositionTextBox
|
||||
//
|
||||
this.bitPositionTextBox.Enabled = false;
|
||||
this.bitPositionTextBox.Location = new System.Drawing.Point(140, 65);
|
||||
this.bitPositionTextBox.Name = "bitPositionTextBox";
|
||||
this.bitPositionTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.bitPositionTextBox.TabIndex = 20;
|
||||
//
|
||||
// bitPositionLabel
|
||||
//
|
||||
this.bitPositionLabel.AutoSize = true;
|
||||
this.bitPositionLabel.Location = new System.Drawing.Point(30, 68);
|
||||
this.bitPositionLabel.Name = "bitPositionLabel";
|
||||
this.bitPositionLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.bitPositionLabel.TabIndex = 19;
|
||||
this.bitPositionLabel.Text = "Valve Bit Position";
|
||||
//
|
||||
// PumpCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Controls.Add(this.bitPositionTextBox);
|
||||
this.Controls.Add(this.bitPositionLabel);
|
||||
this.Controls.Add(this.protocolComboBox);
|
||||
this.Controls.Add(this.protocolLabel);
|
||||
this.Controls.Add(this.delayTextBox);
|
||||
this.Controls.Add(this.delayLabel);
|
||||
this.Controls.Add(this.busAddressTextBox);
|
||||
this.Controls.Add(this.stopBitsComboBox);
|
||||
this.Controls.Add(this.parityComboBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Controls.Add(this.busAddressLabel);
|
||||
this.Controls.Add(this.stopBitsLabel);
|
||||
this.Controls.Add(this.dataBitsTextBox);
|
||||
this.Controls.Add(this.dataBitsLabel);
|
||||
this.Controls.Add(this.partityLabel);
|
||||
this.Controls.Add(this.baudRateTextBox);
|
||||
this.Controls.Add(this.baudRateLabel);
|
||||
this.Controls.Add(this.comPortNrTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "PumpCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 240);
|
||||
this.Load += new System.EventHandler(this.AbbientCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox comPortNrTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label baudRateLabel;
|
||||
private System.Windows.Forms.TextBox baudRateTextBox;
|
||||
private System.Windows.Forms.Label partityLabel;
|
||||
private System.Windows.Forms.Label dataBitsLabel;
|
||||
private System.Windows.Forms.TextBox dataBitsTextBox;
|
||||
private System.Windows.Forms.Label stopBitsLabel;
|
||||
private System.Windows.Forms.Label busAddressLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.ComboBox parityComboBox;
|
||||
private System.Windows.Forms.ComboBox stopBitsComboBox;
|
||||
private System.Windows.Forms.TextBox busAddressTextBox;
|
||||
private System.Windows.Forms.TextBox delayTextBox;
|
||||
private System.Windows.Forms.Label delayLabel;
|
||||
private System.Windows.Forms.Label protocolLabel;
|
||||
private System.Windows.Forms.ComboBox protocolComboBox;
|
||||
private System.Windows.Forms.TextBox bitPositionTextBox;
|
||||
private System.Windows.Forms.Label bitPositionLabel;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
{
|
||||
public class PumpFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "Pump-Danfoss-VLT2800"; } }
|
||||
|
||||
public void ResetStaticProperties() { Pump.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Pump(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Pump(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new PumpCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(PumpCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,381 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
partial class CycleBeginningForm
|
||||
{
|
||||
/// <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.okButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.aux1ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.main1ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.auxSN1Label = new System.Windows.Forms.Label();
|
||||
this.mainSN1Label = new System.Windows.Forms.Label();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.aux2ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.main2ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.auxSN2Label = new System.Windows.Forms.Label();
|
||||
this.mainSN2Label = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.aux3ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.main3ComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox3 = new System.Windows.Forms.CheckBox();
|
||||
this.auxSN3Label = new System.Windows.Forms.Label();
|
||||
this.mainSN3Label = new System.Windows.Forms.Label();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// 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(589, 33);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(117, 63);
|
||||
this.okButton.TabIndex = 0;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.aux1ComboBox);
|
||||
this.groupBox1.Controls.Add(this.main1ComboBox);
|
||||
this.groupBox1.Controls.Add(this.checkBox1);
|
||||
this.groupBox1.Controls.Add(this.auxSN1Label);
|
||||
this.groupBox1.Controls.Add(this.mainSN1Label);
|
||||
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(28, 118);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(533, 137);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Water Meter 1";
|
||||
this.groupBox1.Visible = false;
|
||||
//
|
||||
// aux1ComboBox
|
||||
//
|
||||
this.aux1ComboBox.FormattingEnabled = true;
|
||||
this.aux1ComboBox.Location = new System.Drawing.Point(287, 83);
|
||||
this.aux1ComboBox.Name = "aux1ComboBox";
|
||||
this.aux1ComboBox.Size = new System.Drawing.Size(175, 31);
|
||||
this.aux1ComboBox.TabIndex = 6;
|
||||
this.aux1ComboBox.Visible = false;
|
||||
this.aux1ComboBox.SelectedIndexChanged += new System.EventHandler(this.aux1ComboBox_SelectedIndexChanged);
|
||||
this.aux1ComboBox.TextChanged += new System.EventHandler(this.aux1ComboBox_TextChanged);
|
||||
this.aux1ComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux1ComboBox_KeyPress);
|
||||
//
|
||||
// main1ComboBox
|
||||
//
|
||||
this.main1ComboBox.FormattingEnabled = true;
|
||||
this.main1ComboBox.Location = new System.Drawing.Point(287, 37);
|
||||
this.main1ComboBox.Name = "main1ComboBox";
|
||||
this.main1ComboBox.Size = new System.Drawing.Size(175, 31);
|
||||
this.main1ComboBox.TabIndex = 5;
|
||||
this.main1ComboBox.Visible = false;
|
||||
this.main1ComboBox.SelectedIndexChanged += new System.EventHandler(this.main1ComboBox_SelectedIndexChanged);
|
||||
this.main1ComboBox.TextChanged += new System.EventHandler(this.main1ComboBox_TextChanged);
|
||||
this.main1ComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main1ComboBox_KeyPress);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Font = new System.Drawing.Font("Verdana", 27.75F);
|
||||
this.checkBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.checkBox1.Location = new System.Drawing.Point(490, 69);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(15, 14);
|
||||
this.checkBox1.TabIndex = 4;
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.Visible = false;
|
||||
//
|
||||
// auxSN1Label
|
||||
//
|
||||
this.auxSN1Label.AutoSize = true;
|
||||
this.auxSN1Label.Location = new System.Drawing.Point(21, 86);
|
||||
this.auxSN1Label.Name = "auxSN1Label";
|
||||
this.auxSN1Label.Size = new System.Drawing.Size(193, 23);
|
||||
this.auxSN1Label.TabIndex = 2;
|
||||
this.auxSN1Label.Text = "Aux. WM Serial Nr.";
|
||||
this.auxSN1Label.Visible = false;
|
||||
//
|
||||
// mainSN1Label
|
||||
//
|
||||
this.mainSN1Label.AutoSize = true;
|
||||
this.mainSN1Label.Location = new System.Drawing.Point(21, 40);
|
||||
this.mainSN1Label.Name = "mainSN1Label";
|
||||
this.mainSN1Label.Size = new System.Drawing.Size(195, 23);
|
||||
this.mainSN1Label.TabIndex = 0;
|
||||
this.mainSN1Label.Text = "Main WM Serial Nr.";
|
||||
this.mainSN1Label.Visible = false;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.aux2ComboBox);
|
||||
this.groupBox2.Controls.Add(this.main2ComboBox);
|
||||
this.groupBox2.Controls.Add(this.checkBox2);
|
||||
this.groupBox2.Controls.Add(this.auxSN2Label);
|
||||
this.groupBox2.Controls.Add(this.mainSN2Label);
|
||||
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(28, 275);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(533, 137);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Water Meter 2";
|
||||
this.groupBox2.Visible = false;
|
||||
//
|
||||
// aux2ComboBox
|
||||
//
|
||||
this.aux2ComboBox.FormattingEnabled = true;
|
||||
this.aux2ComboBox.Location = new System.Drawing.Point(287, 83);
|
||||
this.aux2ComboBox.Name = "aux2ComboBox";
|
||||
this.aux2ComboBox.Size = new System.Drawing.Size(175, 31);
|
||||
this.aux2ComboBox.TabIndex = 10;
|
||||
this.aux2ComboBox.Visible = false;
|
||||
this.aux2ComboBox.SelectedIndexChanged += new System.EventHandler(this.aux2ComboBox_SelectedIndexChanged);
|
||||
this.aux2ComboBox.TextChanged += new System.EventHandler(this.aux2ComboBox_TextChanged);
|
||||
this.aux2ComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux2ComboBox_KeyPress);
|
||||
//
|
||||
// main2ComboBox
|
||||
//
|
||||
this.main2ComboBox.FormattingEnabled = true;
|
||||
this.main2ComboBox.Location = new System.Drawing.Point(287, 37);
|
||||
this.main2ComboBox.Name = "main2ComboBox";
|
||||
this.main2ComboBox.Size = new System.Drawing.Size(175, 31);
|
||||
this.main2ComboBox.TabIndex = 9;
|
||||
this.main2ComboBox.Visible = false;
|
||||
this.main2ComboBox.SelectedIndexChanged += new System.EventHandler(this.main2ComboBox_SelectedIndexChanged);
|
||||
this.main2ComboBox.TextChanged += new System.EventHandler(this.main2ComboBox_TextChanged);
|
||||
this.main2ComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main2ComboBox_KeyPress);
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Font = new System.Drawing.Font("Verdana", 27.75F);
|
||||
this.checkBox2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.checkBox2.Location = new System.Drawing.Point(490, 69);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(15, 14);
|
||||
this.checkBox2.TabIndex = 8;
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
this.checkBox2.Visible = false;
|
||||
//
|
||||
// auxSN2Label
|
||||
//
|
||||
this.auxSN2Label.AutoSize = true;
|
||||
this.auxSN2Label.Location = new System.Drawing.Point(21, 86);
|
||||
this.auxSN2Label.Name = "auxSN2Label";
|
||||
this.auxSN2Label.Size = new System.Drawing.Size(193, 23);
|
||||
this.auxSN2Label.TabIndex = 2;
|
||||
this.auxSN2Label.Text = "Aux. WM Serial Nr.";
|
||||
this.auxSN2Label.Visible = false;
|
||||
//
|
||||
// mainSN2Label
|
||||
//
|
||||
this.mainSN2Label.AutoSize = true;
|
||||
this.mainSN2Label.Location = new System.Drawing.Point(21, 40);
|
||||
this.mainSN2Label.Name = "mainSN2Label";
|
||||
this.mainSN2Label.Size = new System.Drawing.Size(195, 23);
|
||||
this.mainSN2Label.TabIndex = 0;
|
||||
this.mainSN2Label.Text = "Main WM Serial Nr.";
|
||||
this.mainSN2Label.Visible = false;
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.aux3ComboBox);
|
||||
this.groupBox3.Controls.Add(this.main3ComboBox);
|
||||
this.groupBox3.Controls.Add(this.checkBox3);
|
||||
this.groupBox3.Controls.Add(this.auxSN3Label);
|
||||
this.groupBox3.Controls.Add(this.mainSN3Label);
|
||||
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(28, 430);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(533, 137);
|
||||
this.groupBox3.TabIndex = 3;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Water Meter 3";
|
||||
this.groupBox3.Visible = false;
|
||||
//
|
||||
// aux3ComboBox
|
||||
//
|
||||
this.aux3ComboBox.FormattingEnabled = true;
|
||||
this.aux3ComboBox.Location = new System.Drawing.Point(287, 83);
|
||||
this.aux3ComboBox.Name = "aux3ComboBox";
|
||||
this.aux3ComboBox.Size = new System.Drawing.Size(175, 31);
|
||||
this.aux3ComboBox.TabIndex = 10;
|
||||
this.aux3ComboBox.Visible = false;
|
||||
this.aux3ComboBox.SelectedIndexChanged += new System.EventHandler(this.aux3ComboBox_SelectedIndexChanged);
|
||||
this.aux3ComboBox.TextChanged += new System.EventHandler(this.aux3ComboBox_TextChanged);
|
||||
this.aux3ComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.aux3ComboBox_KeyPress);
|
||||
//
|
||||
// main3ComboBox
|
||||
//
|
||||
this.main3ComboBox.FormattingEnabled = true;
|
||||
this.main3ComboBox.Location = new System.Drawing.Point(287, 37);
|
||||
this.main3ComboBox.Name = "main3ComboBox";
|
||||
this.main3ComboBox.Size = new System.Drawing.Size(175, 31);
|
||||
this.main3ComboBox.TabIndex = 9;
|
||||
this.main3ComboBox.Visible = false;
|
||||
this.main3ComboBox.SelectedIndexChanged += new System.EventHandler(this.main3ComboBox_SelectedIndexChanged);
|
||||
this.main3ComboBox.TextChanged += new System.EventHandler(this.main3ComboBox_TextChanged);
|
||||
this.main3ComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.main3ComboBox_KeyPress);
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
this.checkBox3.AutoSize = true;
|
||||
this.checkBox3.Font = new System.Drawing.Font("Verdana", 27.75F);
|
||||
this.checkBox3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.checkBox3.Location = new System.Drawing.Point(490, 68);
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.Size = new System.Drawing.Size(15, 14);
|
||||
this.checkBox3.TabIndex = 8;
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
this.checkBox3.Visible = false;
|
||||
//
|
||||
// auxSN3Label
|
||||
//
|
||||
this.auxSN3Label.AutoSize = true;
|
||||
this.auxSN3Label.Location = new System.Drawing.Point(21, 86);
|
||||
this.auxSN3Label.Name = "auxSN3Label";
|
||||
this.auxSN3Label.Size = new System.Drawing.Size(193, 23);
|
||||
this.auxSN3Label.TabIndex = 2;
|
||||
this.auxSN3Label.Text = "Aux. WM Serial Nr.";
|
||||
this.auxSN3Label.Visible = false;
|
||||
//
|
||||
// mainSN3Label
|
||||
//
|
||||
this.mainSN3Label.AutoSize = true;
|
||||
this.mainSN3Label.Location = new System.Drawing.Point(21, 40);
|
||||
this.mainSN3Label.Name = "mainSN3Label";
|
||||
this.mainSN3Label.Size = new System.Drawing.Size(195, 23);
|
||||
this.mainSN3Label.TabIndex = 0;
|
||||
this.mainSN3Label.Text = "Main WM Serial Nr.";
|
||||
this.mainSN3Label.Visible = false;
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
this.clearButton.Font = new System.Drawing.Font("Verdana", 14.25F);
|
||||
this.clearButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.clearButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.clearButton.Location = new System.Drawing.Point(589, 116);
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.Size = new System.Drawing.Size(117, 63);
|
||||
this.clearButton.TabIndex = 9;
|
||||
this.clearButton.Text = "Clear";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// orderGroupBox
|
||||
//
|
||||
this.orderGroupBox.Controls.Add(this.orderComboBox);
|
||||
this.orderGroupBox.Font = new System.Drawing.Font("Verdana", 14.25F);
|
||||
this.orderGroupBox.ForeColor = System.Drawing.Color.Black;
|
||||
this.orderGroupBox.Location = new System.Drawing.Point(28, 16);
|
||||
this.orderGroupBox.Name = "orderGroupBox";
|
||||
this.orderGroupBox.Size = new System.Drawing.Size(533, 82);
|
||||
this.orderGroupBox.TabIndex = 10;
|
||||
this.orderGroupBox.TabStop = false;
|
||||
this.orderGroupBox.Text = "Order";
|
||||
//
|
||||
// orderComboBox
|
||||
//
|
||||
this.orderComboBox.FormattingEnabled = true;
|
||||
this.orderComboBox.Location = new System.Drawing.Point(165, 30);
|
||||
this.orderComboBox.Name = "orderComboBox";
|
||||
this.orderComboBox.Size = new System.Drawing.Size(297, 31);
|
||||
this.orderComboBox.TabIndex = 0;
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.ClientSize = new System.Drawing.Size(732, 593);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.clearButton);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.Text = "Daten";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label mainSN1Label;
|
||||
private System.Windows.Forms.Label auxSN1Label;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.Label auxSN2Label;
|
||||
private System.Windows.Forms.Label mainSN2Label;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.Label auxSN3Label;
|
||||
private System.Windows.Forms.Label mainSN3Label;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
private System.Windows.Forms.CheckBox checkBox3;
|
||||
private System.Windows.Forms.GroupBox orderGroupBox;
|
||||
private System.Windows.Forms.ComboBox orderComboBox;
|
||||
private System.Windows.Forms.ComboBox aux1ComboBox;
|
||||
private System.Windows.Forms.ComboBox main1ComboBox;
|
||||
private System.Windows.Forms.ComboBox aux2ComboBox;
|
||||
private System.Windows.Forms.ComboBox main2ComboBox;
|
||||
private System.Windows.Forms.ComboBox aux3ComboBox;
|
||||
private System.Windows.Forms.ComboBox main3ComboBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
#pragma warning disable 162 /// Disables 'Unreachable code detected' warning
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
public partial class CycleBeginningForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleBeginningForm));
|
||||
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public string PurchaseOrder;
|
||||
public string[] MainSNText;
|
||||
public string[] AuxSNText;
|
||||
public bool[] Disabled;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
int TextBoxesCount;
|
||||
Label[] mainLabels;
|
||||
Label[] auxLabels;
|
||||
ComboBox[] mainComboBoxes;
|
||||
ComboBox[] auxComboBoxes;
|
||||
CheckBox[] checkBoxes;
|
||||
IList<ComboBox> enabledComboBoxes;
|
||||
|
||||
|
||||
public CycleBeginningForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
TextBoxesCount = 3;
|
||||
mainLabels = new Label[] { mainSN1Label, mainSN2Label, mainSN3Label };
|
||||
auxLabels = new Label[] { auxSN1Label, auxSN2Label, auxSN3Label };
|
||||
mainComboBoxes = new ComboBox[] { main1ComboBox, main2ComboBox, main3ComboBox };
|
||||
auxComboBoxes = new ComboBox[] { aux1ComboBox, aux2ComboBox, aux3ComboBox };
|
||||
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3 };
|
||||
enabledComboBoxes = new List<ComboBox>();
|
||||
|
||||
this.WaterMetersCount = Config.Data.CompoundWMsCount; /// Default number of compound water meters
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="compoundWaterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(int compoundWaterMetersCount)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = compoundWaterMetersCount; /// = Program.CompondWMsCount
|
||||
MainSNText = new string[compoundWaterMetersCount];
|
||||
AuxSNText = new string[compoundWaterMetersCount];
|
||||
Disabled = new bool[compoundWaterMetersCount];
|
||||
|
||||
ShuffleTextBoxes(compoundWaterMetersCount);
|
||||
|
||||
Height = 110 + WaterMetersCount * 157;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure the layout of labels/text boxes on the screen
|
||||
/// corresponds to the layout of watermeters of the test bench.
|
||||
/// </summary>
|
||||
/// <param name="compoundWMsCount">Numebr of combined watermeters</param>
|
||||
void ShuffleTextBoxes(int compoundWMsCount)
|
||||
{
|
||||
if (compoundWMsCount < TextBoxesCount) TextBoxesCount = compoundWMsCount;
|
||||
}
|
||||
|
||||
private void CycleBeginningForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
PrepareOrderCombo(orderComboBox);
|
||||
|
||||
if (WaterMetersCount >= 1) groupBox1.Visible = true;
|
||||
if (WaterMetersCount >= 2) groupBox2.Visible = true;
|
||||
if (WaterMetersCount >= 3) groupBox3.Visible = true;
|
||||
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
mainLabels[i].Visible = mainComboBoxes[i].Visible = true;
|
||||
auxLabels[i].Visible = auxComboBoxes[i].Visible = true;
|
||||
checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(mainComboBoxes[i]);
|
||||
enabledComboBoxes.Add(auxComboBoxes[i]);
|
||||
|
||||
if (Program.LocalSettings.LastMainSNTextsCount == TextBoxesCount &&
|
||||
Program.LocalSettings.LastAuxSNTextsCount == TextBoxesCount)
|
||||
{
|
||||
mainComboBoxes[i].Items.Add((Program.LocalSettings.LastMainSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastMainSNTexts[i]);
|
||||
auxComboBoxes[i].Items.Add((Program.LocalSettings.LastAuxSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastAuxSNTexts[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
orderGroupBox.Text = Strings.Purchase_order;
|
||||
groupBox1.Text = Strings.Water_Meter + " 1";
|
||||
groupBox2.Text = Strings.Water_Meter + " 2";
|
||||
groupBox3.Text = Strings.Water_Meter + " 3";
|
||||
mainSN1Label.Text = Strings.Main_WM_SerialNr;
|
||||
mainSN2Label.Text = Strings.Main_WM_SerialNr;
|
||||
mainSN3Label.Text = Strings.Main_WM_SerialNr;
|
||||
auxSN1Label.Text = Strings.Aux_WM_SerialNr;
|
||||
auxSN2Label.Text = Strings.Aux_WM_SerialNr;
|
||||
auxSN3Label.Text = Strings.Aux_WM_SerialNr;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
clearButton.Text = Strings.ClearBtnText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
/// <param name="orderComboBox">Puchase order ComboBox</param>
|
||||
void PrepareOrderCombo(ComboBox orderComboBox)
|
||||
{
|
||||
for (int i = 0; i < Program.LocalSettings.PurchaseOrderHistoryCount; i++)
|
||||
{
|
||||
orderComboBox.Items.Add(Program.LocalSettings.PurchaseOrderHistory[i]);
|
||||
}
|
||||
|
||||
if (orderComboBox.Items.Count > 0)
|
||||
{
|
||||
orderComboBox.Text = orderComboBox.Items[0].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
Program.LocalSettings.LastMainSNTexts = MainSNText;
|
||||
Program.LocalSettings.LastAuxSNTexts = AuxSNText;
|
||||
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
MainSNText[i] = mainComboBoxes[i].Text;
|
||||
AuxSNText[i] = auxComboBoxes[i].Text;
|
||||
Disabled[i] = !checkBoxes[i].Checked;
|
||||
}
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
mainComboBoxes[i].Text = string.Empty;
|
||||
auxComboBoxes[i].Text = string.Empty;
|
||||
checkBoxes[i].Checked = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// When one combo box is updated using drop-down menu, all combo boxes
|
||||
/// are updated by this function.
|
||||
/// </summary>
|
||||
private void UpdateAllCombos()
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
mainComboBoxes[i].Text = Program.LocalSettings.LastMainSNTexts[i];
|
||||
auxComboBoxes[i].Text = Program.LocalSettings.LastAuxSNTexts[i];
|
||||
checkBoxes[i].Checked = !string.IsNullOrEmpty(mainComboBoxes[i].Text)
|
||||
|| !string.IsNullOrEmpty(auxComboBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void main1ComboBox_TextChanged(object sender, EventArgs e) { checkBox1.Checked = true; }
|
||||
private void main1ComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastMainSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (main1ComboBox.Text.Equals(main1ComboBox.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void aux1ComboBox_TextChanged(object sender, EventArgs e) { checkBox1.Checked = true; }
|
||||
private void aux1ComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastAuxSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (aux1ComboBox.Text.Equals(aux1ComboBox.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void main2ComboBox_TextChanged(object sender, EventArgs e) { checkBox2.Checked = true; }
|
||||
private void main2ComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastMainSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (main2ComboBox.Text.Equals(main2ComboBox.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void aux2ComboBox_TextChanged(object sender, EventArgs e) { checkBox2.Checked = true; }
|
||||
private void aux2ComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastAuxSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (aux2ComboBox.Text.Equals(aux2ComboBox.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void main3ComboBox_TextChanged(object sender, EventArgs e) { checkBox3.Checked = true; }
|
||||
private void main3ComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastMainSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (main3ComboBox.Text.Equals(main3ComboBox.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void aux3ComboBox_TextChanged(object sender, EventArgs e) { checkBox3.Checked = true; }
|
||||
private void aux3ComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastAuxSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (aux3ComboBox.Text.Equals(aux3ComboBox.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#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>
|
||||
/// 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, ComboBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledComboBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledComboBoxes.Count; i++)
|
||||
{
|
||||
if (enabledComboBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledComboBoxes[(i + 1) % enabledComboBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void main1ComboBox_KeyPress(object sender, KeyPressEventArgs e) { ProcKeyPress(sender, e, main1ComboBox); }
|
||||
private void main2ComboBox_KeyPress(object sender, KeyPressEventArgs e) { ProcKeyPress(sender, e, main2ComboBox); }
|
||||
private void main3ComboBox_KeyPress(object sender, KeyPressEventArgs e) { ProcKeyPress(sender, e, main3ComboBox); }
|
||||
private void aux1ComboBox_KeyPress(object sender, KeyPressEventArgs e) { ProcKeyPress(sender, e, aux1ComboBox); }
|
||||
private void aux2ComboBox_KeyPress(object sender, KeyPressEventArgs e) { ProcKeyPress(sender, e, aux2ComboBox); }
|
||||
private void aux3ComboBox_KeyPress(object sender, KeyPressEventArgs e) { ProcKeyPress(sender, e, aux3ComboBox); }
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,443 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
partial class CycleEndForm
|
||||
{
|
||||
/// <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.mainState1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState1Label = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.qFall1Label = new System.Windows.Forms.Label();
|
||||
this.qFall1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qRise1Label = new System.Windows.Forms.Label();
|
||||
this.qRise1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxState1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxState1Label = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.protocolGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.radioButton3 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.qFall2Label = new System.Windows.Forms.Label();
|
||||
this.qFall2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qRise2Label = new System.Windows.Forms.Label();
|
||||
this.qRise2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState2Label = new System.Windows.Forms.Label();
|
||||
this.auxState2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxState2Label = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.qFall3Label = new System.Windows.Forms.Label();
|
||||
this.qFall3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qRise3Label = new System.Windows.Forms.Label();
|
||||
this.qRise3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState3Label = new System.Windows.Forms.Label();
|
||||
this.auxState3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxState3Label = new System.Windows.Forms.Label();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.protocolGroupBox.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// mainState1TextBox
|
||||
//
|
||||
this.mainState1TextBox.Location = new System.Drawing.Point(211, 42);
|
||||
this.mainState1TextBox.Name = "mainState1TextBox";
|
||||
this.mainState1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.mainState1TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainState1Label
|
||||
//
|
||||
this.mainState1Label.AutoSize = true;
|
||||
this.mainState1Label.Location = new System.Drawing.Point(18, 45);
|
||||
this.mainState1Label.Name = "mainState1Label";
|
||||
this.mainState1Label.Size = new System.Drawing.Size(153, 23);
|
||||
this.mainState1Label.TabIndex = 0;
|
||||
this.mainState1Label.Text = "Main WM State";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.qFall1Label);
|
||||
this.groupBox1.Controls.Add(this.qFall1TextBox);
|
||||
this.groupBox1.Controls.Add(this.qRise1Label);
|
||||
this.groupBox1.Controls.Add(this.qRise1TextBox);
|
||||
this.groupBox1.Controls.Add(this.mainState1TextBox);
|
||||
this.groupBox1.Controls.Add(this.mainState1Label);
|
||||
this.groupBox1.Controls.Add(this.auxState1TextBox);
|
||||
this.groupBox1.Controls.Add(this.auxState1Label);
|
||||
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, 23);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(375, 237);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Water Meter 1";
|
||||
//
|
||||
// qFall1Label
|
||||
//
|
||||
this.qFall1Label.AutoSize = true;
|
||||
this.qFall1Label.Location = new System.Drawing.Point(18, 184);
|
||||
this.qFall1Label.Name = "qFall1Label";
|
||||
this.qFall1Label.Size = new System.Drawing.Size(55, 23);
|
||||
this.qFall1Label.TabIndex = 6;
|
||||
this.qFall1Label.Text = "Qfall";
|
||||
//
|
||||
// qFall1TextBox
|
||||
//
|
||||
this.qFall1TextBox.Location = new System.Drawing.Point(211, 177);
|
||||
this.qFall1TextBox.Name = "qFall1TextBox";
|
||||
this.qFall1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qFall1TextBox.TabIndex = 7;
|
||||
//
|
||||
// qRise1Label
|
||||
//
|
||||
this.qRise1Label.AutoSize = true;
|
||||
this.qRise1Label.Location = new System.Drawing.Point(18, 135);
|
||||
this.qRise1Label.Name = "qRise1Label";
|
||||
this.qRise1Label.Size = new System.Drawing.Size(60, 23);
|
||||
this.qRise1Label.TabIndex = 4;
|
||||
this.qRise1Label.Text = "Qrise";
|
||||
//
|
||||
// qRise1TextBox
|
||||
//
|
||||
this.qRise1TextBox.Location = new System.Drawing.Point(211, 132);
|
||||
this.qRise1TextBox.Name = "qRise1TextBox";
|
||||
this.qRise1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qRise1TextBox.TabIndex = 5;
|
||||
//
|
||||
// auxState1TextBox
|
||||
//
|
||||
this.auxState1TextBox.Location = new System.Drawing.Point(211, 87);
|
||||
this.auxState1TextBox.Name = "auxState1TextBox";
|
||||
this.auxState1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.auxState1TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxState1Label
|
||||
//
|
||||
this.auxState1Label.AutoSize = true;
|
||||
this.auxState1Label.Location = new System.Drawing.Point(18, 90);
|
||||
this.auxState1Label.Name = "auxState1Label";
|
||||
this.auxState1Label.Size = new System.Drawing.Size(151, 23);
|
||||
this.auxState1Label.TabIndex = 2;
|
||||
this.auxState1Label.Text = "Aux. WM 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(699, 33);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(98, 63);
|
||||
this.okButton.TabIndex = 0;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// protocolGroupBox
|
||||
//
|
||||
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.Name = "protocolGroupBox";
|
||||
this.protocolGroupBox.Size = new System.Drawing.Size(375, 142);
|
||||
this.protocolGroupBox.TabIndex = 4;
|
||||
this.protocolGroupBox.TabStop = false;
|
||||
this.protocolGroupBox.Text = "Protocol";
|
||||
//
|
||||
// radioButton3
|
||||
//
|
||||
this.radioButton3.AutoSize = true;
|
||||
this.radioButton3.Location = new System.Drawing.Point(34, 100);
|
||||
this.radioButton3.Name = "radioButton3";
|
||||
this.radioButton3.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton3.TabIndex = 2;
|
||||
this.radioButton3.Text = "radioButton3";
|
||||
this.radioButton3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(34, 67);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton2.TabIndex = 1;
|
||||
this.radioButton2.Text = "radioButton2";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Checked = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(34, 34);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton1.TabIndex = 0;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "radioButton1";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.qFall2Label);
|
||||
this.groupBox2.Controls.Add(this.qFall2TextBox);
|
||||
this.groupBox2.Controls.Add(this.qRise2Label);
|
||||
this.groupBox2.Controls.Add(this.qRise2TextBox);
|
||||
this.groupBox2.Controls.Add(this.mainState2TextBox);
|
||||
this.groupBox2.Controls.Add(this.mainState2Label);
|
||||
this.groupBox2.Controls.Add(this.auxState2TextBox);
|
||||
this.groupBox2.Controls.Add(this.auxState2Label);
|
||||
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, 282);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(375, 237);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Water Meter 2";
|
||||
//
|
||||
// qFall2Label
|
||||
//
|
||||
this.qFall2Label.AutoSize = true;
|
||||
this.qFall2Label.Location = new System.Drawing.Point(18, 184);
|
||||
this.qFall2Label.Name = "qFall2Label";
|
||||
this.qFall2Label.Size = new System.Drawing.Size(55, 23);
|
||||
this.qFall2Label.TabIndex = 6;
|
||||
this.qFall2Label.Text = "Qfall";
|
||||
//
|
||||
// qFall2TextBox
|
||||
//
|
||||
this.qFall2TextBox.Location = new System.Drawing.Point(211, 177);
|
||||
this.qFall2TextBox.Name = "qFall2TextBox";
|
||||
this.qFall2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qFall2TextBox.TabIndex = 7;
|
||||
//
|
||||
// qRise2Label
|
||||
//
|
||||
this.qRise2Label.AutoSize = true;
|
||||
this.qRise2Label.Location = new System.Drawing.Point(18, 135);
|
||||
this.qRise2Label.Name = "qRise2Label";
|
||||
this.qRise2Label.Size = new System.Drawing.Size(60, 23);
|
||||
this.qRise2Label.TabIndex = 4;
|
||||
this.qRise2Label.Text = "Qrise";
|
||||
//
|
||||
// qRise2TextBox
|
||||
//
|
||||
this.qRise2TextBox.Location = new System.Drawing.Point(211, 132);
|
||||
this.qRise2TextBox.Name = "qRise2TextBox";
|
||||
this.qRise2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qRise2TextBox.TabIndex = 5;
|
||||
//
|
||||
// mainState2TextBox
|
||||
//
|
||||
this.mainState2TextBox.Location = new System.Drawing.Point(211, 42);
|
||||
this.mainState2TextBox.Name = "mainState2TextBox";
|
||||
this.mainState2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.mainState2TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainState2Label
|
||||
//
|
||||
this.mainState2Label.AutoSize = true;
|
||||
this.mainState2Label.Location = new System.Drawing.Point(17, 45);
|
||||
this.mainState2Label.Name = "mainState2Label";
|
||||
this.mainState2Label.Size = new System.Drawing.Size(153, 23);
|
||||
this.mainState2Label.TabIndex = 0;
|
||||
this.mainState2Label.Text = "Main WM State";
|
||||
//
|
||||
// auxState2TextBox
|
||||
//
|
||||
this.auxState2TextBox.Location = new System.Drawing.Point(211, 87);
|
||||
this.auxState2TextBox.Name = "auxState2TextBox";
|
||||
this.auxState2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.auxState2TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxState2Label
|
||||
//
|
||||
this.auxState2Label.AutoSize = true;
|
||||
this.auxState2Label.Location = new System.Drawing.Point(18, 90);
|
||||
this.auxState2Label.Name = "auxState2Label";
|
||||
this.auxState2Label.Size = new System.Drawing.Size(151, 23);
|
||||
this.auxState2Label.TabIndex = 2;
|
||||
this.auxState2Label.Text = "Aux. WM State";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.qFall3Label);
|
||||
this.groupBox3.Controls.Add(this.qFall3TextBox);
|
||||
this.groupBox3.Controls.Add(this.qRise3Label);
|
||||
this.groupBox3.Controls.Add(this.qRise3TextBox);
|
||||
this.groupBox3.Controls.Add(this.mainState3TextBox);
|
||||
this.groupBox3.Controls.Add(this.mainState3Label);
|
||||
this.groupBox3.Controls.Add(this.auxState3TextBox);
|
||||
this.groupBox3.Controls.Add(this.auxState3Label);
|
||||
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(422, 282);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(375, 237);
|
||||
this.groupBox3.TabIndex = 3;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Water Meter 3";
|
||||
//
|
||||
// qFall3Label
|
||||
//
|
||||
this.qFall3Label.AutoSize = true;
|
||||
this.qFall3Label.Location = new System.Drawing.Point(18, 184);
|
||||
this.qFall3Label.Name = "qFall3Label";
|
||||
this.qFall3Label.Size = new System.Drawing.Size(55, 23);
|
||||
this.qFall3Label.TabIndex = 6;
|
||||
this.qFall3Label.Text = "Qfall";
|
||||
//
|
||||
// qFall3TextBox
|
||||
//
|
||||
this.qFall3TextBox.Location = new System.Drawing.Point(211, 177);
|
||||
this.qFall3TextBox.Name = "qFall3TextBox";
|
||||
this.qFall3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qFall3TextBox.TabIndex = 7;
|
||||
//
|
||||
// qRise3Label
|
||||
//
|
||||
this.qRise3Label.AutoSize = true;
|
||||
this.qRise3Label.Location = new System.Drawing.Point(18, 135);
|
||||
this.qRise3Label.Name = "qRise3Label";
|
||||
this.qRise3Label.Size = new System.Drawing.Size(60, 23);
|
||||
this.qRise3Label.TabIndex = 4;
|
||||
this.qRise3Label.Text = "Qrise";
|
||||
//
|
||||
// qRise3TextBox
|
||||
//
|
||||
this.qRise3TextBox.Location = new System.Drawing.Point(211, 132);
|
||||
this.qRise3TextBox.Name = "qRise3TextBox";
|
||||
this.qRise3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qRise3TextBox.TabIndex = 5;
|
||||
//
|
||||
// mainState3TextBox
|
||||
//
|
||||
this.mainState3TextBox.Location = new System.Drawing.Point(211, 42);
|
||||
this.mainState3TextBox.Name = "mainState3TextBox";
|
||||
this.mainState3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.mainState3TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainState3Label
|
||||
//
|
||||
this.mainState3Label.AutoSize = true;
|
||||
this.mainState3Label.Location = new System.Drawing.Point(18, 45);
|
||||
this.mainState3Label.Name = "mainState3Label";
|
||||
this.mainState3Label.Size = new System.Drawing.Size(153, 23);
|
||||
this.mainState3Label.TabIndex = 0;
|
||||
this.mainState3Label.Text = "Main WM State";
|
||||
//
|
||||
// auxState3TextBox
|
||||
//
|
||||
this.auxState3TextBox.Location = new System.Drawing.Point(211, 87);
|
||||
this.auxState3TextBox.Name = "auxState3TextBox";
|
||||
this.auxState3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.auxState3TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxState3Label
|
||||
//
|
||||
this.auxState3Label.AutoSize = true;
|
||||
this.auxState3Label.Location = new System.Drawing.Point(18, 90);
|
||||
this.auxState3Label.Name = "auxState3Label";
|
||||
this.auxState3Label.Size = new System.Drawing.Size(151, 23);
|
||||
this.auxState3Label.TabIndex = 2;
|
||||
this.auxState3Label.Text = "Aux. WM 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(822, 542);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.protocolGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleEndForm";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Text = "Daten";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleEndForm_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.protocolGroupBox.ResumeLayout(false);
|
||||
this.protocolGroupBox.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox mainState1TextBox;
|
||||
private System.Windows.Forms.Label mainState1Label;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox auxState1TextBox;
|
||||
private System.Windows.Forms.Label auxState1Label;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox protocolGroupBox;
|
||||
private System.Windows.Forms.RadioButton radioButton3;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.Label qFall1Label;
|
||||
private System.Windows.Forms.TextBox qFall1TextBox;
|
||||
private System.Windows.Forms.Label qRise1Label;
|
||||
private System.Windows.Forms.TextBox qRise1TextBox;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.Label qFall2Label;
|
||||
private System.Windows.Forms.TextBox qFall2TextBox;
|
||||
private System.Windows.Forms.Label qRise2Label;
|
||||
private System.Windows.Forms.TextBox qRise2TextBox;
|
||||
private System.Windows.Forms.TextBox mainState2TextBox;
|
||||
private System.Windows.Forms.Label mainState2Label;
|
||||
private System.Windows.Forms.TextBox auxState2TextBox;
|
||||
private System.Windows.Forms.Label auxState2Label;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.Label qFall3Label;
|
||||
private System.Windows.Forms.TextBox qFall3TextBox;
|
||||
private System.Windows.Forms.Label qRise3Label;
|
||||
private System.Windows.Forms.TextBox qRise3TextBox;
|
||||
private System.Windows.Forms.TextBox mainState3TextBox;
|
||||
private System.Windows.Forms.Label mainState3Label;
|
||||
private System.Windows.Forms.TextBox auxState3TextBox;
|
||||
private System.Windows.Forms.Label auxState3Label;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
#pragma warning disable 162 /// Disables 'Unreachable code detected' warning
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
public partial class CycleEndForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleEndForm));
|
||||
|
||||
// To be set before the form opens
|
||||
public string ProtocolName1;
|
||||
public string ProtocolName2;
|
||||
public string ProtocolName3;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public string[] MainStateText;
|
||||
public string[] AuxStateText;
|
||||
public float[] QRise;
|
||||
public float[] QFall;
|
||||
public string ProtocolTitle;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
public CycleEndForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
MainStateText = new string[Config.Data.CompoundWMsCount];
|
||||
AuxStateText = new string[Config.Data.CompoundWMsCount];
|
||||
QRise = new float[Config.Data.CompoundWMsCount];
|
||||
QFall = new float[Config.Data.CompoundWMsCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
protocolGroupBox.Text = Strings.Protocol;
|
||||
groupBox1.Text = Strings.Water_Meter + " 1";
|
||||
mainState1Label.Text = Strings.Main_Water_Meter_State;
|
||||
auxState1Label.Text = Strings.Aux_Water_Meter_State;
|
||||
qRise1Label.Text = Strings.Qrise;
|
||||
qFall1Label.Text = Strings.Qfall;
|
||||
|
||||
groupBox2.Text = Strings.Water_Meter + " 2";
|
||||
mainState2Label.Text = Strings.Main_Water_Meter_State;
|
||||
auxState2Label.Text = Strings.Aux_Water_Meter_State;
|
||||
qRise2Label.Text = Strings.Qrise;
|
||||
qFall2Label.Text = Strings.Qfall;
|
||||
|
||||
groupBox3.Text = Strings.Water_Meter + " 3";
|
||||
mainState3Label.Text = Strings.Main_Water_Meter_State;
|
||||
auxState3Label.Text = Strings.Aux_Water_Meter_State;
|
||||
qRise3Label.Text = Strings.Qrise;
|
||||
qFall3Label.Text = Strings.Qfall;
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
radioButton1.Text = ProtocolName1;
|
||||
radioButton2.Text = ProtocolName2;
|
||||
radioButton3.Text = ProtocolName3;
|
||||
|
||||
qRise1TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall1TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 2)
|
||||
{
|
||||
qRise2TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall2TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
groupBox2.Visible = false;
|
||||
Height = 305;
|
||||
}
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 3)
|
||||
{
|
||||
qRise3TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall3TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
groupBox3.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
float ftmp;
|
||||
bool allOK = true;
|
||||
|
||||
MainStateText[0] = mainState1TextBox.Text;
|
||||
AuxStateText[0] = auxState1TextBox.Text;
|
||||
if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; }
|
||||
if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; }
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 2)
|
||||
{
|
||||
MainStateText[1] = mainState2TextBox.Text;
|
||||
AuxStateText[1] = auxState2TextBox.Text;
|
||||
if (Utils.TryParseUFloat(qRise2TextBox.Text, out ftmp)) { QRise[1] = ftmp; } else { allOK = false; }
|
||||
if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; }
|
||||
}
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 3)
|
||||
{
|
||||
MainStateText[2] = mainState3TextBox.Text;
|
||||
AuxStateText[2] = auxState3TextBox.Text;
|
||||
if (Utils.TryParseUFloat(qRise3TextBox.Text, out ftmp)) { QRise[2] = ftmp; } else { allOK = false; }
|
||||
if (Utils.TryParseUFloat(qFall3TextBox.Text, out ftmp)) { QFall[2] = ftmp; } else { allOK = false; }
|
||||
}
|
||||
|
||||
if (radioButton1.Checked) ProtocolTitle = ProtocolName1;
|
||||
else if (radioButton2.Checked) ProtocolTitle = ProtocolName2;
|
||||
else if (radioButton3.Checked) ProtocolTitle = ProtocolName3;
|
||||
|
||||
if (allOK)
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
<?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>
|
||||
<metadata name="mainState1TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainState1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="qFall1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<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="okButton.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">
|
||||
<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="groupBox2.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>
|
||||
<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>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,281 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString() { return string.Format("DataEntry.Combined({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin and the End form
|
||||
/// </summary>
|
||||
string purchaseOrder;
|
||||
public string PurchaseOrder { get { return purchaseOrder; } }
|
||||
|
||||
bool[] disabled; /// This array is shared between forms
|
||||
|
||||
string[] wmCycleEndState;
|
||||
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
|
||||
|
||||
double[] wmStartState;
|
||||
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
|
||||
|
||||
double[] wmEndState;
|
||||
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
|
||||
|
||||
string[] wmStartStateStr;
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
ShowFormAtCycleBeginning,
|
||||
ShowFormAtCycleEnd,
|
||||
EnterTestStartStates,
|
||||
EnterTestEndStates,
|
||||
}
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.CompoundWMsCount];
|
||||
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
|
||||
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
return this;
|
||||
}
|
||||
|
||||
delegate void EntryFormDlgt(EntryForm myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(Config.Data.CompoundWMsCount);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryForm myRef)
|
||||
{
|
||||
CycleEndForm endForm = new CycleEndForm();
|
||||
myRef.modelessDlg = endForm;
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.CompoundWMsCount, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
string[] mainStartStateStr = new string[Config.Data.CompoundWMsCount];
|
||||
string[] auxStartStateStr = new string[Config.Data.CompoundWMsCount];
|
||||
for (int i = 0; i < Config.Data.CompoundWMsCount; i++)
|
||||
{
|
||||
mainStartStateStr[i] = wmStartStateStr[2 * i];
|
||||
auxStartStateStr[i] = wmStartStateStr[2 * i + 1];
|
||||
}
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.CompoundWMsCount, myRef.regReaders, mainStartStateStr, auxStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
resultSaved = false;
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
break;
|
||||
case CurrentOp.ShowFormAtCycleEnd:
|
||||
if (entryFormCfg.ShowCycleEndForm)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.EnterTestStartStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||
break;
|
||||
case CurrentOp.EnterTestEndStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
{
|
||||
return Event.ModelessFormIsOpen;
|
||||
}
|
||||
|
||||
if (!resultSaved) /// This is to save the result only once
|
||||
{
|
||||
if (currentOp == CurrentOp.ShowFormAtCycleBeginning)
|
||||
{
|
||||
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
|
||||
|
||||
if (dlg != null)
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
waterMeters[i].SerialNr = dlg.MainSNText[i];
|
||||
waterMeters[i].SerialNrAux = dlg.AuxSNText[i];
|
||||
|
||||
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
//CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
//int count = waterMeters.Count;
|
||||
//if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
//for (int i = 0; i < count; i++)
|
||||
//{
|
||||
// if (waterMeters[i] != null)
|
||||
// {
|
||||
// /// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
|
||||
// wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
|
||||
{
|
||||
/// Fixed start test - start
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmStartState[2 * i] = dlg.MainStartState[i];
|
||||
wmStartStateStr[2 * i] = dlg.MainStartStateStr[i];
|
||||
wmStartState[2 * i + 1] = dlg.AuxStartState[i];
|
||||
wmStartStateStr[2 * i + 1] = dlg.AuxStartStateStr[i];
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
|
||||
{
|
||||
/// Fixed start test - end
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmEndState[2 * i] = dlg.MainEndState[i];
|
||||
wmEndState[2 * i + 1] = dlg.AuxEndState[i];
|
||||
}
|
||||
}
|
||||
resultSaved = true;
|
||||
modelessDlg = null;
|
||||
}
|
||||
|
||||
return Event.ModelessFormClosed; /// Form closed
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
if (modelessDlg is IHasCompleted)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null);
|
||||
modelessDlg = null;
|
||||
}
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates test results with the information collected in watermeters.
|
||||
/// </summary>
|
||||
/// <param name="batchResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(Results.BatchResults batchResults)
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public bool ShowCycleEndForm;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
{
|
||||
Name = "DataEntry-Combined";
|
||||
ParentName = string.Empty;
|
||||
ShowCycleEndForm = false;
|
||||
}
|
||||
|
||||
public EntryFormCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, ShowEndForm={1}", Name, ShowCycleEndForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as EntryFormCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public EntryFormCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
showCycleEndFormCheckBox.Text = Strings.Show_cycle_end_form;
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
showCycleEndFormCheckBox.Checked = config.ShowCycleEndForm;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
showCycleEndFormCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ShowCycleEndForm = showCycleEndFormCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
partial class EntryFormCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.showCycleEndFormCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// showCycleEndFormCheckBox
|
||||
//
|
||||
this.showCycleEndFormCheckBox.AutoSize = true;
|
||||
this.showCycleEndFormCheckBox.Enabled = false;
|
||||
this.showCycleEndFormCheckBox.Location = new System.Drawing.Point(137, 90);
|
||||
this.showCycleEndFormCheckBox.Name = "showCycleEndFormCheckBox";
|
||||
this.showCycleEndFormCheckBox.Size = new System.Drawing.Size(125, 17);
|
||||
this.showCycleEndFormCheckBox.TabIndex = 14;
|
||||
this.showCycleEndFormCheckBox.Text = "Show cycle end form";
|
||||
this.showCycleEndFormCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.showCycleEndFormCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.CheckBox showCycleEndFormCheckBox;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
public class EntryFormFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntry-Combined"; } }
|
||||
|
||||
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(EntryFormCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,426 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
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 IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] MainStartState;
|
||||
public double[] AuxStartState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] MainStartStateStr;
|
||||
public readonly string[] AuxStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] MainEndState;
|
||||
public double[] AuxEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double 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();
|
||||
ControlBox = false;
|
||||
|
||||
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, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
MainStartState = new double[waterMetersCount];
|
||||
AuxStartState = new double[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, IRegisterReader[] regReaders, string[] mainStartStateStr, string[] auxStartStateStr,
|
||||
bool[] disabled, double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
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 double[waterMetersCount];
|
||||
AuxEndState = new double[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 (Config.Data.CompoundWMsCount < TextBoxesCount)
|
||||
{
|
||||
TextBoxesCount = Config.Data.CompoundWMsCount;
|
||||
}
|
||||
}
|
||||
|
||||
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) groupBox3.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";
|
||||
groupBox3.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.ParseUDouble(mainEndTextBoxes[i].Text);
|
||||
}
|
||||
if (auxEndTextBoxes[i].Visible && auxEndTextBoxes[i].Enabled)
|
||||
{
|
||||
AuxEndState[i] = Utils.ParseUDouble(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.ParseUDouble(mainStartTextBoxes[i].Text);
|
||||
}
|
||||
if (auxStartTextBoxes[i].Visible && auxStartTextBoxes[i].Enabled)
|
||||
{
|
||||
AuxStartStateStr[i] = auxStartTextBoxes[i].Text;
|
||||
AuxStartState[i] = Utils.ParseUDouble(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)
|
||||
{
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// double endState = Utils.ParseUDouble(main1EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(main1StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { };
|
||||
|
||||
//main1Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void aux1EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// double endState = Utils.ParseUDouble(aux1EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(aux1StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
//aux1Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void main2EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// double endState = Utils.ParseUDouble(main2EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(main2StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
//main2Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void aux2EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// double endState = Utils.ParseUDouble(aux2EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(aux2StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
//aux2Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void main3EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// double endState = Utils.ParseUDouble(main3EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(main3StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
//main3Exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void aux3EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// double endState = Utils.ParseUDouble(aux3EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(aux3StartTextBox.Text);
|
||||
// err = 100.0 * (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); }
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,730 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
partial class CycleBeginningForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.checkBox3 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox3 = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox4 = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.checkBox5 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox5 = new System.Windows.Forms.ComboBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.checkBox6 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox6 = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.checkBox7 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox7 = new System.Windows.Forms.ComboBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox8 = new System.Windows.Forms.ComboBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.checkBox9 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox9 = new System.Windows.Forms.ComboBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.checkBox10 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox10 = new System.Windows.Forms.ComboBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.checkBox11 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox11 = new System.Windows.Forms.ComboBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.checkBox12 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox12 = new System.Windows.Forms.ComboBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.extensionsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.remarkTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.snSuffixTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.snPrefixTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.idNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.ext4Label = new System.Windows.Forms.Label();
|
||||
this.ext4TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext3Label = new System.Windows.Forms.Label();
|
||||
this.ext3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext2Label = new System.Windows.Forms.Label();
|
||||
this.ext2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext1Label = new System.Windows.Forms.Label();
|
||||
this.ext1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.autoSNButton = new System.Windows.Forms.Button();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox5 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox7 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox8 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox9 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox10 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox11 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox12 = new System.Windows.Forms.PictureBox();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
this.extensionsGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// orderGroupBox
|
||||
//
|
||||
this.orderGroupBox.Controls.Add(this.orderComboBox);
|
||||
resources.ApplyResources(this.orderGroupBox, "orderGroupBox");
|
||||
this.orderGroupBox.ForeColor = System.Drawing.Color.Black;
|
||||
this.orderGroupBox.Name = "orderGroupBox";
|
||||
this.orderGroupBox.TabStop = false;
|
||||
//
|
||||
// orderComboBox
|
||||
//
|
||||
this.orderComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.orderComboBox, "orderComboBox");
|
||||
this.orderComboBox.Name = "orderComboBox";
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
resources.ApplyResources(this.clearButton, "clearButton");
|
||||
this.clearButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
resources.ApplyResources(this.comboBox1, "comboBox1");
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);
|
||||
this.comboBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox1_KeyPress);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
resources.ApplyResources(this.checkBox1, "checkBox1");
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
resources.ApplyResources(this.checkBox2, "checkBox2");
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
resources.ApplyResources(this.comboBox2, "comboBox2");
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
|
||||
this.comboBox2.TextChanged += new System.EventHandler(this.comboBox2_TextChanged);
|
||||
this.comboBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox2_KeyPress);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
resources.ApplyResources(this.checkBox3, "checkBox3");
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox3
|
||||
//
|
||||
resources.ApplyResources(this.comboBox3, "comboBox3");
|
||||
this.comboBox3.FormattingEnabled = true;
|
||||
this.comboBox3.Name = "comboBox3";
|
||||
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
|
||||
this.comboBox3.TextChanged += new System.EventHandler(this.comboBox3_TextChanged);
|
||||
this.comboBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox3_KeyPress);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
resources.ApplyResources(this.checkBox4, "checkBox4");
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox4
|
||||
//
|
||||
resources.ApplyResources(this.comboBox4, "comboBox4");
|
||||
this.comboBox4.FormattingEnabled = true;
|
||||
this.comboBox4.Name = "comboBox4";
|
||||
this.comboBox4.SelectedIndexChanged += new System.EventHandler(this.comboBox4_SelectedIndexChanged);
|
||||
this.comboBox4.TextChanged += new System.EventHandler(this.comboBox4_TextChanged);
|
||||
this.comboBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox4_KeyPress);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
resources.ApplyResources(this.checkBox5, "checkBox5");
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox5
|
||||
//
|
||||
resources.ApplyResources(this.comboBox5, "comboBox5");
|
||||
this.comboBox5.FormattingEnabled = true;
|
||||
this.comboBox5.Name = "comboBox5";
|
||||
this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);
|
||||
this.comboBox5.TextChanged += new System.EventHandler(this.comboBox5_TextChanged);
|
||||
this.comboBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox5_KeyPress);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
resources.ApplyResources(this.checkBox6, "checkBox6");
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox6
|
||||
//
|
||||
resources.ApplyResources(this.comboBox6, "comboBox6");
|
||||
this.comboBox6.FormattingEnabled = true;
|
||||
this.comboBox6.Name = "comboBox6";
|
||||
this.comboBox6.SelectedIndexChanged += new System.EventHandler(this.comboBox6_SelectedIndexChanged);
|
||||
this.comboBox6.TextChanged += new System.EventHandler(this.comboBox6_TextChanged);
|
||||
this.comboBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox6_KeyPress);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// checkBox7
|
||||
//
|
||||
resources.ApplyResources(this.checkBox7, "checkBox7");
|
||||
this.checkBox7.Name = "checkBox7";
|
||||
this.checkBox7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox7
|
||||
//
|
||||
resources.ApplyResources(this.comboBox7, "comboBox7");
|
||||
this.comboBox7.FormattingEnabled = true;
|
||||
this.comboBox7.Name = "comboBox7";
|
||||
this.comboBox7.SelectedIndexChanged += new System.EventHandler(this.comboBox7_SelectedIndexChanged);
|
||||
this.comboBox7.TextChanged += new System.EventHandler(this.comboBox7_TextChanged);
|
||||
this.comboBox7.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox7_KeyPress);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
resources.ApplyResources(this.label7, "label7");
|
||||
this.label7.Name = "label7";
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
resources.ApplyResources(this.checkBox8, "checkBox8");
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox8
|
||||
//
|
||||
resources.ApplyResources(this.comboBox8, "comboBox8");
|
||||
this.comboBox8.FormattingEnabled = true;
|
||||
this.comboBox8.Name = "comboBox8";
|
||||
this.comboBox8.SelectedIndexChanged += new System.EventHandler(this.comboBox8_SelectedIndexChanged);
|
||||
this.comboBox8.TextChanged += new System.EventHandler(this.comboBox8_TextChanged);
|
||||
this.comboBox8.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox8_KeyPress);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
resources.ApplyResources(this.label8, "label8");
|
||||
this.label8.Name = "label8";
|
||||
//
|
||||
// checkBox9
|
||||
//
|
||||
resources.ApplyResources(this.checkBox9, "checkBox9");
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox9
|
||||
//
|
||||
resources.ApplyResources(this.comboBox9, "comboBox9");
|
||||
this.comboBox9.FormattingEnabled = true;
|
||||
this.comboBox9.Name = "comboBox9";
|
||||
this.comboBox9.SelectedIndexChanged += new System.EventHandler(this.comboBox9_SelectedIndexChanged);
|
||||
this.comboBox9.TextChanged += new System.EventHandler(this.comboBox9_TextChanged);
|
||||
this.comboBox9.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox9_KeyPress);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
resources.ApplyResources(this.label9, "label9");
|
||||
this.label9.Name = "label9";
|
||||
//
|
||||
// checkBox10
|
||||
//
|
||||
resources.ApplyResources(this.checkBox10, "checkBox10");
|
||||
this.checkBox10.Name = "checkBox10";
|
||||
this.checkBox10.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox10
|
||||
//
|
||||
resources.ApplyResources(this.comboBox10, "comboBox10");
|
||||
this.comboBox10.FormattingEnabled = true;
|
||||
this.comboBox10.Name = "comboBox10";
|
||||
this.comboBox10.SelectedIndexChanged += new System.EventHandler(this.comboBox10_SelectedIndexChanged);
|
||||
this.comboBox10.TextChanged += new System.EventHandler(this.comboBox10_TextChanged);
|
||||
this.comboBox10.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox10_KeyPress);
|
||||
//
|
||||
// label10
|
||||
//
|
||||
resources.ApplyResources(this.label10, "label10");
|
||||
this.label10.Name = "label10";
|
||||
//
|
||||
// checkBox11
|
||||
//
|
||||
resources.ApplyResources(this.checkBox11, "checkBox11");
|
||||
this.checkBox11.Name = "checkBox11";
|
||||
this.checkBox11.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox11
|
||||
//
|
||||
resources.ApplyResources(this.comboBox11, "comboBox11");
|
||||
this.comboBox11.FormattingEnabled = true;
|
||||
this.comboBox11.Name = "comboBox11";
|
||||
this.comboBox11.SelectedIndexChanged += new System.EventHandler(this.comboBox11_SelectedIndexChanged);
|
||||
this.comboBox11.TextChanged += new System.EventHandler(this.comboBox11_TextChanged);
|
||||
this.comboBox11.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox11_KeyPress);
|
||||
//
|
||||
// label11
|
||||
//
|
||||
resources.ApplyResources(this.label11, "label11");
|
||||
this.label11.Name = "label11";
|
||||
//
|
||||
// checkBox12
|
||||
//
|
||||
resources.ApplyResources(this.checkBox12, "checkBox12");
|
||||
this.checkBox12.Name = "checkBox12";
|
||||
this.checkBox12.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox12
|
||||
//
|
||||
resources.ApplyResources(this.comboBox12, "comboBox12");
|
||||
this.comboBox12.FormattingEnabled = true;
|
||||
this.comboBox12.Name = "comboBox12";
|
||||
this.comboBox12.SelectedIndexChanged += new System.EventHandler(this.comboBox12_SelectedIndexChanged);
|
||||
this.comboBox12.TextChanged += new System.EventHandler(this.comboBox12_TextChanged);
|
||||
this.comboBox12.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox12_KeyPress);
|
||||
//
|
||||
// label12
|
||||
//
|
||||
resources.ApplyResources(this.label12, "label12");
|
||||
this.label12.Name = "label12";
|
||||
//
|
||||
// extensionsGroupBox
|
||||
//
|
||||
this.extensionsGroupBox.Controls.Add(this.remarkTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label16);
|
||||
this.extensionsGroupBox.Controls.Add(this.snSuffixTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label15);
|
||||
this.extensionsGroupBox.Controls.Add(this.snPrefixTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label14);
|
||||
this.extensionsGroupBox.Controls.Add(this.idNumberTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label13);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext4Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext4TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext3Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext3TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext2Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext2TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext1Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext1TextBox);
|
||||
resources.ApplyResources(this.extensionsGroupBox, "extensionsGroupBox");
|
||||
this.extensionsGroupBox.Name = "extensionsGroupBox";
|
||||
this.extensionsGroupBox.TabStop = false;
|
||||
//
|
||||
// remarkTextBox
|
||||
//
|
||||
resources.ApplyResources(this.remarkTextBox, "remarkTextBox");
|
||||
this.remarkTextBox.Name = "remarkTextBox";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
this.label16.Name = "label16";
|
||||
//
|
||||
// snSuffixTextBox
|
||||
//
|
||||
resources.ApplyResources(this.snSuffixTextBox, "snSuffixTextBox");
|
||||
this.snSuffixTextBox.Name = "snSuffixTextBox";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// snPrefixTextBox
|
||||
//
|
||||
resources.ApplyResources(this.snPrefixTextBox, "snPrefixTextBox");
|
||||
this.snPrefixTextBox.Name = "snPrefixTextBox";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
resources.ApplyResources(this.label14, "label14");
|
||||
this.label14.Name = "label14";
|
||||
//
|
||||
// idNumberTextBox
|
||||
//
|
||||
resources.ApplyResources(this.idNumberTextBox, "idNumberTextBox");
|
||||
this.idNumberTextBox.Name = "idNumberTextBox";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
this.label13.Name = "label13";
|
||||
//
|
||||
// ext4Label
|
||||
//
|
||||
resources.ApplyResources(this.ext4Label, "ext4Label");
|
||||
this.ext4Label.Name = "ext4Label";
|
||||
//
|
||||
// ext4TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext4TextBox, "ext4TextBox");
|
||||
this.ext4TextBox.Name = "ext4TextBox";
|
||||
//
|
||||
// ext3Label
|
||||
//
|
||||
resources.ApplyResources(this.ext3Label, "ext3Label");
|
||||
this.ext3Label.Name = "ext3Label";
|
||||
//
|
||||
// ext3TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext3TextBox, "ext3TextBox");
|
||||
this.ext3TextBox.Name = "ext3TextBox";
|
||||
//
|
||||
// ext2Label
|
||||
//
|
||||
resources.ApplyResources(this.ext2Label, "ext2Label");
|
||||
this.ext2Label.Name = "ext2Label";
|
||||
//
|
||||
// ext2TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext2TextBox, "ext2TextBox");
|
||||
this.ext2TextBox.Name = "ext2TextBox";
|
||||
//
|
||||
// ext1Label
|
||||
//
|
||||
resources.ApplyResources(this.ext1Label, "ext1Label");
|
||||
this.ext1Label.Name = "ext1Label";
|
||||
//
|
||||
// ext1TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext1TextBox, "ext1TextBox");
|
||||
this.ext1TextBox.Name = "ext1TextBox";
|
||||
this.ext1TextBox.TextChanged += new System.EventHandler(this.ext1TextBox_TextChanged);
|
||||
//
|
||||
// autoSNButton
|
||||
//
|
||||
resources.ApplyResources(this.autoSNButton, "autoSNButton");
|
||||
this.autoSNButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.autoSNButton.Name = "autoSNButton";
|
||||
this.autoSNButton.UseVisualStyleBackColor = true;
|
||||
this.autoSNButton.Click += new System.EventHandler(this.autoSNButton_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox2, "pictureBox2");
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// pictureBox3
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox3, "pictureBox3");
|
||||
this.pictureBox3.Name = "pictureBox3";
|
||||
this.pictureBox3.TabStop = false;
|
||||
//
|
||||
// pictureBox4
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox4, "pictureBox4");
|
||||
this.pictureBox4.Name = "pictureBox4";
|
||||
this.pictureBox4.TabStop = false;
|
||||
//
|
||||
// pictureBox5
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox5, "pictureBox5");
|
||||
this.pictureBox5.Name = "pictureBox5";
|
||||
this.pictureBox5.TabStop = false;
|
||||
//
|
||||
// pictureBox6
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox6, "pictureBox6");
|
||||
this.pictureBox6.Name = "pictureBox6";
|
||||
this.pictureBox6.TabStop = false;
|
||||
//
|
||||
// pictureBox7
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox7, "pictureBox7");
|
||||
this.pictureBox7.Name = "pictureBox7";
|
||||
this.pictureBox7.TabStop = false;
|
||||
//
|
||||
// pictureBox8
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox8, "pictureBox8");
|
||||
this.pictureBox8.Name = "pictureBox8";
|
||||
this.pictureBox8.TabStop = false;
|
||||
//
|
||||
// pictureBox9
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox9, "pictureBox9");
|
||||
this.pictureBox9.Name = "pictureBox9";
|
||||
this.pictureBox9.TabStop = false;
|
||||
//
|
||||
// pictureBox10
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox10, "pictureBox10");
|
||||
this.pictureBox10.Name = "pictureBox10";
|
||||
this.pictureBox10.TabStop = false;
|
||||
//
|
||||
// pictureBox11
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox11, "pictureBox11");
|
||||
this.pictureBox11.Name = "pictureBox11";
|
||||
this.pictureBox11.TabStop = false;
|
||||
//
|
||||
// pictureBox12
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox12, "pictureBox12");
|
||||
this.pictureBox12.Name = "pictureBox12";
|
||||
this.pictureBox12.TabStop = false;
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.Controls.Add(this.pictureBox12);
|
||||
this.Controls.Add(this.pictureBox11);
|
||||
this.Controls.Add(this.pictureBox10);
|
||||
this.Controls.Add(this.pictureBox9);
|
||||
this.Controls.Add(this.pictureBox8);
|
||||
this.Controls.Add(this.pictureBox7);
|
||||
this.Controls.Add(this.pictureBox6);
|
||||
this.Controls.Add(this.pictureBox5);
|
||||
this.Controls.Add(this.pictureBox4);
|
||||
this.Controls.Add(this.pictureBox3);
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.autoSNButton);
|
||||
this.Controls.Add(this.extensionsGroupBox);
|
||||
this.Controls.Add(this.checkBox12);
|
||||
this.Controls.Add(this.comboBox12);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.checkBox11);
|
||||
this.Controls.Add(this.comboBox11);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.checkBox10);
|
||||
this.Controls.Add(this.comboBox10);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.checkBox9);
|
||||
this.Controls.Add(this.comboBox9);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.checkBox8);
|
||||
this.Controls.Add(this.comboBox8);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.checkBox7);
|
||||
this.Controls.Add(this.comboBox7);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.checkBox6);
|
||||
this.Controls.Add(this.comboBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.checkBox5);
|
||||
this.Controls.Add(this.comboBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.checkBox4);
|
||||
this.Controls.Add(this.comboBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.checkBox3);
|
||||
this.Controls.Add(this.comboBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.comboBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.clearButton);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
this.extensionsGroupBox.ResumeLayout(false);
|
||||
this.extensionsGroupBox.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox orderGroupBox;
|
||||
private System.Windows.Forms.ComboBox orderComboBox;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox comboBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
private System.Windows.Forms.ComboBox comboBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.CheckBox checkBox3;
|
||||
private System.Windows.Forms.ComboBox comboBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckBox checkBox4;
|
||||
private System.Windows.Forms.ComboBox comboBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.CheckBox checkBox5;
|
||||
private System.Windows.Forms.ComboBox comboBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.CheckBox checkBox6;
|
||||
private System.Windows.Forms.ComboBox comboBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.CheckBox checkBox7;
|
||||
private System.Windows.Forms.ComboBox comboBox7;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.ComboBox comboBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.CheckBox checkBox9;
|
||||
private System.Windows.Forms.ComboBox comboBox9;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.CheckBox checkBox10;
|
||||
private System.Windows.Forms.ComboBox comboBox10;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.CheckBox checkBox11;
|
||||
private System.Windows.Forms.ComboBox comboBox11;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.CheckBox checkBox12;
|
||||
private System.Windows.Forms.ComboBox comboBox12;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.GroupBox extensionsGroupBox;
|
||||
private System.Windows.Forms.Label ext4Label;
|
||||
private System.Windows.Forms.TextBox ext4TextBox;
|
||||
private System.Windows.Forms.Label ext3Label;
|
||||
private System.Windows.Forms.TextBox ext3TextBox;
|
||||
private System.Windows.Forms.Label ext2Label;
|
||||
private System.Windows.Forms.TextBox ext2TextBox;
|
||||
private System.Windows.Forms.Label ext1Label;
|
||||
private System.Windows.Forms.TextBox ext1TextBox;
|
||||
private System.Windows.Forms.TextBox remarkTextBox;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.TextBox snSuffixTextBox;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.TextBox snPrefixTextBox;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.TextBox idNumberTextBox;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.Button autoSNButton;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
private System.Windows.Forms.PictureBox pictureBox3;
|
||||
private System.Windows.Forms.PictureBox pictureBox4;
|
||||
private System.Windows.Forms.PictureBox pictureBox5;
|
||||
private System.Windows.Forms.PictureBox pictureBox6;
|
||||
private System.Windows.Forms.PictureBox pictureBox7;
|
||||
private System.Windows.Forms.PictureBox pictureBox8;
|
||||
private System.Windows.Forms.PictureBox pictureBox9;
|
||||
private System.Windows.Forms.PictureBox pictureBox10;
|
||||
private System.Windows.Forms.PictureBox pictureBox11;
|
||||
private System.Windows.Forms.PictureBox pictureBox12;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,530 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
public partial class CycleBeginningForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleBeginningForm));
|
||||
|
||||
readonly Results.Entities.WaterMeter[] WaterMeters;
|
||||
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
public readonly bool AtTheEnd;
|
||||
public readonly bool SensusExtensions;
|
||||
|
||||
/// To be retrieved after the form is closed
|
||||
public string PurchaseOrder;
|
||||
public string[] SNText;
|
||||
public bool[] Disabled;
|
||||
|
||||
public string IdNumber;
|
||||
public string SnPrefix;
|
||||
public string SnSuffix;
|
||||
public string Remark;
|
||||
|
||||
/// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
int textBoxesCount;
|
||||
Label[] labels;
|
||||
ComboBox[] comboBoxes;
|
||||
CheckBox[] checkBoxes;
|
||||
PictureBox[] pictureBoxes;
|
||||
IList<ComboBox> enabledComboBoxes;
|
||||
|
||||
|
||||
/// <summary> Parameterless constructor for common functionality </summary>
|
||||
public CycleBeginningForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
labels = new Label[] { label1, label2, label3, label4, label5, label6,
|
||||
label7, label8, label9, label10, label11, label12 };
|
||||
|
||||
comboBoxes = new ComboBox[] { comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6,
|
||||
comboBox7, comboBox8, comboBox9, comboBox10, comboBox11, comboBox12 };
|
||||
|
||||
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6,
|
||||
checkBox7, checkBox8, checkBox9, checkBox10, checkBox11, checkBox12 };
|
||||
|
||||
pictureBoxes = new PictureBox[] { pictureBox1, pictureBox2, pictureBox3, pictureBox4, pictureBox5, pictureBox6,
|
||||
pictureBox7, pictureBox8, pictureBox9, pictureBox10, pictureBox11, pictureBox12 };
|
||||
|
||||
if (labels.Length != comboBoxes.Length || labels.Length != checkBoxes.Length) throw new Exception("Error in CycleBeginningForm()");
|
||||
|
||||
textBoxesCount = labels.Length;
|
||||
|
||||
enabledComboBoxes = new List<ComboBox>();
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(Results.Entities.WaterMeter[] waterMeters, bool atTheEnd, bool sensusExtensions)
|
||||
: this()
|
||||
{
|
||||
this.WaterMeters = waterMeters;
|
||||
this.WaterMetersCount = waterMeters.Length;
|
||||
this.AtTheEnd = atTheEnd;
|
||||
this.SensusExtensions = sensusExtensions;
|
||||
SNText = new string[WaterMetersCount];
|
||||
Disabled = new bool[WaterMetersCount];
|
||||
|
||||
ShuffleTextBoxes(Config.Data.WMsCount, Config.Data.LineSize);
|
||||
|
||||
foreach (var wm in WaterMeters) if (wm != null) wm.Passed = wm.PassedFromTests();
|
||||
|
||||
Height = 147 + WaterMetersCount * 45; /// Adjust the window size
|
||||
|
||||
if (sensusExtensions)
|
||||
{
|
||||
if (Height < 605) Height = 605; /// Minimum height for the extensionsGroupBox
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Hide extensionsGroupBox, etc.
|
||||
int delta = extensionsGroupBox.Width + 45;
|
||||
okButton.Left -= delta;
|
||||
clearButton.Left -= delta;
|
||||
Width -= delta;
|
||||
extensionsGroupBox.Visible = false;
|
||||
autoSNButton.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure the layout of labels/text boxes on the screen
|
||||
/// corresponds to the layout of watermeters of the test bench.
|
||||
/// </summary>
|
||||
/// <param name="wmsCount">Number of watermeters</param>
|
||||
/// <param name="lineSize">Number of watermeters in one line</param>
|
||||
void ShuffleTextBoxes(int wmsCount, int lineSize)
|
||||
{
|
||||
if (wmsCount < textBoxesCount && lineSize > 0)
|
||||
{
|
||||
int nrLines = (wmsCount + lineSize - 1) / lineSize;
|
||||
int gap = (textBoxesCount - wmsCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
{
|
||||
for (int i = 0; i < lineSize; i++)
|
||||
{
|
||||
labels[dest] = labels[l * lineSize + l * gap + i];
|
||||
comboBoxes[dest] = comboBoxes[l * lineSize + l * gap + i];
|
||||
checkBoxes[dest] = checkBoxes[l * lineSize + l * gap + i];
|
||||
pictureBoxes[dest] = pictureBoxes[l * lineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
textBoxesCount = wmsCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void CycleBeginningForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
PrepareOrderCombo(orderComboBox);
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
if (AtTheEnd)
|
||||
{
|
||||
pictureBoxes[i].Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateIcons();
|
||||
|
||||
if (SensusExtensions)
|
||||
{
|
||||
idNumberTextBox.Text = (Program.LocalSettings.LastText1 == null) ? string.Empty : Program.LocalSettings.LastText1;
|
||||
snPrefixTextBox.Text = (Program.LocalSettings.LastText2 == null) ? string.Empty : Program.LocalSettings.LastText2;
|
||||
snSuffixTextBox.Text = (Program.LocalSettings.LastText3 == null) ? string.Empty : Program.LocalSettings.LastText3;
|
||||
remarkTextBox.Text = (Program.LocalSettings.LastRemark == null) ? string.Empty : Program.LocalSettings.LastRemark;
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
orderGroupBox.Text = Strings.Purchase_order;
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
labels[i].Text = Strings.Serial_Number + " " + (i + 1).ToString();
|
||||
}
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
clearButton.Text = Strings.ClearBtnText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
/// <param name="orderComboBox">Puchase order ComboBox</param>
|
||||
void PrepareOrderCombo(ComboBox orderComboBox)
|
||||
{
|
||||
for (int i = 0; i < Program.LocalSettings.PurchaseOrderHistoryCount; i++)
|
||||
{
|
||||
orderComboBox.Items.Add(Program.LocalSettings.PurchaseOrderHistory[i]);
|
||||
}
|
||||
|
||||
if (orderComboBox.Items.Count > 0)
|
||||
{
|
||||
orderComboBox.Text = orderComboBox.Items[0].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateIcons()
|
||||
{
|
||||
Image imgP = null;
|
||||
Image imgF = null;
|
||||
Image imgP2 = null;
|
||||
Image imgF2 = null;
|
||||
|
||||
int nrRedone = 0;
|
||||
if (SensusExtensions)
|
||||
{
|
||||
if (!int.TryParse(ext1TextBox.Text, out nrRedone) || nrRedone < 0 || nrRedone > WaterMetersCount)
|
||||
{
|
||||
nrRedone = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
Results.Entities.WaterMeter wm = WaterMeters[i];
|
||||
if (wm == null)
|
||||
{
|
||||
checkBoxes[i].Checked = true;
|
||||
}
|
||||
else if (AtTheEnd)
|
||||
{
|
||||
if (imgP == null || imgF == null || imgP2 == null || imgF2 == null)
|
||||
{
|
||||
imgP = Properties.Resources.TestPassedImage; /// Passed
|
||||
imgF = Properties.Resources.TestFailedImage; /// Failed
|
||||
imgP2 = Properties.Resources.TestPassedImage2; /// Passed after re-work
|
||||
imgF2 = Properties.Resources.TestFailedImage2; /// Failed after re-work
|
||||
}
|
||||
|
||||
pictureBoxes[i].Image = (WaterMetersCount - i > nrRedone) ? (wm.Passed ? imgP : imgF) : (wm.Passed ? imgP2 : imgF2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
Program.LocalSettings.LastSNTexts = SNText;
|
||||
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
SNText[i] = comboBoxes[i].Text;
|
||||
Disabled[i] = !checkBoxes[i].Checked;
|
||||
}
|
||||
|
||||
if (SensusExtensions)
|
||||
{
|
||||
int nrRedone = 0;
|
||||
if (SensusExtensions)
|
||||
{
|
||||
if (!int.TryParse(ext1TextBox.Text, out nrRedone) || nrRedone < 0 || nrRedone > WaterMetersCount)
|
||||
{
|
||||
nrRedone = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Program.LocalSettings.LastText1 = IdNumber = string.IsNullOrEmpty(idNumberTextBox.Text) ? null : idNumberTextBox.Text;
|
||||
Program.LocalSettings.LastText2 = SnPrefix = string.IsNullOrEmpty(snPrefixTextBox.Text) ? null : snPrefixTextBox.Text;
|
||||
Program.LocalSettings.LastText3 = SnSuffix = string.IsNullOrEmpty(snSuffixTextBox.Text) ? null : snSuffixTextBox.Text;
|
||||
Program.LocalSettings.LastRemark = Remark = string.IsNullOrEmpty(remarkTextBox.Text) ? null : remarkTextBox.Text;
|
||||
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
Results.Entities.WaterMeter wm = WaterMeters[i];
|
||||
{
|
||||
if (wm != null)
|
||||
{
|
||||
bool pressureTestPassed = false;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if ((mtr.Method().Equals("PMax-Test") || mtr.Method().Equals("Leak-Test")) && mtr.Passed)
|
||||
{
|
||||
pressureTestPassed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
wm.WaterMeterData.Text1 = IdNumber;
|
||||
wm.WaterMeterData.Text2 = SnPrefix;
|
||||
wm.WaterMeterData.Text3 = SnSuffix;
|
||||
wm.Batch.Remark = Remark;
|
||||
wm.ResultCode = 32 + (wm.Passed ? 0 : 1) + (pressureTestPassed ? 64 : 0) + ((WaterMetersCount - i <= nrRedone) ? 128 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When one combo box is updated using drop-down menu, all combo boxes
|
||||
/// are updated by this function.
|
||||
/// </summary>
|
||||
private void UpdateAllCombos()
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
comboBoxes[i].Text = Program.LocalSettings.LastSNTexts[i];
|
||||
checkBoxes[i].Checked = !string.IsNullOrEmpty(comboBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
comboBoxes[i].Text = string.Empty;
|
||||
checkBoxes[i].Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void comboBox1_TextChanged(object sender, EventArgs e) { checkBox1.Checked = true; }
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox1.Text.Equals(comboBox1.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox2_TextChanged(object sender, EventArgs e) { checkBox2.Checked = true; }
|
||||
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox2.Text.Equals(comboBox2.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox3_TextChanged(object sender, EventArgs e) { checkBox3.Checked = true; }
|
||||
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox3.Text.Equals(comboBox3.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox4_TextChanged(object sender, EventArgs e) { checkBox4.Checked = true; }
|
||||
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox4.Text.Equals(comboBox4.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox5_TextChanged(object sender, EventArgs e) { checkBox5.Checked = true; }
|
||||
private void comboBox5_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox5.Text.Equals(comboBox5.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox6_TextChanged(object sender, EventArgs e) { checkBox6.Checked = true; }
|
||||
private void comboBox6_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox6.Text.Equals(comboBox6.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox7_TextChanged(object sender, EventArgs e) { checkBox7.Checked = true; }
|
||||
private void comboBox7_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox7.Text.Equals(comboBox7.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox8_TextChanged(object sender, EventArgs e) { checkBox8.Checked = true; }
|
||||
private void comboBox8_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox8.Text.Equals(comboBox8.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox9_TextChanged(object sender, EventArgs e) { checkBox9.Checked = true; }
|
||||
private void comboBox9_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox9.Text.Equals(comboBox9.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox10_TextChanged(object sender, EventArgs e) { checkBox10.Checked = true; }
|
||||
private void comboBox10_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox10.Text.Equals(comboBox10.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox11_TextChanged(object sender, EventArgs e) { checkBox11.Checked = true; }
|
||||
private void comboBox11_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox11.Text.Equals(comboBox11.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox12_TextChanged(object sender, EventArgs e) { checkBox12.Checked = true; }
|
||||
private void comboBox12_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox12.Text.Equals(comboBox12.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
#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);
|
||||
};
|
||||
}
|
||||
|
||||
private void OnForceClose(object sender, EventArgs args)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <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, ComboBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledComboBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledComboBoxes.Count; i++)
|
||||
{
|
||||
if (enabledComboBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledComboBoxes[(i + 1) % enabledComboBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox1); }
|
||||
private void comboBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox2); }
|
||||
private void comboBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox3); }
|
||||
private void comboBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox4); }
|
||||
private void comboBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox5); }
|
||||
private void comboBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox6); }
|
||||
private void comboBox7_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox7); }
|
||||
private void comboBox8_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox8); }
|
||||
private void comboBox9_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox9); }
|
||||
private void comboBox10_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox10); }
|
||||
private void comboBox11_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox11); }
|
||||
private void comboBox12_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox12); }
|
||||
|
||||
private void autoSNButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool snFound = false;
|
||||
int sn = 1;
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
if (!AtTheEnd || WaterMeters[i].Passed)
|
||||
{
|
||||
if (!snFound)
|
||||
{
|
||||
sn = int.Parse(comboBoxes[i].Text); /// S/N from the first combo box
|
||||
snFound = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sn++;
|
||||
comboBoxes[i].Text = sn.ToString(); /// Update combo boxes of other 'good' water meters
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
/// Don't do anything if int.Parse fails
|
||||
}
|
||||
}
|
||||
|
||||
private void ext1TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateIcons();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
<?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>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Text" xml:space="preserve">
|
||||
<value>Kolejność</value>
|
||||
</data>
|
||||
<data name="clearButton.Text" xml:space="preserve">
|
||||
<value>Usunąć</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 1</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 2</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 3</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 4</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 5</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 6</value>
|
||||
</data>
|
||||
<data name="label7.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 7</value>
|
||||
</data>
|
||||
<data name="label8.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 8</value>
|
||||
</data>
|
||||
<data name="label9.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 9</value>
|
||||
</data>
|
||||
<data name="label10.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 10</value>
|
||||
</data>
|
||||
<data name="label11.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 11</value>
|
||||
</data>
|
||||
<data name="label12.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 12</value>
|
||||
</data>
|
||||
<data name="label16.Text" xml:space="preserve">
|
||||
<value>Uwaga:</value>
|
||||
</data>
|
||||
<data name="label15.Text" xml:space="preserve">
|
||||
<value>Uzupełnienie za nr seryjnym</value>
|
||||
</data>
|
||||
<data name="label14.Text" xml:space="preserve">
|
||||
<value>Uzupełnienie przed nr seryjnym</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>Nr identyfikacyjny:</value>
|
||||
</data>
|
||||
<data name="ext4Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext3Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext2Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext1Label.Text" xml:space="preserve">
|
||||
<value>naprawionych</value>
|
||||
</data>
|
||||
<data name="extensionsGroupBox.Text" xml:space="preserve">
|
||||
<value># sztuk</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Text" xml:space="preserve">
|
||||
<value>Auto nr seryjny</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Dane partii</value>
|
||||
</data>
|
||||
</root>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,198 @@
|
||||
<?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>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Text" xml:space="preserve">
|
||||
<value>Порядок</value>
|
||||
</data>
|
||||
<data name="clearButton.Text" xml:space="preserve">
|
||||
<value>Очистить</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Серийный номер 1</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Серийный номер 2</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Серийный номер 3</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Серийный номер 4</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Серийный номер 5</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Серийный номер 6</value>
|
||||
</data>
|
||||
<data name="label7.Text" xml:space="preserve">
|
||||
<value>Серийный номер 7</value>
|
||||
</data>
|
||||
<data name="label8.Text" xml:space="preserve">
|
||||
<value>Серийный номер8</value>
|
||||
</data>
|
||||
<data name="label9.Text" xml:space="preserve">
|
||||
<value>Серийный номер 9</value>
|
||||
</data>
|
||||
<data name="label10.Text" xml:space="preserve">
|
||||
<value>Серийный номер 10</value>
|
||||
</data>
|
||||
<data name="label11.Text" xml:space="preserve">
|
||||
<value>Серийный номер 11</value>
|
||||
</data>
|
||||
<data name="label12.Text" xml:space="preserve">
|
||||
<value>Серийный номер 12</value>
|
||||
</data>
|
||||
<data name="label16.Text" xml:space="preserve">
|
||||
<value>Примечание:</value>
|
||||
</data>
|
||||
<data name="label15.Text" xml:space="preserve">
|
||||
<value>Дополнить за с/н</value>
|
||||
</data>
|
||||
<data name="label14.Text" xml:space="preserve">
|
||||
<value>Дополнить перед с/н</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>Идентификационный номер:</value>
|
||||
</data>
|
||||
<data name="ext4Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext3Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext2Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext1Label.Text" xml:space="preserve">
|
||||
<value>отремонтированных</value>
|
||||
</data>
|
||||
<data name="extensionsGroupBox.Text" xml:space="preserve">
|
||||
<value># штук</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Text" xml:space="preserve">
|
||||
<value>Авто с/н</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Пакетные данные</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,305 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
partial class CycleEndForm
|
||||
{
|
||||
/// <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.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox5 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox6 = new System.Windows.Forms.TextBox();
|
||||
this.label6 = 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.textBox2);
|
||||
this.groupBox2.Controls.Add(this.label2);
|
||||
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, 104);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Wasserzähler 2";
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox2.TabIndex = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(18, 34);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(74, 23);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Stand:";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.textBox1);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
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, 14);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Wasserzähler 1";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox1.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(18, 34);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(74, 23);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Stand:";
|
||||
//
|
||||
// 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, 23);
|
||||
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.textBox3);
|
||||
this.groupBox3.Controls.Add(this.label3);
|
||||
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, 194);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox3.TabIndex = 3;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Wasserzähler 3";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox3.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(18, 34);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(74, 23);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Stand:";
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.textBox4);
|
||||
this.groupBox4.Controls.Add(this.label4);
|
||||
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, 284);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox4.TabIndex = 4;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Wasserzähler 4";
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox4.TabIndex = 1;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(18, 34);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(74, 23);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "Stand:";
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.textBox5);
|
||||
this.groupBox5.Controls.Add(this.label5);
|
||||
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, 374);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox5.TabIndex = 5;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "Wasserzähler 5";
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox5.TabIndex = 1;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(18, 34);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(74, 23);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "Stand:";
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Controls.Add(this.textBox6);
|
||||
this.groupBox6.Controls.Add(this.label6);
|
||||
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, 464);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox6.TabIndex = 6;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "Wasserzähler 6";
|
||||
//
|
||||
// textBox6
|
||||
//
|
||||
this.textBox6.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox6.Name = "textBox6";
|
||||
this.textBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox6.TabIndex = 1;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(18, 34);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(74, 23);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Stand:";
|
||||
//
|
||||
// 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, 566);
|
||||
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 = "Daten";
|
||||
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 textBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
private System.Windows.Forms.TextBox textBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.GroupBox groupBox6;
|
||||
private System.Windows.Forms.TextBox textBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
public partial class CycleEndForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleEndForm));
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public string[] EndStateText;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleEndForm(int waterMetersCount)
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
EndStateText = new string[WaterMetersCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary> Parameterless constructor for 3 watermeters </summary>
|
||||
public CycleEndForm()
|
||||
: this(3)
|
||||
{
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
Height = 50 + 90 * WaterMetersCount;
|
||||
|
||||
if (WaterMetersCount < 1) groupBox1.Visible = false;
|
||||
if (WaterMetersCount < 2) groupBox2.Visible = false;
|
||||
if (WaterMetersCount < 3) groupBox3.Visible = false;
|
||||
if (WaterMetersCount < 4) groupBox4.Visible = false;
|
||||
if (WaterMetersCount < 5) groupBox5.Visible = false;
|
||||
if (WaterMetersCount < 6) groupBox6.Visible = false;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
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";
|
||||
label1.Text = Strings.State;
|
||||
label2.Text = Strings.State;
|
||||
label3.Text = Strings.State;
|
||||
label4.Text = Strings.State;
|
||||
label5.Text = Strings.State;
|
||||
label6.Text = Strings.State;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (WaterMetersCount >= 1) EndStateText[0] = textBox1.Text;
|
||||
if (WaterMetersCount >= 2) EndStateText[1] = textBox3.Text;
|
||||
if (WaterMetersCount >= 3) EndStateText[2] = textBox4.Text;
|
||||
if (WaterMetersCount >= 4) EndStateText[3] = textBox5.Text;
|
||||
if (WaterMetersCount >= 5) EndStateText[4] = textBox6.Text;
|
||||
if (WaterMetersCount >= 6) EndStateText[5] = textBox6.Text;
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,320 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasHeatMtrStatesForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||
}
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
/// </summary>
|
||||
string purchaseOrder;
|
||||
public string PurchaseOrder { get { return purchaseOrder; } }
|
||||
|
||||
bool[] disabled; /// This array is shared between forms
|
||||
|
||||
string[] wmCycleEndState;
|
||||
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
|
||||
|
||||
double[] wmStartState;
|
||||
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
|
||||
|
||||
double[] wmEndState;
|
||||
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
|
||||
|
||||
string[] wmStartStateStr;
|
||||
|
||||
double[] energyStartState;
|
||||
public double EnergyStartState(int wmNr) { return (wmNr >= 0 && wmNr < energyStartState.Length) ? energyStartState[wmNr] : 0; }
|
||||
|
||||
double[] energyEndState;
|
||||
public double EnergyEndState(int wmNr) { return (wmNr >= 0 && wmNr < energyEndState.Length) ? energyEndState[wmNr] : 0; }
|
||||
|
||||
string[] energyStartStateStr;
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
double refEnergy;
|
||||
double energyErrLimLo;
|
||||
double energyErrLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
ShowFormAtCycleBeginning,
|
||||
ShowFormAtCycleEnd,
|
||||
EnterTestStartStates,
|
||||
EnterTestEndStates,
|
||||
}
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.HeatMetersCount];
|
||||
wmStartState = new double[Config.Data.HeatMetersCount];
|
||||
wmStartStateStr = new string[Config.Data.HeatMetersCount];
|
||||
wmEndState = new double[Config.Data.HeatMetersCount];
|
||||
energyStartState = new double[Config.Data.HeatMetersCount];
|
||||
energyStartStateStr = new string[Config.Data.HeatMetersCount];
|
||||
energyEndState = new double[Config.Data.HeatMetersCount];
|
||||
wmCycleEndState = new string[Config.Data.HeatMetersCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
this.refEnergy = 0;
|
||||
this.energyErrLimLo = 0;
|
||||
this.energyErrLimHi = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi,
|
||||
double refEnergy, double energyErrLimLo, double energyErrLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
this.refEnergy = refEnergy;
|
||||
this.energyErrLimLo = energyErrLimLo;
|
||||
this.energyErrLimHi = energyErrLimHi;
|
||||
return this;
|
||||
}
|
||||
|
||||
delegate void EntryFormDlgt(EntryForm myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(myRef.waterMeters, entryFormCfg.EnterSerialNrsAtTheEnd, entryFormCfg.SensusExtensions);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleEndForm(myRef.waterMeters.Length);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, myRef.regReaders, wmStartStateStr, energyStartStateStr,
|
||||
disabled, refVolume, errLimLo, errLimHi, refEnergy, energyErrLimLo, energyErrLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
resultSaved = false;
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.ShowFormAtCycleEnd:
|
||||
if (entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.EnterTestStartStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||
break;
|
||||
case CurrentOp.EnterTestEndStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
{
|
||||
return Event.ModelessFormIsOpen;
|
||||
}
|
||||
|
||||
if (!resultSaved) /// This is to save the result only once
|
||||
{
|
||||
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
|
||||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
|
||||
{
|
||||
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
waterMeters[i].SerialNr = dlg.SNText[i];
|
||||
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = Math.Min(waterMeters.Length, Config.Data.HeatMetersCount);
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
|
||||
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
|
||||
{
|
||||
/// Fixed start test - start
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(waterMeters.Length, Config.Data.HeatMetersCount); i++)
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
energyStartState[i] = dlg.EnergyStartState[i];
|
||||
energyStartStateStr[i] = dlg.EnergyStartStateStr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
|
||||
{
|
||||
/// Fixed start test - end
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(waterMeters.Length, Config.Data.HeatMetersCount); i++)
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
energyEndState[i] = dlg.EnergyEndState[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
resultSaved = true;
|
||||
modelessDlg = null;
|
||||
}
|
||||
|
||||
return Event.ModelessFormClosed; /// Form closed
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
if (modelessDlg is IHasCompleted)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null);
|
||||
modelessDlg = null;
|
||||
}
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates test results with the information collected in watermeters.
|
||||
/// </summary>
|
||||
/// <param name="batchResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(Results.BatchResults batchResults)
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public Config.Unit DefaultUnits;
|
||||
public bool EnterSerialNrsAtTheEnd;
|
||||
public bool ShowCycleEndForm;
|
||||
public bool SensusExtensions;
|
||||
|
||||
[XmlIgnore]
|
||||
public Config.Unit Units;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryFormCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
|
||||
DefaultUnits = Config.Unit.kWh;
|
||||
EnterSerialNrsAtTheEnd = false;
|
||||
ShowCycleEndForm = false;
|
||||
SensusExtensions = false;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, EnterSNsAtTheEnd={1}, ShowEndForm={2}, SensusExt={3}", Name, EnterSerialNrsAtTheEnd, ShowCycleEndForm, SensusExtensions);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
using Config;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as EntryFormCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public EntryFormCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
for (Unit units = 0; units < Unit.Count; units++)
|
||||
{
|
||||
if (Units.IsEnergy(units)) defaultUnitsComboBox.Items.Add(units.ToString());
|
||||
}
|
||||
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
defaultUnitsLabel.Text = Strings.Default_units;
|
||||
enterSNsAtTheEndCheckBox.Text = Strings.Enter_SNs_at_the_end;
|
||||
showEndStateFormCheckBox.Text = Strings.Show_cycle_end_form;
|
||||
sensusExtensionsCheckBox.Text = Strings.Sensus_extensions;
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
enterSNsAtTheEndCheckBox.Checked = config.EnterSerialNrsAtTheEnd;
|
||||
showEndStateFormCheckBox.Checked = config.ShowCycleEndForm;
|
||||
sensusExtensionsCheckBox.Checked = config.SensusExtensions;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
enterSNsAtTheEndCheckBox.Enabled = true;
|
||||
showEndStateFormCheckBox.Enabled = true;
|
||||
sensusExtensionsCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
foreach (var v in defaultUnitsComboBox.Items)
|
||||
{
|
||||
if (v.ToString() == defaultUnitsComboBox.Text) return flags;
|
||||
}
|
||||
|
||||
message = string.Format(Strings.Invalid_0, Strings.Default_units);
|
||||
return CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
|
||||
for (Unit u = 0; u < Unit.Count; u++)
|
||||
{
|
||||
if (u.ToString() == defaultUnitsComboBox.Text) config.DefaultUnits = u;
|
||||
}
|
||||
|
||||
config.EnterSerialNrsAtTheEnd = enterSNsAtTheEndCheckBox.Checked;
|
||||
config.ShowCycleEndForm = showEndStateFormCheckBox.Checked;
|
||||
config.SensusExtensions = sensusExtensionsCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
partial class EntryFormCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.showEndStateFormCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.enterSNsAtTheEndCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.sensusExtensionsCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.defaultUnitsLabel = new System.Windows.Forms.Label();
|
||||
this.defaultUnitsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(113, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(23, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(110, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// showEndStateFormCheckBox
|
||||
//
|
||||
this.showEndStateFormCheckBox.AutoSize = true;
|
||||
this.showEndStateFormCheckBox.Enabled = false;
|
||||
this.showEndStateFormCheckBox.Location = new System.Drawing.Point(113, 139);
|
||||
this.showEndStateFormCheckBox.Name = "showEndStateFormCheckBox";
|
||||
this.showEndStateFormCheckBox.Size = new System.Drawing.Size(151, 17);
|
||||
this.showEndStateFormCheckBox.TabIndex = 4;
|
||||
this.showEndStateFormCheckBox.Text = "Watermeter end state form";
|
||||
this.showEndStateFormCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// enterSNsAtTheEndCheckBox
|
||||
//
|
||||
this.enterSNsAtTheEndCheckBox.AutoSize = true;
|
||||
this.enterSNsAtTheEndCheckBox.Enabled = false;
|
||||
this.enterSNsAtTheEndCheckBox.Location = new System.Drawing.Point(113, 116);
|
||||
this.enterSNsAtTheEndCheckBox.Name = "enterSNsAtTheEndCheckBox";
|
||||
this.enterSNsAtTheEndCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.enterSNsAtTheEndCheckBox.TabIndex = 3;
|
||||
this.enterSNsAtTheEndCheckBox.Text = "Enter serial number at the end";
|
||||
this.enterSNsAtTheEndCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// sensusExtensionsCheckBox
|
||||
//
|
||||
this.sensusExtensionsCheckBox.AutoSize = true;
|
||||
this.sensusExtensionsCheckBox.Enabled = false;
|
||||
this.sensusExtensionsCheckBox.Location = new System.Drawing.Point(113, 162);
|
||||
this.sensusExtensionsCheckBox.Name = "sensusExtensionsCheckBox";
|
||||
this.sensusExtensionsCheckBox.Size = new System.Drawing.Size(114, 17);
|
||||
this.sensusExtensionsCheckBox.TabIndex = 5;
|
||||
this.sensusExtensionsCheckBox.Text = "Sensus extensions";
|
||||
this.sensusExtensionsCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// defaultUnitsLabel
|
||||
//
|
||||
this.defaultUnitsLabel.AutoSize = true;
|
||||
this.defaultUnitsLabel.Location = new System.Drawing.Point(23, 87);
|
||||
this.defaultUnitsLabel.Name = "defaultUnitsLabel";
|
||||
this.defaultUnitsLabel.Size = new System.Drawing.Size(66, 13);
|
||||
this.defaultUnitsLabel.TabIndex = 6;
|
||||
this.defaultUnitsLabel.Text = "Default units";
|
||||
//
|
||||
// defaultUnitsComboBox
|
||||
//
|
||||
this.defaultUnitsComboBox.FormattingEnabled = true;
|
||||
this.defaultUnitsComboBox.Location = new System.Drawing.Point(113, 84);
|
||||
this.defaultUnitsComboBox.Name = "defaultUnitsComboBox";
|
||||
this.defaultUnitsComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.defaultUnitsComboBox.TabIndex = 7;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.defaultUnitsComboBox);
|
||||
this.Controls.Add(this.defaultUnitsLabel);
|
||||
this.Controls.Add(this.sensusExtensionsCheckBox);
|
||||
this.Controls.Add(this.enterSNsAtTheEndCheckBox);
|
||||
this.Controls.Add(this.showEndStateFormCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.CheckBox showEndStateFormCheckBox;
|
||||
private System.Windows.Forms.CheckBox enterSNsAtTheEndCheckBox;
|
||||
private System.Windows.Forms.CheckBox sensusExtensionsCheckBox;
|
||||
private System.Windows.Forms.Label defaultUnitsLabel;
|
||||
private System.Windows.Forms.ComboBox defaultUnitsComboBox;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,31 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring("TBF.BenchControl.".Length); } }
|
||||
|
||||
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig()
|
||||
{
|
||||
return new EntryFormCfg(this.GetType().Namespace.Substring("TBF.BenchControl.DataEntry.".Length), this);
|
||||
}
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
IComponentCfg cfg = ComponentCfgBase.CreateFromDbEntity(EntryFormCfg.Serializer, component, this);
|
||||
(cfg as EntryFormCfg).Units = (cfg as EntryFormCfg).DefaultUnits;
|
||||
return cfg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,730 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
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;
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] WMStartState;
|
||||
public readonly string[] WMStartStateStr;
|
||||
public double[] WMEndState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] EnergyStartState;
|
||||
public readonly string[] EnergyStartStateStr;
|
||||
public double[] EnergyEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
double refEnergy;
|
||||
double energyWarningLimLo; /// limit to display exclamation mark, typically 2x energyErrLimLo
|
||||
double energyWarningLimHi; /// limit to display exclamation mark, typically 2x energyErrLimHi
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
Label[] labels;
|
||||
TextBox[] startTextBoxes;
|
||||
TextBox[] endTextBoxes;
|
||||
Label[] energyLabels;
|
||||
TextBox[] energyStartTextBoxes;
|
||||
TextBox[] energyEndTextBoxes;
|
||||
IList<TextBox> enabledTextBoxes;
|
||||
|
||||
/// <summary>
|
||||
/// Parameterless constructor initializing common part for start and endstate form
|
||||
/// </summary>
|
||||
public TestStartEndForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
TextBoxesCount = 12;
|
||||
|
||||
labels = new Label[]
|
||||
{
|
||||
label1, label2, label3, label4, label5, label6, label7, label8, label9, label10, label11, label12,
|
||||
};
|
||||
startTextBoxes = new TextBox[]
|
||||
{
|
||||
startTextBox1, startTextBox2, startTextBox3, startTextBox4, startTextBox5, startTextBox6,
|
||||
startTextBox7, startTextBox8, startTextBox9, startTextBox10, startTextBox11, startTextBox12,
|
||||
};
|
||||
endTextBoxes = new TextBox[]
|
||||
{
|
||||
endTextBox1, endTextBox2, endTextBox3, endTextBox4, endTextBox5, endTextBox6,
|
||||
endTextBox7, endTextBox8, endTextBox9, endTextBox10, endTextBox11, endTextBox12,
|
||||
};
|
||||
|
||||
energyLabels = new Label[]
|
||||
{
|
||||
label13, label14, label15, label16, label17, label18, label19, label20, label21, label22, label23, label24,
|
||||
};
|
||||
energyStartTextBoxes = new TextBox[]
|
||||
{
|
||||
startTextBox13, startTextBox14, startTextBox15, startTextBox16, startTextBox17, startTextBox18,
|
||||
startTextBox19, startTextBox20, startTextBox21, startTextBox22, startTextBox23, startTextBox24,
|
||||
};
|
||||
energyEndTextBoxes = new TextBox[]
|
||||
{
|
||||
endTextBox13, endTextBox14, endTextBox15, endTextBox16, endTextBox17, endTextBox18,
|
||||
endTextBox19, endTextBox20, endTextBox21, endTextBox22, endTextBox23, endTextBox24,
|
||||
};
|
||||
|
||||
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(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
entryFormCfg = cfg;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
|
||||
EnergyStartState = new double[waterMetersCount];
|
||||
EnergyStartStateStr = new string[waterMetersCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to fill in end states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="wmStartStateStr">Information entered on test start</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(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, string[] energyStartStateStr,
|
||||
bool[] disabled, double refVolume, double errLimLo, double errLimHi,
|
||||
double refEnergy, double energyErrLimLo, double energyErrLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
entryFormCfg = cfg;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
|
||||
if (energyStartStateStr == null || energyStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'energyStartStateStr' argument"));
|
||||
this.EnergyStartStateStr = energyStartStateStr;
|
||||
|
||||
this.disabled = disabled;
|
||||
|
||||
this.refVolume = refVolume;
|
||||
this.warningLimLo = 2 * errLimLo;
|
||||
this.warningLimHi = 2 * errLimHi;
|
||||
|
||||
this.refEnergy = refEnergy;
|
||||
this.energyWarningLimLo = 2 * energyErrLimLo;
|
||||
this.energyWarningLimHi = 2 * energyErrLimHi;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMEndState = new double[waterMetersCount];
|
||||
EnergyEndState = new double[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 (Config.Data.HeatMetersCount < TextBoxesCount)
|
||||
{
|
||||
int nrLines = Math.Max(1, Config.Data.HeatMetersCount / Config.Data.LineSize);
|
||||
int gap = (TextBoxesCount - Config.Data.HeatMetersCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
{
|
||||
for (int i = 0; i < Config.Data.LineSize; i++)
|
||||
{
|
||||
labels[dest] = labels[l * Config.Data.LineSize + l * gap + i];
|
||||
startTextBoxes[dest] = startTextBoxes[l * Config.Data.LineSize + l * gap + i];
|
||||
endTextBoxes[dest] = endTextBoxes[l * Config.Data.LineSize + l * gap + i];
|
||||
energyLabels[dest] = energyLabels[l * Config.Data.LineSize + l * gap + i];
|
||||
energyStartTextBoxes[dest] = energyStartTextBoxes[l * Config.Data.LineSize + l * gap + i];
|
||||
energyEndTextBoxes[dest] = energyEndTextBoxes[l * Config.Data.LineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
TextBoxesCount = Config.Data.HeatMetersCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void TestStartEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
for (Config.Unit units = 0; units < Config.Unit.Count; units++)
|
||||
{
|
||||
if (Config.Units.IsEnergy(units)) unitsComboBox.Items.Add(units.ToString());
|
||||
}
|
||||
unitsComboBox.Text = entryFormCfg.Units.ToString();
|
||||
|
||||
//Height = 115 + 90 * WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (i < WaterMetersCount)
|
||||
{
|
||||
labels[i].Visible = startTextBoxes[i].Visible = endTextBoxes[i].Visible = true;
|
||||
energyLabels[i].Visible = energyStartTextBoxes[i].Visible = energyEndTextBoxes[i].Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (WMStartStateStr != null && i < WMStartStateStr.Length)
|
||||
{
|
||||
startTextBoxes[i].Text = WMStartStateStr[i];
|
||||
}
|
||||
if (EnergyStartStateStr != null && i < EnergyStartStateStr.Length)
|
||||
{
|
||||
energyStartTextBoxes[i].Text = EnergyStartStateStr[i];
|
||||
}
|
||||
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
{
|
||||
endTextBoxes[i].Enabled = false;
|
||||
energyEndTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
endTextBoxes[i].Enabled = true;
|
||||
energyEndTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(endTextBoxes[i]);
|
||||
enabledTextBoxes.Add(energyEndTextBoxes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
{
|
||||
startTextBoxes[i].Enabled = false;
|
||||
energyStartTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
startTextBoxes[i].Enabled = true;
|
||||
energyStartTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(startTextBoxes[i]);
|
||||
enabledTextBoxes.Add(energyStartTextBoxes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Water_Meter_States;
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
labels[i].Text = string.Format("{0} {1} [l]", Strings.Volume + " ", i + 1);
|
||||
energyLabels[i].Text = string.Format("{0} {1}", Strings.Energy + " ", i + 1);
|
||||
}
|
||||
startLabel.Text = Strings.Start;
|
||||
endLabel.Text = Strings.End;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
}
|
||||
|
||||
private void unitsComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
{
|
||||
if (u.ToString() == unitsComboBox.Text)
|
||||
{
|
||||
entryFormCfg.Units = u;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs eArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, TextBoxesCount); i++)
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
EnergyEndState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyEndTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, TextBoxesCount); i++)
|
||||
{
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
EnergyStartStateStr[i] = energyStartTextBoxes[i].Text;
|
||||
EnergyStartState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyStartTextBoxes[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 endTextBoxes (1..24).
|
||||
/// </summary>
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox1.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox2.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox2.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox3.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox4.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox5.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox6.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox7.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox7.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox8.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox8.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox9.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox9.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox10.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox10.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox11.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox11.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox12.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox12.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox13.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox13.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox14.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox14.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox15.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox15.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox16.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox16.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox17.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox17.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox18.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox18.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox19_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox19.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox19.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation19.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox20_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox20.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox20.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation20.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox21_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox21.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox21.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation21.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox22_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox22.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox22.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation22.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox23_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox23.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox23.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation23.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox24_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox24.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox24.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation24.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < 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 startTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox1); }
|
||||
private void startTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox2); }
|
||||
private void startTextBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox3); }
|
||||
private void startTextBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox4); }
|
||||
private void startTextBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox5); }
|
||||
private void startTextBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox6); }
|
||||
private void startTextBox7_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox7); }
|
||||
private void startTextBox8_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox8); }
|
||||
private void startTextBox9_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox9); }
|
||||
private void startTextBox10_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox10); }
|
||||
private void startTextBox11_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox11); }
|
||||
private void startTextBox12_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox12); }
|
||||
private void startTextBox13_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox13); }
|
||||
private void startTextBox14_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox14); }
|
||||
private void startTextBox15_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox15); }
|
||||
private void startTextBox16_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox16); }
|
||||
private void startTextBox17_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox17); }
|
||||
private void startTextBox18_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox18); }
|
||||
private void startTextBox19_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox19); }
|
||||
private void startTextBox20_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox20); }
|
||||
private void startTextBox21_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox21); }
|
||||
private void startTextBox22_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox22); }
|
||||
private void startTextBox23_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox23); }
|
||||
private void startTextBox24_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox24); }
|
||||
|
||||
private void endTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox1); }
|
||||
private void endTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox2); }
|
||||
private void endTextBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox3); }
|
||||
private void endTextBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox4); }
|
||||
private void endTextBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox5); }
|
||||
private void endTextBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox6); }
|
||||
private void endTextBox7_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox7); }
|
||||
private void endTextBox8_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox8); }
|
||||
private void endTextBox9_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox9); }
|
||||
private void endTextBox10_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox10); }
|
||||
private void endTextBox11_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox11); }
|
||||
private void endTextBox12_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox12); }
|
||||
private void endTextBox13_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox13); }
|
||||
private void endTextBox14_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox14); }
|
||||
private void endTextBox15_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox15); }
|
||||
private void endTextBox16_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox16); }
|
||||
private void endTextBox17_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox17); }
|
||||
private void endTextBox18_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox18); }
|
||||
private void endTextBox19_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox19); }
|
||||
private void endTextBox20_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox20); }
|
||||
private void endTextBox21_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox21); }
|
||||
private void endTextBox22_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox22); }
|
||||
private void endTextBox23_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox23); }
|
||||
private void endTextBox24_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox24); }
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||
@@ -0,0 +1,490 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
partial class CycleBeginningForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.checkBox3 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox3 = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox4 = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.checkBox5 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox5 = new System.Windows.Forms.ComboBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.checkBox6 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox6 = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.extensionsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.remarkTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.snSuffixTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.snPrefixTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.idNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.ext4Label = new System.Windows.Forms.Label();
|
||||
this.ext4TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext3Label = new System.Windows.Forms.Label();
|
||||
this.ext3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext2Label = new System.Windows.Forms.Label();
|
||||
this.ext2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext1Label = new System.Windows.Forms.Label();
|
||||
this.ext1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.autoSNButton = new System.Windows.Forms.Button();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox5 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
this.extensionsGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// orderGroupBox
|
||||
//
|
||||
this.orderGroupBox.Controls.Add(this.orderComboBox);
|
||||
resources.ApplyResources(this.orderGroupBox, "orderGroupBox");
|
||||
this.orderGroupBox.ForeColor = System.Drawing.Color.Black;
|
||||
this.orderGroupBox.Name = "orderGroupBox";
|
||||
this.orderGroupBox.TabStop = false;
|
||||
//
|
||||
// orderComboBox
|
||||
//
|
||||
this.orderComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.orderComboBox, "orderComboBox");
|
||||
this.orderComboBox.Name = "orderComboBox";
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
resources.ApplyResources(this.clearButton, "clearButton");
|
||||
this.clearButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
resources.ApplyResources(this.comboBox1, "comboBox1");
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);
|
||||
this.comboBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox1_KeyPress);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
resources.ApplyResources(this.checkBox1, "checkBox1");
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
resources.ApplyResources(this.checkBox2, "checkBox2");
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
resources.ApplyResources(this.comboBox2, "comboBox2");
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
|
||||
this.comboBox2.TextChanged += new System.EventHandler(this.comboBox2_TextChanged);
|
||||
this.comboBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox2_KeyPress);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
resources.ApplyResources(this.checkBox3, "checkBox3");
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox3
|
||||
//
|
||||
resources.ApplyResources(this.comboBox3, "comboBox3");
|
||||
this.comboBox3.FormattingEnabled = true;
|
||||
this.comboBox3.Name = "comboBox3";
|
||||
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
|
||||
this.comboBox3.TextChanged += new System.EventHandler(this.comboBox3_TextChanged);
|
||||
this.comboBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox3_KeyPress);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
resources.ApplyResources(this.checkBox4, "checkBox4");
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox4
|
||||
//
|
||||
resources.ApplyResources(this.comboBox4, "comboBox4");
|
||||
this.comboBox4.FormattingEnabled = true;
|
||||
this.comboBox4.Name = "comboBox4";
|
||||
this.comboBox4.SelectedIndexChanged += new System.EventHandler(this.comboBox4_SelectedIndexChanged);
|
||||
this.comboBox4.TextChanged += new System.EventHandler(this.comboBox4_TextChanged);
|
||||
this.comboBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox4_KeyPress);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
resources.ApplyResources(this.checkBox5, "checkBox5");
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox5
|
||||
//
|
||||
resources.ApplyResources(this.comboBox5, "comboBox5");
|
||||
this.comboBox5.FormattingEnabled = true;
|
||||
this.comboBox5.Name = "comboBox5";
|
||||
this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);
|
||||
this.comboBox5.TextChanged += new System.EventHandler(this.comboBox5_TextChanged);
|
||||
this.comboBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox5_KeyPress);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
resources.ApplyResources(this.checkBox6, "checkBox6");
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox6
|
||||
//
|
||||
resources.ApplyResources(this.comboBox6, "comboBox6");
|
||||
this.comboBox6.FormattingEnabled = true;
|
||||
this.comboBox6.Name = "comboBox6";
|
||||
this.comboBox6.SelectedIndexChanged += new System.EventHandler(this.comboBox6_SelectedIndexChanged);
|
||||
this.comboBox6.TextChanged += new System.EventHandler(this.comboBox6_TextChanged);
|
||||
this.comboBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox6_KeyPress);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// extensionsGroupBox
|
||||
//
|
||||
this.extensionsGroupBox.Controls.Add(this.remarkTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label16);
|
||||
this.extensionsGroupBox.Controls.Add(this.snSuffixTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label15);
|
||||
this.extensionsGroupBox.Controls.Add(this.snPrefixTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label14);
|
||||
this.extensionsGroupBox.Controls.Add(this.idNumberTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label13);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext4Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext4TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext3Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext3TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext2Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext2TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext1Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext1TextBox);
|
||||
resources.ApplyResources(this.extensionsGroupBox, "extensionsGroupBox");
|
||||
this.extensionsGroupBox.Name = "extensionsGroupBox";
|
||||
this.extensionsGroupBox.TabStop = false;
|
||||
//
|
||||
// remarkTextBox
|
||||
//
|
||||
resources.ApplyResources(this.remarkTextBox, "remarkTextBox");
|
||||
this.remarkTextBox.Name = "remarkTextBox";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
this.label16.Name = "label16";
|
||||
//
|
||||
// snSuffixTextBox
|
||||
//
|
||||
resources.ApplyResources(this.snSuffixTextBox, "snSuffixTextBox");
|
||||
this.snSuffixTextBox.Name = "snSuffixTextBox";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// snPrefixTextBox
|
||||
//
|
||||
resources.ApplyResources(this.snPrefixTextBox, "snPrefixTextBox");
|
||||
this.snPrefixTextBox.Name = "snPrefixTextBox";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
resources.ApplyResources(this.label14, "label14");
|
||||
this.label14.Name = "label14";
|
||||
//
|
||||
// idNumberTextBox
|
||||
//
|
||||
resources.ApplyResources(this.idNumberTextBox, "idNumberTextBox");
|
||||
this.idNumberTextBox.Name = "idNumberTextBox";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
this.label13.Name = "label13";
|
||||
//
|
||||
// ext4Label
|
||||
//
|
||||
resources.ApplyResources(this.ext4Label, "ext4Label");
|
||||
this.ext4Label.Name = "ext4Label";
|
||||
//
|
||||
// ext4TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext4TextBox, "ext4TextBox");
|
||||
this.ext4TextBox.Name = "ext4TextBox";
|
||||
//
|
||||
// ext3Label
|
||||
//
|
||||
resources.ApplyResources(this.ext3Label, "ext3Label");
|
||||
this.ext3Label.Name = "ext3Label";
|
||||
//
|
||||
// ext3TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext3TextBox, "ext3TextBox");
|
||||
this.ext3TextBox.Name = "ext3TextBox";
|
||||
//
|
||||
// ext2Label
|
||||
//
|
||||
resources.ApplyResources(this.ext2Label, "ext2Label");
|
||||
this.ext2Label.Name = "ext2Label";
|
||||
//
|
||||
// ext2TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext2TextBox, "ext2TextBox");
|
||||
this.ext2TextBox.Name = "ext2TextBox";
|
||||
//
|
||||
// ext1Label
|
||||
//
|
||||
resources.ApplyResources(this.ext1Label, "ext1Label");
|
||||
this.ext1Label.Name = "ext1Label";
|
||||
//
|
||||
// ext1TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext1TextBox, "ext1TextBox");
|
||||
this.ext1TextBox.Name = "ext1TextBox";
|
||||
this.ext1TextBox.TextChanged += new System.EventHandler(this.ext1TextBox_TextChanged);
|
||||
//
|
||||
// autoSNButton
|
||||
//
|
||||
resources.ApplyResources(this.autoSNButton, "autoSNButton");
|
||||
this.autoSNButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.autoSNButton.Name = "autoSNButton";
|
||||
this.autoSNButton.UseVisualStyleBackColor = true;
|
||||
this.autoSNButton.Click += new System.EventHandler(this.autoSNButton_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox2, "pictureBox2");
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// pictureBox3
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox3, "pictureBox3");
|
||||
this.pictureBox3.Name = "pictureBox3";
|
||||
this.pictureBox3.TabStop = false;
|
||||
//
|
||||
// pictureBox4
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox4, "pictureBox4");
|
||||
this.pictureBox4.Name = "pictureBox4";
|
||||
this.pictureBox4.TabStop = false;
|
||||
//
|
||||
// pictureBox5
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox5, "pictureBox5");
|
||||
this.pictureBox5.Name = "pictureBox5";
|
||||
this.pictureBox5.TabStop = false;
|
||||
//
|
||||
// pictureBox6
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox6, "pictureBox6");
|
||||
this.pictureBox6.Name = "pictureBox6";
|
||||
this.pictureBox6.TabStop = false;
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.Controls.Add(this.pictureBox6);
|
||||
this.Controls.Add(this.pictureBox5);
|
||||
this.Controls.Add(this.pictureBox4);
|
||||
this.Controls.Add(this.pictureBox3);
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.autoSNButton);
|
||||
this.Controls.Add(this.extensionsGroupBox);
|
||||
this.Controls.Add(this.checkBox6);
|
||||
this.Controls.Add(this.comboBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.checkBox5);
|
||||
this.Controls.Add(this.comboBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.checkBox4);
|
||||
this.Controls.Add(this.comboBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.checkBox3);
|
||||
this.Controls.Add(this.comboBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.comboBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.clearButton);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
this.extensionsGroupBox.ResumeLayout(false);
|
||||
this.extensionsGroupBox.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox orderGroupBox;
|
||||
private System.Windows.Forms.ComboBox orderComboBox;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox comboBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
private System.Windows.Forms.ComboBox comboBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.CheckBox checkBox3;
|
||||
private System.Windows.Forms.ComboBox comboBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckBox checkBox4;
|
||||
private System.Windows.Forms.ComboBox comboBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.CheckBox checkBox5;
|
||||
private System.Windows.Forms.ComboBox comboBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.CheckBox checkBox6;
|
||||
private System.Windows.Forms.ComboBox comboBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.GroupBox extensionsGroupBox;
|
||||
private System.Windows.Forms.Label ext4Label;
|
||||
private System.Windows.Forms.TextBox ext4TextBox;
|
||||
private System.Windows.Forms.Label ext3Label;
|
||||
private System.Windows.Forms.TextBox ext3TextBox;
|
||||
private System.Windows.Forms.Label ext2Label;
|
||||
private System.Windows.Forms.TextBox ext2TextBox;
|
||||
private System.Windows.Forms.Label ext1Label;
|
||||
private System.Windows.Forms.TextBox ext1TextBox;
|
||||
private System.Windows.Forms.TextBox remarkTextBox;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.TextBox snSuffixTextBox;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.TextBox snPrefixTextBox;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.TextBox idNumberTextBox;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.Button autoSNButton;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
private System.Windows.Forms.PictureBox pictureBox3;
|
||||
private System.Windows.Forms.PictureBox pictureBox4;
|
||||
private System.Windows.Forms.PictureBox pictureBox5;
|
||||
private System.Windows.Forms.PictureBox pictureBox6;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,463 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
public partial class CycleBeginningForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleBeginningForm));
|
||||
|
||||
readonly Results.Entities.WaterMeter[] WaterMeters;
|
||||
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
public readonly bool AtTheEnd;
|
||||
public readonly bool SensusExtensions;
|
||||
|
||||
/// To be retrieved after the form is closed
|
||||
public string PurchaseOrder;
|
||||
public string[] SNText;
|
||||
public bool[] Disabled;
|
||||
|
||||
public string IdNumber;
|
||||
public string SnPrefix;
|
||||
public string SnSuffix;
|
||||
public string Remark;
|
||||
|
||||
/// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
int textBoxesCount;
|
||||
Label[] labels;
|
||||
ComboBox[] comboBoxes;
|
||||
CheckBox[] checkBoxes;
|
||||
PictureBox[] pictureBoxes;
|
||||
IList<ComboBox> enabledComboBoxes;
|
||||
|
||||
|
||||
/// <summary> Parameterless constructor for common functionality </summary>
|
||||
public CycleBeginningForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
labels = new Label[] { label1, label2, label3, label4, label5, label6 };
|
||||
comboBoxes = new ComboBox[] { comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6 };
|
||||
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6 };
|
||||
pictureBoxes = new PictureBox[] { pictureBox1, pictureBox2, pictureBox3, pictureBox4, pictureBox5, pictureBox6 };
|
||||
|
||||
if (labels.Length != comboBoxes.Length || labels.Length != checkBoxes.Length) throw new Exception("Error in CycleBeginningForm()");
|
||||
|
||||
textBoxesCount = labels.Length;
|
||||
|
||||
enabledComboBoxes = new List<ComboBox>();
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(Results.Entities.WaterMeter[] waterMeters, bool atTheEnd, bool sensusExtensions)
|
||||
: this()
|
||||
{
|
||||
this.WaterMeters = waterMeters;
|
||||
this.WaterMetersCount = waterMeters.Length;
|
||||
this.AtTheEnd = atTheEnd;
|
||||
this.SensusExtensions = sensusExtensions;
|
||||
SNText = new string[WaterMetersCount];
|
||||
Disabled = new bool[WaterMetersCount];
|
||||
|
||||
ShuffleTextBoxes(Config.Data.WMsCount, Config.Data.LineSize);
|
||||
|
||||
foreach (var wm in WaterMeters) if (wm != null) wm.Passed = wm.PassedFromTests();
|
||||
|
||||
Height = 147 + WaterMetersCount * 45; /// Adjust the window size
|
||||
|
||||
if (sensusExtensions)
|
||||
{
|
||||
if (Height < 605) Height = 605; /// Minimum height for the extensionsGroupBox
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Hide extensionsGroupBox, etc.
|
||||
int delta = extensionsGroupBox.Width + 45;
|
||||
okButton.Left -= delta;
|
||||
clearButton.Left -= delta;
|
||||
Width -= delta;
|
||||
extensionsGroupBox.Visible = false;
|
||||
autoSNButton.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure the layout of labels/text boxes on the screen
|
||||
/// corresponds to the layout of watermeters of the test bench.
|
||||
/// </summary>
|
||||
/// <param name="wmsCount">Number of watermeters</param>
|
||||
/// <param name="lineSize">Number of watermeters in one line</param>
|
||||
void ShuffleTextBoxes(int wmsCount, int lineSize)
|
||||
{
|
||||
if (wmsCount < textBoxesCount && lineSize > 0)
|
||||
{
|
||||
int nrLines = (wmsCount + lineSize - 1) / lineSize;
|
||||
int gap = (textBoxesCount - wmsCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
{
|
||||
for (int i = 0; i < lineSize; i++)
|
||||
{
|
||||
labels[dest] = labels[l * lineSize + l * gap + i];
|
||||
comboBoxes[dest] = comboBoxes[l * lineSize + l * gap + i];
|
||||
checkBoxes[dest] = checkBoxes[l * lineSize + l * gap + i];
|
||||
pictureBoxes[dest] = pictureBoxes[l * lineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
textBoxesCount = wmsCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void CycleBeginningForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
PrepareOrderCombo(orderComboBox);
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
if (AtTheEnd)
|
||||
{
|
||||
pictureBoxes[i].Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateIcons();
|
||||
|
||||
if (SensusExtensions)
|
||||
{
|
||||
idNumberTextBox.Text = (Program.LocalSettings.LastText1 == null) ? string.Empty : Program.LocalSettings.LastText1;
|
||||
snPrefixTextBox.Text = (Program.LocalSettings.LastText2 == null) ? string.Empty : Program.LocalSettings.LastText2;
|
||||
snSuffixTextBox.Text = (Program.LocalSettings.LastText3 == null) ? string.Empty : Program.LocalSettings.LastText3;
|
||||
remarkTextBox.Text = (Program.LocalSettings.LastRemark == null) ? string.Empty : Program.LocalSettings.LastRemark;
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
orderGroupBox.Text = Strings.Purchase_order;
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
labels[i].Text = Strings.Serial_Number + " " + (i + 1).ToString();
|
||||
}
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
clearButton.Text = Strings.ClearBtnText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
/// <param name="orderComboBox">Puchase order ComboBox</param>
|
||||
void PrepareOrderCombo(ComboBox orderComboBox)
|
||||
{
|
||||
for (int i = 0; i < Program.LocalSettings.PurchaseOrderHistoryCount; i++)
|
||||
{
|
||||
orderComboBox.Items.Add(Program.LocalSettings.PurchaseOrderHistory[i]);
|
||||
}
|
||||
|
||||
if (orderComboBox.Items.Count > 0)
|
||||
{
|
||||
orderComboBox.Text = orderComboBox.Items[0].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateIcons()
|
||||
{
|
||||
Image imgP = null;
|
||||
Image imgF = null;
|
||||
Image imgP2 = null;
|
||||
Image imgF2 = null;
|
||||
|
||||
int nrRedone = 0;
|
||||
if (SensusExtensions)
|
||||
{
|
||||
if (!int.TryParse(ext1TextBox.Text, out nrRedone) || nrRedone < 0 || nrRedone > WaterMetersCount)
|
||||
{
|
||||
nrRedone = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
Results.Entities.WaterMeter wm = WaterMeters[i];
|
||||
if (wm == null)
|
||||
{
|
||||
checkBoxes[i].Checked = true;
|
||||
}
|
||||
else if (AtTheEnd)
|
||||
{
|
||||
if (imgP == null || imgF == null || imgP2 == null || imgF2 == null)
|
||||
{
|
||||
imgP = Properties.Resources.TestPassedImage; /// Passed
|
||||
imgF = Properties.Resources.TestFailedImage; /// Failed
|
||||
imgP2 = Properties.Resources.TestPassedImage2; /// Passed after re-work
|
||||
imgF2 = Properties.Resources.TestFailedImage2; /// Failed after re-work
|
||||
}
|
||||
|
||||
pictureBoxes[i].Image = (WaterMetersCount - i > nrRedone) ? (wm.Passed ? imgP : imgF) : (wm.Passed ? imgP2 : imgF2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
Program.LocalSettings.LastSNTexts = SNText;
|
||||
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
SNText[i] = comboBoxes[i].Text;
|
||||
Disabled[i] = !checkBoxes[i].Checked;
|
||||
}
|
||||
|
||||
if (SensusExtensions)
|
||||
{
|
||||
int nrRedone = 0;
|
||||
if (SensusExtensions)
|
||||
{
|
||||
if (!int.TryParse(ext1TextBox.Text, out nrRedone) || nrRedone < 0 || nrRedone > WaterMetersCount)
|
||||
{
|
||||
nrRedone = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Program.LocalSettings.LastText1 = IdNumber = string.IsNullOrEmpty(idNumberTextBox.Text) ? null : idNumberTextBox.Text;
|
||||
Program.LocalSettings.LastText2 = SnPrefix = string.IsNullOrEmpty(snPrefixTextBox.Text) ? null : snPrefixTextBox.Text;
|
||||
Program.LocalSettings.LastText3 = SnSuffix = string.IsNullOrEmpty(snSuffixTextBox.Text) ? null : snSuffixTextBox.Text;
|
||||
Program.LocalSettings.LastRemark = Remark = string.IsNullOrEmpty(remarkTextBox.Text) ? null : remarkTextBox.Text;
|
||||
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
Results.Entities.WaterMeter wm = WaterMeters[i];
|
||||
{
|
||||
if (wm != null)
|
||||
{
|
||||
bool pressureTestPassed = false;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if ((mtr.Method().Equals("PMax-Test") || mtr.Method().Equals("Leak-Test")) && mtr.Passed)
|
||||
{
|
||||
pressureTestPassed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
wm.WaterMeterData.Text1 = IdNumber;
|
||||
wm.WaterMeterData.Text2 = SnPrefix;
|
||||
wm.WaterMeterData.Text3 = SnSuffix;
|
||||
wm.Batch.Remark = Remark;
|
||||
wm.ResultCode = 32 + (wm.Passed ? 0 : 1) + (pressureTestPassed ? 64 : 0) + ((WaterMetersCount - i <= nrRedone) ? 128 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When one combo box is updated using drop-down menu, all combo boxes
|
||||
/// are updated by this function.
|
||||
/// </summary>
|
||||
private void UpdateAllCombos()
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
comboBoxes[i].Text = Program.LocalSettings.LastSNTexts[i];
|
||||
checkBoxes[i].Checked = !string.IsNullOrEmpty(comboBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
comboBoxes[i].Text = string.Empty;
|
||||
checkBoxes[i].Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void comboBox1_TextChanged(object sender, EventArgs e) { checkBox1.Checked = true; }
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox1.Text.Equals(comboBox1.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox2_TextChanged(object sender, EventArgs e) { checkBox2.Checked = true; }
|
||||
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox2.Text.Equals(comboBox2.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox3_TextChanged(object sender, EventArgs e) { checkBox3.Checked = true; }
|
||||
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox3.Text.Equals(comboBox3.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox4_TextChanged(object sender, EventArgs e) { checkBox4.Checked = true; }
|
||||
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox4.Text.Equals(comboBox4.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox5_TextChanged(object sender, EventArgs e) { checkBox5.Checked = true; }
|
||||
private void comboBox5_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox5.Text.Equals(comboBox5.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox6_TextChanged(object sender, EventArgs e) { checkBox6.Checked = true; }
|
||||
private void comboBox6_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox6.Text.Equals(comboBox6.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
#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);
|
||||
};
|
||||
}
|
||||
|
||||
private void OnForceClose(object sender, EventArgs args)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <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, ComboBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledComboBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledComboBoxes.Count; i++)
|
||||
{
|
||||
if (enabledComboBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledComboBoxes[(i + 1) % enabledComboBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox1); }
|
||||
private void comboBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox2); }
|
||||
private void comboBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox3); }
|
||||
private void comboBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox4); }
|
||||
private void comboBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox5); }
|
||||
private void comboBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox6); }
|
||||
|
||||
private void autoSNButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool snFound = false;
|
||||
int sn = 1;
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
if (!AtTheEnd || WaterMeters[i].Passed)
|
||||
{
|
||||
if (!snFound)
|
||||
{
|
||||
sn = int.Parse(comboBoxes[i].Text); /// S/N from the first combo box
|
||||
snFound = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sn++;
|
||||
comboBoxes[i].Text = sn.ToString(); /// Update combo boxes of other 'good' water meters
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
/// Don't do anything if int.Parse fails
|
||||
}
|
||||
}
|
||||
|
||||
private void ext1TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateIcons();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
<?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>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Text" xml:space="preserve">
|
||||
<value>Kolejność</value>
|
||||
</data>
|
||||
<data name="clearButton.Text" xml:space="preserve">
|
||||
<value>Usunąć</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 1</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 2</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 3</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 4</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 5</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Nr seryjny 6</value>
|
||||
</data>
|
||||
<data name="label16.Text" xml:space="preserve">
|
||||
<value>Uwaga:</value>
|
||||
</data>
|
||||
<data name="label15.Text" xml:space="preserve">
|
||||
<value>Uzupełnienie za nr seryjnym</value>
|
||||
</data>
|
||||
<data name="label14.Text" xml:space="preserve">
|
||||
<value>Uzupełnienie przed nr seryjnym</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>Nr identyfikacyjny:</value>
|
||||
</data>
|
||||
<data name="ext4Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext3Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext2Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext1Label.Text" xml:space="preserve">
|
||||
<value>naprawionych</value>
|
||||
</data>
|
||||
<data name="extensionsGroupBox.Text" xml:space="preserve">
|
||||
<value># sztuk</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Text" xml:space="preserve">
|
||||
<value>Auto nr seryjny</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Dane partii</value>
|
||||
</data>
|
||||
</root>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,180 @@
|
||||
<?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>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Text" xml:space="preserve">
|
||||
<value>Порядок</value>
|
||||
</data>
|
||||
<data name="clearButton.Text" xml:space="preserve">
|
||||
<value>Очистить</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Серийный номер 1</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Серийный номер 2</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Серийный номер 3</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Серийный номер 4</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Серийный номер 5</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Серийный номер 6</value>
|
||||
</data>
|
||||
<data name="label16.Text" xml:space="preserve">
|
||||
<value>Примечание:</value>
|
||||
</data>
|
||||
<data name="label15.Text" xml:space="preserve">
|
||||
<value>Дополнить за с/н</value>
|
||||
</data>
|
||||
<data name="label14.Text" xml:space="preserve">
|
||||
<value>Дополнить перед с/н</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>Идентификационный номер:</value>
|
||||
</data>
|
||||
<data name="ext4Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext3Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext2Label.Text" xml:space="preserve">
|
||||
<value>?</value>
|
||||
</data>
|
||||
<data name="ext1Label.Text" xml:space="preserve">
|
||||
<value>отремонтированных</value>
|
||||
</data>
|
||||
<data name="extensionsGroupBox.Text" xml:space="preserve">
|
||||
<value># штук</value>
|
||||
</data>
|
||||
<data name="autoSNButton.Text" xml:space="preserve">
|
||||
<value>Авто с/н</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Пакетные данные</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,305 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
partial class CycleEndForm
|
||||
{
|
||||
/// <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.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox5 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.textBox6 = new System.Windows.Forms.TextBox();
|
||||
this.label6 = 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.textBox2);
|
||||
this.groupBox2.Controls.Add(this.label2);
|
||||
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, 104);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Wasserzähler 2";
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox2.TabIndex = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(18, 34);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(74, 23);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Stand:";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.textBox1);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
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, 14);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Wasserzähler 1";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox1.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(18, 34);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(74, 23);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Stand:";
|
||||
//
|
||||
// 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, 23);
|
||||
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.textBox3);
|
||||
this.groupBox3.Controls.Add(this.label3);
|
||||
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, 194);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox3.TabIndex = 3;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Wasserzähler 3";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox3.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(18, 34);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(74, 23);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Stand:";
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.textBox4);
|
||||
this.groupBox4.Controls.Add(this.label4);
|
||||
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, 284);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox4.TabIndex = 4;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Wasserzähler 4";
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox4.TabIndex = 1;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(18, 34);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(74, 23);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "Stand:";
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.textBox5);
|
||||
this.groupBox5.Controls.Add(this.label5);
|
||||
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, 374);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox5.TabIndex = 5;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "Wasserzähler 5";
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox5.TabIndex = 1;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(18, 34);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(74, 23);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "Stand:";
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Controls.Add(this.textBox6);
|
||||
this.groupBox6.Controls.Add(this.label6);
|
||||
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, 464);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Size = new System.Drawing.Size(362, 81);
|
||||
this.groupBox6.TabIndex = 6;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "Wasserzähler 6";
|
||||
//
|
||||
// textBox6
|
||||
//
|
||||
this.textBox6.Location = new System.Drawing.Point(183, 31);
|
||||
this.textBox6.Name = "textBox6";
|
||||
this.textBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.textBox6.TabIndex = 1;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(18, 34);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(74, 23);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Stand:";
|
||||
//
|
||||
// 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, 566);
|
||||
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 = "Daten";
|
||||
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 textBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
private System.Windows.Forms.TextBox textBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.GroupBox groupBox6;
|
||||
private System.Windows.Forms.TextBox textBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
public partial class CycleEndForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleEndForm));
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public string[] EndStateText;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleEndForm(int waterMetersCount)
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
EndStateText = new string[WaterMetersCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary> Parameterless constructor for 3 watermeters </summary>
|
||||
public CycleEndForm()
|
||||
: this(3)
|
||||
{
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
Height = 50 + 90 * WaterMetersCount;
|
||||
|
||||
if (WaterMetersCount < 1) groupBox1.Visible = false;
|
||||
if (WaterMetersCount < 2) groupBox2.Visible = false;
|
||||
if (WaterMetersCount < 3) groupBox3.Visible = false;
|
||||
if (WaterMetersCount < 4) groupBox4.Visible = false;
|
||||
if (WaterMetersCount < 5) groupBox5.Visible = false;
|
||||
if (WaterMetersCount < 6) groupBox6.Visible = false;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
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";
|
||||
label1.Text = Strings.State;
|
||||
label2.Text = Strings.State;
|
||||
label3.Text = Strings.State;
|
||||
label4.Text = Strings.State;
|
||||
label5.Text = Strings.State;
|
||||
label6.Text = Strings.State;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (WaterMetersCount >= 1) EndStateText[0] = textBox1.Text;
|
||||
if (WaterMetersCount >= 2) EndStateText[1] = textBox3.Text;
|
||||
if (WaterMetersCount >= 3) EndStateText[2] = textBox4.Text;
|
||||
if (WaterMetersCount >= 4) EndStateText[3] = textBox5.Text;
|
||||
if (WaterMetersCount >= 5) EndStateText[4] = textBox6.Text;
|
||||
if (WaterMetersCount >= 6) EndStateText[5] = textBox6.Text;
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,320 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasHeatMtrStatesForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||
}
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
/// </summary>
|
||||
string purchaseOrder;
|
||||
public string PurchaseOrder { get { return purchaseOrder; } }
|
||||
|
||||
bool[] disabled; /// This array is shared between forms
|
||||
|
||||
string[] wmCycleEndState;
|
||||
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
|
||||
|
||||
double[] wmStartState;
|
||||
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
|
||||
|
||||
double[] wmEndState;
|
||||
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
|
||||
|
||||
string[] wmStartStateStr;
|
||||
|
||||
double[] energyStartState;
|
||||
public double EnergyStartState(int wmNr) { return (wmNr >= 0 && wmNr < energyStartState.Length) ? energyStartState[wmNr] : 0; }
|
||||
|
||||
double[] energyEndState;
|
||||
public double EnergyEndState(int wmNr) { return (wmNr >= 0 && wmNr < energyEndState.Length) ? energyEndState[wmNr] : 0; }
|
||||
|
||||
string[] energyStartStateStr;
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
double refEnergy;
|
||||
double energyErrLimLo;
|
||||
double energyErrLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
ShowFormAtCycleBeginning,
|
||||
ShowFormAtCycleEnd,
|
||||
EnterTestStartStates,
|
||||
EnterTestEndStates,
|
||||
}
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.HeatMetersCount];
|
||||
wmStartState = new double[Config.Data.HeatMetersCount];
|
||||
wmStartStateStr = new string[Config.Data.HeatMetersCount];
|
||||
wmEndState = new double[Config.Data.HeatMetersCount];
|
||||
energyStartState = new double[Config.Data.HeatMetersCount];
|
||||
energyStartStateStr = new string[Config.Data.HeatMetersCount];
|
||||
energyEndState = new double[Config.Data.HeatMetersCount];
|
||||
wmCycleEndState = new string[Config.Data.HeatMetersCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
this.refEnergy = 0;
|
||||
this.energyErrLimLo = 0;
|
||||
this.energyErrLimHi = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi,
|
||||
double refEnergy, double energyErrLimLo, double energyErrLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
this.refEnergy = refEnergy;
|
||||
this.energyErrLimLo = energyErrLimLo;
|
||||
this.energyErrLimHi = energyErrLimHi;
|
||||
return this;
|
||||
}
|
||||
|
||||
delegate void EntryFormDlgt(EntryForm myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(myRef.waterMeters, entryFormCfg.EnterSerialNrsAtTheEnd, entryFormCfg.SensusExtensions);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleEndForm(myRef.waterMeters.Length);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, myRef.regReaders, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, myRef.regReaders, wmStartStateStr, energyStartStateStr,
|
||||
disabled, refVolume, errLimLo, errLimHi, refEnergy, energyErrLimLo, energyErrLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
resultSaved = false;
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.ShowFormAtCycleEnd:
|
||||
if (entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.EnterTestStartStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||
break;
|
||||
case CurrentOp.EnterTestEndStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
{
|
||||
return Event.ModelessFormIsOpen;
|
||||
}
|
||||
|
||||
if (!resultSaved) /// This is to save the result only once
|
||||
{
|
||||
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
|
||||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
|
||||
{
|
||||
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
waterMeters[i].SerialNr = dlg.SNText[i];
|
||||
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = Math.Min(waterMeters.Length, Config.Data.HeatMetersCount);
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
|
||||
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
|
||||
{
|
||||
/// Fixed start test - start
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(waterMeters.Length, Config.Data.HeatMetersCount); i++)
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
energyStartState[i] = dlg.EnergyStartState[i];
|
||||
energyStartStateStr[i] = dlg.EnergyStartStateStr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
|
||||
{
|
||||
/// Fixed start test - end
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(waterMeters.Length, Config.Data.HeatMetersCount); i++)
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
energyEndState[i] = dlg.EnergyEndState[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
resultSaved = true;
|
||||
modelessDlg = null;
|
||||
}
|
||||
|
||||
return Event.ModelessFormClosed; /// Form closed
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
if (modelessDlg is IHasCompleted)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null);
|
||||
modelessDlg = null;
|
||||
}
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates test results with the information collected in watermeters.
|
||||
/// </summary>
|
||||
/// <param name="batchResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(Results.BatchResults batchResults)
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (wm != null && !wm.Disabled) wm.PurchaseOrder = PurchaseOrder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
protected override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public Config.Unit DefaultUnits;
|
||||
public bool EnterSerialNrsAtTheEnd;
|
||||
public bool ShowCycleEndForm;
|
||||
public bool SensusExtensions;
|
||||
|
||||
[XmlIgnore]
|
||||
public Config.Unit Units;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryFormCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
|
||||
DefaultUnits = Config.Unit.kWh;
|
||||
EnterSerialNrsAtTheEnd = false;
|
||||
ShowCycleEndForm = false;
|
||||
SensusExtensions = false;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, EnterSNsAtTheEnd={1}, ShowEndForm={2}, SensusExt={3}", Name, EnterSerialNrsAtTheEnd, ShowCycleEndForm, SensusExtensions);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
using Config;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EntryFormCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as EntryFormCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public EntryFormCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
for (Unit units = 0; units < Unit.Count; units++)
|
||||
{
|
||||
if (Units.IsEnergy(units)) defaultUnitsComboBox.Items.Add(units.ToString());
|
||||
}
|
||||
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
defaultUnitsLabel.Text = Strings.Default_units;
|
||||
enterSNsAtTheEndCheckBox.Text = Strings.Enter_SNs_at_the_end;
|
||||
showEndStateFormCheckBox.Text = Strings.Show_cycle_end_form;
|
||||
sensusExtensionsCheckBox.Text = Strings.Sensus_extensions;
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
enterSNsAtTheEndCheckBox.Checked = config.EnterSerialNrsAtTheEnd;
|
||||
showEndStateFormCheckBox.Checked = config.ShowCycleEndForm;
|
||||
sensusExtensionsCheckBox.Checked = config.SensusExtensions;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
enterSNsAtTheEndCheckBox.Enabled = true;
|
||||
showEndStateFormCheckBox.Enabled = true;
|
||||
sensusExtensionsCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
foreach (var v in defaultUnitsComboBox.Items)
|
||||
{
|
||||
if (v.ToString() == defaultUnitsComboBox.Text) return flags;
|
||||
}
|
||||
|
||||
message = string.Format(Strings.Invalid_0, Strings.Default_units);
|
||||
return CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
|
||||
for (Unit u = 0; u < Unit.Count; u++)
|
||||
{
|
||||
if (u.ToString() == defaultUnitsComboBox.Text) config.DefaultUnits = u;
|
||||
}
|
||||
|
||||
config.EnterSerialNrsAtTheEnd = enterSNsAtTheEndCheckBox.Checked;
|
||||
config.ShowCycleEndForm = showEndStateFormCheckBox.Checked;
|
||||
config.SensusExtensions = sensusExtensionsCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
partial class EntryFormCfgCtrl
|
||||
{
|
||||
/// <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 Component 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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.showEndStateFormCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.enterSNsAtTheEndCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.sensusExtensionsCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.defaultUnitsLabel = new System.Windows.Forms.Label();
|
||||
this.defaultUnitsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(113, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(23, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(110, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// showEndStateFormCheckBox
|
||||
//
|
||||
this.showEndStateFormCheckBox.AutoSize = true;
|
||||
this.showEndStateFormCheckBox.Enabled = false;
|
||||
this.showEndStateFormCheckBox.Location = new System.Drawing.Point(113, 139);
|
||||
this.showEndStateFormCheckBox.Name = "showEndStateFormCheckBox";
|
||||
this.showEndStateFormCheckBox.Size = new System.Drawing.Size(151, 17);
|
||||
this.showEndStateFormCheckBox.TabIndex = 4;
|
||||
this.showEndStateFormCheckBox.Text = "Watermeter end state form";
|
||||
this.showEndStateFormCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// enterSNsAtTheEndCheckBox
|
||||
//
|
||||
this.enterSNsAtTheEndCheckBox.AutoSize = true;
|
||||
this.enterSNsAtTheEndCheckBox.Enabled = false;
|
||||
this.enterSNsAtTheEndCheckBox.Location = new System.Drawing.Point(113, 116);
|
||||
this.enterSNsAtTheEndCheckBox.Name = "enterSNsAtTheEndCheckBox";
|
||||
this.enterSNsAtTheEndCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.enterSNsAtTheEndCheckBox.TabIndex = 3;
|
||||
this.enterSNsAtTheEndCheckBox.Text = "Enter serial number at the end";
|
||||
this.enterSNsAtTheEndCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// sensusExtensionsCheckBox
|
||||
//
|
||||
this.sensusExtensionsCheckBox.AutoSize = true;
|
||||
this.sensusExtensionsCheckBox.Enabled = false;
|
||||
this.sensusExtensionsCheckBox.Location = new System.Drawing.Point(113, 162);
|
||||
this.sensusExtensionsCheckBox.Name = "sensusExtensionsCheckBox";
|
||||
this.sensusExtensionsCheckBox.Size = new System.Drawing.Size(114, 17);
|
||||
this.sensusExtensionsCheckBox.TabIndex = 5;
|
||||
this.sensusExtensionsCheckBox.Text = "Sensus extensions";
|
||||
this.sensusExtensionsCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// defaultUnitsLabel
|
||||
//
|
||||
this.defaultUnitsLabel.AutoSize = true;
|
||||
this.defaultUnitsLabel.Location = new System.Drawing.Point(23, 87);
|
||||
this.defaultUnitsLabel.Name = "defaultUnitsLabel";
|
||||
this.defaultUnitsLabel.Size = new System.Drawing.Size(66, 13);
|
||||
this.defaultUnitsLabel.TabIndex = 6;
|
||||
this.defaultUnitsLabel.Text = "Default units";
|
||||
//
|
||||
// defaultUnitsComboBox
|
||||
//
|
||||
this.defaultUnitsComboBox.FormattingEnabled = true;
|
||||
this.defaultUnitsComboBox.Location = new System.Drawing.Point(113, 84);
|
||||
this.defaultUnitsComboBox.Name = "defaultUnitsComboBox";
|
||||
this.defaultUnitsComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.defaultUnitsComboBox.TabIndex = 7;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.defaultUnitsComboBox);
|
||||
this.Controls.Add(this.defaultUnitsLabel);
|
||||
this.Controls.Add(this.sensusExtensionsCheckBox);
|
||||
this.Controls.Add(this.enterSNsAtTheEndCheckBox);
|
||||
this.Controls.Add(this.showEndStateFormCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.CheckBox showEndStateFormCheckBox;
|
||||
private System.Windows.Forms.CheckBox enterSNsAtTheEndCheckBox;
|
||||
private System.Windows.Forms.CheckBox sensusExtensionsCheckBox;
|
||||
private System.Windows.Forms.Label defaultUnitsLabel;
|
||||
private System.Windows.Forms.ComboBox defaultUnitsComboBox;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,31 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring("TBF.BenchControl.".Length); } }
|
||||
|
||||
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig()
|
||||
{
|
||||
return new EntryFormCfg(this.GetType().Namespace.Substring("TBF.BenchControl.DataEntry.".Length), this);
|
||||
}
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
IComponentCfg cfg = ComponentCfgBase.CreateFromDbEntity(EntryFormCfg.Serializer, component, this);
|
||||
(cfg as EntryFormCfg).Units = (cfg as EntryFormCfg).DefaultUnits;
|
||||
return cfg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,553 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
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;
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] WMStartState;
|
||||
public readonly string[] WMStartStateStr;
|
||||
public double[] WMEndState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] EnergyStartState;
|
||||
public readonly string[] EnergyStartStateStr;
|
||||
public double[] EnergyEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
double refEnergy;
|
||||
double energyWarningLimLo; /// limit to display exclamation mark, typically 2x energyErrLimLo
|
||||
double energyWarningLimHi; /// limit to display exclamation mark, typically 2x energyErrLimHi
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
Label[] labels;
|
||||
TextBox[] startTextBoxes;
|
||||
TextBox[] endTextBoxes;
|
||||
Label[] energyLabels;
|
||||
TextBox[] energyStartTextBoxes;
|
||||
TextBox[] energyEndTextBoxes;
|
||||
IList<TextBox> enabledTextBoxes;
|
||||
|
||||
/// <summary>
|
||||
/// Parameterless constructor initializing common part for start and endstate form
|
||||
/// </summary>
|
||||
public TestStartEndForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
TextBoxesCount = 6;
|
||||
|
||||
labels = new Label[] { label1, label2, label3, label4, label5, label6 };
|
||||
|
||||
startTextBoxes = new TextBox[]
|
||||
{
|
||||
startTextBox1, startTextBox2, startTextBox3, startTextBox4, startTextBox5, startTextBox6,
|
||||
};
|
||||
endTextBoxes = new TextBox[]
|
||||
{
|
||||
endTextBox1, endTextBox2, endTextBox3, endTextBox4, endTextBox5, endTextBox6,
|
||||
};
|
||||
|
||||
energyLabels = new Label[] { label13, label14, label15, label16, label17, label18 };
|
||||
|
||||
energyStartTextBoxes = new TextBox[]
|
||||
{
|
||||
startTextBox13, startTextBox14, startTextBox15, startTextBox16, startTextBox17, startTextBox18,
|
||||
};
|
||||
energyEndTextBoxes = new TextBox[]
|
||||
{
|
||||
endTextBox13, endTextBox14, endTextBox15, endTextBox16, endTextBox17, endTextBox18,
|
||||
};
|
||||
|
||||
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(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
entryFormCfg = cfg;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
|
||||
EnergyStartState = new double[waterMetersCount];
|
||||
EnergyStartStateStr = new string[waterMetersCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to fill in end states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="wmStartStateStr">Information entered on test start</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(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, string[] energyStartStateStr,
|
||||
bool[] disabled, double refVolume, double errLimLo, double errLimHi,
|
||||
double refEnergy, double energyErrLimLo, double energyErrLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
entryFormCfg = cfg;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
|
||||
if (energyStartStateStr == null || energyStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'energyStartStateStr' argument"));
|
||||
this.EnergyStartStateStr = energyStartStateStr;
|
||||
|
||||
this.disabled = disabled;
|
||||
|
||||
this.refVolume = refVolume;
|
||||
this.warningLimLo = 2 * errLimLo;
|
||||
this.warningLimHi = 2 * errLimHi;
|
||||
|
||||
this.refEnergy = refEnergy;
|
||||
this.energyWarningLimLo = 2 * energyErrLimLo;
|
||||
this.energyWarningLimHi = 2 * energyErrLimHi;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMEndState = new double[waterMetersCount];
|
||||
EnergyEndState = new double[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 (Config.Data.HeatMetersCount < TextBoxesCount)
|
||||
{
|
||||
int nrLines = Math.Max(1, Config.Data.HeatMetersCount / Config.Data.LineSize);
|
||||
int gap = (TextBoxesCount - Config.Data.HeatMetersCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
{
|
||||
for (int i = 0; i < Config.Data.LineSize; i++)
|
||||
{
|
||||
labels[dest] = labels[l * Config.Data.LineSize + l * gap + i];
|
||||
startTextBoxes[dest] = startTextBoxes[l * Config.Data.LineSize + l * gap + i];
|
||||
endTextBoxes[dest] = endTextBoxes[l * Config.Data.LineSize + l * gap + i];
|
||||
energyLabels[dest] = energyLabels[l * Config.Data.LineSize + l * gap + i];
|
||||
energyStartTextBoxes[dest] = energyStartTextBoxes[l * Config.Data.LineSize + l * gap + i];
|
||||
energyEndTextBoxes[dest] = energyEndTextBoxes[l * Config.Data.LineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
TextBoxesCount = Config.Data.HeatMetersCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void TestStartEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
for (Config.Unit units = 0; units < Config.Unit.Count; units++)
|
||||
{
|
||||
if (Config.Units.IsEnergy(units)) unitsComboBox.Items.Add(units.ToString());
|
||||
}
|
||||
unitsComboBox.Text = entryFormCfg.Units.ToString();
|
||||
|
||||
//Height = 115 + 90 * WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (i < WaterMetersCount)
|
||||
{
|
||||
labels[i].Visible = startTextBoxes[i].Visible = endTextBoxes[i].Visible = true;
|
||||
energyLabels[i].Visible = energyStartTextBoxes[i].Visible = energyEndTextBoxes[i].Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (WMStartStateStr != null && i < WMStartStateStr.Length)
|
||||
{
|
||||
startTextBoxes[i].Text = WMStartStateStr[i];
|
||||
}
|
||||
if (EnergyStartStateStr != null && i < EnergyStartStateStr.Length)
|
||||
{
|
||||
energyStartTextBoxes[i].Text = EnergyStartStateStr[i];
|
||||
}
|
||||
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
{
|
||||
endTextBoxes[i].Enabled = false;
|
||||
energyEndTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
endTextBoxes[i].Enabled = true;
|
||||
energyEndTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(endTextBoxes[i]);
|
||||
enabledTextBoxes.Add(energyEndTextBoxes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
{
|
||||
startTextBoxes[i].Enabled = false;
|
||||
energyStartTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
startTextBoxes[i].Enabled = true;
|
||||
energyStartTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(startTextBoxes[i]);
|
||||
enabledTextBoxes.Add(energyStartTextBoxes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Water_Meter_States;
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
labels[i].Text = string.Format("{0} {1} [l]", Strings.Volume + " ", i + 1);
|
||||
energyLabels[i].Text = string.Format("{0} {1}", Strings.Energy + " ", i + 1);
|
||||
}
|
||||
startLabel.Text = Strings.Start;
|
||||
endLabel.Text = Strings.End;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
}
|
||||
|
||||
private void unitsComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
{
|
||||
if (u.ToString() == unitsComboBox.Text)
|
||||
{
|
||||
entryFormCfg.Units = u;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs eArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, TextBoxesCount); i++)
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
EnergyEndState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyEndTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, TextBoxesCount); i++)
|
||||
{
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
EnergyStartStateStr[i] = energyStartTextBoxes[i].Text;
|
||||
EnergyStartState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyStartTextBoxes[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 endTextBoxes (1..24).
|
||||
/// </summary>
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox1.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox2.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox2.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox3.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox4.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox5.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox6.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox13.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox13.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox14.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox14.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox15.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox15.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox16.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox16.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox17.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox17.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < err);
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox18.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox18.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = (err < energyWarningLimLo) || (energyWarningLimHi < 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 startTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox1); }
|
||||
private void startTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox2); }
|
||||
private void startTextBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox3); }
|
||||
private void startTextBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox4); }
|
||||
private void startTextBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox5); }
|
||||
private void startTextBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox6); }
|
||||
private void startTextBox13_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox13); }
|
||||
private void startTextBox14_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox14); }
|
||||
private void startTextBox15_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox15); }
|
||||
private void startTextBox16_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox16); }
|
||||
private void startTextBox17_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox17); }
|
||||
private void startTextBox18_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox18); }
|
||||
|
||||
private void endTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox1); }
|
||||
private void endTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox2); }
|
||||
private void endTextBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox3); }
|
||||
private void endTextBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox4); }
|
||||
private void endTextBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox5); }
|
||||
private void endTextBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox6); }
|
||||
private void endTextBox13_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox13); }
|
||||
private void endTextBox14_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox14); }
|
||||
private void endTextBox15_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox15); }
|
||||
private void endTextBox16_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox16); }
|
||||
private void endTextBox17_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox17); }
|
||||
private void endTextBox18_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox18); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,846 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
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.exclamation1 = new System.Windows.Forms.Label();
|
||||
this.startTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.exclamation3 = new System.Windows.Forms.Label();
|
||||
this.startTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.exclamation4 = new System.Windows.Forms.Label();
|
||||
this.startTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.exclamation5 = new System.Windows.Forms.Label();
|
||||
this.startTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.exclamation6 = new System.Windows.Forms.Label();
|
||||
this.startTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.startLabel = new System.Windows.Forms.Label();
|
||||
this.endLabel = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.endTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.startTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.exclamation2 = new System.Windows.Forms.Label();
|
||||
this.exclamation18 = new System.Windows.Forms.Label();
|
||||
this.exclamation17 = new System.Windows.Forms.Label();
|
||||
this.startTextBox18 = new System.Windows.Forms.TextBox();
|
||||
this.exclamation16 = new System.Windows.Forms.Label();
|
||||
this.endTextBox18 = new System.Windows.Forms.TextBox();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.startTextBox17 = new System.Windows.Forms.TextBox();
|
||||
this.exclamation15 = new System.Windows.Forms.Label();
|
||||
this.endTextBox17 = new System.Windows.Forms.TextBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.startTextBox16 = new System.Windows.Forms.TextBox();
|
||||
this.exclamation14 = new System.Windows.Forms.Label();
|
||||
this.endTextBox16 = new System.Windows.Forms.TextBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.startTextBox15 = new System.Windows.Forms.TextBox();
|
||||
this.exclamation13 = new System.Windows.Forms.Label();
|
||||
this.endTextBox15 = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.startTextBox14 = new System.Windows.Forms.TextBox();
|
||||
this.label35 = new System.Windows.Forms.Label();
|
||||
this.endTextBox14 = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.startTextBox13 = new System.Windows.Forms.TextBox();
|
||||
this.label37 = new System.Windows.Forms.Label();
|
||||
this.endTextBox13 = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.unitsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.unitsLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// exclamation1
|
||||
//
|
||||
this.exclamation1.AutoSize = true;
|
||||
this.exclamation1.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation1.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation1.Location = new System.Drawing.Point(532, 56);
|
||||
this.exclamation1.Name = "exclamation1";
|
||||
this.exclamation1.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation1.TabIndex = 5;
|
||||
this.exclamation1.Text = "!";
|
||||
this.exclamation1.Visible = false;
|
||||
//
|
||||
// startTextBox1
|
||||
//
|
||||
this.startTextBox1.Enabled = false;
|
||||
this.startTextBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox1.Location = new System.Drawing.Point(185, 60);
|
||||
this.startTextBox1.Name = "startTextBox1";
|
||||
this.startTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox1.TabIndex = 3;
|
||||
this.startTextBox1.Visible = false;
|
||||
this.startTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox1_KeyPress);
|
||||
//
|
||||
// endTextBox1
|
||||
//
|
||||
this.endTextBox1.Enabled = false;
|
||||
this.endTextBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox1.Location = new System.Drawing.Point(367, 60);
|
||||
this.endTextBox1.Name = "endTextBox1";
|
||||
this.endTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox1.TabIndex = 4;
|
||||
this.endTextBox1.Visible = false;
|
||||
this.endTextBox1.TextChanged += new System.EventHandler(this.endTextBox1_TextChanged);
|
||||
this.endTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox1_KeyPress);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label1.Location = new System.Drawing.Point(23, 63);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(132, 23);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Volume 1 [l]";
|
||||
this.label1.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(1159, 60);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(98, 63);
|
||||
this.okButton.TabIndex = 100;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// exclamation3
|
||||
//
|
||||
this.exclamation3.AutoSize = true;
|
||||
this.exclamation3.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation3.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation3.Location = new System.Drawing.Point(532, 144);
|
||||
this.exclamation3.Name = "exclamation3";
|
||||
this.exclamation3.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation3.TabIndex = 13;
|
||||
this.exclamation3.Text = "!";
|
||||
this.exclamation3.Visible = false;
|
||||
//
|
||||
// startTextBox3
|
||||
//
|
||||
this.startTextBox3.Enabled = false;
|
||||
this.startTextBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox3.Location = new System.Drawing.Point(185, 148);
|
||||
this.startTextBox3.Name = "startTextBox3";
|
||||
this.startTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox3.TabIndex = 11;
|
||||
this.startTextBox3.Visible = false;
|
||||
this.startTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox3_KeyPress);
|
||||
//
|
||||
// endTextBox3
|
||||
//
|
||||
this.endTextBox3.Enabled = false;
|
||||
this.endTextBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox3.Location = new System.Drawing.Point(367, 148);
|
||||
this.endTextBox3.Name = "endTextBox3";
|
||||
this.endTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox3.TabIndex = 12;
|
||||
this.endTextBox3.Visible = false;
|
||||
this.endTextBox3.TextChanged += new System.EventHandler(this.endTextBox3_TextChanged);
|
||||
this.endTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox3_KeyPress);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label3.Location = new System.Drawing.Point(23, 151);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(132, 23);
|
||||
this.label3.TabIndex = 10;
|
||||
this.label3.Text = "Volume 3 [l]";
|
||||
this.label3.Visible = false;
|
||||
//
|
||||
// exclamation4
|
||||
//
|
||||
this.exclamation4.AutoSize = true;
|
||||
this.exclamation4.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation4.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation4.Location = new System.Drawing.Point(532, 188);
|
||||
this.exclamation4.Name = "exclamation4";
|
||||
this.exclamation4.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation4.TabIndex = 17;
|
||||
this.exclamation4.Text = "!";
|
||||
this.exclamation4.Visible = false;
|
||||
//
|
||||
// startTextBox4
|
||||
//
|
||||
this.startTextBox4.Enabled = false;
|
||||
this.startTextBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox4.Location = new System.Drawing.Point(185, 192);
|
||||
this.startTextBox4.Name = "startTextBox4";
|
||||
this.startTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox4.TabIndex = 15;
|
||||
this.startTextBox4.Visible = false;
|
||||
this.startTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox4_KeyPress);
|
||||
//
|
||||
// endTextBox4
|
||||
//
|
||||
this.endTextBox4.Enabled = false;
|
||||
this.endTextBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox4.Location = new System.Drawing.Point(367, 192);
|
||||
this.endTextBox4.Name = "endTextBox4";
|
||||
this.endTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox4.TabIndex = 16;
|
||||
this.endTextBox4.Visible = false;
|
||||
this.endTextBox4.TextChanged += new System.EventHandler(this.endTextBox4_TextChanged);
|
||||
this.endTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox4_KeyPress);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label4.Location = new System.Drawing.Point(23, 195);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(132, 23);
|
||||
this.label4.TabIndex = 14;
|
||||
this.label4.Text = "Volume 4 [l]";
|
||||
this.label4.Visible = false;
|
||||
//
|
||||
// exclamation5
|
||||
//
|
||||
this.exclamation5.AutoSize = true;
|
||||
this.exclamation5.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation5.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation5.Location = new System.Drawing.Point(532, 232);
|
||||
this.exclamation5.Name = "exclamation5";
|
||||
this.exclamation5.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation5.TabIndex = 21;
|
||||
this.exclamation5.Text = "!";
|
||||
this.exclamation5.Visible = false;
|
||||
//
|
||||
// startTextBox5
|
||||
//
|
||||
this.startTextBox5.Enabled = false;
|
||||
this.startTextBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox5.Location = new System.Drawing.Point(185, 236);
|
||||
this.startTextBox5.Name = "startTextBox5";
|
||||
this.startTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox5.TabIndex = 19;
|
||||
this.startTextBox5.Visible = false;
|
||||
this.startTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox5_KeyPress);
|
||||
//
|
||||
// endTextBox5
|
||||
//
|
||||
this.endTextBox5.Enabled = false;
|
||||
this.endTextBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox5.Location = new System.Drawing.Point(367, 236);
|
||||
this.endTextBox5.Name = "endTextBox5";
|
||||
this.endTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox5.TabIndex = 20;
|
||||
this.endTextBox5.Visible = false;
|
||||
this.endTextBox5.TextChanged += new System.EventHandler(this.endTextBox5_TextChanged);
|
||||
this.endTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox5_KeyPress);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label5.Location = new System.Drawing.Point(23, 239);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(132, 23);
|
||||
this.label5.TabIndex = 18;
|
||||
this.label5.Text = "Volume 5 [l]";
|
||||
this.label5.Visible = false;
|
||||
//
|
||||
// exclamation6
|
||||
//
|
||||
this.exclamation6.AutoSize = true;
|
||||
this.exclamation6.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation6.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation6.Location = new System.Drawing.Point(532, 276);
|
||||
this.exclamation6.Name = "exclamation6";
|
||||
this.exclamation6.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation6.TabIndex = 25;
|
||||
this.exclamation6.Text = "!";
|
||||
this.exclamation6.Visible = false;
|
||||
//
|
||||
// startTextBox6
|
||||
//
|
||||
this.startTextBox6.Enabled = false;
|
||||
this.startTextBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox6.Location = new System.Drawing.Point(185, 280);
|
||||
this.startTextBox6.Name = "startTextBox6";
|
||||
this.startTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox6.TabIndex = 23;
|
||||
this.startTextBox6.Visible = false;
|
||||
this.startTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox6_KeyPress);
|
||||
//
|
||||
// endTextBox6
|
||||
//
|
||||
this.endTextBox6.Enabled = false;
|
||||
this.endTextBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox6.Location = new System.Drawing.Point(367, 280);
|
||||
this.endTextBox6.Name = "endTextBox6";
|
||||
this.endTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox6.TabIndex = 24;
|
||||
this.endTextBox6.Visible = false;
|
||||
this.endTextBox6.TextChanged += new System.EventHandler(this.endTextBox6_TextChanged);
|
||||
this.endTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox6_KeyPress);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label6.Location = new System.Drawing.Point(23, 283);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(132, 23);
|
||||
this.label6.TabIndex = 22;
|
||||
this.label6.Text = "Volume 6 [l]";
|
||||
this.label6.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(237, 21);
|
||||
this.startLabel.Name = "startLabel";
|
||||
this.startLabel.Size = new System.Drawing.Size(56, 23);
|
||||
this.startLabel.TabIndex = 0;
|
||||
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(423, 21);
|
||||
this.endLabel.Name = "endLabel";
|
||||
this.endLabel.Size = new System.Drawing.Size(46, 23);
|
||||
this.endLabel.TabIndex = 1;
|
||||
this.endLabel.Text = "End";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label2.Location = new System.Drawing.Point(23, 107);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(132, 23);
|
||||
this.label2.TabIndex = 6;
|
||||
this.label2.Text = "Volume 2 [l]";
|
||||
this.label2.Visible = false;
|
||||
//
|
||||
// endTextBox2
|
||||
//
|
||||
this.endTextBox2.Enabled = false;
|
||||
this.endTextBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox2.Location = new System.Drawing.Point(367, 104);
|
||||
this.endTextBox2.Name = "endTextBox2";
|
||||
this.endTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox2.TabIndex = 8;
|
||||
this.endTextBox2.Visible = false;
|
||||
this.endTextBox2.TextChanged += new System.EventHandler(this.endTextBox2_TextChanged);
|
||||
this.endTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox2_KeyPress);
|
||||
//
|
||||
// startTextBox2
|
||||
//
|
||||
this.startTextBox2.Enabled = false;
|
||||
this.startTextBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox2.Location = new System.Drawing.Point(185, 104);
|
||||
this.startTextBox2.Name = "startTextBox2";
|
||||
this.startTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox2.TabIndex = 7;
|
||||
this.startTextBox2.Visible = false;
|
||||
this.startTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox2_KeyPress);
|
||||
//
|
||||
// exclamation2
|
||||
//
|
||||
this.exclamation2.AutoSize = true;
|
||||
this.exclamation2.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation2.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation2.Location = new System.Drawing.Point(532, 100);
|
||||
this.exclamation2.Name = "exclamation2";
|
||||
this.exclamation2.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation2.TabIndex = 9;
|
||||
this.exclamation2.Text = "!";
|
||||
this.exclamation2.Visible = false;
|
||||
//
|
||||
// exclamation18
|
||||
//
|
||||
this.exclamation18.AutoSize = true;
|
||||
this.exclamation18.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation18.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation18.Location = new System.Drawing.Point(1101, 276);
|
||||
this.exclamation18.Name = "exclamation18";
|
||||
this.exclamation18.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation18.TabIndex = 75;
|
||||
this.exclamation18.Text = "!";
|
||||
this.exclamation18.Visible = false;
|
||||
//
|
||||
// exclamation17
|
||||
//
|
||||
this.exclamation17.AutoSize = true;
|
||||
this.exclamation17.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation17.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation17.Location = new System.Drawing.Point(1101, 232);
|
||||
this.exclamation17.Name = "exclamation17";
|
||||
this.exclamation17.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation17.TabIndex = 71;
|
||||
this.exclamation17.Text = "!";
|
||||
this.exclamation17.Visible = false;
|
||||
//
|
||||
// startTextBox18
|
||||
//
|
||||
this.startTextBox18.Enabled = false;
|
||||
this.startTextBox18.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox18.Location = new System.Drawing.Point(754, 280);
|
||||
this.startTextBox18.Name = "startTextBox18";
|
||||
this.startTextBox18.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox18.TabIndex = 73;
|
||||
this.startTextBox18.Visible = false;
|
||||
this.startTextBox18.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox18_KeyPress);
|
||||
//
|
||||
// exclamation16
|
||||
//
|
||||
this.exclamation16.AutoSize = true;
|
||||
this.exclamation16.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation16.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation16.Location = new System.Drawing.Point(1101, 188);
|
||||
this.exclamation16.Name = "exclamation16";
|
||||
this.exclamation16.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation16.TabIndex = 67;
|
||||
this.exclamation16.Text = "!";
|
||||
this.exclamation16.Visible = false;
|
||||
//
|
||||
// endTextBox18
|
||||
//
|
||||
this.endTextBox18.Enabled = false;
|
||||
this.endTextBox18.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox18.Location = new System.Drawing.Point(936, 280);
|
||||
this.endTextBox18.Name = "endTextBox18";
|
||||
this.endTextBox18.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox18.TabIndex = 74;
|
||||
this.endTextBox18.Visible = false;
|
||||
this.endTextBox18.TextChanged += new System.EventHandler(this.endTextBox18_TextChanged);
|
||||
this.endTextBox18.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox18_KeyPress);
|
||||
//
|
||||
// label18
|
||||
//
|
||||
this.label18.AutoSize = true;
|
||||
this.label18.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label18.Location = new System.Drawing.Point(592, 283);
|
||||
this.label18.Name = "label18";
|
||||
this.label18.Size = new System.Drawing.Size(95, 23);
|
||||
this.label18.TabIndex = 72;
|
||||
this.label18.Text = "Energy 6";
|
||||
this.label18.Visible = false;
|
||||
//
|
||||
// startTextBox17
|
||||
//
|
||||
this.startTextBox17.Enabled = false;
|
||||
this.startTextBox17.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox17.Location = new System.Drawing.Point(754, 236);
|
||||
this.startTextBox17.Name = "startTextBox17";
|
||||
this.startTextBox17.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox17.TabIndex = 69;
|
||||
this.startTextBox17.Visible = false;
|
||||
this.startTextBox17.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox17_KeyPress);
|
||||
//
|
||||
// exclamation15
|
||||
//
|
||||
this.exclamation15.AutoSize = true;
|
||||
this.exclamation15.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation15.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation15.Location = new System.Drawing.Point(1101, 144);
|
||||
this.exclamation15.Name = "exclamation15";
|
||||
this.exclamation15.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation15.TabIndex = 63;
|
||||
this.exclamation15.Text = "!";
|
||||
this.exclamation15.Visible = false;
|
||||
//
|
||||
// endTextBox17
|
||||
//
|
||||
this.endTextBox17.Enabled = false;
|
||||
this.endTextBox17.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox17.Location = new System.Drawing.Point(936, 236);
|
||||
this.endTextBox17.Name = "endTextBox17";
|
||||
this.endTextBox17.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox17.TabIndex = 70;
|
||||
this.endTextBox17.Visible = false;
|
||||
this.endTextBox17.TextChanged += new System.EventHandler(this.endTextBox17_TextChanged);
|
||||
this.endTextBox17.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox17_KeyPress);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
this.label17.AutoSize = true;
|
||||
this.label17.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label17.Location = new System.Drawing.Point(592, 239);
|
||||
this.label17.Name = "label17";
|
||||
this.label17.Size = new System.Drawing.Size(95, 23);
|
||||
this.label17.TabIndex = 68;
|
||||
this.label17.Text = "Energy 5";
|
||||
this.label17.Visible = false;
|
||||
//
|
||||
// startTextBox16
|
||||
//
|
||||
this.startTextBox16.Enabled = false;
|
||||
this.startTextBox16.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox16.Location = new System.Drawing.Point(754, 192);
|
||||
this.startTextBox16.Name = "startTextBox16";
|
||||
this.startTextBox16.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox16.TabIndex = 65;
|
||||
this.startTextBox16.Visible = false;
|
||||
this.startTextBox16.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox16_KeyPress);
|
||||
//
|
||||
// exclamation14
|
||||
//
|
||||
this.exclamation14.AutoSize = true;
|
||||
this.exclamation14.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation14.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation14.Location = new System.Drawing.Point(1101, 100);
|
||||
this.exclamation14.Name = "exclamation14";
|
||||
this.exclamation14.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation14.TabIndex = 59;
|
||||
this.exclamation14.Text = "!";
|
||||
this.exclamation14.Visible = false;
|
||||
//
|
||||
// endTextBox16
|
||||
//
|
||||
this.endTextBox16.Enabled = false;
|
||||
this.endTextBox16.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox16.Location = new System.Drawing.Point(936, 192);
|
||||
this.endTextBox16.Name = "endTextBox16";
|
||||
this.endTextBox16.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox16.TabIndex = 66;
|
||||
this.endTextBox16.Visible = false;
|
||||
this.endTextBox16.TextChanged += new System.EventHandler(this.endTextBox16_TextChanged);
|
||||
this.endTextBox16.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox16_KeyPress);
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.AutoSize = true;
|
||||
this.label16.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label16.Location = new System.Drawing.Point(592, 195);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(95, 23);
|
||||
this.label16.TabIndex = 64;
|
||||
this.label16.Text = "Energy 4";
|
||||
this.label16.Visible = false;
|
||||
//
|
||||
// startTextBox15
|
||||
//
|
||||
this.startTextBox15.Enabled = false;
|
||||
this.startTextBox15.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox15.Location = new System.Drawing.Point(754, 148);
|
||||
this.startTextBox15.Name = "startTextBox15";
|
||||
this.startTextBox15.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox15.TabIndex = 61;
|
||||
this.startTextBox15.Visible = false;
|
||||
this.startTextBox15.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox15_KeyPress);
|
||||
//
|
||||
// exclamation13
|
||||
//
|
||||
this.exclamation13.AutoSize = true;
|
||||
this.exclamation13.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation13.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation13.Location = new System.Drawing.Point(1101, 56);
|
||||
this.exclamation13.Name = "exclamation13";
|
||||
this.exclamation13.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation13.TabIndex = 55;
|
||||
this.exclamation13.Text = "!";
|
||||
this.exclamation13.Visible = false;
|
||||
//
|
||||
// endTextBox15
|
||||
//
|
||||
this.endTextBox15.Enabled = false;
|
||||
this.endTextBox15.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox15.Location = new System.Drawing.Point(936, 148);
|
||||
this.endTextBox15.Name = "endTextBox15";
|
||||
this.endTextBox15.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox15.TabIndex = 62;
|
||||
this.endTextBox15.Visible = false;
|
||||
this.endTextBox15.TextChanged += new System.EventHandler(this.endTextBox15_TextChanged);
|
||||
this.endTextBox15.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox15_KeyPress);
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label15.Location = new System.Drawing.Point(592, 151);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(95, 23);
|
||||
this.label15.TabIndex = 60;
|
||||
this.label15.Text = "Energy 3";
|
||||
this.label15.Visible = false;
|
||||
//
|
||||
// startTextBox14
|
||||
//
|
||||
this.startTextBox14.Enabled = false;
|
||||
this.startTextBox14.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox14.Location = new System.Drawing.Point(754, 104);
|
||||
this.startTextBox14.Name = "startTextBox14";
|
||||
this.startTextBox14.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox14.TabIndex = 57;
|
||||
this.startTextBox14.Visible = false;
|
||||
this.startTextBox14.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox14_KeyPress);
|
||||
//
|
||||
// label35
|
||||
//
|
||||
this.label35.AutoSize = true;
|
||||
this.label35.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label35.Location = new System.Drawing.Point(992, 21);
|
||||
this.label35.Name = "label35";
|
||||
this.label35.Size = new System.Drawing.Size(46, 23);
|
||||
this.label35.TabIndex = 51;
|
||||
this.label35.Text = "End";
|
||||
//
|
||||
// endTextBox14
|
||||
//
|
||||
this.endTextBox14.Enabled = false;
|
||||
this.endTextBox14.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox14.Location = new System.Drawing.Point(936, 104);
|
||||
this.endTextBox14.Name = "endTextBox14";
|
||||
this.endTextBox14.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox14.TabIndex = 58;
|
||||
this.endTextBox14.Visible = false;
|
||||
this.endTextBox14.TextChanged += new System.EventHandler(this.endTextBox14_TextChanged);
|
||||
this.endTextBox14.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox14_KeyPress);
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label14.Location = new System.Drawing.Point(592, 107);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(95, 23);
|
||||
this.label14.TabIndex = 56;
|
||||
this.label14.Text = "Energy 2";
|
||||
this.label14.Visible = false;
|
||||
//
|
||||
// startTextBox13
|
||||
//
|
||||
this.startTextBox13.Enabled = false;
|
||||
this.startTextBox13.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox13.Location = new System.Drawing.Point(754, 60);
|
||||
this.startTextBox13.Name = "startTextBox13";
|
||||
this.startTextBox13.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox13.TabIndex = 53;
|
||||
this.startTextBox13.Visible = false;
|
||||
this.startTextBox13.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox13_KeyPress);
|
||||
//
|
||||
// label37
|
||||
//
|
||||
this.label37.AutoSize = true;
|
||||
this.label37.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label37.Location = new System.Drawing.Point(806, 21);
|
||||
this.label37.Name = "label37";
|
||||
this.label37.Size = new System.Drawing.Size(56, 23);
|
||||
this.label37.TabIndex = 50;
|
||||
this.label37.Text = "Start";
|
||||
//
|
||||
// endTextBox13
|
||||
//
|
||||
this.endTextBox13.Enabled = false;
|
||||
this.endTextBox13.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox13.Location = new System.Drawing.Point(936, 60);
|
||||
this.endTextBox13.Name = "endTextBox13";
|
||||
this.endTextBox13.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox13.TabIndex = 54;
|
||||
this.endTextBox13.Visible = false;
|
||||
this.endTextBox13.TextChanged += new System.EventHandler(this.endTextBox13_TextChanged);
|
||||
this.endTextBox13.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox13_KeyPress);
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label13.Location = new System.Drawing.Point(592, 63);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(95, 23);
|
||||
this.label13.TabIndex = 52;
|
||||
this.label13.Text = "Energy 1";
|
||||
this.label13.Visible = false;
|
||||
//
|
||||
// unitsComboBox
|
||||
//
|
||||
this.unitsComboBox.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.unitsComboBox.FormattingEnabled = true;
|
||||
this.unitsComboBox.Location = new System.Drawing.Point(1159, 192);
|
||||
this.unitsComboBox.Name = "unitsComboBox";
|
||||
this.unitsComboBox.Size = new System.Drawing.Size(98, 31);
|
||||
this.unitsComboBox.TabIndex = 101;
|
||||
this.unitsComboBox.SelectedIndexChanged += new System.EventHandler(this.unitsComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// unitsLabel
|
||||
//
|
||||
this.unitsLabel.AutoSize = true;
|
||||
this.unitsLabel.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.unitsLabel.Location = new System.Drawing.Point(1155, 159);
|
||||
this.unitsLabel.Name = "unitsLabel";
|
||||
this.unitsLabel.Size = new System.Drawing.Size(68, 23);
|
||||
this.unitsLabel.TabIndex = 102;
|
||||
this.unitsLabel.Text = "Units:";
|
||||
//
|
||||
// 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(1292, 338);
|
||||
this.Controls.Add(this.unitsLabel);
|
||||
this.Controls.Add(this.unitsComboBox);
|
||||
this.Controls.Add(this.exclamation18);
|
||||
this.Controls.Add(this.exclamation17);
|
||||
this.Controls.Add(this.startTextBox18);
|
||||
this.Controls.Add(this.exclamation16);
|
||||
this.Controls.Add(this.endTextBox18);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.startTextBox17);
|
||||
this.Controls.Add(this.exclamation15);
|
||||
this.Controls.Add(this.endTextBox17);
|
||||
this.Controls.Add(this.label17);
|
||||
this.Controls.Add(this.startTextBox16);
|
||||
this.Controls.Add(this.exclamation14);
|
||||
this.Controls.Add(this.endTextBox16);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.startTextBox15);
|
||||
this.Controls.Add(this.exclamation13);
|
||||
this.Controls.Add(this.endTextBox15);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.startTextBox14);
|
||||
this.Controls.Add(this.label35);
|
||||
this.Controls.Add(this.endTextBox14);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.startTextBox13);
|
||||
this.Controls.Add(this.label37);
|
||||
this.Controls.Add(this.endTextBox13);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.exclamation6);
|
||||
this.Controls.Add(this.exclamation5);
|
||||
this.Controls.Add(this.startTextBox6);
|
||||
this.Controls.Add(this.exclamation4);
|
||||
this.Controls.Add(this.endTextBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.startTextBox5);
|
||||
this.Controls.Add(this.exclamation3);
|
||||
this.Controls.Add(this.endTextBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.startTextBox4);
|
||||
this.Controls.Add(this.exclamation2);
|
||||
this.Controls.Add(this.endTextBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.startTextBox3);
|
||||
this.Controls.Add(this.exclamation1);
|
||||
this.Controls.Add(this.endTextBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.startTextBox2);
|
||||
this.Controls.Add(this.endLabel);
|
||||
this.Controls.Add(this.endTextBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.startTextBox1);
|
||||
this.Controls.Add(this.startLabel);
|
||||
this.Controls.Add(this.endTextBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.okButton);
|
||||
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.TestStartEndForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox endTextBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.TextBox endTextBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox endTextBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox endTextBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox endTextBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox startTextBox1;
|
||||
private System.Windows.Forms.TextBox startTextBox3;
|
||||
private System.Windows.Forms.TextBox startTextBox4;
|
||||
private System.Windows.Forms.TextBox startTextBox5;
|
||||
private System.Windows.Forms.TextBox startTextBox6;
|
||||
private System.Windows.Forms.Label startLabel;
|
||||
private System.Windows.Forms.Label endLabel;
|
||||
private System.Windows.Forms.Label exclamation1;
|
||||
private System.Windows.Forms.Label exclamation3;
|
||||
private System.Windows.Forms.Label exclamation4;
|
||||
private System.Windows.Forms.Label exclamation5;
|
||||
private System.Windows.Forms.Label exclamation6;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox endTextBox2;
|
||||
private System.Windows.Forms.TextBox startTextBox2;
|
||||
private System.Windows.Forms.Label exclamation2;
|
||||
private System.Windows.Forms.Label exclamation18;
|
||||
private System.Windows.Forms.Label exclamation17;
|
||||
private System.Windows.Forms.TextBox startTextBox18;
|
||||
private System.Windows.Forms.Label exclamation16;
|
||||
private System.Windows.Forms.TextBox endTextBox18;
|
||||
private System.Windows.Forms.Label label18;
|
||||
private System.Windows.Forms.TextBox startTextBox17;
|
||||
private System.Windows.Forms.Label exclamation15;
|
||||
private System.Windows.Forms.TextBox endTextBox17;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.TextBox startTextBox16;
|
||||
private System.Windows.Forms.Label exclamation14;
|
||||
private System.Windows.Forms.TextBox endTextBox16;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.TextBox startTextBox15;
|
||||
private System.Windows.Forms.Label exclamation13;
|
||||
private System.Windows.Forms.TextBox endTextBox15;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.TextBox startTextBox14;
|
||||
private System.Windows.Forms.Label label35;
|
||||
private System.Windows.Forms.TextBox endTextBox14;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.TextBox startTextBox13;
|
||||
private System.Windows.Forms.Label label37;
|
||||
private System.Windows.Forms.TextBox endTextBox13;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.ComboBox unitsComboBox;
|
||||
private System.Windows.Forms.Label unitsLabel;
|
||||
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user