Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d831ff468 | ||
|
|
8125970bde | ||
|
|
550fe20094 | ||
|
|
25e6a04a98 | ||
|
|
ab8f550bb3 | ||
|
|
c59d2cf52c | ||
|
|
23c9fadf86 | ||
|
|
f5926259a7 | ||
|
|
f180af692f | ||
|
|
d3ca871eb5 | ||
|
|
58f046ca34 | ||
|
|
e1c4da482a | ||
|
|
b7a079515c | ||
|
|
5849984381 | ||
|
|
a75a7d0a4a | ||
|
|
4fa2159e61 | ||
|
|
3f3a01857b | ||
|
|
c37f15bae2 |
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IZRAEL_200</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -28,7 +28,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IZRAEL_200</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -358,6 +358,40 @@ namespace Config.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsPartCompatible(int waterMeterPartNr)
|
||||
{
|
||||
if ((this.Part == 0) || (waterMeterPartNr == 0)) return true;
|
||||
|
||||
if ((this.Part % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 10) % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 100) % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 1000) % 10) == waterMeterPartNr) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether tests part number is OK.
|
||||
/// Examples of correct part number are:
|
||||
/// 1, 2, 12, 21 in case of max. part nr.== 2
|
||||
/// 1, 2, 3, 4, 12, 13, 14, 23, 24, 34, 123, 124, 134, 234, 1234 in case of max. part nr.== 4
|
||||
/// </summary>
|
||||
/// <param name="partNr">Tests par tnumber</param>
|
||||
/// <returns>true when Part number is OK</returns>
|
||||
public static bool IsGoodPartNr(int partNr)
|
||||
{
|
||||
bool firstDigitIsOK = ((partNr % 10) > 0) && ((partNr % 10) <= Config.Data.MaxPartNr);
|
||||
bool secondDigitIsOK = (((partNr/10) % 10) > 0) && (((partNr/10) % 10) <= Config.Data.MaxPartNr);
|
||||
bool thirdDigitIsOK = (((partNr/100) % 10) > 0) && (((partNr/100) % 10) <= Config.Data.MaxPartNr);
|
||||
bool fourthDigitIsOK = (((partNr/1000) % 10) > 0) && (((partNr/1000) % 10) <= Config.Data.MaxPartNr);
|
||||
|
||||
if (firstDigitIsOK && (partNr / 10 == 0)) return true;
|
||||
if (firstDigitIsOK && secondDigitIsOK && (partNr / 100 == 0)) return true;
|
||||
if (firstDigitIsOK && secondDigitIsOK && thirdDigitIsOK && (partNr / 1000 == 0)) return true;
|
||||
if (firstDigitIsOK && secondDigitIsOK && thirdDigitIsOK && fourthDigitIsOK && (partNr / 10000 == 0)) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1102.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1102.0")]
|
||||
[assembly: AssemblyVersion("2.18.1110.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1110.0")]
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Results
|
||||
{
|
||||
if (d.WaterMeters[i] == null) continue;
|
||||
|
||||
if (t.Part != 0 && waterMeterParts[i] != 0 && t.Part != waterMeterParts[i]) continue;
|
||||
if (!t.IsPartCompatible(waterMeterParts[i])) continue;
|
||||
|
||||
///
|
||||
/// Create empty watermeter test results and add them to the list and to dictionaries
|
||||
|
||||
@@ -319,6 +319,18 @@ namespace Results.Entities
|
||||
#endif
|
||||
}
|
||||
|
||||
public virtual bool IsPartCompatible(int waterMeterPartNr)
|
||||
{
|
||||
if ((this.Part == 0) || (waterMeterPartNr == 0)) return true;
|
||||
|
||||
if ((this.Part % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 10) % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 100) % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 1000) % 10) == waterMeterPartNr) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("batch={0}, procedure={1}, test={2}, {3} {4}", Batch.BatchNr, Batch.ProcedureName, Name(), StartTime.ToShortDateString(), StartTime.ToShortTimeString());
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using Config.Entities;
|
||||
using Results.Resources;
|
||||
|
||||
namespace Results.Output.Printers.Label
|
||||
{
|
||||
public class LabelPrintDocument : PrintersCommon
|
||||
{
|
||||
/// Size of the printed area without margins, after taking into account 'pageOrientation'
|
||||
readonly int printHeight;
|
||||
readonly int printWidth;
|
||||
|
||||
/// Selected font
|
||||
readonly Font font;
|
||||
|
||||
/// Data to print
|
||||
Results.Entities.Batch batch;
|
||||
LabelPrinterCfg cfg;
|
||||
Results.Entities.WaterMeter wm;
|
||||
|
||||
/// Items to print
|
||||
IList<WMeterRsltItemSpec> itemsToPrint;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public LabelPrintDocument(Results.Entities.Batch batch, LabelPrinterCfg cfg, Results.Entities.WaterMeter wm, string documentName)
|
||||
{
|
||||
DocumentName = documentName;
|
||||
|
||||
this.batch = batch;
|
||||
this.cfg = cfg;
|
||||
this.wm = wm;
|
||||
this.itemsToPrint = Results.WMeterRsltItemSpec.FromStrArray(cfg.ItemsToPrint);
|
||||
|
||||
/// Initialize fonts
|
||||
font = new Font((cfg.FontFamily != null ? cfg.FontFamily : "Arial"),
|
||||
(cfg.FontSize > 0 ? cfg.FontSize : 10),
|
||||
(FontStyle)cfg.FontStyle);
|
||||
|
||||
/// Set print area size and margins (in dots using 100 dpi)
|
||||
DefaultPageSettings.Landscape = (cfg.PageOrientation == PageOrientation.Landscape);
|
||||
///
|
||||
printHeight = cfg.PaperHeight;
|
||||
printWidth = cfg.PaperWidth;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default onbeginPrint method of the PrintDocument Object
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks></remarks>
|
||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
base.OnBeginPrint(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default OnPrintPage method of the PrintDocument.
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks>This provides the print logic for our document</remarks>
|
||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
/// Run base code
|
||||
base.OnPrintPage(e);
|
||||
|
||||
if (!string.IsNullOrEmpty(cfg.Template))
|
||||
{
|
||||
string templatePath = Path.Combine("C:\\TBF\\Templates\\", cfg.Template);
|
||||
if (File.Exists(templatePath))
|
||||
{
|
||||
e.Graphics.DrawImage(new Bitmap(Image.FromFile(templatePath), printWidth, printHeight), new Rectangle(0, 0, printWidth, printHeight));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in itemsToPrint)
|
||||
{
|
||||
string[] coords = item.Caption.Split(new char[] { ';' });
|
||||
int x, y;
|
||||
if (coords.Length >= 2 && int.TryParse(coords[0].Trim(new char[] { ' ' }), out x)
|
||||
&& int.TryParse(coords[1].Trim(new char[] { ' ' }), out y))
|
||||
{
|
||||
RectangleF printArea = new RectangleF(x, y, printWidth, printHeight);
|
||||
e.Graphics.DrawString(item.Print(wm), this.font, Brushes.Black, printArea);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
|
||||
namespace Results.Output.Printers.Label
|
||||
{
|
||||
public class LabelPrinterCfg
|
||||
{
|
||||
public string Template; /// Full path to a 'png' file
|
||||
public Config.Entities.PageOrientation PageOrientation;
|
||||
public int PaperWidth; /// In 0,254 mm = 1/100 in = 100dpi pixels count
|
||||
public int PaperHeight; /// In 0,254 mm = 1/100 in = 100dpi pixels count
|
||||
public string[] ItemsToPrint;
|
||||
public string FontFamily;
|
||||
public int FontSize;
|
||||
public int FontStyle;
|
||||
public System.Globalization.CultureInfo CultureInfo;
|
||||
public bool GoodOnly;
|
||||
public bool SupressPrinting; /// true = Bypass printing
|
||||
}
|
||||
}
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1093.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1093.0")]
|
||||
[assembly: AssemblyVersion("2.18.1110.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1110.0")]
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IZRAEL_200</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -27,7 +27,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IZRAEL_200</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -104,6 +104,10 @@
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\Enhanced\EnhancedPrinterCfg.cs" />
|
||||
<Compile Include="Output\Printers\Label\LabelPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\Label\LabelPrinterCfg.cs" />
|
||||
<Compile Include="Output\Printers\PrintersCommon.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -418,8 +418,8 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactorLNA, "iPerl CalibFactorLNA", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.CalibFactorLNA)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2ErrWOCorrection, "iPerl Q2ErrWOCorrection", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Q2ErrWOCorrection)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrectionDone, "iPerl Q2CorrectionDone", Quantity.Boolean,ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrectionDone ? Strings.Yes : Strings.No)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2CorrRFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRL)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2CorrLFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLR)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2Corr R-L", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRL)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2Corr L-R", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLR)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrFlowRight, "iPerl Q2CorrFlowRight", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrFlowRight)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.FW_Version, "iPerl FW version", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.FWVersion)));
|
||||
#if ORACLE_DB
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class BatchNrFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "BatchNr"; }
|
||||
public static string GetFilterName() { return "Batch number"; }
|
||||
|
||||
///
|
||||
/// Obligatory wrappers
|
||||
///
|
||||
public string GetThisFilterID() { return GetFilterID(); }
|
||||
public void Save(StringBuilder sb) { (new XmlSerializer(this.GetType())).Serialize(new StringWriter(sb), this); }
|
||||
public void Data2UI() { userIface.Data2UI(); }
|
||||
public void UI2Data() { userIface.UI2Data(); }
|
||||
public UserControl GetFilterUI() { return userIface as UserControl; }
|
||||
|
||||
///
|
||||
/// Serialized filter data
|
||||
///
|
||||
public int BatchNr;
|
||||
|
||||
|
||||
private BatchNrFilterUI userIface;
|
||||
|
||||
public BatchNrFilter()
|
||||
{
|
||||
userIface = new BatchNrFilterUI(this);
|
||||
}
|
||||
|
||||
public IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters)
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<WaterMeter> wms = se.QueryOver<WaterMeter>().List<WaterMeter>();
|
||||
|
||||
foreach (var wm in wms)
|
||||
{
|
||||
if (wm.BatchNr() == BatchNr) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.BatchNr() == BatchNr) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class BatchNrFilterUI
|
||||
{
|
||||
/// <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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.batchNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.batchNrTextBox);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Batch number";
|
||||
//
|
||||
// batchNrTextBox
|
||||
//
|
||||
this.batchNrTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.batchNrTextBox.Name = "batchNrTextBox";
|
||||
this.batchNrTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.batchNrTextBox.TabIndex = 0;
|
||||
//
|
||||
// BatchNrFilterUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "BatchNrFilterUI";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox batchNrTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class BatchNrFilterUI : UserControl
|
||||
{
|
||||
BatchNrFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public BatchNrFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public BatchNrFilterUI(BatchNrFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = BatchNrFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
batchNrTextBox.Text = data.BatchNr.ToString();
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
data.BatchNr = int.Parse(batchNrTextBox.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -18,19 +18,23 @@ namespace ResultsBrowser.Filters
|
||||
IDs = new string[]
|
||||
{
|
||||
DateFilter.GetFilterID(),
|
||||
BatchNrFilter.GetFilterID(),
|
||||
ProcedureFilter.GetFilterID(),
|
||||
ProtocolFilter.GetFilterID(),
|
||||
QnFilter.GetFilterID(),
|
||||
SerialNrFilter.GetFilterID(),
|
||||
WMPositionFilter.GetFilterID(),
|
||||
};
|
||||
|
||||
Names = new string[]
|
||||
{
|
||||
DateFilter.GetFilterName(),
|
||||
BatchNrFilter.GetFilterName(),
|
||||
ProcedureFilter.GetFilterName(),
|
||||
ProtocolFilter.GetFilterName(),
|
||||
QnFilter.GetFilterName(),
|
||||
SerialNrFilter.GetFilterName(),
|
||||
WMPositionFilter.GetFilterName(),
|
||||
};
|
||||
|
||||
Count = IDs.Length;
|
||||
@@ -39,11 +43,13 @@ namespace ResultsBrowser.Filters
|
||||
|
||||
public static IFilter GetFilter(string filterID)
|
||||
{
|
||||
if (filterID == DateFilter.GetFilterID()) return new DateFilter();
|
||||
else if (filterID == ProcedureFilter.GetFilterID()) return new ProcedureFilter();
|
||||
else if (filterID == ProtocolFilter.GetFilterID()) return new ProtocolFilter();
|
||||
else if (filterID == QnFilter.GetFilterID()) return new QnFilter();
|
||||
else if (filterID == SerialNrFilter.GetFilterID()) return new SerialNrFilter();
|
||||
if (filterID == DateFilter.GetFilterID()) return new DateFilter();
|
||||
else if (filterID == BatchNrFilter.GetFilterID()) return new BatchNrFilter();
|
||||
else if (filterID == ProcedureFilter.GetFilterID()) return new ProcedureFilter();
|
||||
else if (filterID == ProtocolFilter.GetFilterID()) return new ProtocolFilter();
|
||||
else if (filterID == QnFilter.GetFilterID()) return new QnFilter();
|
||||
else if (filterID == SerialNrFilter.GetFilterID()) return new SerialNrFilter();
|
||||
else if (filterID == WMPositionFilter.GetFilterID()) return new WMPositionFilter();
|
||||
else return null;
|
||||
}
|
||||
|
||||
@@ -53,11 +59,13 @@ namespace ResultsBrowser.Filters
|
||||
try
|
||||
{
|
||||
Type type;
|
||||
if (filterID == DateFilter.GetFilterID()) type = typeof(DateFilter);
|
||||
else if (filterID == ProcedureFilter.GetFilterID()) type = typeof(ProcedureFilter);
|
||||
else if (filterID == ProtocolFilter.GetFilterID()) type = typeof(ProtocolFilter);
|
||||
else if (filterID == QnFilter.GetFilterID()) type = typeof(QnFilter);
|
||||
else if (filterID == SerialNrFilter.GetFilterID()) type = typeof(SerialNrFilter);
|
||||
if (filterID == DateFilter.GetFilterID()) type = typeof(DateFilter);
|
||||
else if (filterID == BatchNrFilter.GetFilterID()) type = typeof(BatchNrFilter);
|
||||
else if (filterID == ProcedureFilter.GetFilterID()) type = typeof(ProcedureFilter);
|
||||
else if (filterID == ProtocolFilter.GetFilterID()) type = typeof(ProtocolFilter);
|
||||
else if (filterID == QnFilter.GetFilterID()) type = typeof(QnFilter);
|
||||
else if (filterID == SerialNrFilter.GetFilterID()) type = typeof(SerialNrFilter);
|
||||
else if (filterID == WMPositionFilter.GetFilterID()) type = typeof(WMPositionFilter);
|
||||
else return null;
|
||||
|
||||
IFilter filter = (new XmlSerializer(type)).Deserialize(new StringReader(serializedText)) as IFilter;
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class WMPositionFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "WM_position"; }
|
||||
public static string GetFilterName() { return "WM Position"; }
|
||||
|
||||
///
|
||||
/// Obligatory wrappers
|
||||
///
|
||||
public string GetThisFilterID() { return GetFilterID(); }
|
||||
public void Save(StringBuilder sb) { (new XmlSerializer(this.GetType())).Serialize(new StringWriter(sb), this); }
|
||||
public void Data2UI() { userIface.Data2UI(); }
|
||||
public void UI2Data() { userIface.UI2Data(); }
|
||||
public UserControl GetFilterUI() { return userIface as UserControl; }
|
||||
|
||||
///
|
||||
/// Serialized filter data
|
||||
///
|
||||
public int WMPosition;
|
||||
|
||||
|
||||
private WMPositionFilterUI userIface;
|
||||
|
||||
public WMPositionFilter()
|
||||
{
|
||||
userIface = new WMPositionFilterUI(this);
|
||||
}
|
||||
|
||||
public IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters)
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<Batch> batches = se.QueryOver<Batch>()
|
||||
.List<Batch>();
|
||||
|
||||
foreach (var b in batches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) if (wm.WMPosition == this.WMPosition) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.WMPosition == this.WMPosition) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class WMPositionFilterUI
|
||||
{
|
||||
/// <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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.wmPositionTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.wmPositionTextBox);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "WM Position";
|
||||
//
|
||||
// wmPositionTextBox
|
||||
//
|
||||
this.wmPositionTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.wmPositionTextBox.Name = "wmPositionTextBox";
|
||||
this.wmPositionTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.wmPositionTextBox.TabIndex = 0;
|
||||
//
|
||||
// WMPositionFilterUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "WMPositionFilterUI";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox wmPositionTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class WMPositionFilterUI : UserControl
|
||||
{
|
||||
WMPositionFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public WMPositionFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public WMPositionFilterUI(WMPositionFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = WMPositionFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
wmPositionTextBox.Text = data.WMPosition.ToString();
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
int pos;
|
||||
if (int.TryParse(wmPositionTextBox.Text, out pos) && (pos >= 1) && (pos <= 40))
|
||||
{
|
||||
data.WMPosition = pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.WMPosition = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
+218
-198
@@ -28,204 +28,222 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.connectionStringTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.benchNameTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.languageLabel = new System.Windows.Forms.Label();
|
||||
this.languageTextBox = new System.Windows.Forms.TextBox();
|
||||
this.formatLabel = new System.Windows.Forms.Label();
|
||||
this.timePeriodFormatTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// connectionStringTextBox1
|
||||
//
|
||||
this.connectionStringTextBox1.Location = new System.Drawing.Point(157, 45);
|
||||
this.connectionStringTextBox1.Name = "connectionStringTextBox1";
|
||||
this.connectionStringTextBox1.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox1.TabIndex = 3;
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(26, 20);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.benchNameLabel.TabIndex = 0;
|
||||
this.benchNameLabel.Text = "Bench name";
|
||||
//
|
||||
// connectionStringLabel
|
||||
//
|
||||
this.connectionStringLabel.AutoSize = true;
|
||||
this.connectionStringLabel.Location = new System.Drawing.Point(154, 20);
|
||||
this.connectionStringLabel.Name = "connectionStringLabel";
|
||||
this.connectionStringLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.connectionStringLabel.TabIndex = 1;
|
||||
this.connectionStringLabel.Text = "Connection string";
|
||||
//
|
||||
// connectionStringTextBox2
|
||||
//
|
||||
this.connectionStringTextBox2.Location = new System.Drawing.Point(157, 71);
|
||||
this.connectionStringTextBox2.Name = "connectionStringTextBox2";
|
||||
this.connectionStringTextBox2.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox2.TabIndex = 5;
|
||||
//
|
||||
// connectionStringTextBox3
|
||||
//
|
||||
this.connectionStringTextBox3.Location = new System.Drawing.Point(157, 97);
|
||||
this.connectionStringTextBox3.Name = "connectionStringTextBox3";
|
||||
this.connectionStringTextBox3.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox3.TabIndex = 7;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(506, 250);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 18;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(617, 250);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 19;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// benchNameTextBox1
|
||||
//
|
||||
this.benchNameTextBox1.Location = new System.Drawing.Point(29, 45);
|
||||
this.benchNameTextBox1.Name = "benchNameTextBox1";
|
||||
this.benchNameTextBox1.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox1.TabIndex = 2;
|
||||
//
|
||||
// benchNameTextBox2
|
||||
//
|
||||
this.benchNameTextBox2.Location = new System.Drawing.Point(29, 71);
|
||||
this.benchNameTextBox2.Name = "benchNameTextBox2";
|
||||
this.benchNameTextBox2.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox2.TabIndex = 4;
|
||||
//
|
||||
// benchNameTextBox3
|
||||
//
|
||||
this.benchNameTextBox3.Location = new System.Drawing.Point(29, 97);
|
||||
this.benchNameTextBox3.Name = "benchNameTextBox3";
|
||||
this.benchNameTextBox3.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox3.TabIndex = 6;
|
||||
//
|
||||
// languageLabel
|
||||
//
|
||||
this.languageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageLabel.AutoSize = true;
|
||||
this.languageLabel.Location = new System.Drawing.Point(26, 239);
|
||||
this.languageLabel.Name = "languageLabel";
|
||||
this.languageLabel.Size = new System.Drawing.Size(55, 13);
|
||||
this.languageLabel.TabIndex = 14;
|
||||
this.languageLabel.Text = "Language";
|
||||
//
|
||||
// languageTextBox
|
||||
//
|
||||
this.languageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageTextBox.Location = new System.Drawing.Point(29, 263);
|
||||
this.languageTextBox.Name = "languageTextBox";
|
||||
this.languageTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.languageTextBox.TabIndex = 15;
|
||||
//
|
||||
// formatLabel
|
||||
//
|
||||
this.formatLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.formatLabel.AutoSize = true;
|
||||
this.formatLabel.Location = new System.Drawing.Point(26, 185);
|
||||
this.formatLabel.Name = "formatLabel";
|
||||
this.formatLabel.Size = new System.Drawing.Size(94, 13);
|
||||
this.formatLabel.TabIndex = 12;
|
||||
this.formatLabel.Text = "Time period format";
|
||||
//
|
||||
// timePeriodFormatTextBox
|
||||
//
|
||||
this.timePeriodFormatTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 207);
|
||||
this.timePeriodFormatTextBox.Name = "timePeriodFormatTextBox";
|
||||
this.timePeriodFormatTextBox.Size = new System.Drawing.Size(683, 20);
|
||||
this.timePeriodFormatTextBox.TabIndex = 13;
|
||||
//
|
||||
// benchNameTextBox5
|
||||
//
|
||||
this.benchNameTextBox5.Location = new System.Drawing.Point(29, 149);
|
||||
this.benchNameTextBox5.Name = "benchNameTextBox5";
|
||||
this.benchNameTextBox5.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox5.TabIndex = 10;
|
||||
//
|
||||
// benchNameTextBox4
|
||||
//
|
||||
this.benchNameTextBox4.Location = new System.Drawing.Point(29, 123);
|
||||
this.benchNameTextBox4.Name = "benchNameTextBox4";
|
||||
this.benchNameTextBox4.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox4.TabIndex = 8;
|
||||
//
|
||||
// connectionStringTextBox5
|
||||
//
|
||||
this.connectionStringTextBox5.Location = new System.Drawing.Point(157, 149);
|
||||
this.connectionStringTextBox5.Name = "connectionStringTextBox5";
|
||||
this.connectionStringTextBox5.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox5.TabIndex = 11;
|
||||
//
|
||||
// connectionStringTextBox4
|
||||
//
|
||||
this.connectionStringTextBox4.Location = new System.Drawing.Point(157, 123);
|
||||
this.connectionStringTextBox4.Name = "connectionStringTextBox4";
|
||||
this.connectionStringTextBox4.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox4.TabIndex = 9;
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(743, 310);
|
||||
this.Controls.Add(this.benchNameTextBox5);
|
||||
this.Controls.Add(this.benchNameTextBox4);
|
||||
this.Controls.Add(this.connectionStringTextBox5);
|
||||
this.Controls.Add(this.connectionStringTextBox4);
|
||||
this.Controls.Add(this.timePeriodFormatTextBox);
|
||||
this.Controls.Add(this.formatLabel);
|
||||
this.Controls.Add(this.languageTextBox);
|
||||
this.Controls.Add(this.languageLabel);
|
||||
this.Controls.Add(this.benchNameTextBox3);
|
||||
this.Controls.Add(this.benchNameTextBox2);
|
||||
this.Controls.Add(this.benchNameTextBox1);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.connectionStringTextBox3);
|
||||
this.Controls.Add(this.connectionStringLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox2);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox1);
|
||||
this.Name = "DatabaseSettingsDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Settings";
|
||||
this.Load += new System.EventHandler(this.DatabaseSettings_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.connectionStringTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.benchNameTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.languageLabel = new System.Windows.Forms.Label();
|
||||
this.languageTextBox = new System.Windows.Forms.TextBox();
|
||||
this.formatLabel = new System.Windows.Forms.Label();
|
||||
this.timePeriodFormatTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// connectionStringTextBox1
|
||||
//
|
||||
this.connectionStringTextBox1.Location = new System.Drawing.Point(157, 45);
|
||||
this.connectionStringTextBox1.Name = "connectionStringTextBox1";
|
||||
this.connectionStringTextBox1.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox1.TabIndex = 3;
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(26, 23);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.benchNameLabel.TabIndex = 0;
|
||||
this.benchNameLabel.Text = "Bench name";
|
||||
//
|
||||
// connectionStringLabel
|
||||
//
|
||||
this.connectionStringLabel.AutoSize = true;
|
||||
this.connectionStringLabel.Location = new System.Drawing.Point(154, 23);
|
||||
this.connectionStringLabel.Name = "connectionStringLabel";
|
||||
this.connectionStringLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.connectionStringLabel.TabIndex = 1;
|
||||
this.connectionStringLabel.Text = "Connection string";
|
||||
//
|
||||
// connectionStringTextBox2
|
||||
//
|
||||
this.connectionStringTextBox2.Location = new System.Drawing.Point(157, 69);
|
||||
this.connectionStringTextBox2.Name = "connectionStringTextBox2";
|
||||
this.connectionStringTextBox2.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox2.TabIndex = 5;
|
||||
//
|
||||
// connectionStringTextBox3
|
||||
//
|
||||
this.connectionStringTextBox3.Location = new System.Drawing.Point(157, 93);
|
||||
this.connectionStringTextBox3.Name = "connectionStringTextBox3";
|
||||
this.connectionStringTextBox3.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox3.TabIndex = 7;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(506, 250);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 18;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(617, 250);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 19;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// benchNameTextBox1
|
||||
//
|
||||
this.benchNameTextBox1.Location = new System.Drawing.Point(29, 45);
|
||||
this.benchNameTextBox1.Name = "benchNameTextBox1";
|
||||
this.benchNameTextBox1.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox1.TabIndex = 2;
|
||||
//
|
||||
// benchNameTextBox2
|
||||
//
|
||||
this.benchNameTextBox2.Location = new System.Drawing.Point(29, 69);
|
||||
this.benchNameTextBox2.Name = "benchNameTextBox2";
|
||||
this.benchNameTextBox2.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox2.TabIndex = 4;
|
||||
//
|
||||
// benchNameTextBox3
|
||||
//
|
||||
this.benchNameTextBox3.Location = new System.Drawing.Point(29, 93);
|
||||
this.benchNameTextBox3.Name = "benchNameTextBox3";
|
||||
this.benchNameTextBox3.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox3.TabIndex = 6;
|
||||
//
|
||||
// languageLabel
|
||||
//
|
||||
this.languageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageLabel.AutoSize = true;
|
||||
this.languageLabel.Location = new System.Drawing.Point(26, 245);
|
||||
this.languageLabel.Name = "languageLabel";
|
||||
this.languageLabel.Size = new System.Drawing.Size(55, 13);
|
||||
this.languageLabel.TabIndex = 14;
|
||||
this.languageLabel.Text = "Language";
|
||||
//
|
||||
// languageTextBox
|
||||
//
|
||||
this.languageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageTextBox.Location = new System.Drawing.Point(29, 263);
|
||||
this.languageTextBox.Name = "languageTextBox";
|
||||
this.languageTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.languageTextBox.TabIndex = 15;
|
||||
//
|
||||
// formatLabel
|
||||
//
|
||||
this.formatLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.formatLabel.AutoSize = true;
|
||||
this.formatLabel.Location = new System.Drawing.Point(26, 196);
|
||||
this.formatLabel.Name = "formatLabel";
|
||||
this.formatLabel.Size = new System.Drawing.Size(94, 13);
|
||||
this.formatLabel.TabIndex = 12;
|
||||
this.formatLabel.Text = "Time period format";
|
||||
//
|
||||
// timePeriodFormatTextBox
|
||||
//
|
||||
this.timePeriodFormatTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 215);
|
||||
this.timePeriodFormatTextBox.Name = "timePeriodFormatTextBox";
|
||||
this.timePeriodFormatTextBox.Size = new System.Drawing.Size(683, 20);
|
||||
this.timePeriodFormatTextBox.TabIndex = 13;
|
||||
//
|
||||
// benchNameTextBox5
|
||||
//
|
||||
this.benchNameTextBox5.Location = new System.Drawing.Point(29, 141);
|
||||
this.benchNameTextBox5.Name = "benchNameTextBox5";
|
||||
this.benchNameTextBox5.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox5.TabIndex = 10;
|
||||
//
|
||||
// benchNameTextBox4
|
||||
//
|
||||
this.benchNameTextBox4.Location = new System.Drawing.Point(29, 117);
|
||||
this.benchNameTextBox4.Name = "benchNameTextBox4";
|
||||
this.benchNameTextBox4.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox4.TabIndex = 8;
|
||||
//
|
||||
// connectionStringTextBox5
|
||||
//
|
||||
this.connectionStringTextBox5.Location = new System.Drawing.Point(157, 141);
|
||||
this.connectionStringTextBox5.Name = "connectionStringTextBox5";
|
||||
this.connectionStringTextBox5.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox5.TabIndex = 11;
|
||||
//
|
||||
// connectionStringTextBox4
|
||||
//
|
||||
this.connectionStringTextBox4.Location = new System.Drawing.Point(157, 117);
|
||||
this.connectionStringTextBox4.Name = "connectionStringTextBox4";
|
||||
this.connectionStringTextBox4.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox4.TabIndex = 9;
|
||||
//
|
||||
// benchNameTextBox6
|
||||
//
|
||||
this.benchNameTextBox6.Location = new System.Drawing.Point(29, 165);
|
||||
this.benchNameTextBox6.Name = "benchNameTextBox6";
|
||||
this.benchNameTextBox6.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox6.TabIndex = 20;
|
||||
//
|
||||
// connectionStringTextBox6
|
||||
//
|
||||
this.connectionStringTextBox6.Location = new System.Drawing.Point(157, 165);
|
||||
this.connectionStringTextBox6.Name = "connectionStringTextBox6";
|
||||
this.connectionStringTextBox6.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox6.TabIndex = 21;
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(743, 310);
|
||||
this.Controls.Add(this.benchNameTextBox6);
|
||||
this.Controls.Add(this.connectionStringTextBox6);
|
||||
this.Controls.Add(this.benchNameTextBox5);
|
||||
this.Controls.Add(this.benchNameTextBox4);
|
||||
this.Controls.Add(this.connectionStringTextBox5);
|
||||
this.Controls.Add(this.connectionStringTextBox4);
|
||||
this.Controls.Add(this.timePeriodFormatTextBox);
|
||||
this.Controls.Add(this.formatLabel);
|
||||
this.Controls.Add(this.languageTextBox);
|
||||
this.Controls.Add(this.languageLabel);
|
||||
this.Controls.Add(this.benchNameTextBox3);
|
||||
this.Controls.Add(this.benchNameTextBox2);
|
||||
this.Controls.Add(this.benchNameTextBox1);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.connectionStringTextBox3);
|
||||
this.Controls.Add(this.connectionStringLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox2);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox1);
|
||||
this.Name = "DatabaseSettingsDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Settings";
|
||||
this.Load += new System.EventHandler(this.DatabaseSettings_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -249,5 +267,7 @@
|
||||
private System.Windows.Forms.TextBox benchNameTextBox4;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox5;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox4;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox6;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox6;
|
||||
}
|
||||
}
|
||||
@@ -22,12 +22,14 @@ namespace ResultsBrowser.Forms
|
||||
benchNameTextBox3.Text = Program.LocalSettings.Bench3;
|
||||
benchNameTextBox4.Text = Program.LocalSettings.Bench4;
|
||||
benchNameTextBox5.Text = Program.LocalSettings.Bench5;
|
||||
benchNameTextBox6.Text = Program.LocalSettings.Bench6;
|
||||
|
||||
connectionStringTextBox1.Text = Program.LocalSettings.ConnectionString1;
|
||||
connectionStringTextBox2.Text = Program.LocalSettings.ConnectionString2;
|
||||
connectionStringTextBox3.Text = Program.LocalSettings.ConnectionString3;
|
||||
connectionStringTextBox4.Text = Program.LocalSettings.ConnectionString4;
|
||||
connectionStringTextBox5.Text = Program.LocalSettings.ConnectionString5;
|
||||
connectionStringTextBox6.Text = Program.LocalSettings.ConnectionString6;
|
||||
|
||||
timePeriodFormatTextBox.Text = Program.LocalSettings.TimePeriodFormat;
|
||||
|
||||
@@ -52,12 +54,14 @@ namespace ResultsBrowser.Forms
|
||||
Program.LocalSettings.Bench3 = benchNameTextBox3.Text;
|
||||
Program.LocalSettings.Bench4 = benchNameTextBox4.Text;
|
||||
Program.LocalSettings.Bench5 = benchNameTextBox5.Text;
|
||||
Program.LocalSettings.Bench6 = benchNameTextBox6.Text;
|
||||
|
||||
Program.LocalSettings.ConnectionString1 = connectionStringTextBox1.Text;
|
||||
Program.LocalSettings.ConnectionString2 = connectionStringTextBox2.Text;
|
||||
Program.LocalSettings.ConnectionString3 = connectionStringTextBox3.Text;
|
||||
Program.LocalSettings.ConnectionString4 = connectionStringTextBox4.Text;
|
||||
Program.LocalSettings.ConnectionString5 = connectionStringTextBox5.Text;
|
||||
Program.LocalSettings.ConnectionString6 = connectionStringTextBox6.Text;
|
||||
|
||||
Program.LocalSettings.TimePeriodFormat = timePeriodFormatTextBox.Text;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace ResultsBrowser
|
||||
public string Bench3;
|
||||
public string Bench4;
|
||||
public string Bench5;
|
||||
public string Bench6;
|
||||
|
||||
/// Database settings of servers.
|
||||
public string ConnectionString1;
|
||||
@@ -36,12 +37,14 @@ namespace ResultsBrowser
|
||||
public string ConnectionString3;
|
||||
public string ConnectionString4;
|
||||
public string ConnectionString5;
|
||||
public string ConnectionString6;
|
||||
|
||||
public bool Bench1Selected;
|
||||
public bool Bench2Selected;
|
||||
public bool Bench3Selected;
|
||||
public bool Bench4Selected;
|
||||
public bool Bench5Selected;
|
||||
public bool Bench6Selected;
|
||||
|
||||
public string TimePeriodFormat;
|
||||
|
||||
@@ -106,6 +109,21 @@ namespace ResultsBrowser
|
||||
|
||||
public LocalSettings()
|
||||
{
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
Bench1 = "WR10";
|
||||
Bench2 = "WR11";
|
||||
Bench3 = "WR13";
|
||||
Bench4 = "WR14";
|
||||
Bench5 = "WR15";
|
||||
Bench6 = "PT7";
|
||||
ConnectionString1 = "SERVER=10.42.128.93; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString2 = "SERVER=10.42.128.102; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString3 = "SERVER=10.42.128.89; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString4 = "SERVER=10.42.128.213; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString5 = "SERVER=10.42.128.214; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString6 = "SERVER=10.42.129.26; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
Language = "SK";
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+27
-29
@@ -14,25 +14,26 @@ namespace ResultsBrowser
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
static ILog log; /// log4net
|
||||
|
||||
/// Program information
|
||||
public static string Version; /// version string
|
||||
public static DateTime BuildDateTime; /// date and time of program build
|
||||
|
||||
/// Local settings
|
||||
public static readonly string ExecutableDirectory;
|
||||
public static readonly string ConfigDirectory;
|
||||
public static readonly string LogDirectory;
|
||||
public static readonly string LocalSettingsFileName;
|
||||
public static readonly string LocalSettingsBackupName;
|
||||
public static string ExecutableDirectory;
|
||||
public static string ConfigDirectory;
|
||||
public static string LogDirectory;
|
||||
public static string LocalSettingsFileName;
|
||||
public static string LocalSettingsBackupName;
|
||||
public static LocalSettings LocalSettings;
|
||||
|
||||
|
||||
public static System.Globalization.CultureInfo AltCulture;
|
||||
|
||||
static readonly ILog log; /// log4net
|
||||
|
||||
static Program()
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
/// Program version string
|
||||
System.Reflection.Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||
Version ver = thisAssembly.GetName().Version;
|
||||
@@ -41,26 +42,26 @@ namespace ResultsBrowser
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExecutableDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
ConfigDirectory = Path.Combine(ExecutableDirectory, "..\\Cfg\\");
|
||||
#if false
|
||||
/// Config directory is a sibling directory of the executable directory
|
||||
ConfigDirectory = Path.Combine(ExecutableDirectory, "..", string.Format("Cfg{0}", (args.Length >= 1) ? args[0] : string.Empty));
|
||||
LogDirectory = Path.Combine(ExecutableDirectory, "..\\Log\\");
|
||||
LocalSettingsFileName = ConfigDirectory + "config.xml";
|
||||
LocalSettingsBackupName = ConfigDirectory + "config.backup.xml";
|
||||
#else
|
||||
/// Config directory is a directory in 'C:\Users\username\AppData\Local' folder
|
||||
ConfigDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
string.Format("ResultsBrowser{0}", (args.Length >= 1) ? args[0] : string.Empty));
|
||||
LogDirectory = "C:\\Temp\\ResultsBrowserLog\\";
|
||||
#endif
|
||||
LocalSettingsFileName = Path.Combine(ConfigDirectory, "config.xml");
|
||||
LocalSettingsBackupName = Path.Combine(ConfigDirectory, "config.backup.xml");
|
||||
|
||||
/// Configue and start logging
|
||||
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(ConfigDirectory + "log4netConfig.xml"));
|
||||
log = LogManager.GetLogger(typeof(Program));
|
||||
log.Fatal("------------------------------------------------------------------------------------------------");
|
||||
log.Fatal("started");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
///
|
||||
|
||||
///
|
||||
/// Load the local settings
|
||||
///
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
@@ -93,7 +94,7 @@ namespace ResultsBrowser
|
||||
|
||||
try
|
||||
{
|
||||
string culture = LocalSettings.Language.Replace('_', '-');
|
||||
string culture = (LocalSettings.Language != null) ? LocalSettings.Language.Replace('_', '-') : "EN";
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(culture);
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -107,9 +108,6 @@ namespace ResultsBrowser
|
||||
new System.Globalization.CultureInfo("en");
|
||||
}
|
||||
|
||||
//AltCulture = null;
|
||||
AltCulture = new System.Globalization.CultureInfo("SK");
|
||||
|
||||
|
||||
/// This belongs to Application.Run(new MainWnd()) ...
|
||||
/// and should be executed before opening 'loginDlg'
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1107.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1107.0")]
|
||||
[assembly: AssemblyVersion("2.18.1114.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1114.0")]
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IZRAEL_200</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -31,7 +31,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IZRAEL_200</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -70,6 +70,13 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Filters\BatchNrFilter.cs" />
|
||||
<Compile Include="Filters\BatchNrFilterUI.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Filters\BatchNrFilterUI.designer.cs">
|
||||
<DependentUpon>BatchNrFilterUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Filters\DateFilterUI.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@@ -107,6 +114,13 @@
|
||||
<Compile Include="Filters\SerialNrFilterUI.Designer.cs">
|
||||
<DependentUpon>SerialNrFilterUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Filters\WMPositionFilter.cs" />
|
||||
<Compile Include="Filters\WMPositionFilterUI.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Filters\WMPositionFilterUI.designer.cs">
|
||||
<DependentUpon>WMPositionFilterUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\AddFilterDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -161,6 +175,9 @@
|
||||
<Compile Include="ResultsBrowserWnd.Designer.cs">
|
||||
<DependentUpon>ResultsBrowserWnd.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Filters\BatchNrFilterUI.resx">
|
||||
<DependentUpon>BatchNrFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Filters\DateFilterUI.resx">
|
||||
<DependentUpon>DateFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -176,6 +193,9 @@
|
||||
<EmbeddedResource Include="Filters\SerialNrFilterUI.resx">
|
||||
<DependentUpon>SerialNrFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Filters\WMPositionFilterUI.resx">
|
||||
<DependentUpon>WMPositionFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\AddFilterDlg.resx">
|
||||
<DependentUpon>AddFilterDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
+346
-331
@@ -28,337 +28,351 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.vSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.hSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.filtersGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.filtersFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.resultsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.resultsListView = new System.Windows.Forms.ListView();
|
||||
this.printerConfigBtn = new System.Windows.Forms.Button();
|
||||
this.statisticsBtn = new System.Windows.Forms.Button();
|
||||
this.printQueryResultsBtn = new System.Windows.Forms.Button();
|
||||
this.exportQueryResultsBtn = new System.Windows.Forms.Button();
|
||||
this.formatOfResultsBtn = new System.Windows.Forms.Button();
|
||||
this.clearFiltersBtn = new System.Windows.Forms.Button();
|
||||
this.settingsBtn = new System.Windows.Forms.Button();
|
||||
this.saveConfigBtn = new System.Windows.Forms.Button();
|
||||
this.loadConfigBtn = new System.Windows.Forms.Button();
|
||||
this.executeQueryBtn = new System.Windows.Forms.Button();
|
||||
this.addFilterBtn = new System.Windows.Forms.Button();
|
||||
this.testBenchesGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox5 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox4 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox3 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox2 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox1 = new System.Windows.Forms.RadioButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).BeginInit();
|
||||
this.vSplitContainer.Panel1.SuspendLayout();
|
||||
this.vSplitContainer.Panel2.SuspendLayout();
|
||||
this.vSplitContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).BeginInit();
|
||||
this.hSplitContainer.Panel1.SuspendLayout();
|
||||
this.hSplitContainer.Panel2.SuspendLayout();
|
||||
this.hSplitContainer.SuspendLayout();
|
||||
this.filtersGroupBox.SuspendLayout();
|
||||
this.resultsGroupBox.SuspendLayout();
|
||||
this.testBenchesGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// vSplitContainer
|
||||
//
|
||||
this.vSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.vSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.vSplitContainer.Name = "vSplitContainer";
|
||||
//
|
||||
// vSplitContainer.Panel1
|
||||
//
|
||||
this.vSplitContainer.Panel1.Controls.Add(this.hSplitContainer);
|
||||
this.vSplitContainer.Panel1MinSize = 100;
|
||||
//
|
||||
// vSplitContainer.Panel2
|
||||
//
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.printerConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.statisticsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.printQueryResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.exportQueryResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.formatOfResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.clearFiltersBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.settingsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.saveConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.loadConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.executeQueryBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.addFilterBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.testBenchesGroupBox);
|
||||
this.vSplitContainer.Panel2MinSize = 100;
|
||||
this.vSplitContainer.Size = new System.Drawing.Size(984, 712);
|
||||
this.vSplitContainer.SplitterDistance = 840;
|
||||
this.vSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// hSplitContainer
|
||||
//
|
||||
this.hSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.hSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.hSplitContainer.Name = "hSplitContainer";
|
||||
this.hSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// hSplitContainer.Panel1
|
||||
//
|
||||
this.hSplitContainer.Panel1.Controls.Add(this.filtersGroupBox);
|
||||
//
|
||||
// hSplitContainer.Panel2
|
||||
//
|
||||
this.hSplitContainer.Panel2.Controls.Add(this.resultsGroupBox);
|
||||
this.hSplitContainer.Size = new System.Drawing.Size(840, 712);
|
||||
this.hSplitContainer.SplitterDistance = 280;
|
||||
this.hSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// filtersGroupBox
|
||||
//
|
||||
this.filtersGroupBox.Controls.Add(this.filtersFlowLayoutPanel);
|
||||
this.filtersGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.filtersGroupBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.filtersGroupBox.Name = "filtersGroupBox";
|
||||
this.filtersGroupBox.Size = new System.Drawing.Size(840, 280);
|
||||
this.filtersGroupBox.TabIndex = 1;
|
||||
this.filtersGroupBox.TabStop = false;
|
||||
this.filtersGroupBox.Text = "Filters";
|
||||
//
|
||||
// filtersFlowLayoutPanel
|
||||
//
|
||||
this.filtersFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.filtersFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
|
||||
this.filtersFlowLayoutPanel.Name = "filtersFlowLayoutPanel";
|
||||
this.filtersFlowLayoutPanel.Size = new System.Drawing.Size(834, 261);
|
||||
this.filtersFlowLayoutPanel.TabIndex = 0;
|
||||
//
|
||||
// resultsGroupBox
|
||||
//
|
||||
this.resultsGroupBox.Controls.Add(this.resultsListView);
|
||||
this.resultsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultsGroupBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.resultsGroupBox.Name = "resultsGroupBox";
|
||||
this.resultsGroupBox.Size = new System.Drawing.Size(840, 428);
|
||||
this.resultsGroupBox.TabIndex = 1;
|
||||
this.resultsGroupBox.TabStop = false;
|
||||
this.resultsGroupBox.Text = "Query results";
|
||||
//
|
||||
// resultsListView
|
||||
//
|
||||
this.resultsListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultsListView.Location = new System.Drawing.Point(3, 16);
|
||||
this.resultsListView.Name = "resultsListView";
|
||||
this.resultsListView.Size = new System.Drawing.Size(834, 409);
|
||||
this.resultsListView.TabIndex = 0;
|
||||
this.resultsListView.UseCompatibleStateImageBehavior = false;
|
||||
this.resultsListView.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// printerConfigBtn
|
||||
//
|
||||
this.printerConfigBtn.Location = new System.Drawing.Point(8, 316);
|
||||
this.printerConfigBtn.Name = "printerConfigBtn";
|
||||
this.printerConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.printerConfigBtn.TabIndex = 11;
|
||||
this.printerConfigBtn.Text = "Configure printer";
|
||||
this.printerConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.printerConfigBtn.Click += new System.EventHandler(this.printerConfigBtn_Click);
|
||||
//
|
||||
// statisticsBtn
|
||||
//
|
||||
this.statisticsBtn.Location = new System.Drawing.Point(8, 621);
|
||||
this.statisticsBtn.Name = "statisticsBtn";
|
||||
this.statisticsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.statisticsBtn.TabIndex = 10;
|
||||
this.statisticsBtn.Text = "Statistics";
|
||||
this.statisticsBtn.UseVisualStyleBackColor = true;
|
||||
this.statisticsBtn.Click += new System.EventHandler(this.statisticsBtn_Click);
|
||||
//
|
||||
// printQueryResultsBtn
|
||||
//
|
||||
this.printQueryResultsBtn.Location = new System.Drawing.Point(8, 548);
|
||||
this.printQueryResultsBtn.Name = "printQueryResultsBtn";
|
||||
this.printQueryResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.printQueryResultsBtn.TabIndex = 9;
|
||||
this.printQueryResultsBtn.Text = "Print query results";
|
||||
this.printQueryResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.printQueryResultsBtn.Click += new System.EventHandler(this.printQueryResultsBtn_Click);
|
||||
//
|
||||
// exportQueryResultsBtn
|
||||
//
|
||||
this.exportQueryResultsBtn.Location = new System.Drawing.Point(8, 508);
|
||||
this.exportQueryResultsBtn.Name = "exportQueryResultsBtn";
|
||||
this.exportQueryResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.exportQueryResultsBtn.TabIndex = 8;
|
||||
this.exportQueryResultsBtn.Text = "Export query results";
|
||||
this.exportQueryResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.exportQueryResultsBtn.Click += new System.EventHandler(this.exportQueryResultsBtn_Click);
|
||||
//
|
||||
// formatOfResultsBtn
|
||||
//
|
||||
this.formatOfResultsBtn.Location = new System.Drawing.Point(8, 276);
|
||||
this.formatOfResultsBtn.Name = "formatOfResultsBtn";
|
||||
this.formatOfResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.formatOfResultsBtn.TabIndex = 7;
|
||||
this.formatOfResultsBtn.Text = "Configure output";
|
||||
this.formatOfResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.formatOfResultsBtn.Click += new System.EventHandler(this.formatOfResultsBtn_Click);
|
||||
//
|
||||
// clearFiltersBtn
|
||||
//
|
||||
this.clearFiltersBtn.Location = new System.Drawing.Point(8, 196);
|
||||
this.clearFiltersBtn.Name = "clearFiltersBtn";
|
||||
this.clearFiltersBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.clearFiltersBtn.TabIndex = 2;
|
||||
this.clearFiltersBtn.Text = "Clear filters";
|
||||
this.clearFiltersBtn.UseVisualStyleBackColor = true;
|
||||
this.clearFiltersBtn.Click += new System.EventHandler(this.clearFiltersBtn_Click);
|
||||
//
|
||||
// settingsBtn
|
||||
//
|
||||
this.settingsBtn.Location = new System.Drawing.Point(8, 12);
|
||||
this.settingsBtn.Name = "settingsBtn";
|
||||
this.settingsBtn.Size = new System.Drawing.Size(125, 33);
|
||||
this.settingsBtn.TabIndex = 0;
|
||||
this.settingsBtn.Text = "Settings";
|
||||
this.settingsBtn.UseVisualStyleBackColor = true;
|
||||
this.settingsBtn.Click += new System.EventHandler(this.settingsBtn_Click);
|
||||
//
|
||||
// saveConfigBtn
|
||||
//
|
||||
this.saveConfigBtn.Location = new System.Drawing.Point(8, 356);
|
||||
this.saveConfigBtn.Name = "saveConfigBtn";
|
||||
this.saveConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.saveConfigBtn.TabIndex = 5;
|
||||
this.saveConfigBtn.Text = "Save configuration";
|
||||
this.saveConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.saveConfigBtn.Click += new System.EventHandler(this.saveConfigBtn_Click);
|
||||
//
|
||||
// loadConfigBtn
|
||||
//
|
||||
this.loadConfigBtn.Location = new System.Drawing.Point(8, 396);
|
||||
this.loadConfigBtn.Name = "loadConfigBtn";
|
||||
this.loadConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.loadConfigBtn.TabIndex = 4;
|
||||
this.loadConfigBtn.Text = "Load configuration";
|
||||
this.loadConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.loadConfigBtn.Click += new System.EventHandler(this.loadConfigBtn_Click);
|
||||
//
|
||||
// executeQueryBtn
|
||||
//
|
||||
this.executeQueryBtn.Location = new System.Drawing.Point(8, 468);
|
||||
this.executeQueryBtn.Name = "executeQueryBtn";
|
||||
this.executeQueryBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.executeQueryBtn.TabIndex = 6;
|
||||
this.executeQueryBtn.Text = "Execute query";
|
||||
this.executeQueryBtn.UseVisualStyleBackColor = true;
|
||||
this.executeQueryBtn.Click += new System.EventHandler(this.executeQueryBtn_Click);
|
||||
//
|
||||
// addFilterBtn
|
||||
//
|
||||
this.addFilterBtn.Location = new System.Drawing.Point(8, 236);
|
||||
this.addFilterBtn.Name = "addFilterBtn";
|
||||
this.addFilterBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.addFilterBtn.TabIndex = 3;
|
||||
this.addFilterBtn.Text = "Add filter";
|
||||
this.addFilterBtn.UseVisualStyleBackColor = true;
|
||||
this.addFilterBtn.Click += new System.EventHandler(this.addFilterBtn_Click);
|
||||
//
|
||||
// testBenchesGroupBox
|
||||
//
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox5);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox4);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox3);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox2);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox1);
|
||||
this.testBenchesGroupBox.Location = new System.Drawing.Point(8, 54);
|
||||
this.testBenchesGroupBox.Name = "testBenchesGroupBox";
|
||||
this.testBenchesGroupBox.Size = new System.Drawing.Size(125, 135);
|
||||
this.testBenchesGroupBox.TabIndex = 1;
|
||||
this.testBenchesGroupBox.TabStop = false;
|
||||
this.testBenchesGroupBox.Text = "Test benches";
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
this.checkBox5.AutoSize = true;
|
||||
this.checkBox5.Location = new System.Drawing.Point(23, 106);
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox5.TabIndex = 4;
|
||||
this.checkBox5.TabStop = true;
|
||||
this.checkBox5.Text = "radioButton5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
this.checkBox4.AutoSize = true;
|
||||
this.checkBox4.Location = new System.Drawing.Point(23, 86);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox4.TabIndex = 3;
|
||||
this.checkBox4.TabStop = true;
|
||||
this.checkBox4.Text = "radioButton4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
this.checkBox3.AutoSize = true;
|
||||
this.checkBox3.Location = new System.Drawing.Point(23, 65);
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox3.TabIndex = 2;
|
||||
this.checkBox3.TabStop = true;
|
||||
this.checkBox3.Text = "radioButton3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(23, 44);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox2.TabIndex = 1;
|
||||
this.checkBox2.TabStop = true;
|
||||
this.checkBox2.Text = "radioButton2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(23, 23);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox1.TabIndex = 0;
|
||||
this.checkBox1.TabStop = true;
|
||||
this.checkBox1.Text = "radioButton1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||
//
|
||||
// ResultsBrowserWnd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(984, 712);
|
||||
this.Controls.Add(this.vSplitContainer);
|
||||
this.Name = "ResultsBrowserWnd";
|
||||
this.Text = "Results Browser";
|
||||
this.Load += new System.EventHandler(this.ResultsBrowserWnd_Load);
|
||||
this.vSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.vSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).EndInit();
|
||||
this.vSplitContainer.ResumeLayout(false);
|
||||
this.hSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.hSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).EndInit();
|
||||
this.hSplitContainer.ResumeLayout(false);
|
||||
this.filtersGroupBox.ResumeLayout(false);
|
||||
this.resultsGroupBox.ResumeLayout(false);
|
||||
this.testBenchesGroupBox.ResumeLayout(false);
|
||||
this.testBenchesGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.vSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.hSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.filtersGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.filtersFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.resultsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.resultsListView = new System.Windows.Forms.ListView();
|
||||
this.printerConfigBtn = new System.Windows.Forms.Button();
|
||||
this.statisticsBtn = new System.Windows.Forms.Button();
|
||||
this.printQueryResultsBtn = new System.Windows.Forms.Button();
|
||||
this.exportQueryResultsBtn = new System.Windows.Forms.Button();
|
||||
this.formatOfResultsBtn = new System.Windows.Forms.Button();
|
||||
this.clearFiltersBtn = new System.Windows.Forms.Button();
|
||||
this.settingsBtn = new System.Windows.Forms.Button();
|
||||
this.saveConfigBtn = new System.Windows.Forms.Button();
|
||||
this.loadConfigBtn = new System.Windows.Forms.Button();
|
||||
this.executeQueryBtn = new System.Windows.Forms.Button();
|
||||
this.addFilterBtn = new System.Windows.Forms.Button();
|
||||
this.testBenchesGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox6 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox5 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox4 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox3 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox2 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox1 = new System.Windows.Forms.RadioButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).BeginInit();
|
||||
this.vSplitContainer.Panel1.SuspendLayout();
|
||||
this.vSplitContainer.Panel2.SuspendLayout();
|
||||
this.vSplitContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).BeginInit();
|
||||
this.hSplitContainer.Panel1.SuspendLayout();
|
||||
this.hSplitContainer.Panel2.SuspendLayout();
|
||||
this.hSplitContainer.SuspendLayout();
|
||||
this.filtersGroupBox.SuspendLayout();
|
||||
this.resultsGroupBox.SuspendLayout();
|
||||
this.testBenchesGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// vSplitContainer
|
||||
//
|
||||
this.vSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.vSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.vSplitContainer.Name = "vSplitContainer";
|
||||
//
|
||||
// vSplitContainer.Panel1
|
||||
//
|
||||
this.vSplitContainer.Panel1.Controls.Add(this.hSplitContainer);
|
||||
this.vSplitContainer.Panel1MinSize = 100;
|
||||
//
|
||||
// vSplitContainer.Panel2
|
||||
//
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.printerConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.statisticsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.printQueryResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.exportQueryResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.formatOfResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.clearFiltersBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.settingsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.saveConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.loadConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.executeQueryBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.addFilterBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.testBenchesGroupBox);
|
||||
this.vSplitContainer.Panel2MinSize = 100;
|
||||
this.vSplitContainer.Size = new System.Drawing.Size(984, 712);
|
||||
this.vSplitContainer.SplitterDistance = 840;
|
||||
this.vSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// hSplitContainer
|
||||
//
|
||||
this.hSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.hSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.hSplitContainer.Name = "hSplitContainer";
|
||||
this.hSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// hSplitContainer.Panel1
|
||||
//
|
||||
this.hSplitContainer.Panel1.Controls.Add(this.filtersGroupBox);
|
||||
//
|
||||
// hSplitContainer.Panel2
|
||||
//
|
||||
this.hSplitContainer.Panel2.Controls.Add(this.resultsGroupBox);
|
||||
this.hSplitContainer.Size = new System.Drawing.Size(840, 712);
|
||||
this.hSplitContainer.SplitterDistance = 280;
|
||||
this.hSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// filtersGroupBox
|
||||
//
|
||||
this.filtersGroupBox.Controls.Add(this.filtersFlowLayoutPanel);
|
||||
this.filtersGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.filtersGroupBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.filtersGroupBox.Name = "filtersGroupBox";
|
||||
this.filtersGroupBox.Size = new System.Drawing.Size(840, 280);
|
||||
this.filtersGroupBox.TabIndex = 1;
|
||||
this.filtersGroupBox.TabStop = false;
|
||||
this.filtersGroupBox.Text = "Filters";
|
||||
//
|
||||
// filtersFlowLayoutPanel
|
||||
//
|
||||
this.filtersFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.filtersFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
|
||||
this.filtersFlowLayoutPanel.Name = "filtersFlowLayoutPanel";
|
||||
this.filtersFlowLayoutPanel.Size = new System.Drawing.Size(834, 261);
|
||||
this.filtersFlowLayoutPanel.TabIndex = 0;
|
||||
//
|
||||
// resultsGroupBox
|
||||
//
|
||||
this.resultsGroupBox.Controls.Add(this.resultsListView);
|
||||
this.resultsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultsGroupBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.resultsGroupBox.Name = "resultsGroupBox";
|
||||
this.resultsGroupBox.Size = new System.Drawing.Size(840, 428);
|
||||
this.resultsGroupBox.TabIndex = 1;
|
||||
this.resultsGroupBox.TabStop = false;
|
||||
this.resultsGroupBox.Text = "Query results";
|
||||
//
|
||||
// resultsListView
|
||||
//
|
||||
this.resultsListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultsListView.Location = new System.Drawing.Point(3, 16);
|
||||
this.resultsListView.Name = "resultsListView";
|
||||
this.resultsListView.Size = new System.Drawing.Size(834, 409);
|
||||
this.resultsListView.TabIndex = 0;
|
||||
this.resultsListView.UseCompatibleStateImageBehavior = false;
|
||||
this.resultsListView.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// printerConfigBtn
|
||||
//
|
||||
this.printerConfigBtn.Location = new System.Drawing.Point(8, 316);
|
||||
this.printerConfigBtn.Name = "printerConfigBtn";
|
||||
this.printerConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.printerConfigBtn.TabIndex = 11;
|
||||
this.printerConfigBtn.Text = "Configure printer";
|
||||
this.printerConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.printerConfigBtn.Click += new System.EventHandler(this.printerConfigBtn_Click);
|
||||
//
|
||||
// statisticsBtn
|
||||
//
|
||||
this.statisticsBtn.Location = new System.Drawing.Point(8, 621);
|
||||
this.statisticsBtn.Name = "statisticsBtn";
|
||||
this.statisticsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.statisticsBtn.TabIndex = 10;
|
||||
this.statisticsBtn.Text = "Statistics";
|
||||
this.statisticsBtn.UseVisualStyleBackColor = true;
|
||||
this.statisticsBtn.Click += new System.EventHandler(this.statisticsBtn_Click);
|
||||
//
|
||||
// printQueryResultsBtn
|
||||
//
|
||||
this.printQueryResultsBtn.Location = new System.Drawing.Point(8, 548);
|
||||
this.printQueryResultsBtn.Name = "printQueryResultsBtn";
|
||||
this.printQueryResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.printQueryResultsBtn.TabIndex = 9;
|
||||
this.printQueryResultsBtn.Text = "Print query results";
|
||||
this.printQueryResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.printQueryResultsBtn.Click += new System.EventHandler(this.printQueryResultsBtn_Click);
|
||||
//
|
||||
// exportQueryResultsBtn
|
||||
//
|
||||
this.exportQueryResultsBtn.Location = new System.Drawing.Point(8, 508);
|
||||
this.exportQueryResultsBtn.Name = "exportQueryResultsBtn";
|
||||
this.exportQueryResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.exportQueryResultsBtn.TabIndex = 8;
|
||||
this.exportQueryResultsBtn.Text = "Export query results";
|
||||
this.exportQueryResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.exportQueryResultsBtn.Click += new System.EventHandler(this.exportQueryResultsBtn_Click);
|
||||
//
|
||||
// formatOfResultsBtn
|
||||
//
|
||||
this.formatOfResultsBtn.Location = new System.Drawing.Point(8, 276);
|
||||
this.formatOfResultsBtn.Name = "formatOfResultsBtn";
|
||||
this.formatOfResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.formatOfResultsBtn.TabIndex = 7;
|
||||
this.formatOfResultsBtn.Text = "Configure output";
|
||||
this.formatOfResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.formatOfResultsBtn.Click += new System.EventHandler(this.formatOfResultsBtn_Click);
|
||||
//
|
||||
// clearFiltersBtn
|
||||
//
|
||||
this.clearFiltersBtn.Location = new System.Drawing.Point(8, 196);
|
||||
this.clearFiltersBtn.Name = "clearFiltersBtn";
|
||||
this.clearFiltersBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.clearFiltersBtn.TabIndex = 2;
|
||||
this.clearFiltersBtn.Text = "Clear filters";
|
||||
this.clearFiltersBtn.UseVisualStyleBackColor = true;
|
||||
this.clearFiltersBtn.Click += new System.EventHandler(this.clearFiltersBtn_Click);
|
||||
//
|
||||
// settingsBtn
|
||||
//
|
||||
this.settingsBtn.Location = new System.Drawing.Point(8, 12);
|
||||
this.settingsBtn.Name = "settingsBtn";
|
||||
this.settingsBtn.Size = new System.Drawing.Size(125, 33);
|
||||
this.settingsBtn.TabIndex = 0;
|
||||
this.settingsBtn.Text = "Settings";
|
||||
this.settingsBtn.UseVisualStyleBackColor = true;
|
||||
this.settingsBtn.Click += new System.EventHandler(this.settingsBtn_Click);
|
||||
//
|
||||
// saveConfigBtn
|
||||
//
|
||||
this.saveConfigBtn.Location = new System.Drawing.Point(8, 356);
|
||||
this.saveConfigBtn.Name = "saveConfigBtn";
|
||||
this.saveConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.saveConfigBtn.TabIndex = 5;
|
||||
this.saveConfigBtn.Text = "Save configuration";
|
||||
this.saveConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.saveConfigBtn.Click += new System.EventHandler(this.saveConfigBtn_Click);
|
||||
//
|
||||
// loadConfigBtn
|
||||
//
|
||||
this.loadConfigBtn.Location = new System.Drawing.Point(8, 396);
|
||||
this.loadConfigBtn.Name = "loadConfigBtn";
|
||||
this.loadConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.loadConfigBtn.TabIndex = 4;
|
||||
this.loadConfigBtn.Text = "Load configuration";
|
||||
this.loadConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.loadConfigBtn.Click += new System.EventHandler(this.loadConfigBtn_Click);
|
||||
//
|
||||
// executeQueryBtn
|
||||
//
|
||||
this.executeQueryBtn.Location = new System.Drawing.Point(8, 468);
|
||||
this.executeQueryBtn.Name = "executeQueryBtn";
|
||||
this.executeQueryBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.executeQueryBtn.TabIndex = 6;
|
||||
this.executeQueryBtn.Text = "Execute query";
|
||||
this.executeQueryBtn.UseVisualStyleBackColor = true;
|
||||
this.executeQueryBtn.Click += new System.EventHandler(this.executeQueryBtn_Click);
|
||||
//
|
||||
// addFilterBtn
|
||||
//
|
||||
this.addFilterBtn.Location = new System.Drawing.Point(8, 236);
|
||||
this.addFilterBtn.Name = "addFilterBtn";
|
||||
this.addFilterBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.addFilterBtn.TabIndex = 3;
|
||||
this.addFilterBtn.Text = "Add filter";
|
||||
this.addFilterBtn.UseVisualStyleBackColor = true;
|
||||
this.addFilterBtn.Click += new System.EventHandler(this.addFilterBtn_Click);
|
||||
//
|
||||
// testBenchesGroupBox
|
||||
//
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox6);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox5);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox4);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox3);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox2);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox1);
|
||||
this.testBenchesGroupBox.Location = new System.Drawing.Point(8, 54);
|
||||
this.testBenchesGroupBox.Name = "testBenchesGroupBox";
|
||||
this.testBenchesGroupBox.Size = new System.Drawing.Size(125, 135);
|
||||
this.testBenchesGroupBox.TabIndex = 1;
|
||||
this.testBenchesGroupBox.TabStop = false;
|
||||
this.testBenchesGroupBox.Text = "Test benches";
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
this.checkBox6.AutoSize = true;
|
||||
this.checkBox6.Location = new System.Drawing.Point(23, 110);
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox6.TabIndex = 5;
|
||||
this.checkBox6.TabStop = true;
|
||||
this.checkBox6.Text = "radioButton6";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
this.checkBox6.CheckedChanged += new System.EventHandler(this.checkBox6_CheckedChanged);
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
this.checkBox5.AutoSize = true;
|
||||
this.checkBox5.Location = new System.Drawing.Point(23, 92);
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox5.TabIndex = 4;
|
||||
this.checkBox5.TabStop = true;
|
||||
this.checkBox5.Text = "radioButton5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
this.checkBox4.AutoSize = true;
|
||||
this.checkBox4.Location = new System.Drawing.Point(23, 74);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox4.TabIndex = 3;
|
||||
this.checkBox4.TabStop = true;
|
||||
this.checkBox4.Text = "radioButton4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
this.checkBox3.AutoSize = true;
|
||||
this.checkBox3.Location = new System.Drawing.Point(23, 55);
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox3.TabIndex = 2;
|
||||
this.checkBox3.TabStop = true;
|
||||
this.checkBox3.Text = "radioButton3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(23, 36);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox2.TabIndex = 1;
|
||||
this.checkBox2.TabStop = true;
|
||||
this.checkBox2.Text = "radioButton2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(23, 17);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox1.TabIndex = 0;
|
||||
this.checkBox1.TabStop = true;
|
||||
this.checkBox1.Text = "radioButton1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||
//
|
||||
// ResultsBrowserWnd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(984, 712);
|
||||
this.Controls.Add(this.vSplitContainer);
|
||||
this.Name = "ResultsBrowserWnd";
|
||||
this.Text = "Results Browser";
|
||||
this.Load += new System.EventHandler(this.ResultsBrowserWnd_Load);
|
||||
this.vSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.vSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).EndInit();
|
||||
this.vSplitContainer.ResumeLayout(false);
|
||||
this.hSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.hSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).EndInit();
|
||||
this.hSplitContainer.ResumeLayout(false);
|
||||
this.filtersGroupBox.ResumeLayout(false);
|
||||
this.resultsGroupBox.ResumeLayout(false);
|
||||
this.testBenchesGroupBox.ResumeLayout(false);
|
||||
this.testBenchesGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@@ -387,5 +401,6 @@
|
||||
private System.Windows.Forms.RadioButton checkBox5;
|
||||
private System.Windows.Forms.RadioButton checkBox4;
|
||||
private System.Windows.Forms.Button printerConfigBtn;
|
||||
private System.Windows.Forms.RadioButton checkBox6;
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@ namespace ResultsBrowser
|
||||
checkBox3.Checked = Program.LocalSettings.Bench3Selected;
|
||||
checkBox4.Checked = Program.LocalSettings.Bench4Selected;
|
||||
checkBox5.Checked = Program.LocalSettings.Bench5Selected;
|
||||
checkBox6.Checked = Program.LocalSettings.Bench6Selected;
|
||||
|
||||
if (args.Length == 1 && args[0].IndexOf(".qry") == args[0].Length - 4)
|
||||
{
|
||||
@@ -84,19 +85,24 @@ namespace ResultsBrowser
|
||||
checkBox3.Text = Program.LocalSettings.Bench3;
|
||||
checkBox4.Text = Program.LocalSettings.Bench4;
|
||||
checkBox5.Text = Program.LocalSettings.Bench5;
|
||||
checkBox6.Text = Program.LocalSettings.Bench6;
|
||||
|
||||
checkBox1.Visible = !string.IsNullOrEmpty(checkBox1.Text);
|
||||
checkBox2.Visible = !string.IsNullOrEmpty(checkBox2.Text);
|
||||
checkBox3.Visible = !string.IsNullOrEmpty(checkBox3.Text);
|
||||
checkBox4.Visible = !string.IsNullOrEmpty(checkBox4.Text);
|
||||
checkBox5.Visible = !string.IsNullOrEmpty(checkBox5.Text);
|
||||
checkBox6.Visible = !string.IsNullOrEmpty(checkBox6.Text);
|
||||
}
|
||||
|
||||
string BenchName()
|
||||
{
|
||||
return checkBox1.Checked ? Program.LocalSettings.Bench1
|
||||
: checkBox2.Checked ? Program.LocalSettings.Bench2
|
||||
: Program.LocalSettings.Bench3;
|
||||
: checkBox2.Checked ? Program.LocalSettings.Bench2
|
||||
: checkBox3.Checked ? Program.LocalSettings.Bench3
|
||||
: checkBox4.Checked ? Program.LocalSettings.Bench4
|
||||
: checkBox5.Checked ? Program.LocalSettings.Bench5
|
||||
: Program.LocalSettings.Bench6;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
@@ -133,6 +139,7 @@ namespace ResultsBrowser
|
||||
private void checkBox3_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
|
||||
private void checkBox4_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
|
||||
private void checkBox5_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
|
||||
private void checkBox6_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
|
||||
|
||||
void SaveCheckBoxes()
|
||||
{
|
||||
@@ -141,6 +148,7 @@ namespace ResultsBrowser
|
||||
Program.LocalSettings.Bench3Selected = checkBox3.Checked;
|
||||
Program.LocalSettings.Bench4Selected = checkBox4.Checked;
|
||||
Program.LocalSettings.Bench5Selected = checkBox5.Checked;
|
||||
Program.LocalSettings.Bench6Selected = checkBox6.Checked;
|
||||
Program.LocalSettings.Save();
|
||||
}
|
||||
|
||||
@@ -269,7 +277,8 @@ namespace ResultsBrowser
|
||||
(checkBox3.Checked ? Program.LocalSettings.ConnectionString3 :
|
||||
(checkBox4.Checked ? Program.LocalSettings.ConnectionString4 :
|
||||
(checkBox5.Checked ? Program.LocalSettings.ConnectionString5 :
|
||||
Program.LocalSettings.ConnectionString1))));
|
||||
(checkBox6.Checked ? Program.LocalSettings.ConnectionString6 :
|
||||
Program.LocalSettings.ConnectionString1)))));
|
||||
|
||||
ISession[] sessions = new ISession[] { Results.DB.CreateSession() };
|
||||
|
||||
|
||||
+177
-22
@@ -18,31 +18,153 @@ namespace Statistics
|
||||
[XmlRootAttribute("Statistics")]
|
||||
public class LocalSettings
|
||||
{
|
||||
public const int BenchesCount = 6;
|
||||
public const int FlowsCount = 5;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// User interface language (used as CultureInfo(..) constructor argument).
|
||||
/// </summary>
|
||||
public string Language;
|
||||
|
||||
/// Names of servers.
|
||||
public string Bench1;
|
||||
public string Bench2;
|
||||
public string Bench3;
|
||||
public string Bench4;
|
||||
public string Bench5;
|
||||
public string Bench6;
|
||||
///
|
||||
/// Names of test benches
|
||||
///
|
||||
public string[] BenchNames;
|
||||
///
|
||||
public string GetBenchName(int i)
|
||||
{
|
||||
return ((BenchNames != null) && (i >= 0) && (i < BenchNames.Length)) ? BenchNames[i] : string.Empty;
|
||||
}
|
||||
|
||||
/// Database settings of servers.
|
||||
public string ConnectionString1;
|
||||
public string ConnectionString2;
|
||||
public string ConnectionString3;
|
||||
public string ConnectionString4;
|
||||
public string ConnectionString5;
|
||||
public string ConnectionString6;
|
||||
///
|
||||
/// Database settings of servers
|
||||
///
|
||||
public string[] ConnectionStrings;
|
||||
///
|
||||
public string GetConnectionString(int i)
|
||||
{
|
||||
return ((ConnectionStrings != null) && (i >= 0) && (i < ConnectionStrings.Length)) ? ConnectionStrings[i] : string.Empty;
|
||||
}
|
||||
|
||||
public string TimePeriodFormat;
|
||||
///
|
||||
/// Flow settings
|
||||
///
|
||||
public bool[] FlowEnabledWMs;
|
||||
public bool[] FlowEnabledI1;
|
||||
public bool[] FlowEnabledI2;
|
||||
public bool[] FlowEnabledI3;
|
||||
public bool[] FlowEnabledI4;
|
||||
///
|
||||
public bool GetFlowEnabled(UserControls.MidId midId, int i)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
return ((FlowEnabledWMs != null) && (i >= 0) && (i < FlowEnabledWMs.Length)) ? FlowEnabledWMs[i] : false;
|
||||
case UserControls.MidId.I1: return ((FlowEnabledI1 != null) && (i >= 0) && (i < FlowEnabledI1.Length)) ? FlowEnabledI1[i] : false;
|
||||
case UserControls.MidId.I2: return ((FlowEnabledI2 != null) && (i >= 0) && (i < FlowEnabledI2.Length)) ? FlowEnabledI2[i] : false;
|
||||
case UserControls.MidId.I3: return ((FlowEnabledI3 != null) && (i >= 0) && (i < FlowEnabledI3.Length)) ? FlowEnabledI3[i] : false;
|
||||
case UserControls.MidId.I4: return ((FlowEnabledI4 != null) && (i >= 0) && (i < FlowEnabledI4.Length)) ? FlowEnabledI4[i] : false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
///
|
||||
public void SetFlowEnabled(UserControls.MidId midId, int i, bool value)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
if ((FlowEnabledWMs != null) && (i >= 0) && (i < FlowEnabledWMs.Length)) { FlowEnabledWMs[i] = value; };
|
||||
break;
|
||||
case UserControls.MidId.I1: if ((FlowEnabledI1 != null) && (i >= 0) && (i < FlowEnabledI1.Length)) { FlowEnabledI1[i] = value; }; break;
|
||||
case UserControls.MidId.I2: if ((FlowEnabledI2 != null) && (i >= 0) && (i < FlowEnabledI2.Length)) { FlowEnabledI2[i] = value; }; break;
|
||||
case UserControls.MidId.I3: if ((FlowEnabledI3 != null) && (i >= 0) && (i < FlowEnabledI3.Length)) { FlowEnabledI3[i] = value; }; break;
|
||||
case UserControls.MidId.I4: if ((FlowEnabledI4 != null) && (i >= 0) && (i < FlowEnabledI4.Length)) { FlowEnabledI4[i] = value; }; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public double[] FlowFromWMs;
|
||||
public double[] FlowFromI1;
|
||||
public double[] FlowFromI2;
|
||||
public double[] FlowFromI3;
|
||||
public double[] FlowFromI4;
|
||||
///
|
||||
public double GetFlowFrom(UserControls.MidId midId, int i)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
return ((FlowFromWMs != null) && (i >= 0) && (i < FlowFromWMs.Length)) ? FlowFromWMs[i] : 0;
|
||||
case UserControls.MidId.I1: return ((FlowFromI1 != null) && (i >= 0) && (i < FlowFromI1.Length)) ? FlowFromI1[i] : 0;
|
||||
case UserControls.MidId.I2: return ((FlowFromI2 != null) && (i >= 0) && (i < FlowFromI2.Length)) ? FlowFromI2[i] : 0;
|
||||
case UserControls.MidId.I3: return ((FlowFromI3 != null) && (i >= 0) && (i < FlowFromI3.Length)) ? FlowFromI3[i] : 0;
|
||||
case UserControls.MidId.I4: return ((FlowFromI4 != null) && (i >= 0) && (i < FlowFromI4.Length)) ? FlowFromI4[i] : 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
///
|
||||
public void SetFlowFrom(UserControls.MidId midId, int i, double value)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
if ((FlowFromWMs != null) && (i >= 0) && (i < FlowFromWMs.Length)) { FlowFromWMs[i] = value; };
|
||||
break;
|
||||
case UserControls.MidId.I1: if ((FlowFromI1 != null) && (i >= 0) && (i < FlowFromI1.Length)) { FlowFromI1[i] = value; }; break;
|
||||
case UserControls.MidId.I2: if ((FlowFromI2 != null) && (i >= 0) && (i < FlowFromI2.Length)) { FlowFromI2[i] = value; }; break;
|
||||
case UserControls.MidId.I3: if ((FlowFromI3 != null) && (i >= 0) && (i < FlowFromI3.Length)) { FlowFromI3[i] = value; }; break;
|
||||
case UserControls.MidId.I4: if ((FlowFromI4 != null) && (i >= 0) && (i < FlowFromI4.Length)) { FlowFromI4[i] = value; }; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public double[] FlowToWMs;
|
||||
public double[] FlowToI1;
|
||||
public double[] FlowToI2;
|
||||
public double[] FlowToI3;
|
||||
public double[] FlowToI4;
|
||||
///
|
||||
public double GetFlowTo(UserControls.MidId midId, int i)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
return ((FlowToWMs != null) && (i >= 0) && (i < FlowToWMs.Length)) ? FlowToWMs[i] : 0;
|
||||
case UserControls.MidId.I1: return ((FlowToI1 != null) && (i >= 0) && (i < FlowToI1.Length)) ? FlowToI1[i] : 0;
|
||||
case UserControls.MidId.I2: return ((FlowToI2 != null) && (i >= 0) && (i < FlowToI2.Length)) ? FlowToI2[i] : 0;
|
||||
case UserControls.MidId.I3: return ((FlowToI3 != null) && (i >= 0) && (i < FlowToI3.Length)) ? FlowToI3[i] : 0;
|
||||
case UserControls.MidId.I4: return ((FlowToI4 != null) && (i >= 0) && (i < FlowToI4.Length)) ? FlowToI4[i] : 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
///
|
||||
public void SetFlowTo(UserControls.MidId midId, int i, double value)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
if ((FlowToWMs != null) && (i >= 0) && (i < FlowToWMs.Length)) { FlowToWMs[i] = value; };
|
||||
break;
|
||||
case UserControls.MidId.I1: if ((FlowToI1 != null) && (i >= 0) && (i < FlowToI1.Length)) { FlowToI1[i] = value; }; break;
|
||||
case UserControls.MidId.I2: if ((FlowToI2 != null) && (i >= 0) && (i < FlowToI2.Length)) { FlowToI2[i] = value; }; break;
|
||||
case UserControls.MidId.I3: if ((FlowToI3 != null) && (i >= 0) && (i < FlowToI3.Length)) { FlowToI3[i] = value; }; break;
|
||||
case UserControls.MidId.I4: if ((FlowToI4 != null) && (i >= 0) && (i < FlowToI4.Length)) { FlowToI4[i] = value; }; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// StatisticsDlg UI
|
||||
public int SelectedRadioButtonNumber;
|
||||
|
||||
/// Statistics options
|
||||
public bool TwoDim;
|
||||
|
||||
/// MainWnd
|
||||
public int MainWndLeft;
|
||||
@@ -52,16 +174,49 @@ namespace Statistics
|
||||
public bool ManiWndMaximized;
|
||||
public int SplitterDistance;
|
||||
|
||||
/// Last configuration file name
|
||||
public string LastConfigFileName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor which is used to create default settings
|
||||
/// </summary>
|
||||
public LocalSettings()
|
||||
{
|
||||
Language = "SK";
|
||||
|
||||
BenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "PT7" };
|
||||
|
||||
ConnectionStrings = new string[]
|
||||
{
|
||||
"SERVER=10.42.128.93; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.128.102; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.128.89; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.128.213; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.128.214; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.129.26; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
};
|
||||
|
||||
FlowEnabledWMs = new bool[FlowsCount];
|
||||
FlowEnabledI1 = new bool[FlowsCount];
|
||||
FlowEnabledI2 = new bool[FlowsCount];
|
||||
FlowEnabledI3 = new bool[FlowsCount];
|
||||
FlowEnabledI4 = new bool[FlowsCount];
|
||||
|
||||
FlowFromWMs = new double[FlowsCount];
|
||||
FlowFromI1 = new double[FlowsCount];
|
||||
FlowFromI2 = new double[FlowsCount];
|
||||
FlowFromI3 = new double[FlowsCount];
|
||||
FlowFromI4 = new double[FlowsCount];
|
||||
|
||||
FlowToWMs = new double[FlowsCount];
|
||||
FlowToI1 = new double[FlowsCount];
|
||||
FlowToI2 = new double[FlowsCount];
|
||||
FlowToI3 = new double[FlowsCount];
|
||||
FlowToI4 = new double[FlowsCount];
|
||||
|
||||
SelectedRadioButtonNumber = 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load public fields of this class from the XML file.
|
||||
/// Load local settings (public fields of this class) from the XML file.
|
||||
/// </summary>
|
||||
public static LocalSettings Load(string fileName)
|
||||
{
|
||||
@@ -82,7 +237,7 @@ namespace Statistics
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save public fields of this class to the XML file.
|
||||
/// Save local settings (public fields of this class) to the XML file.
|
||||
/// </summary>
|
||||
public void Save()
|
||||
{
|
||||
|
||||
+19
-17
@@ -3,7 +3,6 @@
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Statistics.Resources;
|
||||
|
||||
@@ -16,13 +15,17 @@ namespace Statistics
|
||||
public static DateTime BuildDateTime; /// date and time of program build
|
||||
|
||||
/// Local settings
|
||||
public static readonly string ExecutableDirectory;
|
||||
public static readonly string ConfigDirectory;
|
||||
public static readonly string LocalSettingsFileName;
|
||||
public static readonly string LocalSettingsBackupName;
|
||||
public static string ExecutableDirectory;
|
||||
public static string ConfigDirectory;
|
||||
public static string LocalSettingsFileName;
|
||||
public static string LocalSettingsBackupName;
|
||||
public static LocalSettings LocalSettings;
|
||||
|
||||
static Program()
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
/// Program version string
|
||||
System.Reflection.Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||
@@ -32,18 +35,17 @@ namespace Statistics
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExecutableDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
ConfigDirectory = Path.Combine(ExecutableDirectory, "..\\Cfg\\");
|
||||
LocalSettingsFileName = ConfigDirectory + "config.xml";
|
||||
LocalSettingsBackupName = ConfigDirectory + "config.backup.xml";
|
||||
}
|
||||
#if false
|
||||
/// Config directory is a sibling directory of the executable directory
|
||||
ConfigDirectory = Path.Combine(ExecutableDirectory, "..", string.Format("Cfg{0}", (args.Length >= 1) ? args[0] : string.Empty));
|
||||
#else
|
||||
/// Config directory is a directory in 'C:\Users\username\AppData\Local' folder
|
||||
ConfigDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
string.Format("Statistics{0}", (args.Length >= 1) ? args[0] : string.Empty));
|
||||
#endif
|
||||
LocalSettingsFileName = Path.Combine(ConfigDirectory, "config.xml");
|
||||
LocalSettingsBackupName = Path.Combine(ConfigDirectory, "config.backup.xml");
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
///
|
||||
/// Load the local settings
|
||||
///
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1104.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1104.0")]
|
||||
[assembly: AssemblyVersion("2.18.1108.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1108.0")]
|
||||
|
||||
Generated
+1
@@ -292,6 +292,7 @@
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "StatisticsDlg";
|
||||
this.Text = "Statistics";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.StatisticsDlg_FormClosing);
|
||||
this.Load += new System.EventHandler(this.StatisticsDlg_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
|
||||
+56
-31
@@ -24,30 +24,7 @@ namespace Statistics
|
||||
{
|
||||
public partial class StatisticsDlg : Form
|
||||
{
|
||||
static string[] testBenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "PT7" };
|
||||
///
|
||||
#if true
|
||||
static string[] connectionStrings = new string[] {
|
||||
"SERVER=10.42.128.197; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR10
|
||||
"SERVER=10.42.128.98; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR11
|
||||
"SERVER=10.42.128.152; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR13
|
||||
"SERVER=10.42.128.143; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR14
|
||||
"SERVER=10.42.128.63; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR15
|
||||
"" /// PT7
|
||||
};
|
||||
#else
|
||||
static string[] connectionStrings = new string[] {
|
||||
"SERVER=localhost; DATABASE=st-wr10-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR10
|
||||
"SERVER=localhost; DATABASE=st-wr11-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR11
|
||||
"SERVER=localhost; DATABASE=st-wr13-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR13
|
||||
"SERVER=localhost; DATABASE=st-wr14-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR14
|
||||
"SERVER=localhost; DATABASE=st-wr15-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR15
|
||||
"" /// PT7
|
||||
};
|
||||
#endif
|
||||
///
|
||||
static ISessionFactory[] sessionFactories = new ISessionFactory[6];
|
||||
|
||||
static ISessionFactory[] sessionFactories = new ISessionFactory[LocalSettings.BenchesCount];
|
||||
|
||||
|
||||
public StatisticsDlg()
|
||||
@@ -91,22 +68,35 @@ namespace Statistics
|
||||
Left = (ls.MainWndLeft != 0) ? ls.MainWndLeft : 50;
|
||||
Top = (ls.MainWndTop != 0) ? ls.MainWndTop : 50;
|
||||
|
||||
for (int i = 0; i < testBenchNames.Length; i++)
|
||||
switch (ls.SelectedRadioButtonNumber)
|
||||
{
|
||||
if ((i < connectionStrings.Length) && !string.IsNullOrEmpty(connectionStrings[i]))
|
||||
case 1: radioButton1.Checked = true; break;
|
||||
case 2: radioButton2.Checked = true; break;
|
||||
case 3: radioButton3.Checked = true; break;
|
||||
case 4: radioButton4.Checked = true; break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)MidId.Count; i++)
|
||||
{
|
||||
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).Data2UI();
|
||||
}
|
||||
|
||||
for (int i = 0; i < LocalSettings.BenchesCount; i++)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Program.LocalSettings.GetConnectionString(i)))
|
||||
{
|
||||
sessionFactories[i] = null;
|
||||
try
|
||||
{
|
||||
sessionFactories[i] = Fluently.Configure()
|
||||
.Database(MySQLConfiguration.Standard.ConnectionString(connectionStrings[i]))
|
||||
.Database(MySQLConfiguration.Standard.ConnectionString(Program.LocalSettings.GetConnectionString(i)))
|
||||
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Results.Entities.Batch>())
|
||||
.ExposeConfiguration(BuildSchema)
|
||||
.BuildSessionFactory();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show(string.Format("Cannot open one of database of {0}", testBenchNames[i]), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
MessageBox.Show(string.Format("Cannot open one of database of {0}", Program.LocalSettings.GetBenchName(i)), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,7 +130,7 @@ namespace Statistics
|
||||
|
||||
public IList<TestRslt> UpdateRequest(int benchId, MidId midId)
|
||||
{
|
||||
if (benchId >= sessionFactories.Length || sessionFactories[benchId] == null || (midId == MidId.WaterMeters))
|
||||
if ((benchId < 0) || (benchId >= LocalSettings.BenchesCount) || (sessionFactories[benchId] == null) || (midId == MidId.WaterMeters))
|
||||
{
|
||||
if (midId == MidId.WaterMeters)
|
||||
{
|
||||
@@ -148,7 +138,7 @@ namespace Statistics
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(string.Format("Cannot load statistics of {0}", (benchId < testBenchNames.Length) ? testBenchNames[benchId] : "XY"));
|
||||
MessageBox.Show(string.Format("Cannot load statistics of {0}", Program.LocalSettings.GetBenchName(benchId)));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -193,7 +183,7 @@ namespace Statistics
|
||||
catch (Exception exc)
|
||||
{
|
||||
Forms.ModelessForm.CloseForm();
|
||||
MessageBox.Show(string.Format("Error loading statistics of {0}\r\n{1}", (benchId < testBenchNames.Length) ? testBenchNames[benchId] : "XY", exc.Message));
|
||||
MessageBox.Show(string.Format("Error loading statistics of {0}\r\n{1}", Program.LocalSettings.GetBenchName(benchId), exc.Message));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -230,5 +220,40 @@ namespace Statistics
|
||||
{
|
||||
timePeriodGroupBox.Enabled = radioButton4.Checked;
|
||||
}
|
||||
|
||||
private void StatisticsDlg_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
|
||||
ls.ManiWndMaximized = (WindowState == FormWindowState.Maximized);
|
||||
if (WindowState == FormWindowState.Normal)
|
||||
{
|
||||
ls.MainWndLeft = Location.X;
|
||||
ls.MainWndTop = Location.Y;
|
||||
ls.MainWndWidth = Size.Width;
|
||||
ls.MainWndHeight = Size.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Maximized or minimized (when restarted, minimized window is restored as normal)
|
||||
ls.MainWndLeft = RestoreBounds.Left;
|
||||
ls.MainWndTop = RestoreBounds.Top;
|
||||
ls.MainWndWidth = RestoreBounds.Width;
|
||||
ls.MainWndHeight = RestoreBounds.Height;
|
||||
}
|
||||
|
||||
if (radioButton1.Checked) ls.SelectedRadioButtonNumber = 1;
|
||||
else if (radioButton2.Checked) ls.SelectedRadioButtonNumber = 2;
|
||||
else if (radioButton3.Checked) ls.SelectedRadioButtonNumber = 3;
|
||||
else if (radioButton4.Checked) ls.SelectedRadioButtonNumber = 4;
|
||||
else ls.SelectedRadioButtonNumber = 0;
|
||||
|
||||
for (int i = 0; i < (int)MidId.Count; i++)
|
||||
{
|
||||
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).UI2Data();
|
||||
}
|
||||
|
||||
ls.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,11 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Results.Entities;
|
||||
using Statistics.Resources;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Statistics.UserControls
|
||||
{
|
||||
@@ -129,6 +126,60 @@ namespace Statistics.UserControls
|
||||
toLabel6.Text = Strings.To;
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
flow1CheckBox.Checked = ls.GetFlowEnabled(MidId, 0);
|
||||
flow2CheckBox.Checked = ls.GetFlowEnabled(MidId, 1);
|
||||
flow3CheckBox.Checked = ls.GetFlowEnabled(MidId, 2);
|
||||
flow4CheckBox.Checked = ls.GetFlowEnabled(MidId, 3);
|
||||
flow5CheckBox.Checked = ls.GetFlowEnabled(MidId, 4);
|
||||
flow1From = ls.GetFlowFrom(MidId, 0);
|
||||
flow2From = ls.GetFlowFrom(MidId, 1);
|
||||
flow3From = ls.GetFlowFrom(MidId, 2);
|
||||
flow4From = ls.GetFlowFrom(MidId, 3);
|
||||
flow5From = ls.GetFlowFrom(MidId, 4);
|
||||
flow1FromTextBox.Text = flow1From.ToString();
|
||||
flow2FromTextBox.Text = flow2From.ToString();
|
||||
flow3FromTextBox.Text = flow3From.ToString();
|
||||
flow4FromTextBox.Text = flow4From.ToString();
|
||||
flow5FromTextBox.Text = flow5From.ToString();
|
||||
flow1To = ls.GetFlowTo(MidId, 0);
|
||||
flow2To = ls.GetFlowTo(MidId, 1);
|
||||
flow3To = ls.GetFlowTo(MidId, 2);
|
||||
flow4To = ls.GetFlowTo(MidId, 3);
|
||||
flow5To = ls.GetFlowTo(MidId, 4);
|
||||
flow1ToTextBox.Text = flow1To.ToString();
|
||||
flow2ToTextBox.Text = flow2To.ToString();
|
||||
flow3ToTextBox.Text = flow3To.ToString();
|
||||
flow4ToTextBox.Text = flow4To.ToString();
|
||||
flow5ToTextBox.Text = flow5To.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns>true when successful</returns>
|
||||
public void UI2Data()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
ls.SetFlowEnabled(MidId, 0, flow1CheckBox.Checked);
|
||||
ls.SetFlowEnabled(MidId, 1, flow2CheckBox.Checked);
|
||||
ls.SetFlowEnabled(MidId, 2, flow3CheckBox.Checked);
|
||||
ls.SetFlowEnabled(MidId, 3, flow4CheckBox.Checked);
|
||||
ls.SetFlowEnabled(MidId, 4, flow5CheckBox.Checked);
|
||||
ls.SetFlowFrom(MidId, 0, flow1From);
|
||||
ls.SetFlowFrom(MidId, 1, flow2From);
|
||||
ls.SetFlowFrom(MidId, 2, flow3From);
|
||||
ls.SetFlowFrom(MidId, 3, flow4From);
|
||||
ls.SetFlowFrom(MidId, 4, flow5From);
|
||||
ls.SetFlowTo(MidId, 0, flow1To);
|
||||
ls.SetFlowTo(MidId, 1, flow2To);
|
||||
ls.SetFlowTo(MidId, 2, flow3To);
|
||||
ls.SetFlowTo(MidId, 3, flow4To);
|
||||
ls.SetFlowTo(MidId, 4, flow5To);
|
||||
}
|
||||
|
||||
private void flow1CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow1CheckBox, flow1GroupBox); }
|
||||
private void flow2CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow2CheckBox, flow2GroupBox); }
|
||||
private void flow3CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow3CheckBox, flow3GroupBox); }
|
||||
@@ -157,7 +208,9 @@ namespace Statistics.UserControls
|
||||
flow1FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow1FromExclamation.Visible = !(double.TryParse(flow1FromTextBox.Text, out flow1From) && (flow1From >= 0));
|
||||
flow1FromExclamation.Visible = !((double.TryParse(flow1FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow1From) ||
|
||||
double.TryParse(flow1FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow1From)) &&
|
||||
(flow1From >= 0));
|
||||
}
|
||||
|
||||
private void flow1ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -168,7 +221,9 @@ namespace Statistics.UserControls
|
||||
flow1ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow1ToExclamation.Visible = !(double.TryParse(flow1ToTextBox.Text, out flow1To) && (flow1To >= 0));
|
||||
flow1ToExclamation.Visible = !((double.TryParse(flow1ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow1To) ||
|
||||
double.TryParse(flow1ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow1To)) &&
|
||||
(flow1To >= 0));
|
||||
}
|
||||
|
||||
private void flow2FromTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -179,7 +234,9 @@ namespace Statistics.UserControls
|
||||
flow2FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow2FromExclamation.Visible = !(double.TryParse(flow2FromTextBox.Text, out flow2From) && (flow2From >= 0));
|
||||
flow2FromExclamation.Visible = !((double.TryParse(flow2FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow2From) ||
|
||||
double.TryParse(flow2FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow2From)) &&
|
||||
(flow2From >= 0));
|
||||
}
|
||||
|
||||
private void flow2ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -190,7 +247,9 @@ namespace Statistics.UserControls
|
||||
flow2ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow2ToExclamation.Visible = !(double.TryParse(flow2ToTextBox.Text, out flow2To) && (flow2To >= 0));
|
||||
flow2ToExclamation.Visible = !((double.TryParse(flow2ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow2To) ||
|
||||
double.TryParse(flow2ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow2To)) &&
|
||||
(flow2To >= 0));
|
||||
}
|
||||
|
||||
private void flow3FromTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -201,7 +260,9 @@ namespace Statistics.UserControls
|
||||
flow3FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow3FromExclamation.Visible = !(double.TryParse(flow3FromTextBox.Text, out flow3From) && (flow3From >= 0));
|
||||
flow3FromExclamation.Visible = !((double.TryParse(flow3FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow3From) ||
|
||||
double.TryParse(flow3FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow3From)) &&
|
||||
(flow3From >= 0));
|
||||
}
|
||||
|
||||
private void flow3ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -212,7 +273,9 @@ namespace Statistics.UserControls
|
||||
flow3ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow3ToExclamation.Visible = !(double.TryParse(flow3ToTextBox.Text, out flow3To) && (flow3To >= 0));
|
||||
flow3ToExclamation.Visible = !((double.TryParse(flow3ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow3To) ||
|
||||
double.TryParse(flow3ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow3To)) &&
|
||||
(flow3To >= 0));
|
||||
}
|
||||
|
||||
private void flow4FromTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -223,7 +286,9 @@ namespace Statistics.UserControls
|
||||
flow4FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow4FromExclamation.Visible = !(double.TryParse(flow4FromTextBox.Text, out flow4From) && (flow4From >= 0));
|
||||
flow4FromExclamation.Visible = !((double.TryParse(flow4FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow4From) ||
|
||||
double.TryParse(flow4FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow4From)) &&
|
||||
(flow4From >= 0));
|
||||
}
|
||||
|
||||
private void flow4ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -234,7 +299,9 @@ namespace Statistics.UserControls
|
||||
flow4ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow4ToExclamation.Visible = !(double.TryParse(flow4ToTextBox.Text, out flow4To) && (flow4To >= 0));
|
||||
flow4ToExclamation.Visible = !((double.TryParse(flow4ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow4To) ||
|
||||
double.TryParse(flow4ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow4To)) &&
|
||||
(flow4To >= 0));
|
||||
}
|
||||
|
||||
private void flow5FromTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -245,7 +312,9 @@ namespace Statistics.UserControls
|
||||
flow5FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow5FromExclamation.Visible = !(double.TryParse(flow5FromTextBox.Text, out flow5From) && (flow5From >= 0));
|
||||
flow5FromExclamation.Visible = !((double.TryParse(flow5FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow5From) ||
|
||||
double.TryParse(flow5FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow5From)) &&
|
||||
(flow5From >= 0));
|
||||
}
|
||||
|
||||
private void flow5ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -256,7 +325,9 @@ namespace Statistics.UserControls
|
||||
flow5ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow5ToExclamation.Visible = !(double.TryParse(flow5ToTextBox.Text, out flow5To) && (flow5To >= 0));
|
||||
flow5ToExclamation.Visible = !((double.TryParse(flow5ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow5To) ||
|
||||
double.TryParse(flow5ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow5To)) &&
|
||||
(flow5To >= 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+45
-45
@@ -28,13 +28,13 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series5 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series10 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
this.updateButton = new System.Windows.Forms.Button();
|
||||
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
@@ -51,7 +51,7 @@
|
||||
this.updateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.updateButton.Location = new System.Drawing.Point(3, 7);
|
||||
this.updateButton.Name = "updateButton";
|
||||
this.updateButton.Size = new System.Drawing.Size(101, 43);
|
||||
this.updateButton.Size = new System.Drawing.Size(90, 43);
|
||||
this.updateButton.TabIndex = 4;
|
||||
this.updateButton.Text = "Update data";
|
||||
this.updateButton.UseVisualStyleBackColor = true;
|
||||
@@ -59,44 +59,44 @@
|
||||
//
|
||||
// chart1
|
||||
//
|
||||
chartArea1.Name = "ChartArea1";
|
||||
this.chart1.ChartAreas.Add(chartArea1);
|
||||
chartArea2.Name = "ChartArea1";
|
||||
this.chart1.ChartAreas.Add(chartArea2);
|
||||
this.chart1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
legend1.Name = "Legend1";
|
||||
this.chart1.Legends.Add(legend1);
|
||||
legend2.Name = "Legend1";
|
||||
this.chart1.Legends.Add(legend2);
|
||||
this.chart1.Location = new System.Drawing.Point(0, 0);
|
||||
this.chart1.Name = "chart1";
|
||||
series1.ChartArea = "ChartArea1";
|
||||
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series1.Color = System.Drawing.Color.ForestGreen;
|
||||
series1.Legend = "Legend1";
|
||||
series1.Name = "Flow 1";
|
||||
series2.ChartArea = "ChartArea1";
|
||||
series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series2.Color = System.Drawing.Color.Red;
|
||||
series2.Legend = "Legend1";
|
||||
series2.Name = "Flow 2";
|
||||
series3.ChartArea = "ChartArea1";
|
||||
series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series3.Color = System.Drawing.Color.Blue;
|
||||
series3.Legend = "Legend1";
|
||||
series3.Name = "Flow 3";
|
||||
series4.ChartArea = "ChartArea1";
|
||||
series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series4.Color = System.Drawing.Color.Yellow;
|
||||
series4.Legend = "Legend1";
|
||||
series4.Name = "Flow 4";
|
||||
series5.ChartArea = "ChartArea1";
|
||||
series5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series5.Color = System.Drawing.Color.Fuchsia;
|
||||
series5.Legend = "Legend1";
|
||||
series5.Name = "Flow 5";
|
||||
this.chart1.Series.Add(series1);
|
||||
this.chart1.Series.Add(series2);
|
||||
this.chart1.Series.Add(series3);
|
||||
this.chart1.Series.Add(series4);
|
||||
this.chart1.Series.Add(series5);
|
||||
this.chart1.Size = new System.Drawing.Size(473, 381);
|
||||
series6.ChartArea = "ChartArea1";
|
||||
series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series6.Color = System.Drawing.Color.ForestGreen;
|
||||
series6.Legend = "Legend1";
|
||||
series6.Name = "Flow 1";
|
||||
series7.ChartArea = "ChartArea1";
|
||||
series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series7.Color = System.Drawing.Color.Red;
|
||||
series7.Legend = "Legend1";
|
||||
series7.Name = "Flow 2";
|
||||
series8.ChartArea = "ChartArea1";
|
||||
series8.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series8.Color = System.Drawing.Color.Blue;
|
||||
series8.Legend = "Legend1";
|
||||
series8.Name = "Flow 3";
|
||||
series9.ChartArea = "ChartArea1";
|
||||
series9.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series9.Color = System.Drawing.Color.DarkOrange;
|
||||
series9.Legend = "Legend1";
|
||||
series9.Name = "Flow 4";
|
||||
series10.ChartArea = "ChartArea1";
|
||||
series10.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series10.Color = System.Drawing.Color.Fuchsia;
|
||||
series10.Legend = "Legend1";
|
||||
series10.Name = "Flow 5";
|
||||
this.chart1.Series.Add(series6);
|
||||
this.chart1.Series.Add(series7);
|
||||
this.chart1.Series.Add(series8);
|
||||
this.chart1.Series.Add(series9);
|
||||
this.chart1.Series.Add(series10);
|
||||
this.chart1.Size = new System.Drawing.Size(476, 381);
|
||||
this.chart1.TabIndex = 5;
|
||||
this.chart1.Text = "chart1";
|
||||
//
|
||||
@@ -117,7 +117,7 @@
|
||||
this.splitContainer1.Panel2.Controls.Add(this.exportButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.updateButton);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(577, 381);
|
||||
this.splitContainer1.SplitterDistance = 473;
|
||||
this.splitContainer1.SplitterDistance = 476;
|
||||
this.splitContainer1.SplitterWidth = 1;
|
||||
this.splitContainer1.TabIndex = 6;
|
||||
//
|
||||
@@ -126,7 +126,7 @@
|
||||
this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.exportButton.Location = new System.Drawing.Point(3, 56);
|
||||
this.exportButton.Name = "exportButton";
|
||||
this.exportButton.Size = new System.Drawing.Size(101, 43);
|
||||
this.exportButton.Size = new System.Drawing.Size(90, 43);
|
||||
this.exportButton.TabIndex = 5;
|
||||
this.exportButton.Text = "Export";
|
||||
this.exportButton.UseVisualStyleBackColor = true;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Statistics.UserControls
|
||||
{
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
chart1.Series[string.Format("{0} {1}", Strings.Flow, i)].Points.Clear();
|
||||
chart1.Series[string.Format("Flow {0}", i)].Points.Clear();
|
||||
}
|
||||
|
||||
IList<TestRslt> results = MidCtrl.UpdateRequest(Id);
|
||||
@@ -44,7 +44,7 @@ namespace Statistics.UserControls
|
||||
{
|
||||
if (MidCtrl.IsFlowEnabled(i) && (MidCtrl.FlowFrom(i) <= r.FlowMean) && (r.FlowMean <= MidCtrl.FlowTo(i)))
|
||||
{
|
||||
chart1.Series[string.Format("{0} {1}", Strings.Flow, i)].Points.AddXY(r.StartTime, r.ErrorMaster);
|
||||
chart1.Series[string.Format("Flow {0}", i)].Points.AddXY(r.StartTime, r.ErrorMaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,794 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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.checkBox13 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox13 = new System.Windows.Forms.ComboBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.checkBox14 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox14 = new System.Windows.Forms.ComboBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.checkBox15 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox15 = new System.Windows.Forms.ComboBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.checkBox16 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox16 = new System.Windows.Forms.ComboBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.checkBox17 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox17 = new System.Windows.Forms.ComboBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.checkBox18 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox18 = new System.Windows.Forms.ComboBox();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.checkBox19 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox19 = new System.Windows.Forms.ComboBox();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.checkBox20 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox20 = new System.Windows.Forms.ComboBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.checkBox21 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox21 = new System.Windows.Forms.ComboBox();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.checkBox22 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox22 = new System.Windows.Forms.ComboBox();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.checkBox23 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox23 = new System.Windows.Forms.ComboBox();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.checkBox24 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox24 = new System.Windows.Forms.ComboBox();
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
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";
|
||||
//
|
||||
// checkBox13
|
||||
//
|
||||
resources.ApplyResources(this.checkBox13, "checkBox13");
|
||||
this.checkBox13.Name = "checkBox13";
|
||||
this.checkBox13.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox13
|
||||
//
|
||||
resources.ApplyResources(this.comboBox13, "comboBox13");
|
||||
this.comboBox13.FormattingEnabled = true;
|
||||
this.comboBox13.Name = "comboBox13";
|
||||
this.comboBox13.SelectedIndexChanged += new System.EventHandler(this.comboBox13_SelectedIndexChanged);
|
||||
this.comboBox13.TextChanged += new System.EventHandler(this.comboBox13_TextChanged);
|
||||
this.comboBox13.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox13_KeyPress);
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
this.label13.Name = "label13";
|
||||
//
|
||||
// checkBox14
|
||||
//
|
||||
resources.ApplyResources(this.checkBox14, "checkBox14");
|
||||
this.checkBox14.Name = "checkBox14";
|
||||
this.checkBox14.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox14
|
||||
//
|
||||
resources.ApplyResources(this.comboBox14, "comboBox14");
|
||||
this.comboBox14.FormattingEnabled = true;
|
||||
this.comboBox14.Name = "comboBox14";
|
||||
this.comboBox14.SelectedIndexChanged += new System.EventHandler(this.comboBox14_SelectedIndexChanged);
|
||||
this.comboBox14.TextChanged += new System.EventHandler(this.comboBox14_TextChanged);
|
||||
this.comboBox14.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox14_KeyPress);
|
||||
//
|
||||
// label14
|
||||
//
|
||||
resources.ApplyResources(this.label14, "label14");
|
||||
this.label14.Name = "label14";
|
||||
//
|
||||
// checkBox15
|
||||
//
|
||||
resources.ApplyResources(this.checkBox15, "checkBox15");
|
||||
this.checkBox15.Name = "checkBox15";
|
||||
this.checkBox15.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox15
|
||||
//
|
||||
resources.ApplyResources(this.comboBox15, "comboBox15");
|
||||
this.comboBox15.FormattingEnabled = true;
|
||||
this.comboBox15.Name = "comboBox15";
|
||||
this.comboBox15.SelectedIndexChanged += new System.EventHandler(this.comboBox15_SelectedIndexChanged);
|
||||
this.comboBox15.TextChanged += new System.EventHandler(this.comboBox15_TextChanged);
|
||||
this.comboBox15.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox15_KeyPress);
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// checkBox16
|
||||
//
|
||||
resources.ApplyResources(this.checkBox16, "checkBox16");
|
||||
this.checkBox16.Name = "checkBox16";
|
||||
this.checkBox16.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox16
|
||||
//
|
||||
resources.ApplyResources(this.comboBox16, "comboBox16");
|
||||
this.comboBox16.FormattingEnabled = true;
|
||||
this.comboBox16.Name = "comboBox16";
|
||||
this.comboBox16.SelectedIndexChanged += new System.EventHandler(this.comboBox16_SelectedIndexChanged);
|
||||
this.comboBox16.TextChanged += new System.EventHandler(this.comboBox16_TextChanged);
|
||||
this.comboBox16.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox16_KeyPress);
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
this.label16.Name = "label16";
|
||||
//
|
||||
// checkBox17
|
||||
//
|
||||
resources.ApplyResources(this.checkBox17, "checkBox17");
|
||||
this.checkBox17.Name = "checkBox17";
|
||||
this.checkBox17.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox17
|
||||
//
|
||||
resources.ApplyResources(this.comboBox17, "comboBox17");
|
||||
this.comboBox17.FormattingEnabled = true;
|
||||
this.comboBox17.Name = "comboBox17";
|
||||
this.comboBox17.SelectedIndexChanged += new System.EventHandler(this.comboBox17_SelectedIndexChanged);
|
||||
this.comboBox17.TextChanged += new System.EventHandler(this.comboBox17_TextChanged);
|
||||
this.comboBox17.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox17_KeyPress);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
resources.ApplyResources(this.label17, "label17");
|
||||
this.label17.Name = "label17";
|
||||
//
|
||||
// checkBox18
|
||||
//
|
||||
resources.ApplyResources(this.checkBox18, "checkBox18");
|
||||
this.checkBox18.Name = "checkBox18";
|
||||
this.checkBox18.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox18
|
||||
//
|
||||
resources.ApplyResources(this.comboBox18, "comboBox18");
|
||||
this.comboBox18.FormattingEnabled = true;
|
||||
this.comboBox18.Name = "comboBox18";
|
||||
this.comboBox18.SelectedIndexChanged += new System.EventHandler(this.comboBox18_SelectedIndexChanged);
|
||||
this.comboBox18.TextChanged += new System.EventHandler(this.comboBox18_TextChanged);
|
||||
this.comboBox18.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox18_KeyPress);
|
||||
//
|
||||
// label18
|
||||
//
|
||||
resources.ApplyResources(this.label18, "label18");
|
||||
this.label18.Name = "label18";
|
||||
//
|
||||
// checkBox19
|
||||
//
|
||||
resources.ApplyResources(this.checkBox19, "checkBox19");
|
||||
this.checkBox19.Name = "checkBox19";
|
||||
this.checkBox19.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox19
|
||||
//
|
||||
resources.ApplyResources(this.comboBox19, "comboBox19");
|
||||
this.comboBox19.FormattingEnabled = true;
|
||||
this.comboBox19.Name = "comboBox19";
|
||||
this.comboBox19.SelectedIndexChanged += new System.EventHandler(this.comboBox19_SelectedIndexChanged);
|
||||
this.comboBox19.TextChanged += new System.EventHandler(this.comboBox19_TextChanged);
|
||||
this.comboBox19.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox19_KeyPress);
|
||||
//
|
||||
// label19
|
||||
//
|
||||
resources.ApplyResources(this.label19, "label19");
|
||||
this.label19.Name = "label19";
|
||||
//
|
||||
// checkBox20
|
||||
//
|
||||
resources.ApplyResources(this.checkBox20, "checkBox20");
|
||||
this.checkBox20.Name = "checkBox20";
|
||||
this.checkBox20.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox20
|
||||
//
|
||||
resources.ApplyResources(this.comboBox20, "comboBox20");
|
||||
this.comboBox20.FormattingEnabled = true;
|
||||
this.comboBox20.Name = "comboBox20";
|
||||
this.comboBox20.SelectedIndexChanged += new System.EventHandler(this.comboBox20_SelectedIndexChanged);
|
||||
this.comboBox20.TextChanged += new System.EventHandler(this.comboBox20_TextChanged);
|
||||
this.comboBox20.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox20_KeyPress);
|
||||
//
|
||||
// label20
|
||||
//
|
||||
resources.ApplyResources(this.label20, "label20");
|
||||
this.label20.Name = "label20";
|
||||
//
|
||||
// checkBox21
|
||||
//
|
||||
resources.ApplyResources(this.checkBox21, "checkBox21");
|
||||
this.checkBox21.Name = "checkBox21";
|
||||
this.checkBox21.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox21
|
||||
//
|
||||
resources.ApplyResources(this.comboBox21, "comboBox21");
|
||||
this.comboBox21.FormattingEnabled = true;
|
||||
this.comboBox21.Name = "comboBox21";
|
||||
this.comboBox21.SelectedIndexChanged += new System.EventHandler(this.comboBox21_SelectedIndexChanged);
|
||||
this.comboBox21.TextChanged += new System.EventHandler(this.comboBox21_TextChanged);
|
||||
this.comboBox21.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox21_KeyPress);
|
||||
//
|
||||
// label21
|
||||
//
|
||||
resources.ApplyResources(this.label21, "label21");
|
||||
this.label21.Name = "label21";
|
||||
//
|
||||
// checkBox22
|
||||
//
|
||||
resources.ApplyResources(this.checkBox22, "checkBox22");
|
||||
this.checkBox22.Name = "checkBox22";
|
||||
this.checkBox22.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox22
|
||||
//
|
||||
resources.ApplyResources(this.comboBox22, "comboBox22");
|
||||
this.comboBox22.FormattingEnabled = true;
|
||||
this.comboBox22.Name = "comboBox22";
|
||||
this.comboBox22.SelectedIndexChanged += new System.EventHandler(this.comboBox22_SelectedIndexChanged);
|
||||
this.comboBox22.TextChanged += new System.EventHandler(this.comboBox22_TextChanged);
|
||||
this.comboBox22.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox22_KeyPress);
|
||||
//
|
||||
// label22
|
||||
//
|
||||
resources.ApplyResources(this.label22, "label22");
|
||||
this.label22.Name = "label22";
|
||||
//
|
||||
// checkBox23
|
||||
//
|
||||
resources.ApplyResources(this.checkBox23, "checkBox23");
|
||||
this.checkBox23.Name = "checkBox23";
|
||||
this.checkBox23.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox23
|
||||
//
|
||||
resources.ApplyResources(this.comboBox23, "comboBox23");
|
||||
this.comboBox23.FormattingEnabled = true;
|
||||
this.comboBox23.Name = "comboBox23";
|
||||
this.comboBox23.SelectedIndexChanged += new System.EventHandler(this.comboBox23_SelectedIndexChanged);
|
||||
this.comboBox23.TextChanged += new System.EventHandler(this.comboBox23_TextChanged);
|
||||
this.comboBox23.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox23_KeyPress);
|
||||
//
|
||||
// label23
|
||||
//
|
||||
resources.ApplyResources(this.label23, "label23");
|
||||
this.label23.Name = "label23";
|
||||
//
|
||||
// checkBox24
|
||||
//
|
||||
resources.ApplyResources(this.checkBox24, "checkBox24");
|
||||
this.checkBox24.Name = "checkBox24";
|
||||
this.checkBox24.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox24
|
||||
//
|
||||
resources.ApplyResources(this.comboBox24, "comboBox24");
|
||||
this.comboBox24.FormattingEnabled = true;
|
||||
this.comboBox24.Name = "comboBox24";
|
||||
this.comboBox24.SelectedIndexChanged += new System.EventHandler(this.comboBox24_SelectedIndexChanged);
|
||||
this.comboBox24.TextChanged += new System.EventHandler(this.comboBox24_TextChanged);
|
||||
this.comboBox24.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox24_KeyPress);
|
||||
//
|
||||
// label24
|
||||
//
|
||||
resources.ApplyResources(this.label24, "label24");
|
||||
this.label24.Name = "label24";
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.Controls.Add(this.checkBox24);
|
||||
this.Controls.Add(this.comboBox24);
|
||||
this.Controls.Add(this.label24);
|
||||
this.Controls.Add(this.checkBox23);
|
||||
this.Controls.Add(this.comboBox23);
|
||||
this.Controls.Add(this.label23);
|
||||
this.Controls.Add(this.checkBox22);
|
||||
this.Controls.Add(this.comboBox22);
|
||||
this.Controls.Add(this.label22);
|
||||
this.Controls.Add(this.checkBox21);
|
||||
this.Controls.Add(this.comboBox21);
|
||||
this.Controls.Add(this.label21);
|
||||
this.Controls.Add(this.checkBox20);
|
||||
this.Controls.Add(this.comboBox20);
|
||||
this.Controls.Add(this.label20);
|
||||
this.Controls.Add(this.checkBox19);
|
||||
this.Controls.Add(this.comboBox19);
|
||||
this.Controls.Add(this.label19);
|
||||
this.Controls.Add(this.checkBox18);
|
||||
this.Controls.Add(this.comboBox18);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.checkBox17);
|
||||
this.Controls.Add(this.comboBox17);
|
||||
this.Controls.Add(this.label17);
|
||||
this.Controls.Add(this.checkBox16);
|
||||
this.Controls.Add(this.comboBox16);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.checkBox15);
|
||||
this.Controls.Add(this.comboBox15);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.checkBox14);
|
||||
this.Controls.Add(this.comboBox14);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.checkBox13);
|
||||
this.Controls.Add(this.comboBox13);
|
||||
this.Controls.Add(this.label13);
|
||||
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.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.CheckBox checkBox13;
|
||||
private System.Windows.Forms.ComboBox comboBox13;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.CheckBox checkBox14;
|
||||
private System.Windows.Forms.ComboBox comboBox14;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.CheckBox checkBox15;
|
||||
private System.Windows.Forms.ComboBox comboBox15;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.CheckBox checkBox16;
|
||||
private System.Windows.Forms.ComboBox comboBox16;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.CheckBox checkBox17;
|
||||
private System.Windows.Forms.ComboBox comboBox17;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.CheckBox checkBox18;
|
||||
private System.Windows.Forms.ComboBox comboBox18;
|
||||
private System.Windows.Forms.Label label18;
|
||||
private System.Windows.Forms.CheckBox checkBox19;
|
||||
private System.Windows.Forms.ComboBox comboBox19;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.CheckBox checkBox20;
|
||||
private System.Windows.Forms.ComboBox comboBox20;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.CheckBox checkBox21;
|
||||
private System.Windows.Forms.ComboBox comboBox21;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.CheckBox checkBox22;
|
||||
private System.Windows.Forms.ComboBox comboBox22;
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.CheckBox checkBox23;
|
||||
private System.Windows.Forms.ComboBox comboBox23;
|
||||
private System.Windows.Forms.Label label23;
|
||||
private System.Windows.Forms.CheckBox checkBox24;
|
||||
private System.Windows.Forms.ComboBox comboBox24;
|
||||
private System.Windows.Forms.Label label24;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,494 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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 is closed
|
||||
public string PurchaseOrder;
|
||||
public string[] SNText;
|
||||
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[] labels;
|
||||
ComboBox[] comboBoxes;
|
||||
CheckBox[] checkBoxes;
|
||||
IList<ComboBox> enabledComboBoxes;
|
||||
|
||||
|
||||
/// <summary> Parameterless constructor for common functionality </summary>
|
||||
public CycleBeginningForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
textBoxesCount = 24;
|
||||
labels = new Label[]
|
||||
{
|
||||
label1, label2, label3, label4, label5, label6, label7, label8, label9, label10,
|
||||
label11, label12, label13, label14, label15, label16, label17, label18, label19, label20,
|
||||
label21, label22, label23, label24,
|
||||
};
|
||||
comboBoxes = new ComboBox[]
|
||||
{
|
||||
comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6,
|
||||
comboBox7, comboBox8, comboBox9, comboBox10, comboBox11, comboBox12,
|
||||
comboBox13, comboBox14, comboBox15, comboBox16, comboBox17, comboBox18,
|
||||
comboBox19, comboBox20, comboBox21, comboBox22, comboBox23, comboBox24,
|
||||
};
|
||||
checkBoxes = new CheckBox[]
|
||||
{
|
||||
checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6,
|
||||
checkBox7, checkBox8, checkBox9, checkBox10, checkBox11, checkBox12,
|
||||
checkBox13, checkBox14, checkBox15, checkBox16, checkBox17, checkBox18,
|
||||
checkBox19, checkBox20, checkBox21, checkBox22, checkBox23, checkBox24,
|
||||
};
|
||||
enabledComboBoxes = new List<ComboBox>();
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(int waterMetersCount)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
SNText = new string[WaterMetersCount];
|
||||
Disabled = new bool[WaterMetersCount];
|
||||
|
||||
ShuffleTextBoxes(Config.Data.WMsCount, Config.Data.LineSize);
|
||||
|
||||
//Height = 147 + WaterMetersCount * 90;
|
||||
}
|
||||
|
||||
/// <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];
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU_150 || FUZHOU_300
|
||||
, 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;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox13_TextChanged(object sender, EventArgs e) { checkBox13.Checked = true; }
|
||||
private void comboBox13_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox13.Text.Equals(comboBox13.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox14_TextChanged(object sender, EventArgs e) { checkBox14.Checked = true; }
|
||||
private void comboBox14_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox14.Text.Equals(comboBox14.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox15_TextChanged(object sender, EventArgs e) { checkBox15.Checked = true; }
|
||||
private void comboBox15_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox15.Text.Equals(comboBox15.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox16_TextChanged(object sender, EventArgs e) { checkBox16.Checked = true; }
|
||||
private void comboBox16_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox16.Text.Equals(comboBox16.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox17_TextChanged(object sender, EventArgs e) { checkBox17.Checked = true; }
|
||||
private void comboBox17_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox17.Text.Equals(comboBox17.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox18_TextChanged(object sender, EventArgs e) { checkBox18.Checked = true; }
|
||||
private void comboBox18_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox18.Text.Equals(comboBox18.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox19_TextChanged(object sender, EventArgs e) { checkBox19.Checked = true; }
|
||||
private void comboBox19_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox19.Text.Equals(comboBox19.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox20_TextChanged(object sender, EventArgs e) { checkBox20.Checked = true; }
|
||||
private void comboBox20_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox20.Text.Equals(comboBox20.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox21_TextChanged(object sender, EventArgs e) { checkBox21.Checked = true; }
|
||||
private void comboBox21_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox21.Text.Equals(comboBox21.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox22_TextChanged(object sender, EventArgs e) { checkBox22.Checked = true; }
|
||||
private void comboBox22_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox22.Text.Equals(comboBox22.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox23_TextChanged(object sender, EventArgs e) { checkBox23.Checked = true; }
|
||||
private void comboBox23_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox23.Text.Equals(comboBox23.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox24_TextChanged(object sender, EventArgs e) { checkBox24.Checked = true; }
|
||||
private void comboBox24_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox24.Text.Equals(comboBox24.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 comboBox13_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox13); }
|
||||
private void comboBox14_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox14); }
|
||||
private void comboBox15_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox15); }
|
||||
private void comboBox16_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox16); }
|
||||
private void comboBox17_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox17); }
|
||||
private void comboBox18_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox18); }
|
||||
private void comboBox19_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox19); }
|
||||
private void comboBox20_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox20); }
|
||||
private void comboBox21_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox21); }
|
||||
private void comboBox22_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox22); }
|
||||
private void comboBox23_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox23); }
|
||||
private void comboBox24_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox24); }
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,652 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.textBox5 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBox6 = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.textBox7 = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.textBox8 = new System.Windows.Forms.TextBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.textBox9 = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.textBox10 = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.textBox11 = new System.Windows.Forms.TextBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.textBox12 = new System.Windows.Forms.TextBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.textBox13 = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.textBox14 = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.textBox15 = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.textBox16 = new System.Windows.Forms.TextBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.textBox17 = new System.Windows.Forms.TextBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.textBox18 = new System.Windows.Forms.TextBox();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.textBox19 = new System.Windows.Forms.TextBox();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.textBox20 = new System.Windows.Forms.TextBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.textBox21 = new System.Windows.Forms.TextBox();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.textBox22 = new System.Windows.Forms.TextBox();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.textBox23 = new System.Windows.Forms.TextBox();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.textBox24 = new System.Windows.Forms.TextBox();
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(205, 66);
|
||||
this.textBox2.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox2.TabIndex = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(38, 71);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(62, 18);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Stand:";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(205, 30);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox1.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(38, 35);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(62, 18);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Stand:";
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
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(832, 30);
|
||||
this.okButton.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(90, 60);
|
||||
this.okButton.TabIndex = 7;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(205, 102);
|
||||
this.textBox3.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox3.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(38, 107);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(62, 18);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Stand:";
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(205, 138);
|
||||
this.textBox4.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox4.TabIndex = 1;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(38, 143);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(62, 18);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "Stand:";
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(205, 174);
|
||||
this.textBox5.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox5.TabIndex = 1;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(38, 179);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(62, 18);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "Stand:";
|
||||
//
|
||||
// textBox6
|
||||
//
|
||||
this.textBox6.Location = new System.Drawing.Point(205, 210);
|
||||
this.textBox6.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox6.Name = "textBox6";
|
||||
this.textBox6.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox6.TabIndex = 1;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(38, 215);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(62, 18);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Stand:";
|
||||
//
|
||||
// textBox7
|
||||
//
|
||||
this.textBox7.Location = new System.Drawing.Point(205, 246);
|
||||
this.textBox7.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox7.Name = "textBox7";
|
||||
this.textBox7.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox7.TabIndex = 9;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(38, 251);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(62, 18);
|
||||
this.label7.TabIndex = 8;
|
||||
this.label7.Text = "Stand:";
|
||||
//
|
||||
// textBox8
|
||||
//
|
||||
this.textBox8.Location = new System.Drawing.Point(205, 282);
|
||||
this.textBox8.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox8.Name = "textBox8";
|
||||
this.textBox8.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox8.TabIndex = 11;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(38, 287);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(62, 18);
|
||||
this.label8.TabIndex = 10;
|
||||
this.label8.Text = "Stand:";
|
||||
//
|
||||
// textBox9
|
||||
//
|
||||
this.textBox9.Location = new System.Drawing.Point(205, 318);
|
||||
this.textBox9.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox9.Name = "textBox9";
|
||||
this.textBox9.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox9.TabIndex = 13;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(38, 323);
|
||||
this.label9.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(62, 18);
|
||||
this.label9.TabIndex = 12;
|
||||
this.label9.Text = "Stand:";
|
||||
//
|
||||
// textBox10
|
||||
//
|
||||
this.textBox10.Location = new System.Drawing.Point(205, 354);
|
||||
this.textBox10.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox10.Name = "textBox10";
|
||||
this.textBox10.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox10.TabIndex = 15;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(38, 359);
|
||||
this.label10.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(62, 18);
|
||||
this.label10.TabIndex = 14;
|
||||
this.label10.Text = "Stand:";
|
||||
//
|
||||
// textBox11
|
||||
//
|
||||
this.textBox11.Location = new System.Drawing.Point(205, 390);
|
||||
this.textBox11.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox11.Name = "textBox11";
|
||||
this.textBox11.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox11.TabIndex = 17;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(38, 395);
|
||||
this.label11.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(62, 18);
|
||||
this.label11.TabIndex = 16;
|
||||
this.label11.Text = "Stand:";
|
||||
//
|
||||
// textBox12
|
||||
//
|
||||
this.textBox12.Location = new System.Drawing.Point(205, 426);
|
||||
this.textBox12.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox12.Name = "textBox12";
|
||||
this.textBox12.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox12.TabIndex = 19;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(38, 431);
|
||||
this.label12.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(62, 18);
|
||||
this.label12.TabIndex = 18;
|
||||
this.label12.Text = "Stand:";
|
||||
//
|
||||
// textBox13
|
||||
//
|
||||
this.textBox13.Location = new System.Drawing.Point(623, 30);
|
||||
this.textBox13.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox13.Name = "textBox13";
|
||||
this.textBox13.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox13.TabIndex = 21;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(456, 35);
|
||||
this.label13.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(62, 18);
|
||||
this.label13.TabIndex = 20;
|
||||
this.label13.Text = "Stand:";
|
||||
//
|
||||
// textBox14
|
||||
//
|
||||
this.textBox14.Location = new System.Drawing.Point(623, 66);
|
||||
this.textBox14.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox14.Name = "textBox14";
|
||||
this.textBox14.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox14.TabIndex = 23;
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(456, 71);
|
||||
this.label14.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(62, 18);
|
||||
this.label14.TabIndex = 22;
|
||||
this.label14.Text = "Stand:";
|
||||
//
|
||||
// textBox15
|
||||
//
|
||||
this.textBox15.Location = new System.Drawing.Point(623, 102);
|
||||
this.textBox15.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox15.Name = "textBox15";
|
||||
this.textBox15.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox15.TabIndex = 25;
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Location = new System.Drawing.Point(456, 107);
|
||||
this.label15.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(62, 18);
|
||||
this.label15.TabIndex = 24;
|
||||
this.label15.Text = "Stand:";
|
||||
//
|
||||
// textBox16
|
||||
//
|
||||
this.textBox16.Location = new System.Drawing.Point(623, 138);
|
||||
this.textBox16.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox16.Name = "textBox16";
|
||||
this.textBox16.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox16.TabIndex = 27;
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.AutoSize = true;
|
||||
this.label16.Location = new System.Drawing.Point(456, 143);
|
||||
this.label16.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(62, 18);
|
||||
this.label16.TabIndex = 26;
|
||||
this.label16.Text = "Stand:";
|
||||
//
|
||||
// textBox17
|
||||
//
|
||||
this.textBox17.Location = new System.Drawing.Point(623, 174);
|
||||
this.textBox17.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox17.Name = "textBox17";
|
||||
this.textBox17.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox17.TabIndex = 29;
|
||||
//
|
||||
// label17
|
||||
//
|
||||
this.label17.AutoSize = true;
|
||||
this.label17.Location = new System.Drawing.Point(456, 179);
|
||||
this.label17.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label17.Name = "label17";
|
||||
this.label17.Size = new System.Drawing.Size(62, 18);
|
||||
this.label17.TabIndex = 28;
|
||||
this.label17.Text = "Stand:";
|
||||
//
|
||||
// textBox18
|
||||
//
|
||||
this.textBox18.Location = new System.Drawing.Point(623, 210);
|
||||
this.textBox18.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox18.Name = "textBox18";
|
||||
this.textBox18.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox18.TabIndex = 31;
|
||||
//
|
||||
// label18
|
||||
//
|
||||
this.label18.AutoSize = true;
|
||||
this.label18.Location = new System.Drawing.Point(456, 215);
|
||||
this.label18.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label18.Name = "label18";
|
||||
this.label18.Size = new System.Drawing.Size(62, 18);
|
||||
this.label18.TabIndex = 30;
|
||||
this.label18.Text = "Stand:";
|
||||
//
|
||||
// textBox19
|
||||
//
|
||||
this.textBox19.Location = new System.Drawing.Point(623, 246);
|
||||
this.textBox19.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox19.Name = "textBox19";
|
||||
this.textBox19.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox19.TabIndex = 33;
|
||||
//
|
||||
// label19
|
||||
//
|
||||
this.label19.AutoSize = true;
|
||||
this.label19.Location = new System.Drawing.Point(456, 251);
|
||||
this.label19.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label19.Name = "label19";
|
||||
this.label19.Size = new System.Drawing.Size(62, 18);
|
||||
this.label19.TabIndex = 32;
|
||||
this.label19.Text = "Stand:";
|
||||
//
|
||||
// textBox20
|
||||
//
|
||||
this.textBox20.Location = new System.Drawing.Point(623, 282);
|
||||
this.textBox20.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox20.Name = "textBox20";
|
||||
this.textBox20.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox20.TabIndex = 35;
|
||||
//
|
||||
// label20
|
||||
//
|
||||
this.label20.AutoSize = true;
|
||||
this.label20.Location = new System.Drawing.Point(456, 287);
|
||||
this.label20.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label20.Name = "label20";
|
||||
this.label20.Size = new System.Drawing.Size(62, 18);
|
||||
this.label20.TabIndex = 34;
|
||||
this.label20.Text = "Stand:";
|
||||
//
|
||||
// textBox21
|
||||
//
|
||||
this.textBox21.Location = new System.Drawing.Point(623, 318);
|
||||
this.textBox21.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox21.Name = "textBox21";
|
||||
this.textBox21.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox21.TabIndex = 37;
|
||||
//
|
||||
// label21
|
||||
//
|
||||
this.label21.AutoSize = true;
|
||||
this.label21.Location = new System.Drawing.Point(456, 323);
|
||||
this.label21.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label21.Name = "label21";
|
||||
this.label21.Size = new System.Drawing.Size(62, 18);
|
||||
this.label21.TabIndex = 36;
|
||||
this.label21.Text = "Stand:";
|
||||
//
|
||||
// textBox22
|
||||
//
|
||||
this.textBox22.Location = new System.Drawing.Point(623, 354);
|
||||
this.textBox22.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox22.Name = "textBox22";
|
||||
this.textBox22.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox22.TabIndex = 39;
|
||||
//
|
||||
// label22
|
||||
//
|
||||
this.label22.AutoSize = true;
|
||||
this.label22.Location = new System.Drawing.Point(456, 359);
|
||||
this.label22.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label22.Name = "label22";
|
||||
this.label22.Size = new System.Drawing.Size(62, 18);
|
||||
this.label22.TabIndex = 38;
|
||||
this.label22.Text = "Stand:";
|
||||
//
|
||||
// textBox23
|
||||
//
|
||||
this.textBox23.Location = new System.Drawing.Point(623, 390);
|
||||
this.textBox23.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox23.Name = "textBox23";
|
||||
this.textBox23.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox23.TabIndex = 41;
|
||||
//
|
||||
// label23
|
||||
//
|
||||
this.label23.AutoSize = true;
|
||||
this.label23.Location = new System.Drawing.Point(456, 395);
|
||||
this.label23.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label23.Name = "label23";
|
||||
this.label23.Size = new System.Drawing.Size(62, 18);
|
||||
this.label23.TabIndex = 40;
|
||||
this.label23.Text = "Stand:";
|
||||
//
|
||||
// textBox24
|
||||
//
|
||||
this.textBox24.Location = new System.Drawing.Point(623, 426);
|
||||
this.textBox24.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox24.Name = "textBox24";
|
||||
this.textBox24.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox24.TabIndex = 43;
|
||||
//
|
||||
// label24
|
||||
//
|
||||
this.label24.AutoSize = true;
|
||||
this.label24.Location = new System.Drawing.Point(456, 431);
|
||||
this.label24.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label24.Name = "label24";
|
||||
this.label24.Size = new System.Drawing.Size(62, 18);
|
||||
this.label24.TabIndex = 42;
|
||||
this.label24.Text = "Stand:";
|
||||
//
|
||||
// CycleEndForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 18F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.ClientSize = new System.Drawing.Size(959, 489);
|
||||
this.Controls.Add(this.textBox24);
|
||||
this.Controls.Add(this.label24);
|
||||
this.Controls.Add(this.textBox23);
|
||||
this.Controls.Add(this.label23);
|
||||
this.Controls.Add(this.textBox22);
|
||||
this.Controls.Add(this.label22);
|
||||
this.Controls.Add(this.textBox21);
|
||||
this.Controls.Add(this.label21);
|
||||
this.Controls.Add(this.textBox20);
|
||||
this.Controls.Add(this.label20);
|
||||
this.Controls.Add(this.textBox19);
|
||||
this.Controls.Add(this.label19);
|
||||
this.Controls.Add(this.textBox18);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.textBox17);
|
||||
this.Controls.Add(this.label17);
|
||||
this.Controls.Add(this.textBox16);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.textBox15);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.textBox14);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.textBox13);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.textBox12);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.textBox11);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.textBox10);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.textBox9);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.textBox8);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.textBox7);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.textBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.textBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.textBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.textBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Font = new System.Drawing.Font("Verdana", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
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.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox textBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox textBox7;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox textBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.TextBox textBox9;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.TextBox textBox10;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.TextBox textBox11;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.TextBox textBox12;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.TextBox textBox13;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.TextBox textBox14;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.TextBox textBox15;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.TextBox textBox16;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.TextBox textBox17;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.TextBox textBox18;
|
||||
private System.Windows.Forms.Label label18;
|
||||
private System.Windows.Forms.TextBox textBox19;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.TextBox textBox20;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.TextBox textBox21;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.TextBox textBox22;
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.TextBox textBox23;
|
||||
private System.Windows.Forms.Label label23;
|
||||
private System.Windows.Forms.TextBox textBox24;
|
||||
private System.Windows.Forms.Label label24;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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;
|
||||
readonly int lineSize;
|
||||
|
||||
// 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;
|
||||
|
||||
int textBoxesCount;
|
||||
Label[] labels;
|
||||
TextBox[] textBoxes;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleEndForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
labels = new Label[]
|
||||
{
|
||||
label1, label2, label3, label4, label5, label6, label7, label8, label9, label10,
|
||||
label11, label12, label13, label14, label15, label16, label17, label18, label19, label20,
|
||||
label21, label22, label23, label24,
|
||||
};
|
||||
textBoxes = new TextBox[]
|
||||
{
|
||||
textBox1, textBox2, textBox3, textBox4, textBox5, textBox6,
|
||||
textBox7, textBox8, textBox9, textBox10, textBox11, textBox12,
|
||||
textBox13, textBox14, textBox15, textBox16, textBox17, textBox18,
|
||||
textBox19, textBox20, textBox21, textBox22, textBox23, textBox24,
|
||||
};
|
||||
textBoxesCount = textBoxes.Length;
|
||||
this.WaterMetersCount = textBoxesCount;
|
||||
this.lineSize = textBoxesCount / 2;
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary> Parameterless constructor for 3 watermeters </summary>
|
||||
public CycleEndForm(int waterMetersCount, int lineSize)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.lineSize = lineSize;
|
||||
ShuffleTextBoxes(waterMetersCount, lineSize);
|
||||
EndStateText = new string[WaterMetersCount];
|
||||
}
|
||||
|
||||
/// <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];
|
||||
textBoxes[dest] = textBoxes[l * lineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
textBoxesCount = wmsCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
Height = 60 + 36 * lineSize;
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
if (i >= WaterMetersCount)
|
||||
{
|
||||
labels[i].Visible = false;
|
||||
textBoxes[i].Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
labels[i].Text = string.Format("{0} {1}:", Strings.Water_Meter, (i + 1).ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
EndStateText[i] = textBoxes[i].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,20 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class EntryForm : EntryFormNoStartEnd, IHasWMStatesForm
|
||||
{
|
||||
public EntryForm()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public bool EnterSerialNrsAtTheEnd;
|
||||
public bool ShowCycleEndForm;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
{
|
||||
Name = "DataEntry-Standard-24";
|
||||
ParentName = string.Empty;
|
||||
EnterSerialNrsAtTheEnd = false;
|
||||
ShowCycleEndForm = false;
|
||||
}
|
||||
|
||||
public EntryFormCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, EnterSNsAtTheEnd={1}, ShowEndForm={2}", Name, EnterSerialNrsAtTheEnd, ShowCycleEndForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
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()
|
||||
{
|
||||
enterSNsAtTheEndCheckBox.Text = Strings.Enter_SNs_at_the_end;
|
||||
showEndStateFormCheckBox.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;
|
||||
enterSNsAtTheEndCheckBox.Checked = config.EnterSerialNrsAtTheEnd;
|
||||
showEndStateFormCheckBox.Checked = config.ShowCycleEndForm;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
enterSNsAtTheEndCheckBox.Enabled = true;
|
||||
showEndStateFormCheckBox.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.EnterSerialNrsAtTheEnd = enterSNsAtTheEndCheckBox.Checked;
|
||||
config.ShowCycleEndForm = showEndStateFormCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(99, 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(35, 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(96, 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(99, 112);
|
||||
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(99, 89);
|
||||
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;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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,288 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class EntryFormNoStartEnd : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
|
||||
public override string ToString() { return string.Format("DataEntry.Standard24({0})", 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;
|
||||
|
||||
|
||||
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 EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
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(EntryFormNoStartEnd myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount, Config.Data.LineSize);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, Config.Data.LineSize, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, Config.Data.LineSize, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
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 = waterMeters.Length;
|
||||
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 < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[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 < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[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 && (PurchaseOrder != null))
|
||||
{
|
||||
wm.PurchaseOrder = PurchaseOrder; /// PurchaseOrder == null if form button OK has not been used => no update
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntry.Single"; } }
|
||||
|
||||
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
|
||||
|
||||
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,26 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class FactoryNoStartEnd : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntry.NoStartEnd.Single"; } }
|
||||
|
||||
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryFormNoStartEnd(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,360 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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 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;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] WMStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] WMEndState;
|
||||
|
||||
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
|
||||
bool fixedErrorLimits; /// false in case of calculated error limits
|
||||
|
||||
Button okButton;
|
||||
|
||||
Label[] labels;
|
||||
TextBox[] startTextBoxes;
|
||||
TextBox[] endTextBoxes;
|
||||
Label[] exclamations;
|
||||
///
|
||||
IList<TextBox> enabledTextBoxes;
|
||||
IList<int> enabledWmNrs;
|
||||
|
||||
public TestStartEndForm()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parameterless constructor initializing common part for start and endstate form
|
||||
/// </summary>
|
||||
public TestStartEndForm(int waterMetersCount, int lineSize)
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
WaterMetersCount = waterMetersCount;
|
||||
|
||||
okButton = new Button()
|
||||
{
|
||||
};
|
||||
|
||||
labels = new Label[waterMetersCount];
|
||||
startTextBoxes = new TextBox[waterMetersCount];
|
||||
endTextBoxes = new TextBox[waterMetersCount];
|
||||
exclamations = new Label[waterMetersCount];
|
||||
|
||||
for (int i = 0; i < waterMetersCount; i++)
|
||||
{
|
||||
labels[i] = new Label();
|
||||
startTextBoxes[i] = new TextBox();
|
||||
endTextBoxes[i] = new TextBox();
|
||||
exclamations[i] = new Label();
|
||||
}
|
||||
|
||||
enabledTextBoxes = new List<TextBox>();
|
||||
enabledWmNrs = new List<int>();
|
||||
|
||||
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, int lineSize, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this(waterMetersCount, lineSize)
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = 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(int waterMetersCount, int lineSize, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this(waterMetersCount, lineSize)
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
this.disabled = disabled;
|
||||
this.refVolume = refVolume;
|
||||
this.warningLimLo = 2 * errLimLo;
|
||||
this.warningLimHi = 2 * errLimHi;
|
||||
this.fixedErrorLimits = (errLimHi > errLimLo);
|
||||
|
||||
WMEndState = new double[waterMetersCount];
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
//Height = 115 + 90 * WaterMetersCount;
|
||||
|
||||
int firstWmIx = -1;
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (WMStartStateStr != null && i < WMStartStateStr.Length)
|
||||
{
|
||||
startTextBoxes[i].Text = WMStartStateStr[i];
|
||||
}
|
||||
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
endTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
endTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(endTextBoxes[i]);
|
||||
enabledWmNrs.Add(i);
|
||||
if (firstWmIx == -1) firstWmIx = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
startTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
startTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(startTextBoxes[i]);
|
||||
enabledWmNrs.Add(i);
|
||||
if (firstWmIx == -1) firstWmIx = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (enabledTextBoxes.Count > 0)
|
||||
{
|
||||
enabledTextBoxes[0].Focus();
|
||||
//largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, firstWmIx + 1, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Water_Meter_States;
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
labels[i].Text = string.Format("{0} {1}", Strings.Water_Meter, i + 1);
|
||||
}
|
||||
//startLabel.Text = startLabel2.Text = Strings.Start;
|
||||
//endLabel.Text = endLabel2.Text = Strings.End;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs eArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[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 ProcEndTextChanged(object sender, EventArgs e, TextBox endTBox)
|
||||
{
|
||||
int wmIx = -1;
|
||||
for (int i = 0; i < startTextBoxes.Length; i++)
|
||||
{
|
||||
if (endTextBoxes[i] == endTBox)
|
||||
{
|
||||
wmIx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBoxes[wmIx].Text);
|
||||
double startState = Utils.ParseUDouble(startTextBoxes[wmIx].Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
bool errorOoR = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
exclamations[wmIx].Visible = errorOoR;
|
||||
//largeExclamationLabel.Visible = errorOoR;
|
||||
//largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, wmIx + 1, endTextBoxes[wmIx].Text);
|
||||
}
|
||||
|
||||
//private void endTextBox1_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox1); }
|
||||
//private void endTextBox2_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox2); }
|
||||
//private void endTextBox3_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox3); }
|
||||
|
||||
//private void endTextBox1_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox1); }
|
||||
//private void endTextBox2_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox2); }
|
||||
//private void endTextBox3_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox3); }
|
||||
|
||||
/// <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
|
||||
int newTBIdx = (i + 1) % enabledTextBoxes.Count;
|
||||
enabledTextBoxes[newTBIdx].Focus();
|
||||
//largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, enabledWmNrs[newTBIdx] + 1, enabledTextBoxes[newTBIdx].Text);
|
||||
//largeExclamationLabel.Visible = false;
|
||||
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 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 ProcStartTextChanged(object sender, EventArgs e, TextBox startTBox)
|
||||
{
|
||||
int wmIx = -1;
|
||||
for (int i = 0; i < startTextBoxes.Length; i++)
|
||||
{
|
||||
if (startTextBoxes[i] == startTBox) { wmIx = i; break; }
|
||||
}
|
||||
//largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, wmIx + 1, startTextBoxes[wmIx].Text);
|
||||
//largeExclamationLabel.Visible = false;
|
||||
}
|
||||
|
||||
//private void startTextBox1_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox1); }
|
||||
//private void startTextBox2_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox2); }
|
||||
//private void startTextBox3_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox3); }
|
||||
|
||||
//private void startTextBox1_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox1); }
|
||||
//private void startTextBox2_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox2); }
|
||||
//private void startTextBox3_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox3); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(270, 237);
|
||||
this.splitContainer1.SplitterDistance = 90;
|
||||
this.splitContainer1.SplitterWidth = 1;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// TestStartEndForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.ClientSize = new System.Drawing.Size(270, 237);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
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);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -136,7 +136,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
@@ -229,8 +229,11 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,7 +245,10 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -133,10 +133,10 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
/// </summary>
|
||||
void ShuffleTextBoxes()
|
||||
{
|
||||
if (Config.Data.WMsCount < TextBoxesCount)
|
||||
if (TextBoxesCount > WaterMetersCount)
|
||||
{
|
||||
int nrLines = Config.Data.WMsCount / Config.Data.LineSize;
|
||||
int gap = (TextBoxesCount - Config.Data.WMsCount) / nrLines;
|
||||
int nrLines = WaterMetersCount / Config.Data.LineSize;
|
||||
int gap = (TextBoxesCount - WaterMetersCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
@@ -149,7 +149,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
TextBoxesCount = Config.Data.WMsCount;
|
||||
TextBoxesCount = WaterMetersCount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
}
|
||||
}
|
||||
|
||||
if (endStates)
|
||||
bool focusSet = false;
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
@@ -174,7 +175,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
startTextBoxes[i].Text = WMStartStateStr[i];
|
||||
}
|
||||
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
endTextBoxes[i].Enabled = false;
|
||||
}
|
||||
@@ -182,14 +183,20 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
endTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(endTextBoxes[i]);
|
||||
}
|
||||
|
||||
if (!focusSet)
|
||||
{
|
||||
endTextBoxes[i].Focus();
|
||||
focusSet = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
startTextBoxes[i].Enabled = false;
|
||||
}
|
||||
@@ -197,7 +204,13 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
startTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(startTextBoxes[i]);
|
||||
}
|
||||
|
||||
if (!focusSet)
|
||||
{
|
||||
startTextBoxes[i].Focus();
|
||||
focusSet = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -136,7 +136,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, myRef.disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
@@ -229,8 +229,11 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,7 +245,10 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -43,7 +43,10 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
Label[] labels;
|
||||
TextBox[] startTextBoxes;
|
||||
TextBox[] endTextBoxes;
|
||||
IList<TextBox> enabledTextBoxes;
|
||||
Label[] exclamations;
|
||||
|
||||
IList<TextBox> activeTextBoxes;
|
||||
IList<int> activeWmNrs;
|
||||
|
||||
/// <summary>
|
||||
/// Parameterless constructor initializing common part for start and endstate form
|
||||
@@ -75,7 +78,16 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
endTextBox13, endTextBox14, endTextBox15, endTextBox16, endTextBox17, endTextBox18,
|
||||
endTextBox19, endTextBox20, endTextBox21, endTextBox22, endTextBox23, endTextBox24,
|
||||
};
|
||||
enabledTextBoxes = new List<TextBox>();
|
||||
exclamations = new Label[]
|
||||
{
|
||||
exclamation1, exclamation2, exclamation3, exclamation4, exclamation5, exclamation6,
|
||||
exclamation7, exclamation8, exclamation9, exclamation10, exclamation11, exclamation12,
|
||||
exclamation13, exclamation14, exclamation15, exclamation16, exclamation17, exclamation18,
|
||||
exclamation19, exclamation20, exclamation21, exclamation22, exclamation23, exclamation24,
|
||||
};
|
||||
|
||||
activeTextBoxes = new List<TextBox>();
|
||||
activeWmNrs = new List<int>();
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
@@ -138,10 +150,10 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// </summary>
|
||||
void ShuffleTextBoxes()
|
||||
{
|
||||
if (Config.Data.WMsCount < TextBoxesCount)
|
||||
if (TextBoxesCount > WaterMetersCount)
|
||||
{
|
||||
int nrLines = Config.Data.WMsCount / Config.Data.LineSize;
|
||||
int gap = (TextBoxesCount - Config.Data.WMsCount) / nrLines;
|
||||
int nrLines = WaterMetersCount / Config.Data.LineSize;
|
||||
int gap = (TextBoxesCount - WaterMetersCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
@@ -151,10 +163,11 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
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];
|
||||
dest++;
|
||||
exclamations[dest] = exclamations[l * Config.Data.LineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
TextBoxesCount = Config.Data.WMsCount;
|
||||
TextBoxesCount = WaterMetersCount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,8 +185,9 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
}
|
||||
}
|
||||
|
||||
if (endStates)
|
||||
if (endStates)
|
||||
{
|
||||
/// End of test
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (WMStartStateStr != null && i < WMStartStateStr.Length)
|
||||
@@ -181,32 +195,41 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
startTextBoxes[i].Text = WMStartStateStr[i];
|
||||
}
|
||||
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
endTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
endTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(endTextBoxes[i]);
|
||||
}
|
||||
activeTextBoxes.Add(endTextBoxes[i]);
|
||||
activeWmNrs.Add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
/// Start of test
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
startTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
startTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(startTextBoxes[i]);
|
||||
}
|
||||
activeTextBoxes.Add(startTextBoxes[i]);
|
||||
activeWmNrs.Add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((activeTextBoxes.Count > 0) && (activeWmNrs.Count > 0))
|
||||
{
|
||||
activeTextBoxes[0].Focus();
|
||||
largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, activeWmNrs[0] + 1, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
@@ -214,7 +237,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
Text = Strings.Water_Meter_States;
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
labels[i].Text = Strings.Water_Meter + " " + (i + 1).ToString();
|
||||
labels[i].Text = string.Format("{0} {1}", Strings.Water_Meter, i + 1);
|
||||
}
|
||||
startLabel.Text = startLabel2.Text = Strings.Start;
|
||||
endLabel.Text = endLabel2.Text = Strings.End;
|
||||
@@ -276,301 +299,88 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
#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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
/// <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 ProcEndTextChanged(object sender, EventArgs e, TextBox endTBox)
|
||||
{
|
||||
int wmIx = -1;
|
||||
for (int i = 0; i < endTextBoxes.Length; i++)
|
||||
{
|
||||
if (endTextBoxes[i] == endTBox)
|
||||
{
|
||||
wmIx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < 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 = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox13.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox13.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox14.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox14.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox15.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox15.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox16.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox16.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox17.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox17.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox18.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox18.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox19_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox19.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox19.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation19.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox20_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox20.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox20.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation20.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox21_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox21.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox21.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation21.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox22_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox22.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox22.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation22.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox23_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox23.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox23.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation23.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void endTextBox24_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBox24.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox24.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation24.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBoxes[wmIx].Text);
|
||||
double startState = Utils.ParseUDouble(startTextBoxes[wmIx].Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
bool errorOoR = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
exclamations[wmIx].Visible = errorOoR;
|
||||
largeExclamationLabel.Visible = errorOoR;
|
||||
largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, wmIx + 1, endTextBoxes[wmIx].Text);
|
||||
}
|
||||
|
||||
private void endTextBox1_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox1); }
|
||||
private void endTextBox2_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox2); }
|
||||
private void endTextBox3_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox3); }
|
||||
private void endTextBox4_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox4); }
|
||||
private void endTextBox5_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox5); }
|
||||
private void endTextBox6_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox6); }
|
||||
private void endTextBox7_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox7); }
|
||||
private void endTextBox8_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox8); }
|
||||
private void endTextBox9_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox9); }
|
||||
private void endTextBox10_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox10); }
|
||||
private void endTextBox11_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox11); }
|
||||
private void endTextBox12_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox12); }
|
||||
private void endTextBox13_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox13); }
|
||||
private void endTextBox14_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox14); }
|
||||
private void endTextBox15_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox15); }
|
||||
private void endTextBox16_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox16); }
|
||||
private void endTextBox17_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox17); }
|
||||
private void endTextBox18_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox18); }
|
||||
private void endTextBox19_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox19); }
|
||||
private void endTextBox20_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox20); }
|
||||
private void endTextBox21_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox21); }
|
||||
private void endTextBox22_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox22); }
|
||||
private void endTextBox23_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox23); }
|
||||
private void endTextBox24_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox24); }
|
||||
|
||||
private void endTextBox1_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox1); }
|
||||
private void endTextBox2_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox2); }
|
||||
private void endTextBox3_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox3); }
|
||||
private void endTextBox4_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox4); }
|
||||
private void endTextBox5_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox5); }
|
||||
private void endTextBox6_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox6); }
|
||||
private void endTextBox7_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox7); }
|
||||
private void endTextBox8_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox8); }
|
||||
private void endTextBox9_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox9); }
|
||||
private void endTextBox10_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox10); }
|
||||
private void endTextBox11_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox11); }
|
||||
private void endTextBox12_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox12); }
|
||||
private void endTextBox13_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox13); }
|
||||
private void endTextBox14_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox14); }
|
||||
private void endTextBox15_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox15); }
|
||||
private void endTextBox16_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox16); }
|
||||
private void endTextBox17_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox17); }
|
||||
private void endTextBox18_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox18); }
|
||||
private void endTextBox19_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox19); }
|
||||
private void endTextBox20_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox20); }
|
||||
private void endTextBox21_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox21); }
|
||||
private void endTextBox22_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox22); }
|
||||
private void endTextBox23_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox23); }
|
||||
private void endTextBox24_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox24); }
|
||||
|
||||
/// <summary>
|
||||
/// Process a key press within any enabled text boxe
|
||||
@@ -585,21 +395,25 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (activeTextBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < activeTextBoxes.Count; i++)
|
||||
{
|
||||
if (activeTextBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
int newTBIdx = (i + 1) % activeTextBoxes.Count;
|
||||
activeTextBoxes[newTBIdx].Focus();
|
||||
largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, activeWmNrs[newTBIdx] + 1, activeTextBoxes[newTBIdx].Text);
|
||||
largeExclamationLabel.Visible = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void startTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox1); }
|
||||
@@ -627,15 +441,15 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
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 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); }
|
||||
@@ -651,5 +465,69 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
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); }
|
||||
}
|
||||
|
||||
|
||||
private void ProcStartTextChanged(object sender, EventArgs e, TextBox startTBox)
|
||||
{
|
||||
for (int i = 0; i < startTextBoxes.Length; i++)
|
||||
{
|
||||
if (startTextBoxes[i] == startTBox)
|
||||
{
|
||||
largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, i + 1, startTextBoxes[i].Text);
|
||||
largeExclamationLabel.Visible = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void startTextBox1_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox1); }
|
||||
private void startTextBox2_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox2); }
|
||||
private void startTextBox3_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox3); }
|
||||
private void startTextBox4_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox4); }
|
||||
private void startTextBox5_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox5); }
|
||||
private void startTextBox6_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox6); }
|
||||
private void startTextBox7_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox7); }
|
||||
private void startTextBox8_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox8); }
|
||||
private void startTextBox9_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox9); }
|
||||
private void startTextBox10_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox10); }
|
||||
private void startTextBox11_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox11); }
|
||||
private void startTextBox12_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox12); }
|
||||
private void startTextBox13_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox13); }
|
||||
private void startTextBox14_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox14); }
|
||||
private void startTextBox15_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox15); }
|
||||
private void startTextBox16_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox16); }
|
||||
private void startTextBox17_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox17); }
|
||||
private void startTextBox18_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox18); }
|
||||
private void startTextBox19_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox19); }
|
||||
private void startTextBox20_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox20); }
|
||||
private void startTextBox21_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox21); }
|
||||
private void startTextBox22_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox22); }
|
||||
private void startTextBox23_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox23); }
|
||||
private void startTextBox24_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox24); }
|
||||
|
||||
private void startTextBox1_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox1); }
|
||||
private void startTextBox2_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox2); }
|
||||
private void startTextBox3_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox3); }
|
||||
private void startTextBox4_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox4); }
|
||||
private void startTextBox5_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox5); }
|
||||
private void startTextBox6_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox6); }
|
||||
private void startTextBox7_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox7); }
|
||||
private void startTextBox8_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox8); }
|
||||
private void startTextBox9_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox9); }
|
||||
private void startTextBox10_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox10); }
|
||||
private void startTextBox11_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox11); }
|
||||
private void startTextBox12_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox12); }
|
||||
private void startTextBox13_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox13); }
|
||||
private void startTextBox14_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox14); }
|
||||
private void startTextBox15_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox15); }
|
||||
private void startTextBox16_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox16); }
|
||||
private void startTextBox17_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox17); }
|
||||
private void startTextBox18_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox18); }
|
||||
private void startTextBox19_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox19); }
|
||||
private void startTextBox20_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox20); }
|
||||
private void startTextBox21_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox21); }
|
||||
private void startTextBox22_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox22); }
|
||||
private void startTextBox23_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox23); }
|
||||
private void startTextBox24_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox24); }
|
||||
}
|
||||
}
|
||||
|
||||
+1472
-1374
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -136,7 +136,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
@@ -221,7 +221,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
|
||||
else if ((modelessDlg is TestStartEndForm) && (currentOp == CurrentOp.EnterTestStartStates))
|
||||
{
|
||||
/// Fixed start test - start
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
@@ -229,12 +229,15 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
|
||||
else if ((modelessDlg is TestStartEndForm) && (currentOp == CurrentOp.EnterTestEndStates))
|
||||
{
|
||||
/// Fixed start test - end
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
@@ -242,7 +245,10 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -43,7 +43,10 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
Label[] labels;
|
||||
TextBox[] startTextBoxes;
|
||||
TextBox[] endTextBoxes;
|
||||
IList<TextBox> enabledTextBoxes;
|
||||
Label[] exclamations;
|
||||
///
|
||||
IList<TextBox> activeTextBoxes;
|
||||
IList<int> activeWmNrs;
|
||||
|
||||
/// <summary>
|
||||
/// Parameterless constructor initializing common part for start and endstate form
|
||||
@@ -79,7 +82,20 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
endTextBox31, endTextBox32, endTextBox33, endTextBox34, endTextBox35, endTextBox36, endTextBox37, endTextBox38, endTextBox39, endTextBox40,
|
||||
endTextBox41, endTextBox42, endTextBox43, endTextBox44, endTextBox45, endTextBox46, endTextBox47, endTextBox48,
|
||||
};
|
||||
enabledTextBoxes = new List<TextBox>();
|
||||
exclamations = new Label[]
|
||||
{
|
||||
exclamation1, exclamation2, exclamation3, exclamation4, exclamation5, exclamation6,
|
||||
exclamation7, exclamation8, exclamation9, exclamation10, exclamation11, exclamation12,
|
||||
exclamation13, exclamation14, exclamation15, exclamation16, exclamation17, exclamation18,
|
||||
exclamation19, exclamation20, exclamation21, exclamation22, exclamation23, exclamation24,
|
||||
exclamation25, exclamation26, exclamation27, exclamation28, exclamation29, exclamation30,
|
||||
exclamation31, exclamation32, exclamation33, exclamation34, exclamation35, exclamation36,
|
||||
exclamation37, exclamation38, exclamation39, exclamation40, exclamation41, exclamation42,
|
||||
exclamation43, exclamation44, exclamation45, exclamation46, exclamation47, exclamation48,
|
||||
};
|
||||
|
||||
activeTextBoxes = new List<TextBox>();
|
||||
activeWmNrs = new List<int>();
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
@@ -142,10 +158,10 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
/// </summary>
|
||||
void ShuffleTextBoxes()
|
||||
{
|
||||
if (Config.Data.WMsCount < TextBoxesCount)
|
||||
if (TextBoxesCount > WaterMetersCount)
|
||||
{
|
||||
int nrLines = Config.Data.WMsCount / Config.Data.LineSize;
|
||||
int gap = (TextBoxesCount - Config.Data.WMsCount) / nrLines;
|
||||
int nrLines = WaterMetersCount / Config.Data.LineSize;
|
||||
int gap = (TextBoxesCount - WaterMetersCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
@@ -155,10 +171,11 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
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];
|
||||
dest++;
|
||||
exclamations[dest] = exclamations[l * Config.Data.LineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
TextBoxesCount = Config.Data.WMsCount;
|
||||
TextBoxesCount = WaterMetersCount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,8 +193,9 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
}
|
||||
}
|
||||
|
||||
if (endStates)
|
||||
if (endStates)
|
||||
{
|
||||
/// End of test
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (WMStartStateStr != null && i < WMStartStateStr.Length)
|
||||
@@ -185,32 +203,41 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
startTextBoxes[i].Text = WMStartStateStr[i];
|
||||
}
|
||||
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
endTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
endTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(endTextBoxes[i]);
|
||||
}
|
||||
activeTextBoxes.Add(endTextBoxes[i]);
|
||||
activeWmNrs.Add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
/// Start of test
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
if (disabled != null && i < disabled.Length && disabled[i])
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
startTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
startTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(startTextBoxes[i]);
|
||||
}
|
||||
activeTextBoxes.Add(startTextBoxes[i]);
|
||||
activeWmNrs.Add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((activeTextBoxes.Count > 0) && (activeWmNrs.Count > 0))
|
||||
{
|
||||
activeTextBoxes[0].Focus();
|
||||
largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, activeWmNrs[0] + 1, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
@@ -281,98 +308,166 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
#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 ProcTextChanged(object sender, EventArgs e, TextBox endStateTB, TextBox startStateTB, Label exclamation)
|
||||
/// <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 ProcEndTextChanged(object sender, EventArgs e, TextBox endTBox)
|
||||
{
|
||||
int wmIx = -1;
|
||||
for (int i = 0; i < endTextBoxes.Length; i++)
|
||||
{
|
||||
if (endTextBoxes[i] == endTBox)
|
||||
{
|
||||
wmIx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endStateTB.Text);
|
||||
double startState = Utils.ParseUDouble(startStateTB.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBoxes[wmIx].Text);
|
||||
double startState = Utils.ParseUDouble(startTextBoxes[wmIx].Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
|
||||
bool errorOoR = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
exclamations[wmIx].Visible = errorOoR;
|
||||
largeExclamationLabel.Visible = errorOoR;
|
||||
largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, wmIx + 1, endTextBoxes[wmIx].Text);
|
||||
}
|
||||
|
||||
private void endTextBox1_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox1, startTextBox1, exclamation1); }
|
||||
private void endTextBox2_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox2, startTextBox2, exclamation2); }
|
||||
private void endTextBox3_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox3, startTextBox3, exclamation3); }
|
||||
private void endTextBox4_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox4, startTextBox4, exclamation4); }
|
||||
private void endTextBox5_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox5, startTextBox5, exclamation5); }
|
||||
private void endTextBox6_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox6, startTextBox6, exclamation6); }
|
||||
private void endTextBox7_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox7, startTextBox7, exclamation7); }
|
||||
private void endTextBox8_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox8, startTextBox8, exclamation8); }
|
||||
private void endTextBox9_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox9, startTextBox9, exclamation9); }
|
||||
private void endTextBox10_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox10, startTextBox10, exclamation10); }
|
||||
private void endTextBox11_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox11, startTextBox11, exclamation11); }
|
||||
private void endTextBox12_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox12, startTextBox12, exclamation12); }
|
||||
private void endTextBox13_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox13, startTextBox13, exclamation13); }
|
||||
private void endTextBox14_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox14, startTextBox14, exclamation14); }
|
||||
private void endTextBox15_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox15, startTextBox15, exclamation15); }
|
||||
private void endTextBox16_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox16, startTextBox16, exclamation16); }
|
||||
private void endTextBox17_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox17, startTextBox17, exclamation17); }
|
||||
private void endTextBox18_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox18, startTextBox18, exclamation18); }
|
||||
private void endTextBox19_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox19, startTextBox19, exclamation19); }
|
||||
private void endTextBox20_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox20, startTextBox20, exclamation20); }
|
||||
private void endTextBox21_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox21, startTextBox21, exclamation21); }
|
||||
private void endTextBox22_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox22, startTextBox22, exclamation22); }
|
||||
private void endTextBox23_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox23, startTextBox23, exclamation23); }
|
||||
private void endTextBox24_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox24, startTextBox24, exclamation24); }
|
||||
private void endTextBox25_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox25, startTextBox25, exclamation25); }
|
||||
private void endTextBox26_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox26, startTextBox26, exclamation26); }
|
||||
private void endTextBox27_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox27, startTextBox27, exclamation27); }
|
||||
private void endTextBox28_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox28, startTextBox28, exclamation28); }
|
||||
private void endTextBox29_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox29, startTextBox29, exclamation29); }
|
||||
private void endTextBox30_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox30, startTextBox30, exclamation30); }
|
||||
private void endTextBox31_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox31, startTextBox31, exclamation31); }
|
||||
private void endTextBox32_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox32, startTextBox32, exclamation32); }
|
||||
private void endTextBox33_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox33, startTextBox33, exclamation33); }
|
||||
private void endTextBox34_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox34, startTextBox34, exclamation34); }
|
||||
private void endTextBox35_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox35, startTextBox35, exclamation35); }
|
||||
private void endTextBox36_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox36, startTextBox36, exclamation36); }
|
||||
private void endTextBox37_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox37, startTextBox37, exclamation37); }
|
||||
private void endTextBox38_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox38, startTextBox38, exclamation38); }
|
||||
private void endTextBox39_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox39, startTextBox39, exclamation39); }
|
||||
private void endTextBox40_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox40, startTextBox40, exclamation40); }
|
||||
private void endTextBox41_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox41, startTextBox41, exclamation41); }
|
||||
private void endTextBox42_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox42, startTextBox42, exclamation42); }
|
||||
private void endTextBox43_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox43, startTextBox43, exclamation43); }
|
||||
private void endTextBox44_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox44, startTextBox44, exclamation44); }
|
||||
private void endTextBox45_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox45, startTextBox45, exclamation45); }
|
||||
private void endTextBox46_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox46, startTextBox46, exclamation46); }
|
||||
private void endTextBox47_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox47, startTextBox47, exclamation47); }
|
||||
private void endTextBox48_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox48, startTextBox48, exclamation48); }
|
||||
private void endTextBox1_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox1); }
|
||||
private void endTextBox2_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox2); }
|
||||
private void endTextBox3_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox3); }
|
||||
private void endTextBox4_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox4); }
|
||||
private void endTextBox5_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox5); }
|
||||
private void endTextBox6_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox6); }
|
||||
private void endTextBox7_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox7); }
|
||||
private void endTextBox8_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox8); }
|
||||
private void endTextBox9_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox9); }
|
||||
private void endTextBox10_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox10); }
|
||||
private void endTextBox11_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox11); }
|
||||
private void endTextBox12_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox12); }
|
||||
private void endTextBox13_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox13); }
|
||||
private void endTextBox14_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox14); }
|
||||
private void endTextBox15_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox15); }
|
||||
private void endTextBox16_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox16); }
|
||||
private void endTextBox17_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox17); }
|
||||
private void endTextBox18_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox18); }
|
||||
private void endTextBox19_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox19); }
|
||||
private void endTextBox20_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox20); }
|
||||
private void endTextBox21_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox21); }
|
||||
private void endTextBox22_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox22); }
|
||||
private void endTextBox23_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox23); }
|
||||
private void endTextBox24_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox24); }
|
||||
private void endTextBox25_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox25); }
|
||||
private void endTextBox26_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox26); }
|
||||
private void endTextBox27_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox27); }
|
||||
private void endTextBox28_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox28); }
|
||||
private void endTextBox29_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox29); }
|
||||
private void endTextBox30_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox30); }
|
||||
private void endTextBox31_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox31); }
|
||||
private void endTextBox32_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox32); }
|
||||
private void endTextBox33_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox33); }
|
||||
private void endTextBox34_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox34); }
|
||||
private void endTextBox35_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox35); }
|
||||
private void endTextBox36_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox36); }
|
||||
private void endTextBox37_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox37); }
|
||||
private void endTextBox38_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox38); }
|
||||
private void endTextBox39_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox39); }
|
||||
private void endTextBox40_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox40); }
|
||||
private void endTextBox41_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox41); }
|
||||
private void endTextBox42_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox42); }
|
||||
private void endTextBox43_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox43); }
|
||||
private void endTextBox44_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox44); }
|
||||
private void endTextBox45_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox45); }
|
||||
private void endTextBox46_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox46); }
|
||||
private void endTextBox47_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox47); }
|
||||
private void endTextBox48_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox48); }
|
||||
|
||||
private void endTextBox1_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox1); }
|
||||
private void endTextBox2_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox2); }
|
||||
private void endTextBox3_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox3); }
|
||||
private void endTextBox4_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox4); }
|
||||
private void endTextBox5_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox5); }
|
||||
private void endTextBox6_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox6); }
|
||||
private void endTextBox7_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox7); }
|
||||
private void endTextBox8_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox8); }
|
||||
private void endTextBox9_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox9); }
|
||||
private void endTextBox10_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox10); }
|
||||
private void endTextBox11_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox11); }
|
||||
private void endTextBox12_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox12); }
|
||||
private void endTextBox13_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox13); }
|
||||
private void endTextBox14_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox14); }
|
||||
private void endTextBox15_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox15); }
|
||||
private void endTextBox16_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox16); }
|
||||
private void endTextBox17_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox17); }
|
||||
private void endTextBox18_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox18); }
|
||||
private void endTextBox19_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox19); }
|
||||
private void endTextBox20_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox20); }
|
||||
private void endTextBox21_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox21); }
|
||||
private void endTextBox22_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox22); }
|
||||
private void endTextBox23_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox23); }
|
||||
private void endTextBox24_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox24); }
|
||||
private void endTextBox25_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox25); }
|
||||
private void endTextBox26_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox26); }
|
||||
private void endTextBox27_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox27); }
|
||||
private void endTextBox28_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox28); }
|
||||
private void endTextBox29_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox29); }
|
||||
private void endTextBox30_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox30); }
|
||||
private void endTextBox31_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox31); }
|
||||
private void endTextBox32_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox32); }
|
||||
private void endTextBox33_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox33); }
|
||||
private void endTextBox34_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox34); }
|
||||
private void endTextBox35_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox35); }
|
||||
private void endTextBox36_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox36); }
|
||||
private void endTextBox37_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox37); }
|
||||
private void endTextBox38_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox38); }
|
||||
private void endTextBox39_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox39); }
|
||||
private void endTextBox40_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox40); }
|
||||
private void endTextBox41_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox41); }
|
||||
private void endTextBox42_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox42); }
|
||||
private void endTextBox43_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox43); }
|
||||
private void endTextBox44_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox44); }
|
||||
private void endTextBox45_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox45); }
|
||||
private void endTextBox46_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox46); }
|
||||
private void endTextBox47_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox47); }
|
||||
private void endTextBox48_MouseClick(object sndr, MouseEventArgs e) { ProcEndTextChanged(sndr, e, endTextBox48); }
|
||||
|
||||
/// <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);
|
||||
}
|
||||
|
||||
/// <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
|
||||
if (activeTextBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledTextBoxes.Count; i++)
|
||||
for (int i = 0; i < activeTextBoxes.Count; i++)
|
||||
{
|
||||
if (enabledTextBoxes[i] == currentFocusOwner)
|
||||
if (activeTextBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledTextBoxes[(i + 1) % enabledTextBoxes.Count].Focus();
|
||||
/// Index of the next active text box
|
||||
int newTBIdx = (i + 1) % activeTextBoxes.Count;
|
||||
|
||||
/// Change focus to the next active text box
|
||||
activeTextBoxes[newTBIdx].Focus();
|
||||
largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, activeWmNrs[newTBIdx] + 1, activeTextBoxes[newTBIdx].Text);
|
||||
largeExclamationLabel.Visible = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -476,5 +571,118 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
private void endTextBox46_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox46); }
|
||||
private void endTextBox47_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox47); }
|
||||
private void endTextBox48_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox48); }
|
||||
}
|
||||
|
||||
|
||||
private void ProcStartTextChanged(object sender, EventArgs e, TextBox startTBox)
|
||||
{
|
||||
for (int i = 0; i < startTextBoxes.Length; i++)
|
||||
{
|
||||
if (startTextBoxes[i] == startTBox)
|
||||
{
|
||||
/// wmIx == i
|
||||
largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, i + 1, startTextBoxes[i].Text);
|
||||
largeExclamationLabel.Visible = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void startTextBox1_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox1); }
|
||||
private void startTextBox2_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox2); }
|
||||
private void startTextBox3_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox3); }
|
||||
private void startTextBox4_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox4); }
|
||||
private void startTextBox5_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox5); }
|
||||
private void startTextBox6_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox6); }
|
||||
private void startTextBox7_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox7); }
|
||||
private void startTextBox8_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox8); }
|
||||
private void startTextBox9_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox9); }
|
||||
private void startTextBox10_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox10); }
|
||||
private void startTextBox11_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox11); }
|
||||
private void startTextBox12_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox12); }
|
||||
private void startTextBox13_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox13); }
|
||||
private void startTextBox14_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox14); }
|
||||
private void startTextBox15_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox15); }
|
||||
private void startTextBox16_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox16); }
|
||||
private void startTextBox17_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox17); }
|
||||
private void startTextBox18_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox18); }
|
||||
private void startTextBox19_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox19); }
|
||||
private void startTextBox20_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox20); }
|
||||
private void startTextBox21_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox21); }
|
||||
private void startTextBox22_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox22); }
|
||||
private void startTextBox23_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox23); }
|
||||
private void startTextBox24_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox24); }
|
||||
private void startTextBox25_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox25); }
|
||||
private void startTextBox26_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox26); }
|
||||
private void startTextBox27_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox27); }
|
||||
private void startTextBox28_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox28); }
|
||||
private void startTextBox29_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox29); }
|
||||
private void startTextBox30_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox30); }
|
||||
private void startTextBox31_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox31); }
|
||||
private void startTextBox32_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox32); }
|
||||
private void startTextBox33_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox33); }
|
||||
private void startTextBox34_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox34); }
|
||||
private void startTextBox35_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox35); }
|
||||
private void startTextBox36_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox36); }
|
||||
private void startTextBox37_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox37); }
|
||||
private void startTextBox38_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox38); }
|
||||
private void startTextBox39_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox39); }
|
||||
private void startTextBox40_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox40); }
|
||||
private void startTextBox41_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox41); }
|
||||
private void startTextBox42_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox42); }
|
||||
private void startTextBox43_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox43); }
|
||||
private void startTextBox44_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox44); }
|
||||
private void startTextBox45_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox45); }
|
||||
private void startTextBox46_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox46); }
|
||||
private void startTextBox47_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox47); }
|
||||
private void startTextBox48_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox48); }
|
||||
|
||||
private void startTextBox1_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox1); }
|
||||
private void startTextBox2_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox2); }
|
||||
private void startTextBox3_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox3); }
|
||||
private void startTextBox4_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox4); }
|
||||
private void startTextBox5_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox5); }
|
||||
private void startTextBox6_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox6); }
|
||||
private void startTextBox7_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox7); }
|
||||
private void startTextBox8_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox8); }
|
||||
private void startTextBox9_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox9); }
|
||||
private void startTextBox10_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox10); }
|
||||
private void startTextBox11_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox11); }
|
||||
private void startTextBox12_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox12); }
|
||||
private void startTextBox13_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox13); }
|
||||
private void startTextBox14_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox14); }
|
||||
private void startTextBox15_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox15); }
|
||||
private void startTextBox16_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox16); }
|
||||
private void startTextBox17_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox17); }
|
||||
private void startTextBox18_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox18); }
|
||||
private void startTextBox19_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox19); }
|
||||
private void startTextBox20_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox20); }
|
||||
private void startTextBox21_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox21); }
|
||||
private void startTextBox22_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox22); }
|
||||
private void startTextBox23_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox23); }
|
||||
private void startTextBox24_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox24); }
|
||||
private void startTextBox25_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox25); }
|
||||
private void startTextBox26_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox26); }
|
||||
private void startTextBox27_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox27); }
|
||||
private void startTextBox28_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox28); }
|
||||
private void startTextBox29_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox29); }
|
||||
private void startTextBox30_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox30); }
|
||||
private void startTextBox31_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox31); }
|
||||
private void startTextBox32_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox32); }
|
||||
private void startTextBox33_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox33); }
|
||||
private void startTextBox34_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox34); }
|
||||
private void startTextBox35_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox35); }
|
||||
private void startTextBox36_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox36); }
|
||||
private void startTextBox37_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox37); }
|
||||
private void startTextBox38_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox38); }
|
||||
private void startTextBox39_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox39); }
|
||||
private void startTextBox40_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox40); }
|
||||
private void startTextBox41_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox41); }
|
||||
private void startTextBox42_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox42); }
|
||||
private void startTextBox43_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox43); }
|
||||
private void startTextBox44_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox44); }
|
||||
private void startTextBox45_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox45); }
|
||||
private void startTextBox46_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox46); }
|
||||
private void startTextBox47_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox47); }
|
||||
private void startTextBox48_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox48); }
|
||||
}
|
||||
}
|
||||
|
||||
+515
-345
File diff suppressed because it is too large
Load Diff
@@ -35,7 +35,7 @@ namespace TBF.BenchControl.Elde
|
||||
|
||||
public int EtPulses(int wmNr1) { return (int)ctrlBrdComponent.etPulses[wmNr1]; }
|
||||
|
||||
#if DN100 || MUNICH || BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || TORINO_50 || TORUN_50 || CEVAK_40 || MURES_40 || PUCHONG_200 || MALTA_WSD25
|
||||
#if DN100 || MUNICH || BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || TORINO_50 || TORUN_50 || CEVAK_40 || MURES_40 || IZRAEL_200 || PUCHONG_200 || MALTA_WSD25
|
||||
public int EtPulsesK { get { return 1; } }
|
||||
#else /// all new benches
|
||||
public int EtPulsesK { get { return (int)ctrlBrdComponent.etPulsesK; } }
|
||||
@@ -94,9 +94,9 @@ namespace TBF.BenchControl.Elde
|
||||
return ctrlBrdComponent.Analogy[rvNr1 - 1]; /// Fixes bug: RValvePosition returns 0 all the time
|
||||
}
|
||||
public float DivSamples(int time, int divIx0)
|
||||
{
|
||||
#if MUNICH
|
||||
return ctrlBrdComponent.DIVSamples[time, 0];
|
||||
{
|
||||
#if MUNICH || IZRAEL_200
|
||||
return ctrlBrdComponent.DIVSamples[time, 0];
|
||||
#else
|
||||
return ctrlBrdComponent.DIVSamples[time, divIx0];
|
||||
#endif
|
||||
|
||||
+102
-98
@@ -70,118 +70,122 @@ namespace TBF.BenchControl
|
||||
/// <summary>
|
||||
/// StateMachine events (issued by operations, IOperation derived classes)
|
||||
/// </summary>
|
||||
public enum Event
|
||||
{
|
||||
None = 0,
|
||||
Busy, /// Useful when waiting in state until at least one is busy (all are done)
|
||||
Done, /// Useful when waiting in state until the first is done, the rest miht still be busy
|
||||
MakeSecondPass, /// Test completed OK but 2nd pass (evaluation) is required
|
||||
///
|
||||
ModelessFormIsOpen,
|
||||
ModelessFormClosed,
|
||||
public enum Event
|
||||
{
|
||||
None = 0,
|
||||
Busy, /// Useful when waiting in state until at least one is busy (all are done)
|
||||
Done, /// Useful when waiting in state until the first is done, the rest miht still be busy
|
||||
MakeSecondPass, /// Test completed OK but 2nd pass (evaluation) is required
|
||||
///
|
||||
ModelessFormIsOpen,
|
||||
ModelessFormClosed,
|
||||
|
||||
ValvesBusy,
|
||||
ValvesSet,
|
||||
ValvesBusy,
|
||||
ValvesSet,
|
||||
|
||||
AmbientDone,
|
||||
BalanceDone,
|
||||
BalanceOverload,
|
||||
PressureDone,
|
||||
PressureInDone,
|
||||
PressureOutDone,
|
||||
TempDone,
|
||||
TempInDone,
|
||||
TempOutDone,
|
||||
TempDivDone,
|
||||
AmbientDone,
|
||||
BalanceDone,
|
||||
BalanceOverload,
|
||||
PressureDone,
|
||||
PressureInDone,
|
||||
PressureOutDone,
|
||||
TempDone,
|
||||
TempInDone,
|
||||
TempOutDone,
|
||||
TempDivDone,
|
||||
LevelDone,
|
||||
VolumeDone,
|
||||
FlowMeasurementDone,
|
||||
FlowReached,
|
||||
PositionReached,
|
||||
RegulValveTimeOut, /// Maximum allowed flow setting time has elapsed
|
||||
ReadRegisterDone,
|
||||
ReadReferenceDone,
|
||||
AllPositionsReached, /// Used in SetAllRegulValvesOp
|
||||
TurnPumpOnOffDone,
|
||||
FlowMeasurementDone,
|
||||
FlowReached,
|
||||
PositionReached,
|
||||
RegulValveTimeOut, /// Maximum allowed flow setting time has elapsed
|
||||
ReadRegisterDone,
|
||||
ReadReferenceDone,
|
||||
AllPositionsReached, /// Used in SetAllRegulValvesOp
|
||||
TurnPumpOnOffDone,
|
||||
|
||||
/// CheckUi events
|
||||
UiCmdReloadBatch,
|
||||
UiCmdStartTest,
|
||||
UiCmdStartQ1,
|
||||
UiCmdStartQ2,
|
||||
UiCmdStartQ3,
|
||||
UiCmdStartCycle,
|
||||
UiCmdStop,
|
||||
UiCmdPurgeBegin,
|
||||
UiCmdPurgeEnd,
|
||||
UiCmdDrainTank1,
|
||||
UiCmdDrainTank2,
|
||||
UiCmdDrainTank3,
|
||||
UiCmdStopDrainingTank1,
|
||||
UiCmdStopDrainingTank2,
|
||||
UiCmdStopDrainingTank3,
|
||||
UiCmdBreak,
|
||||
UiCmdResetResults,
|
||||
UiCmdAcceptResults,
|
||||
UiCmdShutdown,
|
||||
UiCmdCameraTest,
|
||||
UiCmdSensitivityTest,
|
||||
UiCmdCustom,
|
||||
UiCmdB1,
|
||||
UiCmdB2,
|
||||
UiCmdB3,
|
||||
/// CheckUi events
|
||||
UiCmdReloadBatch,
|
||||
UiCmdStartTest,
|
||||
UiCmdStartQ1,
|
||||
UiCmdStartQ2,
|
||||
UiCmdStartQ3,
|
||||
UiCmdStartCycle,
|
||||
UiCmdStop,
|
||||
UiCmdPurgeBegin,
|
||||
UiCmdPurgeEnd,
|
||||
UiCmdDrainTank1,
|
||||
UiCmdDrainTank2,
|
||||
UiCmdDrainTank3,
|
||||
UiCmdStopDrainingTank1,
|
||||
UiCmdStopDrainingTank2,
|
||||
UiCmdStopDrainingTank3,
|
||||
UiCmdBreak,
|
||||
UiCmdResetResults,
|
||||
UiCmdAcceptResults,
|
||||
UiCmdShutdown,
|
||||
UiCmdCameraTest,
|
||||
UiCmdSensitivityTest,
|
||||
UiCmdCustom,
|
||||
UiCmdB1,
|
||||
UiCmdB2,
|
||||
UiCmdB3,
|
||||
|
||||
/// Process/Test oriented
|
||||
PreviousStopped,
|
||||
Wait,
|
||||
ProcedureLoaded,
|
||||
MeasurementStarted,
|
||||
ReadAllRegistersDone,
|
||||
MeasurementCompleted,
|
||||
CommandCompleted,
|
||||
/// Process/Test oriented
|
||||
PreviousStopped,
|
||||
Wait,
|
||||
ProcedureLoaded,
|
||||
MeasurementStarted,
|
||||
ReadAllRegistersDone,
|
||||
MeasurementCompleted,
|
||||
CommandCompleted,
|
||||
|
||||
/// At the end of cycle when saving /printing resultss
|
||||
ResultsPrinted,
|
||||
ResultsWritten,
|
||||
ResultsNotWritten,
|
||||
/// At the beginning of cycle when reading info from DB
|
||||
InfoRead,
|
||||
InfoNotRead,
|
||||
|
||||
/// Timer events
|
||||
TimerExpired,
|
||||
/// At the end of cycle when saving /printing resultss
|
||||
ResultsPrinted,
|
||||
ResultsWritten,
|
||||
ResultsNotWritten,
|
||||
|
||||
/// Process camera events
|
||||
CameraBusy,
|
||||
GrabPassed,
|
||||
GrabFailed,
|
||||
RoiDetectionPassed,
|
||||
RoiDetectionFailed,
|
||||
RoiDetectionPreviousFailed,
|
||||
/// Timer events
|
||||
TimerExpired,
|
||||
|
||||
/// Generic
|
||||
Error, /// Many ops.: Fatal error occurred
|
||||
OpArgumentError,
|
||||
ConfigurationError,
|
||||
Yes,
|
||||
No,
|
||||
Next, /// To move to the next state when debugging
|
||||
OK,
|
||||
Retry,
|
||||
Abort,
|
||||
TimerBusy,
|
||||
SetOutputsDone,
|
||||
/// Process camera events
|
||||
CameraBusy,
|
||||
GrabPassed,
|
||||
GrabFailed,
|
||||
RoiDetectionPassed,
|
||||
RoiDetectionFailed,
|
||||
RoiDetectionPreviousFailed,
|
||||
|
||||
/// Sequence conditions
|
||||
ConditionNotMet,
|
||||
ConditionMet,
|
||||
/// Generic
|
||||
Error, /// Many ops.: Fatal error occurred
|
||||
OpArgumentError,
|
||||
ConfigurationError,
|
||||
Yes,
|
||||
No,
|
||||
Next, /// To move to the next state when debugging
|
||||
OK,
|
||||
Retry,
|
||||
Abort,
|
||||
TimerBusy,
|
||||
SetOutputsDone,
|
||||
|
||||
/// Outer loop control
|
||||
OuterLoopStart,
|
||||
OuterLoopEnd,
|
||||
/// Sequence conditions
|
||||
ConditionNotMet,
|
||||
ConditionMet,
|
||||
|
||||
/// Production tracing
|
||||
/// Outer loop control
|
||||
OuterLoopStart,
|
||||
OuterLoopEnd,
|
||||
|
||||
/// Production tracing
|
||||
CheckDone,
|
||||
CheckNotDone,
|
||||
|
||||
/// Error evaluation
|
||||
ErrorConditionsDone,
|
||||
}
|
||||
/// Error evaluation
|
||||
ErrorConditionsDone,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IStartInfoReader : IComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Reads information on start of a cycle, Events: Event.InfoRead
|
||||
/// </summary>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
IOperation ReadStartInfoOp(Results.Entities.Batch batchResults);
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
Error,
|
||||
}
|
||||
|
||||
public class Database : ComponentBase, IOperation, GenericDevices.IResultsWriter, Generic.IDevice
|
||||
public class Database : ComponentBase, IOperation, GenericDevices.IResultsWriter, GenericDevices.IStartInfoReader, Generic.IDevice
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Database));
|
||||
public override string ToString() { return string.Format("Sensus-Oracle-Database({0})", Cfg.ToString(1)); }
|
||||
@@ -27,12 +27,13 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
|
||||
public DatabaseCfg dbCfg;
|
||||
|
||||
|
||||
|
||||
enum CurrentOp
|
||||
{
|
||||
None,
|
||||
CheckBarcodeScanning,
|
||||
WriteResults,
|
||||
ReadStartInfo,
|
||||
}
|
||||
CurrentOp currentOp;
|
||||
bool opCompleted;
|
||||
@@ -118,24 +119,53 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
public void StopDevice2() { }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file, Events: Event.ResultsWritten
|
||||
/// </summary>
|
||||
/// <param name="procedure">Procedure to print the results of</param>
|
||||
/// <param name="unsortedResults">Results to write into the file</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
if (currentOp != CurrentOp.None)
|
||||
/// <summary>
|
||||
/// Reads information on start of a cycle, Events: Event.InfoRead
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ReadStartInfoOp(Results.Entities.Batch batch)
|
||||
{
|
||||
if (!dbCfg.ReadStartInfo)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if (currentOp != CurrentOp.None)
|
||||
{
|
||||
throw new Exception("Sequence error");
|
||||
}
|
||||
else
|
||||
{
|
||||
currentOp = CurrentOp.ReadStartInfo;
|
||||
this.batch = batch;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
currentOp = CurrentOp.WriteResults;
|
||||
this.batch = batch;
|
||||
return this;
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file, Events: Event.ResultsWritten
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
if (!dbCfg.SaveResults)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if (currentOp != CurrentOp.None)
|
||||
{
|
||||
throw new Exception("Sequence error");
|
||||
}
|
||||
else
|
||||
{
|
||||
currentOp = CurrentOp.WriteResults;
|
||||
this.batch = batch;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IOperation CheckBarcodeScanningOp(GenericDevices.IRegisterReader[] iperlHeads)
|
||||
{
|
||||
if (currentOp != CurrentOp.None)
|
||||
@@ -159,7 +189,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// <returns>Event.ResultsWritten or Event.Error</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (currentOp == CurrentOp.WriteResults)
|
||||
if (currentOp == CurrentOp.ReadStartInfo)
|
||||
{
|
||||
if (!opCompleted)
|
||||
{
|
||||
@@ -167,7 +197,23 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
#if ORACLE_DB
|
||||
if (dbCfg.DebugLevel != DebugMode.Simulate && connection != null)
|
||||
{
|
||||
if (WriteResultsToDatabase(connection, batch, false) == Retv.Error) anyError = true;
|
||||
if (ReadStartInfoFromDB(connection, batch) == Retv.Error) anyError = true;
|
||||
}
|
||||
#endif
|
||||
opCompleted = true;
|
||||
}
|
||||
|
||||
return anyError ? Event.InfoNotRead : Event.InfoRead;
|
||||
}
|
||||
else if (currentOp == CurrentOp.WriteResults)
|
||||
{
|
||||
if (!opCompleted)
|
||||
{
|
||||
if (batch.WaterMeters.Count == 0) return Event.ResultsWritten;
|
||||
#if ORACLE_DB
|
||||
if (dbCfg.DebugLevel != DebugMode.Simulate && connection != null)
|
||||
{
|
||||
if (WriteResultsToDB(connection, batch, false) == Retv.Error) anyError = true;
|
||||
}
|
||||
#endif
|
||||
opCompleted = true;
|
||||
@@ -245,7 +291,45 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
}
|
||||
|
||||
|
||||
public Retv WriteResultsToDatabase(OracleConnection conn, Results.Entities.Batch batch, bool safeMode)
|
||||
public Retv ReadStartInfoFromDB(OracleConnection conn, Results.Entities.Batch batch)
|
||||
{
|
||||
try
|
||||
{
|
||||
conn.Open(); /// Open the Oracle database
|
||||
|
||||
foreach (var wMtr in batch.WaterMeters)
|
||||
{
|
||||
ReadSingleWMfromDB(conn, wMtr);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Reading from ORACLE DB failed, batch={0}, error={1}", batch.BatchNr, exc.Message);
|
||||
|
||||
conn.Close();
|
||||
return Retv.Error;
|
||||
}
|
||||
|
||||
conn.Close();
|
||||
return Retv.OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read start info of one water meter from the database
|
||||
/// </summary>
|
||||
/// <param name="wmNr">0-based water meter number</param>
|
||||
/// <param name="results">Sorted list of results to update</param>
|
||||
void ReadSingleWMfromDB(OracleConnection conn, Results.Entities.WaterMeter wm)
|
||||
{
|
||||
if (string.IsNullOrEmpty(wm.SerialNr)) return; /// No database activity possible w/o PCB number
|
||||
|
||||
wm.Pruefindex = ReadMaxPruefindex(conn, wm);
|
||||
|
||||
// select (Q_Fehler) from VT_PRUEFREIHE_IST_PD where VT_fernum=(1) AND PruefungsNr=(2) AND ANBID=4
|
||||
}
|
||||
|
||||
|
||||
public Retv WriteResultsToDB(OracleConnection conn, Results.Entities.Batch batch, bool safeMode)
|
||||
{
|
||||
OracleTransaction transaction = null;
|
||||
|
||||
@@ -255,11 +339,10 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
transaction = conn.BeginTransaction();
|
||||
|
||||
SaveBatchData(conn, batch);
|
||||
|
||||
foreach (var wMtr in batch.WaterMeters)
|
||||
{
|
||||
SaveSingleWM2DB(conn, wMtr, safeMode);
|
||||
}
|
||||
foreach (var wMtr in batch.WaterMeters)
|
||||
{
|
||||
SaveSingleWM2DB(conn, wMtr, safeMode);
|
||||
}
|
||||
|
||||
transaction.Commit();
|
||||
}
|
||||
@@ -278,7 +361,6 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
return Retv.OK;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write one meter results into the database
|
||||
/// </summary>
|
||||
@@ -286,48 +368,13 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// <param name="results">Sorted list of results to save</param>
|
||||
void SaveSingleWM2DB(OracleConnection conn, Results.Entities.WaterMeter wm, bool safeMode)
|
||||
{
|
||||
if (string.IsNullOrEmpty(wm.SerialNr)) return; /// No database activity possible w/o PCB number
|
||||
if (safeMode && !wm.Passed) return;
|
||||
|
||||
if (safeMode && !wm.Passed) return;
|
||||
|
||||
///
|
||||
/// Read a list of all prufindexes for a given PCB Number
|
||||
///
|
||||
IList<int> pruefindexes = new List<int>();
|
||||
{
|
||||
OracleParameter parm = new OracleParameter();
|
||||
parm.OracleDbType = OracleDbType.Varchar2;
|
||||
parm.Value = wm.SerialNr;
|
||||
if (string.IsNullOrEmpty(wm.SerialNr)) return; /// No database activity possible w/o PCB number
|
||||
|
||||
OracleCommand cmd1 = new OracleCommand("SELECT Pruefindex FROM VT_ZAEHLER_PINDEX_PD WHERE VT_Fernum = :1 AND ANBID = 4", conn);
|
||||
cmd1.Parameters.Add(parm);
|
||||
int maxpruefindexLowPart = ReadMaxPruefindex(conn, wm);
|
||||
|
||||
OracleDataReader dr = cmd1.ExecuteReader();
|
||||
while (dr.Read()) { pruefindexes.Add(dr.GetInt32(0)); }
|
||||
dr.Close();
|
||||
}
|
||||
{
|
||||
OracleParameter parm = new OracleParameter();
|
||||
parm.OracleDbType = OracleDbType.Varchar2;
|
||||
parm.Value = wm.SerialNr;
|
||||
|
||||
OracleCommand cmd1 = new OracleCommand("SELECT Max_Pruefindex FROM VT_ZAEHLER_PD WHERE VT_Fernum = :1 AND ANBID = 4", conn);
|
||||
cmd1.Parameters.Add(parm);
|
||||
|
||||
OracleDataReader dr = cmd1.ExecuteReader();
|
||||
while (dr.Read()) { pruefindexes.Add(dr.GetInt32(0)); }
|
||||
dr.Close();
|
||||
}
|
||||
|
||||
///
|
||||
/// Determine MAX_Pruefindex
|
||||
///
|
||||
int maxpruefindexLowPart = 0;
|
||||
foreach (var v in pruefindexes)
|
||||
{
|
||||
if ((v % 100) > maxpruefindexLowPart) maxpruefindexLowPart = (v % 100);
|
||||
}
|
||||
int MAX_Pruefindex = 100 * dbCfg.TestBenchId + maxpruefindexLowPart + 1;
|
||||
int MAX_Pruefindex = 100 * dbCfg.TestBenchId + maxpruefindexLowPart + 1;
|
||||
|
||||
|
||||
int Hydr_Pruefung;
|
||||
@@ -350,6 +397,58 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
SaveOrUpdateWM(conn, wm, MAX_Pruefindex, Hydr_Pruefung);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="conn"></param>
|
||||
/// <param name="wm"></param>
|
||||
/// <returns></returns>
|
||||
int ReadMaxPruefindex(OracleConnection conn, Results.Entities.WaterMeter wm)
|
||||
{
|
||||
/// Create a list of all prufindexes for a given PCB Number (the list is initially empty)
|
||||
IList<int> pruefindexes = new List<int>();
|
||||
string purchaseOrder;
|
||||
string assignedSerialNr;
|
||||
string radioAddress;
|
||||
|
||||
{
|
||||
OracleParameter parm = new OracleParameter();
|
||||
parm.OracleDbType = OracleDbType.Varchar2;
|
||||
parm.Value = wm.SerialNr;
|
||||
|
||||
OracleCommand cmd1 = new OracleCommand("SELECT Pruefindex FROM VT_ZAEHLER_PINDEX_PD WHERE VT_Fernum = :1 AND ANBID = 4", conn);
|
||||
cmd1.Parameters.Add(parm);
|
||||
|
||||
OracleDataReader dr = cmd1.ExecuteReader();
|
||||
while (dr.Read()) { pruefindexes.Add(dr.GetInt32(0)); }
|
||||
dr.Close();
|
||||
}
|
||||
{
|
||||
OracleParameter parm = new OracleParameter();
|
||||
parm.OracleDbType = OracleDbType.Varchar2;
|
||||
parm.Value = wm.SerialNr;
|
||||
|
||||
OracleCommand cmd1 = new OracleCommand("SELECT Max_Pruefindex, Auftragsnummer, Z_Nr_Komplett, VT_Modul_Snr FROM VT_ZAEHLER_PD WHERE VT_Fernum = :1 AND ANBID = 4", conn);
|
||||
/// purchase order assigned s/n radio address PCB number Producer ID
|
||||
cmd1.Parameters.Add(parm);
|
||||
|
||||
OracleDataReader dr = cmd1.ExecuteReader();
|
||||
while (dr.Read())
|
||||
{
|
||||
pruefindexes.Add(dr.GetInt32(0));
|
||||
}
|
||||
dr.Close();
|
||||
}
|
||||
|
||||
/// Determine MAX_Pruefindex
|
||||
int maxPrfIndex = 0;
|
||||
foreach (var pix in pruefindexes)
|
||||
{
|
||||
if ((pix % 100) > maxPrfIndex) maxPrfIndex = (pix % 100);
|
||||
}
|
||||
|
||||
return maxPrfIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save common batch data
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
@@ -39,10 +37,8 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
public int TestBenchId;
|
||||
public DBUsed DBUsed;
|
||||
public int Baujahr; /// Written to the database
|
||||
public string LogFolderPath; /// Directory path into which the results will be saved
|
||||
public bool YearFolders;
|
||||
public bool MonthFolders;
|
||||
public bool DayFolders;
|
||||
public bool ReadStartInfo;
|
||||
public bool SaveResults;
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
@@ -53,10 +49,8 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
TestBenchId = 1;
|
||||
DBUsed = DBUsed.Test;
|
||||
Baujahr = 2015;
|
||||
LogFolderPath = Program.HomeDir + "Logs\\";
|
||||
YearFolders = true;
|
||||
MonthFolders = true;
|
||||
DayFolders = false;
|
||||
ReadStartInfo = true;
|
||||
SaveResults = true;
|
||||
}
|
||||
|
||||
public DatabaseCfg(IComponentFactory factory)
|
||||
@@ -67,14 +61,12 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("BenchId={0}, DBUsed={1}, Baujahr={2}, Logs={3}, Y={4}, M={5}, D={6}",
|
||||
return string.Format("BenchId={0}, DBUsed={1}, Baujahr={2}, ReadStartInfo={3}, SaveResults={4}",
|
||||
TestBenchId,
|
||||
DBUsed,
|
||||
Baujahr,
|
||||
LogFolderPath,
|
||||
YearFolders,
|
||||
MonthFolders,
|
||||
DayFolders);
|
||||
ReadStartInfo,
|
||||
SaveResults);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,10 +50,8 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
benchIdTextBox.Text = config.TestBenchId.ToString();
|
||||
dbUsedComboBox.Text = config.DBUsed.ToString();
|
||||
baujahrTextBox.Text = config.Baujahr.ToString();
|
||||
logsFolderTextBox.Text = config.LogFolderPath;
|
||||
yearFoldersCheckBox.Checked = config.YearFolders;
|
||||
monthFoldersCheckBox.Checked = config.MonthFolders;
|
||||
dayFoldersCheckBox.Checked = config.DayFolders;
|
||||
readStartInfoCheckBox.Checked = config.ReadStartInfo;
|
||||
saveResultsCheckBox.Checked = config.SaveResults;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
@@ -62,11 +60,8 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
benchIdTextBox.Enabled = true;
|
||||
dbUsedComboBox.Enabled = true;
|
||||
baujahrTextBox.Enabled = true;
|
||||
logsFolderTextBox.Enabled = true;
|
||||
logsFolderButton.Enabled = true;
|
||||
yearFoldersCheckBox.Enabled = true;
|
||||
monthFoldersCheckBox.Enabled = true;
|
||||
dayFoldersCheckBox.Enabled = true;
|
||||
readStartInfoCheckBox.Enabled = true;
|
||||
saveResultsCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
@@ -130,26 +125,14 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
}
|
||||
}
|
||||
|
||||
if (config.LogFolderPath != logsFolderTextBox.Text)
|
||||
if (readStartInfoCheckBox.Checked != config.ReadStartInfo)
|
||||
{
|
||||
config.LogFolderPath = logsFolderTextBox.Text;
|
||||
if (!config.LogFolderPath.EndsWith("\\")) config.LogFolderPath += "\\";
|
||||
config.ReadStartInfo = readStartInfoCheckBox.Checked;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
if (yearFoldersCheckBox.Checked != config.YearFolders)
|
||||
if (saveResultsCheckBox.Checked != config.SaveResults)
|
||||
{
|
||||
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;
|
||||
config.SaveResults = saveResultsCheckBox.Checked;
|
||||
flags = CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
|
||||
+25
-76
@@ -34,18 +34,14 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.dayFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.yearFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.monthFoldersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.readStartInfoCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.saveResultsCheckBox = new System.Windows.Forms.CheckBox();
|
||||
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
|
||||
@@ -74,38 +70,27 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// dayFoldersCheckBox
|
||||
// readStartInfoCheckBox
|
||||
//
|
||||
this.dayFoldersCheckBox.AutoSize = true;
|
||||
this.dayFoldersCheckBox.Enabled = false;
|
||||
this.dayFoldersCheckBox.Location = new System.Drawing.Point(111, 190);
|
||||
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;
|
||||
this.readStartInfoCheckBox.AutoSize = true;
|
||||
this.readStartInfoCheckBox.Enabled = false;
|
||||
this.readStartInfoCheckBox.Location = new System.Drawing.Point(111, 144);
|
||||
this.readStartInfoCheckBox.Name = "readStartInfoCheckBox";
|
||||
this.readStartInfoCheckBox.Size = new System.Drawing.Size(95, 17);
|
||||
this.readStartInfoCheckBox.TabIndex = 15;
|
||||
this.readStartInfoCheckBox.Text = "Read start info";
|
||||
this.readStartInfoCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// yearFoldersCheckBox
|
||||
// saveResultsCheckBox
|
||||
//
|
||||
this.yearFoldersCheckBox.AutoSize = true;
|
||||
this.yearFoldersCheckBox.Enabled = false;
|
||||
this.yearFoldersCheckBox.Location = new System.Drawing.Point(111, 144);
|
||||
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, 167);
|
||||
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;
|
||||
this.saveResultsCheckBox.AutoSize = true;
|
||||
this.saveResultsCheckBox.Enabled = false;
|
||||
this.saveResultsCheckBox.Location = new System.Drawing.Point(111, 167);
|
||||
this.saveResultsCheckBox.Name = "saveResultsCheckBox";
|
||||
this.saveResultsCheckBox.Size = new System.Drawing.Size(84, 17);
|
||||
this.saveResultsCheckBox.TabIndex = 16;
|
||||
this.saveResultsCheckBox.Text = "Save results";
|
||||
this.saveResultsCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// benchIdTextBox
|
||||
//
|
||||
@@ -159,50 +144,18 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
this.baujahrLabel.TabIndex = 7;
|
||||
this.baujahrLabel.Text = "Baujahr";
|
||||
//
|
||||
// logsFolderButton
|
||||
//
|
||||
this.logsFolderButton.Enabled = false;
|
||||
this.logsFolderButton.Location = new System.Drawing.Point(261, 116);
|
||||
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, 116);
|
||||
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, 119);
|
||||
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.monthFoldersCheckBox);
|
||||
this.Controls.Add(this.yearFoldersCheckBox);
|
||||
this.Controls.Add(this.dayFoldersCheckBox);
|
||||
this.Controls.Add(this.saveResultsCheckBox);
|
||||
this.Controls.Add(this.readStartInfoCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
@@ -219,17 +172,13 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.CheckBox dayFoldersCheckBox;
|
||||
private System.Windows.Forms.CheckBox yearFoldersCheckBox;
|
||||
private System.Windows.Forms.CheckBox monthFoldersCheckBox;
|
||||
private System.Windows.Forms.CheckBox readStartInfoCheckBox;
|
||||
private System.Windows.Forms.CheckBox saveResultsCheckBox;
|
||||
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;
|
||||
private System.Windows.Forms.Label baujahrLabel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
|
||||
public int FooterFntSz;
|
||||
public int TitFntSty;
|
||||
public int HdrFntSty;
|
||||
public int BodyFntSty;
|
||||
public int FooterFntSty;
|
||||
public int BodyFntSty;
|
||||
public int FooterFntSty;
|
||||
public bool GoodOnly;
|
||||
public bool SupressPrinting; /// Bypass printing when true
|
||||
public Culture Culture;
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.Printers.LabelPrinter
|
||||
namespace TBF.BenchControl.Output.Printers.Label
|
||||
{
|
||||
public class PrinterFactory : IComponentFactory
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ using System.IO;
|
||||
using Config.Entities;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Output.Printers.LabelPrinter
|
||||
namespace TBF.BenchControl.Output.Printers.Label
|
||||
{
|
||||
public class PrintLabelDocument : PrintDocument
|
||||
{
|
||||
@@ -0,0 +1,159 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using Results.Output.Printers.Label;
|
||||
|
||||
namespace TBF.BenchControl.Output.Printers.Label
|
||||
{
|
||||
public class Printer : ComponentBase, IOperation, GenericDevices.IResultsPrinter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Printer));
|
||||
public override string ToString() { return string.Format("LabelPrinter({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly PrinterCfg printerCfg;
|
||||
|
||||
public bool SupressPrinting { get { return printerCfg.SupressPrinting; } }
|
||||
|
||||
/// <summary> Data to print </summary>
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
///
|
||||
/// Items to print
|
||||
///
|
||||
IList<Results.WMeterRsltItemSpec> commonItems;
|
||||
|
||||
|
||||
public Printer() { }
|
||||
|
||||
public Printer(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
printerCfg = cfg as PrinterCfg;
|
||||
ApplyConfig();
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
void ApplyConfig()
|
||||
{
|
||||
commonItems = Results.WMeterRsltItemSpec.FromStrArray(printerCfg.ItemsToPrint);
|
||||
}
|
||||
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCfgChange(object sender, CfgChangeArgs args)
|
||||
{
|
||||
if (CfgChangeHandler == null) return;
|
||||
try { CfgChangeHandler(sender, args); }
|
||||
catch (Exception e) { log.Error("CfgChangeHandler(...) failed", e); }
|
||||
}
|
||||
|
||||
public static event EventHandler<CfgChangeArgs> CfgChangeHandler;
|
||||
|
||||
public override void StartChangeHandler()
|
||||
{
|
||||
CfgChangeHandler += delegate(object sender, CfgChangeArgs args)
|
||||
{
|
||||
PrinterCfg newCfg = args.Cfg as PrinterCfg;
|
||||
if (newCfg != null && newCfg.Name.Equals(Name))
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
printerCfg.Template = newCfg.Template;
|
||||
printerCfg.PageOrientation = newCfg.PageOrientation;
|
||||
printerCfg.PaperWidth = newCfg.PaperWidth;
|
||||
printerCfg.PaperHeight = newCfg.PaperHeight;
|
||||
printerCfg.ItemsToPrint = newCfg.ItemsToPrint;
|
||||
printerCfg.FontFamily = newCfg.FontFamily;
|
||||
printerCfg.FontSize = newCfg.FontSize;
|
||||
printerCfg.FontStyle = newCfg.FontStyle;
|
||||
printerCfg.Culture = newCfg.Culture;
|
||||
printerCfg.NrOfCopies = newCfg.NrOfCopies;
|
||||
printerCfg.GoodOnly = newCfg.GoodOnly;
|
||||
printerCfg.SupressPrinting = newCfg.SupressPrinting;
|
||||
|
||||
ApplyConfig();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Prints the test cycle results, Events: Event.ResultsPrinted
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
CultureInfo oriCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
if (printerCfg.Culture != Culture.system)
|
||||
{
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo(printerCfg.Culture.ToString());
|
||||
}
|
||||
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
if (wm != null && (!printerCfg.GoodOnly || wm.Passed))
|
||||
{
|
||||
PrintResults(batch, wm, string.Format("{0}-{1}", batch.BatchNr, wm.WMPosition));
|
||||
}
|
||||
}
|
||||
|
||||
Thread.CurrentThread.CurrentCulture = oriCulture;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PrintResults(Results.Entities.Batch batch, Results.Entities.WaterMeter wm, string documentName)
|
||||
{
|
||||
LabelPrinterCfg cfg = new LabelPrinterCfg
|
||||
{
|
||||
Template = printerCfg.Template,
|
||||
PageOrientation = printerCfg.PageOrientation,
|
||||
PaperWidth = printerCfg.PaperWidth,
|
||||
PaperHeight = printerCfg.PaperHeight,
|
||||
ItemsToPrint = printerCfg.ItemsToPrint,
|
||||
FontFamily = printerCfg.FontFamily,
|
||||
FontSize = printerCfg.FontSize,
|
||||
FontStyle = printerCfg.FontStyle,
|
||||
CultureInfo = (printerCfg.Culture == Culture.system) ? Thread.CurrentThread.CurrentCulture : new CultureInfo(printerCfg.Culture.ToString()),
|
||||
GoodOnly = printerCfg.GoodOnly,
|
||||
SupressPrinting = printerCfg.SupressPrinting,
|
||||
};
|
||||
|
||||
for (int i = 1; i <= printerCfg.NrOfCopies; i++)
|
||||
{
|
||||
string docNameEx = string.Format(((printerCfg.NrOfCopies == 1) ? "{0}" : "{0}_{1}"), documentName, i);
|
||||
new Results.Output.Printers.Label.LabelPrintDocument(batch, cfg, wm, docNameEx).Print();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+21
-7
@@ -8,7 +8,7 @@ using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.Printers.LabelPrinter
|
||||
namespace TBF.BenchControl.Output.Printers.Label
|
||||
{
|
||||
public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
@@ -20,10 +20,17 @@ namespace TBF.BenchControl.Output.Printers.LabelPrinter
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string Template; /// Full path to a 'png' file
|
||||
public PageOrientation PageOrientation;
|
||||
public int PaperWidth; /// In 0,254 mm = 1/100 in = 100dpi pixels count
|
||||
public int PaperHeight; /// In 0,254 mm = 1/100 in = 100dpi pixels count
|
||||
public string TemplateFile; /// Full path to a 'png' file
|
||||
public string[] ItemsToPrint;
|
||||
public string FontFamily;
|
||||
public int FontSize;
|
||||
public int FontStyle;
|
||||
public Culture Culture;
|
||||
public int NrOfCopies;
|
||||
public bool GoodOnly;
|
||||
public bool SupressPrinting; /// true = Bypass printing
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
@@ -37,21 +44,28 @@ namespace TBF.BenchControl.Output.Printers.LabelPrinter
|
||||
this.Name = name;
|
||||
this.Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
PageOrientation = PageOrientation.Portrait;
|
||||
|
||||
Template = string.Empty;
|
||||
PageOrientation = PageOrientation.Portrait;
|
||||
PaperWidth = 827; /// A4 width
|
||||
PaperHeight = 1169; /// A4 height
|
||||
TemplateFile = "C:\\TBF\\Templates\\Label.png";
|
||||
SupressPrinting = false;
|
||||
FontFamily = "Arial";
|
||||
FontSize = 10;
|
||||
FontStyle = 0;
|
||||
NrOfCopies = 1;
|
||||
GoodOnly = false;
|
||||
SupressPrinting = false;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Orientation={1}, PaperWidth={2}, PaperHeight={3}, TemplateFile={4}, SupressPrinting={5}",
|
||||
return string.Format("Name={0}, Orientation={1}, PaperWidth={2}, PaperHeight={3}, TemplateFile={4}, GoodOnly={5}, SupressPrinting={6}",
|
||||
Name,
|
||||
PageOrientation,
|
||||
PaperWidth,
|
||||
PaperHeight,
|
||||
TemplateFile,
|
||||
Template,
|
||||
GoodOnly ? "yes" : "no",
|
||||
SupressPrinting ? "yes" : "no"
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.Output.Printers.Label
|
||||
{
|
||||
partial class PrinterCfgCtrl
|
||||
{
|
||||
/// <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.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.orientationLabel = new System.Windows.Forms.Label();
|
||||
this.orientationComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.templateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.templateLabel = new System.Windows.Forms.Label();
|
||||
this.paperWidthTextBox = new System.Windows.Forms.TextBox();
|
||||
this.paperWidthLabel = new System.Windows.Forms.Label();
|
||||
this.paperHeightTextBox = new System.Windows.Forms.TextBox();
|
||||
this.paperHeightLabel = new System.Windows.Forms.Label();
|
||||
this.italicCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.boldCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.fontSizeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.fontFamilyComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.bodyFontLabel = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.itemsToPrintButton = new System.Windows.Forms.Button();
|
||||
this.nrOfCopiesLabel = new System.Windows.Forms.Label();
|
||||
this.nrOfCopiesTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cultureComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.cultureLabel = new System.Windows.Forms.Label();
|
||||
this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(122, 35);
|
||||
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(8, 38);
|
||||
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(119, 11);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(61, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "Class name";
|
||||
//
|
||||
// supressPrintingCheckBox
|
||||
//
|
||||
this.supressPrintingCheckBox.AutoSize = true;
|
||||
this.supressPrintingCheckBox.Enabled = false;
|
||||
this.supressPrintingCheckBox.Location = new System.Drawing.Point(122, 283);
|
||||
this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
|
||||
this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
|
||||
this.supressPrintingCheckBox.TabIndex = 11;
|
||||
this.supressPrintingCheckBox.Text = "Supress printing";
|
||||
this.supressPrintingCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// orientationLabel
|
||||
//
|
||||
this.orientationLabel.AutoSize = true;
|
||||
this.orientationLabel.Location = new System.Drawing.Point(8, 84);
|
||||
this.orientationLabel.Name = "orientationLabel";
|
||||
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
|
||||
this.orientationLabel.TabIndex = 3;
|
||||
this.orientationLabel.Text = "Page orientation";
|
||||
//
|
||||
// orientationComboBox
|
||||
//
|
||||
this.orientationComboBox.Enabled = false;
|
||||
this.orientationComboBox.FormattingEnabled = true;
|
||||
this.orientationComboBox.Location = new System.Drawing.Point(122, 81);
|
||||
this.orientationComboBox.Name = "orientationComboBox";
|
||||
this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.orientationComboBox.TabIndex = 4;
|
||||
//
|
||||
// templateTextBox
|
||||
//
|
||||
this.templateTextBox.Enabled = false;
|
||||
this.templateTextBox.Location = new System.Drawing.Point(122, 58);
|
||||
this.templateTextBox.Name = "templateTextBox";
|
||||
this.templateTextBox.Size = new System.Drawing.Size(228, 20);
|
||||
this.templateTextBox.TabIndex = 10;
|
||||
//
|
||||
// templateLabel
|
||||
//
|
||||
this.templateLabel.AutoSize = true;
|
||||
this.templateLabel.Location = new System.Drawing.Point(8, 61);
|
||||
this.templateLabel.Name = "templateLabel";
|
||||
this.templateLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.templateLabel.TabIndex = 9;
|
||||
this.templateLabel.Text = "Template file";
|
||||
//
|
||||
// paperWidthTextBox
|
||||
//
|
||||
this.paperWidthTextBox.Enabled = false;
|
||||
this.paperWidthTextBox.Location = new System.Drawing.Point(122, 105);
|
||||
this.paperWidthTextBox.Name = "paperWidthTextBox";
|
||||
this.paperWidthTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.paperWidthTextBox.TabIndex = 6;
|
||||
//
|
||||
// paperWidthLabel
|
||||
//
|
||||
this.paperWidthLabel.AutoSize = true;
|
||||
this.paperWidthLabel.Location = new System.Drawing.Point(8, 108);
|
||||
this.paperWidthLabel.Name = "paperWidthLabel";
|
||||
this.paperWidthLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.paperWidthLabel.TabIndex = 5;
|
||||
this.paperWidthLabel.Text = "Paper width";
|
||||
//
|
||||
// paperHeightTextBox
|
||||
//
|
||||
this.paperHeightTextBox.Enabled = false;
|
||||
this.paperHeightTextBox.Location = new System.Drawing.Point(122, 128);
|
||||
this.paperHeightTextBox.Name = "paperHeightTextBox";
|
||||
this.paperHeightTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.paperHeightTextBox.TabIndex = 8;
|
||||
//
|
||||
// paperHeightLabel
|
||||
//
|
||||
this.paperHeightLabel.AutoSize = true;
|
||||
this.paperHeightLabel.Location = new System.Drawing.Point(8, 131);
|
||||
this.paperHeightLabel.Name = "paperHeightLabel";
|
||||
this.paperHeightLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.paperHeightLabel.TabIndex = 7;
|
||||
this.paperHeightLabel.Text = "Paper height";
|
||||
//
|
||||
// bodyItalicCheckBox
|
||||
//
|
||||
this.italicCheckBox.AutoSize = true;
|
||||
this.italicCheckBox.Enabled = false;
|
||||
this.italicCheckBox.Location = new System.Drawing.Point(335, 190);
|
||||
this.italicCheckBox.Name = "bodyItalicCheckBox";
|
||||
this.italicCheckBox.Size = new System.Drawing.Size(15, 14);
|
||||
this.italicCheckBox.TabIndex = 47;
|
||||
this.italicCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bodyBoldCheckBox
|
||||
//
|
||||
this.boldCheckBox.AutoSize = true;
|
||||
this.boldCheckBox.Enabled = false;
|
||||
this.boldCheckBox.Location = new System.Drawing.Point(307, 190);
|
||||
this.boldCheckBox.Name = "bodyBoldCheckBox";
|
||||
this.boldCheckBox.Size = new System.Drawing.Size(15, 14);
|
||||
this.boldCheckBox.TabIndex = 46;
|
||||
this.boldCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bodyFontSizeTextBox
|
||||
//
|
||||
this.fontSizeTextBox.Enabled = false;
|
||||
this.fontSizeTextBox.Location = new System.Drawing.Point(259, 184);
|
||||
this.fontSizeTextBox.Name = "bodyFontSizeTextBox";
|
||||
this.fontSizeTextBox.Size = new System.Drawing.Size(29, 20);
|
||||
this.fontSizeTextBox.TabIndex = 45;
|
||||
//
|
||||
// bodyFontFamilyComboBox
|
||||
//
|
||||
this.fontFamilyComboBox.Enabled = false;
|
||||
this.fontFamilyComboBox.FormattingEnabled = true;
|
||||
this.fontFamilyComboBox.Location = new System.Drawing.Point(122, 184);
|
||||
this.fontFamilyComboBox.Name = "bodyFontFamilyComboBox";
|
||||
this.fontFamilyComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.fontFamilyComboBox.TabIndex = 44;
|
||||
//
|
||||
// bodyFontLabel
|
||||
//
|
||||
this.bodyFontLabel.AutoSize = true;
|
||||
this.bodyFontLabel.Location = new System.Drawing.Point(8, 187);
|
||||
this.bodyFontLabel.Name = "bodyFontLabel";
|
||||
this.bodyFontLabel.Size = new System.Drawing.Size(106, 13);
|
||||
this.bodyFontLabel.TabIndex = 43;
|
||||
this.bodyFontLabel.Text = "Font family/size/style";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label2.Location = new System.Drawing.Point(331, 175);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(24, 13);
|
||||
this.label2.TabIndex = 49;
|
||||
this.label2.Text = "Ital.";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label1.Location = new System.Drawing.Point(297, 175);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(32, 13);
|
||||
this.label1.TabIndex = 48;
|
||||
this.label1.Text = "Bold";
|
||||
//
|
||||
// itemsToPrintButton
|
||||
//
|
||||
this.itemsToPrintButton.Enabled = false;
|
||||
this.itemsToPrintButton.Location = new System.Drawing.Point(121, 154);
|
||||
this.itemsToPrintButton.Name = "itemsToPrintButton";
|
||||
this.itemsToPrintButton.Size = new System.Drawing.Size(132, 23);
|
||||
this.itemsToPrintButton.TabIndex = 50;
|
||||
this.itemsToPrintButton.Text = "Items to print";
|
||||
this.itemsToPrintButton.UseVisualStyleBackColor = true;
|
||||
this.itemsToPrintButton.Click += new System.EventHandler(this.itemsToPrintButton_Click);
|
||||
//
|
||||
// nrOfCopiesLabel
|
||||
//
|
||||
this.nrOfCopiesLabel.AutoSize = true;
|
||||
this.nrOfCopiesLabel.Location = new System.Drawing.Point(8, 235);
|
||||
this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
|
||||
this.nrOfCopiesLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.nrOfCopiesLabel.TabIndex = 52;
|
||||
this.nrOfCopiesLabel.Text = "Number of copies";
|
||||
//
|
||||
// nrOfCopiesTextBox
|
||||
//
|
||||
this.nrOfCopiesTextBox.Enabled = false;
|
||||
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(122, 232);
|
||||
this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
|
||||
this.nrOfCopiesTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.nrOfCopiesTextBox.TabIndex = 51;
|
||||
//
|
||||
// cultureComboBox
|
||||
//
|
||||
this.cultureComboBox.Enabled = false;
|
||||
this.cultureComboBox.FormattingEnabled = true;
|
||||
this.cultureComboBox.Location = new System.Drawing.Point(122, 208);
|
||||
this.cultureComboBox.Name = "cultureComboBox";
|
||||
this.cultureComboBox.Size = new System.Drawing.Size(218, 21);
|
||||
this.cultureComboBox.TabIndex = 54;
|
||||
//
|
||||
// cultureLabel
|
||||
//
|
||||
this.cultureLabel.AutoSize = true;
|
||||
this.cultureLabel.Location = new System.Drawing.Point(8, 211);
|
||||
this.cultureLabel.Name = "cultureLabel";
|
||||
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
|
||||
this.cultureLabel.TabIndex = 53;
|
||||
this.cultureLabel.Text = "Cullture";
|
||||
//
|
||||
// goodOnlyCheckBox
|
||||
//
|
||||
this.goodOnlyCheckBox.AutoSize = true;
|
||||
this.goodOnlyCheckBox.Enabled = false;
|
||||
this.goodOnlyCheckBox.Location = new System.Drawing.Point(122, 262);
|
||||
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
|
||||
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
|
||||
this.goodOnlyCheckBox.TabIndex = 55;
|
||||
this.goodOnlyCheckBox.Text = "Good only";
|
||||
this.goodOnlyCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PrinterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.goodOnlyCheckBox);
|
||||
this.Controls.Add(this.cultureComboBox);
|
||||
this.Controls.Add(this.cultureLabel);
|
||||
this.Controls.Add(this.nrOfCopiesLabel);
|
||||
this.Controls.Add(this.nrOfCopiesTextBox);
|
||||
this.Controls.Add(this.itemsToPrintButton);
|
||||
this.Controls.Add(this.italicCheckBox);
|
||||
this.Controls.Add(this.boldCheckBox);
|
||||
this.Controls.Add(this.fontSizeTextBox);
|
||||
this.Controls.Add(this.fontFamilyComboBox);
|
||||
this.Controls.Add(this.bodyFontLabel);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.paperHeightTextBox);
|
||||
this.Controls.Add(this.paperHeightLabel);
|
||||
this.Controls.Add(this.paperWidthTextBox);
|
||||
this.Controls.Add(this.paperWidthLabel);
|
||||
this.Controls.Add(this.templateTextBox);
|
||||
this.Controls.Add(this.templateLabel);
|
||||
this.Controls.Add(this.orientationComboBox);
|
||||
this.Controls.Add(this.orientationLabel);
|
||||
this.Controls.Add(this.supressPrintingCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "PrinterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(372, 327);
|
||||
this.Load += new System.EventHandler(this.PrinterCfgCtrl_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 supressPrintingCheckBox;
|
||||
private System.Windows.Forms.Label orientationLabel;
|
||||
private System.Windows.Forms.ComboBox orientationComboBox;
|
||||
private System.Windows.Forms.TextBox templateTextBox;
|
||||
private System.Windows.Forms.Label templateLabel;
|
||||
private System.Windows.Forms.TextBox paperWidthTextBox;
|
||||
private System.Windows.Forms.Label paperWidthLabel;
|
||||
private System.Windows.Forms.TextBox paperHeightTextBox;
|
||||
private System.Windows.Forms.Label paperHeightLabel;
|
||||
private System.Windows.Forms.CheckBox italicCheckBox;
|
||||
private System.Windows.Forms.CheckBox boldCheckBox;
|
||||
private System.Windows.Forms.TextBox fontSizeTextBox;
|
||||
private System.Windows.Forms.ComboBox fontFamilyComboBox;
|
||||
private System.Windows.Forms.Label bodyFontLabel;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button itemsToPrintButton;
|
||||
private System.Windows.Forms.Label nrOfCopiesLabel;
|
||||
private System.Windows.Forms.TextBox nrOfCopiesTextBox;
|
||||
private System.Windows.Forms.ComboBox cultureComboBox;
|
||||
private System.Windows.Forms.Label cultureLabel;
|
||||
private System.Windows.Forms.CheckBox goodOnlyCheckBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.Configs;
|
||||
|
||||
namespace TBF.BenchControl.Output.Printers.Label
|
||||
{
|
||||
public partial class PrinterCfgCtrl : ConfigCtrlUtils, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(PrinterCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
PrinterCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as PrinterCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
string[] itemsToPrint;
|
||||
|
||||
public PrinterCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
|
||||
orientationComboBox.Items.Add(PageOrientation.Portrait.ToString());
|
||||
orientationComboBox.Items.Add(PageOrientation.Landscape.ToString());
|
||||
|
||||
foreach (var ff in System.Drawing.FontFamily.Families)
|
||||
{
|
||||
fontFamilyComboBox.Items.Add(ff.Name);
|
||||
}
|
||||
}
|
||||
|
||||
private void PrinterCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
|
||||
|
||||
itemsToPrint = config.ItemsToPrint;
|
||||
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
}
|
||||
|
||||
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;
|
||||
templateTextBox.Text = config.Template;
|
||||
orientationComboBox.Text = config.PageOrientation.ToString();
|
||||
paperWidthTextBox.Text = config.PaperWidth.ToString();
|
||||
paperHeightTextBox.Text = config.PaperHeight.ToString();
|
||||
|
||||
fontFamilyComboBox.Text = config.FontFamily;
|
||||
fontSizeTextBox.Text = config.FontSize.ToString();
|
||||
boldCheckBox.Checked = ((config.FontStyle & (int)System.Drawing.FontStyle.Bold) != 0);
|
||||
italicCheckBox.Checked = ((config.FontStyle & (int)System.Drawing.FontStyle.Italic) != 0);
|
||||
|
||||
cultureComboBox.Text = config.Culture.ToString();
|
||||
nrOfCopiesTextBox.Text = config.NrOfCopies.ToString();
|
||||
goodOnlyCheckBox.Checked = config.GoodOnly;
|
||||
supressPrintingCheckBox.Checked = config.SupressPrinting;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
templateTextBox.Enabled = true;
|
||||
orientationComboBox.Enabled = true;
|
||||
paperWidthTextBox.Enabled = true;
|
||||
paperHeightTextBox.Enabled = true;
|
||||
itemsToPrintButton.Enabled = true;
|
||||
fontFamilyComboBox.Enabled = true;
|
||||
fontSizeTextBox.Enabled = true;
|
||||
boldCheckBox.Enabled = true;
|
||||
italicCheckBox.Enabled = true;
|
||||
cultureComboBox.Enabled = true;
|
||||
nrOfCopiesTextBox.Enabled = true;
|
||||
goodOnlyCheckBox.Enabled = true;
|
||||
supressPrintingCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
if (!File.Exists(Path.Combine("C:\\TBF\\Templates", templateTextBox.Text)))
|
||||
{
|
||||
message += Environment.NewLine + "Template file missing";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
if ((int)GetOrientation(orientationComboBox.Text) < 0)
|
||||
{
|
||||
message += Environment.NewLine + "Invalid page orientation";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(paperWidthTextBox.Text, out dummy) || dummy <= 0)
|
||||
{
|
||||
message += Environment.NewLine + "Invalid paper width";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(paperHeightTextBox.Text, out dummy) || dummy <= 0)
|
||||
{
|
||||
message += Environment.NewLine + "Invalid paper height";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(fontSizeTextBox.Text, out dummy) || dummy < 6 || dummy > 48)
|
||||
{
|
||||
message += Environment.NewLine + "Font size' should be between 6 and 48";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!cultureComboBox.Items.Contains(cultureComboBox.Text))
|
||||
{
|
||||
message += Environment.NewLine + "Invalid culture";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(nrOfCopiesTextBox.Text, out dummy) || dummy < 0 || dummy > 9)
|
||||
{
|
||||
message += Environment.NewLine + "'Number of copies' should be between 0 and 9";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
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 | CfgUpdateFlags.AnyChange);
|
||||
}
|
||||
|
||||
flags |= UpdateDifferent(ref config.Template, templateTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
if (config.PageOrientation != GetOrientation(orientationComboBox.Text))
|
||||
{
|
||||
config.PageOrientation = GetOrientation(orientationComboBox.Text);
|
||||
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
}
|
||||
|
||||
flags |= UpdateDifferent(ref config.PaperWidth, paperWidthTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.PaperHeight, paperHeightTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
flags |= UpdateDifferent(ref config.ItemsToPrint, itemsToPrint, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
/// Body font properties
|
||||
flags |= UpdateDifferent(ref config.FontFamily, fontFamilyComboBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.FontSize, int.Parse(fontSizeTextBox.Text), CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
int tmp = (boldCheckBox.Checked ? (int)System.Drawing.FontStyle.Bold : 0)
|
||||
+ (italicCheckBox.Checked ? (int)System.Drawing.FontStyle.Italic : 0);
|
||||
flags |= UpdateDifferent(ref config.FontStyle, tmp, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
for (Culture i = 0; i < Culture.Count; i++)
|
||||
{
|
||||
if (i.ToString().Equals(cultureComboBox.Text) && (config.Culture != i))
|
||||
{
|
||||
config.Culture = i;
|
||||
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
flags |= UpdateDifferent(ref config.NrOfCopies, nrOfCopiesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.GoodOnly, goodOnlyCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.SupressPrinting, supressPrintingCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
|
||||
{
|
||||
Printer.OnCfgChange(this, new CfgChangeArgs(CfgChangeCmd.CfgChange, config));
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
private void itemsToPrintButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Results.Forms.ResultsConfigDlg dlg = new Results.Forms.ResultsConfigDlg()
|
||||
{
|
||||
SelectedItems = Results.WMeterRsltItemSpec.FromStrArray(itemsToPrint),
|
||||
};
|
||||
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
itemsToPrint = Results.WMeterRsltItemSpec.ToStrArray(dlg.SelectedItems);
|
||||
}
|
||||
}
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCmdResponse(object sender, CmdResponseArgs args)
|
||||
{
|
||||
if (CmdResponseHandler == null) return;
|
||||
try { CmdResponseHandler(sender, args); }
|
||||
catch (Exception e) { log.Error("CmdResponseHandler(...) failed", e); }
|
||||
}
|
||||
|
||||
public static event EventHandler<CmdResponseArgs> CmdResponseHandler;
|
||||
|
||||
public void StartResponseHandler() { }
|
||||
public void StopResponseHandler() { }
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -1,67 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using log4net;
|
||||
|
||||
namespace TBF.BenchControl.Output.Printers.LabelPrinter
|
||||
{
|
||||
public class Printer : ComponentBase, IOperation, GenericDevices.IResultsPrinter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Printer));
|
||||
public override string ToString() { return string.Format("LabelPrinter({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly PrinterCfg printerCfg;
|
||||
|
||||
public bool SupressPrinting { get { return printerCfg.SupressPrinting; } }
|
||||
|
||||
/// <summary> Data to print </summary>
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
|
||||
public Printer() { }
|
||||
|
||||
|
||||
public Printer(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
printerCfg = cfg as PrinterCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prints the test cycle results, Events: Event.ResultsPrinted
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results to print</param>
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation PrintResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
if (batch.WaterMeters.Count > 0)
|
||||
{
|
||||
new PrintLabelDocument(batch,
|
||||
printerCfg.PageOrientation,
|
||||
printerCfg.PaperWidth,
|
||||
printerCfg.PaperHeight,
|
||||
printerCfg.TemplateFile).Print();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
return Event.ResultsPrinted;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,193 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.Output.Printers.LabelPrinter
|
||||
{
|
||||
partial class PrinterCfgCtrl
|
||||
{
|
||||
/// <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.supressPrintingCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.orientationLabel = new System.Windows.Forms.Label();
|
||||
this.orientationComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.templateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.templateLabel = new System.Windows.Forms.Label();
|
||||
this.paperWidthTextBox = new System.Windows.Forms.TextBox();
|
||||
this.paperWidthLabel = new System.Windows.Forms.Label();
|
||||
this.paperHeightTextBox = new System.Windows.Forms.TextBox();
|
||||
this.paperHeightLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(98, 30);
|
||||
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(8, 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(95, 6);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// supressPrintingCheckBox
|
||||
//
|
||||
this.supressPrintingCheckBox.AutoSize = true;
|
||||
this.supressPrintingCheckBox.Enabled = false;
|
||||
this.supressPrintingCheckBox.Location = new System.Drawing.Point(98, 164);
|
||||
this.supressPrintingCheckBox.Name = "supressPrintingCheckBox";
|
||||
this.supressPrintingCheckBox.Size = new System.Drawing.Size(101, 17);
|
||||
this.supressPrintingCheckBox.TabIndex = 11;
|
||||
this.supressPrintingCheckBox.Text = "Supress printing";
|
||||
this.supressPrintingCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// orientationLabel
|
||||
//
|
||||
this.orientationLabel.AutoSize = true;
|
||||
this.orientationLabel.Location = new System.Drawing.Point(8, 59);
|
||||
this.orientationLabel.Name = "orientationLabel";
|
||||
this.orientationLabel.Size = new System.Drawing.Size(84, 13);
|
||||
this.orientationLabel.TabIndex = 3;
|
||||
this.orientationLabel.Text = "Page orientation";
|
||||
//
|
||||
// orientationComboBox
|
||||
//
|
||||
this.orientationComboBox.Enabled = false;
|
||||
this.orientationComboBox.FormattingEnabled = true;
|
||||
this.orientationComboBox.Location = new System.Drawing.Point(98, 56);
|
||||
this.orientationComboBox.Name = "orientationComboBox";
|
||||
this.orientationComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.orientationComboBox.TabIndex = 4;
|
||||
//
|
||||
// templateTextBox
|
||||
//
|
||||
this.templateTextBox.Enabled = false;
|
||||
this.templateTextBox.Location = new System.Drawing.Point(98, 135);
|
||||
this.templateTextBox.Name = "templateTextBox";
|
||||
this.templateTextBox.Size = new System.Drawing.Size(187, 20);
|
||||
this.templateTextBox.TabIndex = 10;
|
||||
//
|
||||
// templateLabel
|
||||
//
|
||||
this.templateLabel.AutoSize = true;
|
||||
this.templateLabel.Location = new System.Drawing.Point(8, 138);
|
||||
this.templateLabel.Name = "templateLabel";
|
||||
this.templateLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.templateLabel.TabIndex = 9;
|
||||
this.templateLabel.Text = "Template file";
|
||||
//
|
||||
// paperWidthTextBox
|
||||
//
|
||||
this.paperWidthTextBox.Enabled = false;
|
||||
this.paperWidthTextBox.Location = new System.Drawing.Point(98, 83);
|
||||
this.paperWidthTextBox.Name = "paperWidthTextBox";
|
||||
this.paperWidthTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.paperWidthTextBox.TabIndex = 6;
|
||||
//
|
||||
// paperWidthLabel
|
||||
//
|
||||
this.paperWidthLabel.AutoSize = true;
|
||||
this.paperWidthLabel.Location = new System.Drawing.Point(8, 86);
|
||||
this.paperWidthLabel.Name = "paperWidthLabel";
|
||||
this.paperWidthLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.paperWidthLabel.TabIndex = 5;
|
||||
this.paperWidthLabel.Text = "Paper width";
|
||||
//
|
||||
// paperHeightTextBox
|
||||
//
|
||||
this.paperHeightTextBox.Enabled = false;
|
||||
this.paperHeightTextBox.Location = new System.Drawing.Point(98, 109);
|
||||
this.paperHeightTextBox.Name = "paperHeightTextBox";
|
||||
this.paperHeightTextBox.Size = new System.Drawing.Size(51, 20);
|
||||
this.paperHeightTextBox.TabIndex = 8;
|
||||
//
|
||||
// paperHeightLabel
|
||||
//
|
||||
this.paperHeightLabel.AutoSize = true;
|
||||
this.paperHeightLabel.Location = new System.Drawing.Point(8, 112);
|
||||
this.paperHeightLabel.Name = "paperHeightLabel";
|
||||
this.paperHeightLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.paperHeightLabel.TabIndex = 7;
|
||||
this.paperHeightLabel.Text = "Paper height";
|
||||
//
|
||||
// PrinterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.paperHeightTextBox);
|
||||
this.Controls.Add(this.paperHeightLabel);
|
||||
this.Controls.Add(this.paperWidthTextBox);
|
||||
this.Controls.Add(this.paperWidthLabel);
|
||||
this.Controls.Add(this.templateTextBox);
|
||||
this.Controls.Add(this.templateLabel);
|
||||
this.Controls.Add(this.orientationComboBox);
|
||||
this.Controls.Add(this.orientationLabel);
|
||||
this.Controls.Add(this.supressPrintingCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "PrinterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.PrinterCfgCtrl_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 supressPrintingCheckBox;
|
||||
private System.Windows.Forms.Label orientationLabel;
|
||||
private System.Windows.Forms.ComboBox orientationComboBox;
|
||||
private System.Windows.Forms.TextBox templateTextBox;
|
||||
private System.Windows.Forms.Label templateLabel;
|
||||
private System.Windows.Forms.TextBox paperWidthTextBox;
|
||||
private System.Windows.Forms.Label paperWidthLabel;
|
||||
private System.Windows.Forms.TextBox paperHeightTextBox;
|
||||
private System.Windows.Forms.Label paperHeightLabel;
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Output.Printers.LabelPrinter
|
||||
{
|
||||
public partial class PrinterCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(PrinterCfgCtrl));
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
PrinterCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as PrinterCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public PrinterCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
orientationComboBox.Items.Add(PageOrientation.Portrait.ToString());
|
||||
orientationComboBox.Items.Add(PageOrientation.Landscape.ToString());
|
||||
}
|
||||
|
||||
private void PrinterCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
orientationComboBox.Text = config.PageOrientation.ToString();
|
||||
paperWidthTextBox.Text = config.PaperWidth.ToString();
|
||||
paperHeightTextBox.Text = config.PaperHeight.ToString();
|
||||
templateTextBox.Text = config.TemplateFile;
|
||||
supressPrintingCheckBox.Checked = config.SupressPrinting;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
orientationComboBox.Enabled = true;
|
||||
paperWidthTextBox.Enabled = true;
|
||||
paperHeightTextBox.Enabled = true;
|
||||
templateTextBox.Enabled = true;
|
||||
supressPrintingCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
if ((int)GetOrientation(orientationComboBox.Text) < 0)
|
||||
{
|
||||
message += Environment.NewLine + "Invalid page orientation";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(paperWidthTextBox.Text, out dummy) || dummy <= 0)
|
||||
{
|
||||
message += Environment.NewLine + "Invalid paper width";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(paperHeightTextBox.Text, out dummy) || dummy <= 0)
|
||||
{
|
||||
message += Environment.NewLine + "Invalid paper height";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
if (!File.Exists(config.TemplateFile))
|
||||
{
|
||||
message += Environment.NewLine + "Template file missing";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
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.PageOrientation = GetOrientation(orientationComboBox.Text);
|
||||
config.PaperWidth = int.Parse(paperWidthTextBox.Text);
|
||||
config.PaperHeight = int.Parse(paperHeightTextBox.Text);
|
||||
config.TemplateFile = templateTextBox.Text;
|
||||
config.SupressPrinting = supressPrintingCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -416,27 +416,6 @@ namespace TBF.BenchControl.Sequences
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
RestoreBatchResults(TBF.UiBridge.Bridge.BatchNr, ref BatchRslts); /// pass the original batch number of the batch to be restored
|
||||
}
|
||||
else if (selection == Selection.Custom)
|
||||
{
|
||||
for (int i = StateMachine.Procedure.Tests.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (StateMachine.Procedure.Tests[i].Name.ToLower().Contains("write") ||
|
||||
StateMachine.Procedure.Tests[i].Name.ToLower().Contains("reset"))
|
||||
{
|
||||
StateMachine.Procedure.Tests.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
|
||||
for (int i = StateMachine.Procedure.Tests.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (StateMachine.Procedure.Tests[i].Name.ToLower().Contains("adj"))
|
||||
{
|
||||
StateMachine.Procedure.Tests.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
|
||||
@@ -451,7 +430,7 @@ namespace TBF.BenchControl.Sequences
|
||||
///
|
||||
/// Display 'Cycle Begin Form' in case of a normal batch (not a restored batch)
|
||||
///
|
||||
if (selection != Selection.RestoreBatch && selection != Selection.Custom)
|
||||
if (selection != Selection.RestoreBatch)
|
||||
{
|
||||
if (OpenCycleBeginForm()) goto stop;
|
||||
}
|
||||
@@ -547,34 +526,47 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
|
||||
modelessDlg = null;
|
||||
}
|
||||
|
||||
if (selection == Selection.Custom)
|
||||
///
|
||||
/// Read start info from the DB @ cycle start
|
||||
///
|
||||
State readingStartInfo = State.Create("MainSeq : Reading start info from DB");
|
||||
///
|
||||
string[] resultWriters = StateMachine.Procedure.ResultsWriter.Split(new char[] { '~' });
|
||||
foreach (var writerName in resultWriters)
|
||||
{
|
||||
IStartInfoReader infoReader = TbfComponents.FindComponent(writerName) as IStartInfoReader;
|
||||
if (infoReader != null)
|
||||
{
|
||||
/// Load existing data from databases
|
||||
Results.DBase.Databases.Clear();
|
||||
try { Results.DBase.Databases.Add(new Results.DBase("SERVER=10.42.128.197; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", "WR10")); }
|
||||
catch (Exception exc) { log.ErrorFormat("Cannot open WR10 result database: {0}", exc.Message); }
|
||||
try { Results.DBase.Databases.Add(new Results.DBase("SERVER=10.42.128.98; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", "WR11")); }
|
||||
catch (Exception exc) { log.ErrorFormat("Cannot open WR11 result database: {0}", exc.Message); }
|
||||
try { Results.DBase.Databases.Add(new Results.DBase("SERVER=10.42.128.152; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", "WR13")); }
|
||||
catch (Exception exc) { log.ErrorFormat("Cannot open WR13 result database: {0}", exc.Message); }
|
||||
try { Results.DBase.Databases.Add(new Results.DBase("SERVER=10.42.128.63; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", "WR15")); }
|
||||
catch (Exception exc) { log.ErrorFormat("Cannot open WR15 result database: {0}", exc.Message); }
|
||||
|
||||
for (int i = 0; i < BatchRslts.WaterMeters.Length; i++)
|
||||
try
|
||||
{
|
||||
WaterMeter newWM = BatchRslts.WaterMeters[i];
|
||||
for (int j = 0; j < Results.DBase.Count; j++)
|
||||
{
|
||||
NHibernate.ISession sesn = Results.DBase.Databases[j].OpenSession();
|
||||
|
||||
IList<WaterMeter> watermeters = sesn.QueryOver<WaterMeter>().Where(x => (x.SerialNr == newWM.SerialNr)).List();
|
||||
if (watermeters.Count > 0)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].CopyContentFrom(watermeters[watermeters.Count - 1]); /// Copy results from the last occurance of the watermeter
|
||||
}
|
||||
}
|
||||
IOperation op = infoReader.ReadStartInfoOp(ProcessData.BatchRslts.Batch);
|
||||
if (op != null) readingStartInfo.AddOperation(op);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Bridge.OnError(this, string.Format(Strings.Component_0_crashed_Results_not_saved, writerName));
|
||||
log.FatalFormat("StartInfoReader {0} crashed: {1}", writerName, exc.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
///
|
||||
if (readingStartInfo.Operations.Count > 0)
|
||||
{
|
||||
readingStartInfo.AddOperation(checkUiOp).EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto error;
|
||||
if (e.Contains(Event.UiCmdStop)) goto stop;
|
||||
}
|
||||
while (e.Contains(Event.Busy));
|
||||
|
||||
if (e.Contains(Event.InfoNotRead))
|
||||
{
|
||||
log.ErrorFormat("StartInfoReader failed to read data from the database");
|
||||
/// TODO: Message for an operator? Error?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,7 +576,7 @@ namespace TBF.BenchControl.Sequences
|
||||
benchFilled = true;
|
||||
Bridge.Bench2UI(ButtonsEtc.ShowBenchFilled);
|
||||
|
||||
if (selection != Selection.PurgeBegin && selection != Selection.RestoreBatch && selection != Selection.Custom)
|
||||
if (selection != Selection.PurgeBegin && selection != Selection.RestoreBatch)
|
||||
{
|
||||
goto cycle_or_test_selected;
|
||||
}
|
||||
@@ -1252,7 +1244,6 @@ namespace TBF.BenchControl.Sequences
|
||||
SaveResults,
|
||||
RestoreBatch,
|
||||
Shutdown,
|
||||
Custom,
|
||||
}
|
||||
|
||||
|
||||
@@ -1342,7 +1333,6 @@ namespace TBF.BenchControl.Sequences
|
||||
if (e.Contains(Event.UiCmdStartQ3)) return Selection.Q3;
|
||||
if (e.Contains(Event.UiCmdAcceptResults)) return Selection.SaveResults;
|
||||
if (e.Contains(Event.UiCmdReloadBatch)) return Selection.RestoreBatch;
|
||||
if (e.Contains(Event.UiCmdCustom)) return Selection.Custom;
|
||||
}
|
||||
while (true);
|
||||
|
||||
|
||||
@@ -26,7 +26,9 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new DataEntry.Munich3.EntryFormFactory());
|
||||
Factories.Add(new DataEntry.Munich.EntryFormFactory());
|
||||
Factories.Add(new DataEntry.iPerl.EntryFormFactory());
|
||||
Factories.Add(new DataEntry.Standard6.Factory());
|
||||
Factories.Add(new DataEntry.Single.Factory());
|
||||
Factories.Add(new DataEntry.Single.FactoryNoStartEnd());
|
||||
Factories.Add(new DataEntry.Standard6.Factory());
|
||||
Factories.Add(new DataEntry.Standard6.FactoryNoStartEnd());
|
||||
Factories.Add(new DataEntry.Standard12.Factory());
|
||||
Factories.Add(new DataEntry.Standard12.FactoryNoStartEnd());
|
||||
@@ -133,7 +135,7 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new Output.Printers.Enhanced.FactorySingle());
|
||||
Factories.Add(new Output.Printers.Enhanced.FactoryCompound());
|
||||
Factories.Add(new Output.Printers.Enhanced.FactoryHeatMeters());
|
||||
Factories.Add(new Output.Printers.LabelPrinter.PrinterFactory()); /// LabelPrinter
|
||||
Factories.Add(new Output.Printers.Label.Factory()); /// Label printer
|
||||
Factories.Add(new Output.Printers.Munich.PrinterFactory());
|
||||
Factories.Add(new Output.Printers.OnePerMeter.FactorySingle());
|
||||
Factories.Add(new Output.Printers.OnePerMeter.FactoryCompound());
|
||||
|
||||
@@ -403,7 +403,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
@@ -644,7 +644,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
|
||||
@@ -393,7 +393,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
@@ -930,7 +930,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -993,7 +993,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterVolume);
|
||||
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
||||
@@ -1050,7 +1050,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
@@ -571,7 +571,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
+2
-2
@@ -1094,7 +1094,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(data.TestName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(data.TestName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -1144,7 +1144,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(data.TestName, i, Config.Entities.CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
+3
-3
@@ -1019,7 +1019,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -1082,7 +1082,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterVolume);
|
||||
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
||||
@@ -1139,7 +1139,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
+2
-2
@@ -748,7 +748,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -798,7 +798,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
@@ -565,7 +565,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterVolume);
|
||||
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
||||
@@ -623,7 +623,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
+3
-3
@@ -829,7 +829,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -901,7 +901,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterVolume);
|
||||
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
||||
@@ -959,7 +959,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
+3
-3
@@ -903,7 +903,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -975,7 +975,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterVolume);
|
||||
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
||||
@@ -1033,7 +1033,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
/// MetersKind.Single meters
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
|
||||
+3
-3
@@ -797,7 +797,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -869,7 +869,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterVolume);
|
||||
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
||||
@@ -927,7 +927,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
/// MetersKind.Single meters
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
|
||||
+3
-3
@@ -788,7 +788,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -860,7 +860,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt volumeRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterVolume);
|
||||
Results.Entities.MeterTestRslt energyRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
||||
@@ -918,7 +918,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
/// MetersKind.Single meters
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
|
||||
+2
-2
@@ -535,7 +535,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt mainMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMeterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
@@ -594,7 +594,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
||||
///
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
/// MetersKind.Single meters
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, Config.Entities.CompoundMeterId.Single);
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
if (StateMachine.Procedure.MetersKind == MetersKind.Single)
|
||||
{
|
||||
|
||||
@@ -212,7 +212,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
if (StateMachine.Procedure.MetersKind == MetersKind.Single)
|
||||
{
|
||||
|
||||
@@ -403,7 +403,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
@@ -403,7 +403,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue;
|
||||
if (!test.IsPartCompatible(Utils.PartNr(i + 1, BatchRslts.Batch.Compound))) continue;
|
||||
|
||||
Results.Entities.MeterTestRslt meterRslt = BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.Single);
|
||||
GenericDevices.IRegisterReader regReader = sensPath.RegisterReaders[i];
|
||||
|
||||
@@ -242,7 +242,10 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
}
|
||||
|
||||
int time = StateMachine.Time;
|
||||
|
||||
/// TODO: !!! The following can only be done for compound meters
|
||||
int diff = RegisterReaders[(test.Part - 1) * 2 + 1].WMPulses - lastWMPulses[(test.Part - 1) * 2 + 1];
|
||||
|
||||
flowsForDetection[0] = cBrd.ReferenceFreq * outPath.FlowMeter.NominalFlow / 2000.0f;
|
||||
pulseFreqsForDetection[0] = (float)diff / (float)(time - lastTime);
|
||||
lastTime = StateMachine.Time;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user