Compare commits

...
Author SHA1 Message Date
Milan Hanajik f0ba99fee3 Reconfigured for FEWA 50 2019-03-07 08:52:41 +01:00
Milan Hanajik 2e76d595c0 Quido RS 4-4 support added, ver. 2.18.1160. 2019-03-06 10:45:58 +01:00
Milan Hanajik 75e5b75d4d DEWA_300 : (1) component upgraded (6.3.2019), (2) Diverter: flowMtrNr4Cmd fixed, ver. 2.18.1159 2019-03-06 09:42:25 +01:00
Milan Hanajik b47f5e32d4 DEWA_300 symbol usage fixed, ver. 2.18.1158 2019-03-05 15:12:24 +01:00
Milan Hanajik 771af696ae (1) TBF program shutdown modifications, (2) Obligatory tank draining before TBF exit, (3) Shutdown PC after TBF exit option, ver. 2.18.1156 2019-03-05 12:28:58 +01:00
Milan Hanajik b10ab44fa9 (1) MetrologyDlg displays corrections for all pressure meters, (2) Elde.PressureMeter and Modbus.PressureMeter.Meret use corrections. 2019-03-04 09:20:16 +01:00
Milan Hanajik 13eb7138a3 TracingDB : Cleaned-up and upgraded to current version, TBF : Workplace registered for approx. 2 weeks. 2019-03-01 14:16:04 +01:00
Milan Hanajik 02f6c9264a MID Statistics is data driven, no MidId enum, ver. 2.18.1154 2019-02-28 15:13:44 +01:00
Milan Hanajik edb26ccf6e ver. 2.18.1154 2019-02-28 10:03:52 +01:00
Milan Hanajik 2574ce1aee ver. 2.18.1153 2019-02-27 08:11:50 +01:00
Milan Hanajik 5586f58c6e iPerlCommunicationForm : Better try/catch, more logging, ver. 2.18.1152 2019-02-25 16:15:41 +01:00
Milan Hanajik 138e436645 (1) DEWA_300 component added, (2) DEWA_300 symbol added, (3) IZRAEL_200 symbol bug fix, ver. 2.18.1151 2019-02-25 12:49:04 +01:00
Milan Hanajik ea7e727798 (1) Modbus.QuidoRS.ConfirmationForm added, (2) Use of QuidoRS in iPerlCommForm fixed - uses QuidoRS.Variant, ver. 2.18.1149 2019-02-25 11:05:21 +01:00
Milan Hanajik 7a40cfb1f2 More logging in ShowBenchWaitingOp and ShowBenchErrorOp. 2019-02-22 12:48:51 +01:00
Milan Hanajik b2226ad779 iPerlCommunication : TestModeConfig value verified after switching to a test mode. 2019-02-21 16:00:01 +01:00
Milan Hanajik ebf96f655c Output.DB.SaveFlowmeterCorrections : Corrections calculated differently, from FlowVolume, not FlowMean. 2019-02-20 15:11:58 +01:00
Milan Hanajik 4134bf8875 ProcessTabPageHeatMetersCtrl modifications, language resources, etc. 2019-02-20 14:21:18 +01:00
Milan Hanajik fd7149e263 Screens.ProcessTabPageHeatmetersCtrl added, ver. 2.18.1148 2019-02-20 11:35:57 +01:00
Milan Hanajik a40b4ff606 Added: (1) IParallelOutput, (2) StateMachine.BenchWaitingOp/BenchErrorOp, (3) Modbus.QuidoRS support for Quido RS 8/8 (4) etc., ver. 2.18.1147 2019-02-20 08:34:03 +01:00
Milan Hanajik 86c063caee ReasultsBrowser : Histograms added, ver. 2.18.1146 2019-02-19 14:42:46 +01:00
Milan Hanajik bea3c04eb7 Output.DB.SensusOracle.Database : Writing results more robust, preventing program crash. 2019-02-18 09:04:00 +01:00
Milan Hanajik c5644d6999 iPerlCommunication cleanup, ver. 2.18.1144 2019-02-15 15:36:08 +01:00
Milan Hanajik 29c4c869f2 iPerlCommunication 'iPerlCheck' fixed : Writes correct WMPositions (not wmNr0), ver. 2.18.1143 2019-02-14 08:16:16 +01:00
118 changed files with 5664 additions and 2208 deletions
+2
View File
@@ -0,0 +1,2 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
+2 -2
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;FEWA_50</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;FEWA_50</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+1 -1
View File
@@ -20,7 +20,7 @@ namespace Config
public const int CompoundWMsCount = 1;
public const int HeatMetersCount = 0;
public const int MaxPartNr = WMsCount / LineSize;
#elif FUZHOU_300 || FUZHOU_150 || IZRAEL_200 || PUCHONG_200 || GENESIS || SLM_150 || PETERSBURG_200
#elif FUZHOU_300 || FUZHOU_150 || IZRAEL_200 || PUCHONG_200 || GENESIS || SLM_150 || PETERSBURG_200 || DEWA_300
public const int WMsCount = 6;
public const int LineSize = 6;
public const int CompoundWMsCount = 3;
+2 -2
View File
@@ -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.1122.0")]
[assembly: AssemblyFileVersion("2.18.1122.0")]
[assembly: AssemblyVersion("2.18.1151.0")]
[assembly: AssemblyFileVersion("2.18.1151.0")]
+45 -3
View File
@@ -276,7 +276,14 @@ namespace DeviceTest
radioButton3.Text = "SelectTank 3";
radioButton4.Text = "SelectTank -";
}
else radioButton1.Text = "spare";
else if (className == "Modbus.QuidoRS")
{
radioButton1.Text = "Close relay 1";
radioButton2.Text = "Close relay 2";
radioButton3.Text = "Close relay 3";
radioButton4.Text = "Open all relays";
}
else radioButton1.Text = "spare";
}
///
void UpdateOperations2(string className)
@@ -296,7 +303,14 @@ namespace DeviceTest
radioButton23.Text = "SelectTank 3";
radioButton24.Text = "SelectTank -";
}
else radioButton21.Text = "spare";
else if (className == "Modbus.QuidoRS")
{
radioButton21.Text = "Close relay 1";
radioButton22.Text = "Close relay 2";
radioButton23.Text = "Close relay 3";
radioButton24.Text = "Open all relays";
}
else radioButton21.Text = "spare";
}
///
void UpdateOperations3(string className)
@@ -316,7 +330,14 @@ namespace DeviceTest
radioButton33.Text = "SelectTank 3";
radioButton34.Text = "SelectTank -";
}
else radioButton31.Text = "spare";
else if (className == "Modbus.QuidoRS")
{
radioButton31.Text = "Close relay 1";
radioButton32.Text = "Close relay 2";
radioButton33.Text = "Close relay 3";
radioButton34.Text = "Open all relays";
}
else radioButton31.Text = "spare";
}
@@ -672,6 +693,13 @@ namespace DeviceTest
//operation3 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
//operation4 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
}
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
{
operation1 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
operation2 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
operation3 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
operation4 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
}
if (tbfComponent2forOp is TBF.BenchControl.Modbus.PressureMeter.Meret.PressureMeter)
@@ -704,6 +732,13 @@ namespace DeviceTest
//operation23 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
//operation24 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
}
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
{
operation21 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
operation22 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
operation23 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
operation24 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
}
if (tbfComponent3forOp is TBF.BenchControl.Modbus.PressureMeter.Meret.PressureMeter)
@@ -736,6 +771,13 @@ namespace DeviceTest
//operation33 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
//operation34 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
}
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
{
operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
operation32 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
operation33 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
operation34 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
}
int time = 0;
+2 -2
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;FEWA_50</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;FEWA_50</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+76
View File
@@ -0,0 +1,76 @@
namespace ResultsBrowser.Forms
{
partial class HistogramCtrl
{
/// <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()
{
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.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
this.myChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
((System.ComponentModel.ISupportInitialize)(this.myChart)).BeginInit();
this.SuspendLayout();
//
// myChart
//
chartArea1.Name = "ChartArea1";
this.myChart.ChartAreas.Add(chartArea1);
this.myChart.Dock = System.Windows.Forms.DockStyle.Fill;
legend1.Name = "Legend1";
this.myChart.Legends.Add(legend1);
this.myChart.Location = new System.Drawing.Point(0, 0);
this.myChart.Name = "myChart";
this.myChart.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.Bright;
series1.ChartArea = "ChartArea1";
series1.Legend = "Legend1";
series1.Name = "Series1";
this.myChart.Series.Add(series1);
this.myChart.Size = new System.Drawing.Size(400, 300);
this.myChart.TabIndex = 0;
this.myChart.Text = "chart1";
title1.Name = "Title1";
title1.Text = "Title1";
this.myChart.Titles.Add(title1);
//
// HistogramCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.myChart);
this.Name = "HistogramCtrl";
this.Size = new System.Drawing.Size(400, 300);
((System.ComponentModel.ISupportInitialize)(this.myChart)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataVisualization.Charting.Chart myChart;
}
}
+42
View File
@@ -0,0 +1,42 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
namespace ResultsBrowser.Forms
{
public partial class HistogramCtrl : UserControl
{
/// <summary>
/// Create user control that displays a bar chart iwth custom X-axis labels.
/// </summary>
/// <param name="title">Title of the chart displayed at the top</param>
/// <param name="values">Values = bar lengths</param>
/// <param name="labels">Labels for the X-axis</param>
public HistogramCtrl(string title, double[] values, string[] labels)
{
InitializeComponent();
if (myChart.Titles.Count > 0) myChart.Titles[0].Text = title;
if ((myChart.Series.Count > 0) && (values != null))
{
int startOffset = -1;
int endOffset = 1;
for (int i = 0; i < Math.Min(values.Length + 1, labels.Length); i++)
{
if (i < values.Length) myChart.Series[0].Points.Add(values[i]);
if (!string.IsNullOrEmpty(labels[i]))
{
myChart.ChartAreas[0].AxisX.CustomLabels.Add(new System.Windows.Forms.DataVisualization.Charting.CustomLabel(startOffset, endOffset, labels[i], 0, LabelMarkStyle.None));
}
startOffset = startOffset + 1;
endOffset = endOffset + 1;
}
}
}
}
}
+150
View File
@@ -0,0 +1,150 @@
namespace ResultsBrowser.Forms
{
partial class HistogramDlg
{
/// <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();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.exportButton = new System.Windows.Forms.Button();
this.printButton = new System.Windows.Forms.Button();
this.closeButton = new System.Windows.Forms.Button();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(572, 409);
this.splitContainer1.SplitterDistance = 320;
this.splitContainer1.TabIndex = 0;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.exportButton);
this.splitContainer2.Panel2.Controls.Add(this.printButton);
this.splitContainer2.Panel2.Controls.Add(this.closeButton);
this.splitContainer2.Size = new System.Drawing.Size(572, 85);
this.splitContainer2.SplitterDistance = 249;
this.splitContainer2.TabIndex = 0;
//
// exportButton
//
this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.exportButton.Location = new System.Drawing.Point(103, 21);
this.exportButton.Name = "exportButton";
this.exportButton.Size = new System.Drawing.Size(94, 41);
this.exportButton.TabIndex = 1;
this.exportButton.Text = "Export";
this.exportButton.UseVisualStyleBackColor = true;
//
// printButton
//
this.printButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.printButton.Location = new System.Drawing.Point(4, 21);
this.printButton.Name = "printButton";
this.printButton.Size = new System.Drawing.Size(94, 41);
this.printButton.TabIndex = 0;
this.printButton.Text = "Print";
this.printButton.UseVisualStyleBackColor = true;
//
// closeButton
//
this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.closeButton.Location = new System.Drawing.Point(203, 21);
this.closeButton.Name = "closeButton";
this.closeButton.Size = new System.Drawing.Size(94, 41);
this.closeButton.TabIndex = 2;
this.closeButton.Text = "Close";
this.closeButton.UseVisualStyleBackColor = true;
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(572, 320);
this.flowLayoutPanel1.TabIndex = 0;
//
// HistogramDlg
//
this.AcceptButton = this.closeButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(572, 409);
this.Controls.Add(this.splitContainer1);
this.Name = "HistogramDlg";
this.Text = "HistogramDlg";
this.Load += new System.EventHandler(this.HistogramDlg_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.Button closeButton;
private System.Windows.Forms.Button printButton;
private System.Windows.Forms.Button exportButton;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}
+152
View File
@@ -0,0 +1,152 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using Results.Entities;
using ResultsBrowser.Resources;
using ResultsBrowser.Output.Printers.Statistics;
namespace ResultsBrowser.Forms
{
public partial class HistogramDlg : Form
{
const int NrBins = 11;
IList<WaterMeter> waterMeters;
HistogramOptionsDlg options;
public HistogramDlg(IList<WaterMeter> waterMeters, HistogramOptionsDlg options, string title)
{
InitializeComponent();
this.waterMeters = waterMeters;
this.options = options;
Text = title;
closeButton.Text = Strings.OkBtnText;
printButton.Text = Strings.Print;
}
private void HistogramDlg_Load(object sender, EventArgs e)
{
CalculateAndDraw();
}
void CalculateAndDraw()
{
for (int i = 0; i < options.SelectedItems.Count; i++)
{
Results.WMeterRsltItemSpec item = options.SelectedItems[i];
try
{
/// Find minimum and maximum
double min = Double.MaxValue;
double max = Double.MinValue;
double sum = 0;
int count = 0;
foreach (var wm in waterMeters)
{
string strValue = item.Print(wm);
double value;
if (!double.TryParse(strValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.CurrentCulture, out value) &&
!double.TryParse(strValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out value))
{
throw new Exception(string.Format("{0} is not a number, cannot calculate histogram", item.Caption));
}
sum += value;
count++;
if (min > value) min = value;
if (max < value) max = value;
}
double mean = (count != 0) ? (sum / count) : 0; /// Prevent division by zero
///
/// Determine limits for bins
///
double[] binHiLim;
string[] labels;
if ((-0.55 <= min) && (max <= 0.55))
{
labels = new string[] { "-0.6", "", "-0.4", "", "-0.2", "", "0", "", "0.2", "", "0.4", "", "0.6" };
binHiLim = new double[] { -0.45, -0.35, -0.25, -0.15, -0.05, 0.05, 0.15, 0.25, 0.35, 0.45, 0.55 };
}
else if ((-1.1 <= min) && (max <= 1.1))
{
labels = new string[] { "-1.2", "", "-0.8", "", "-0.4", "", "0", "", "0.4", "", "0.8", "", "1.2" };
binHiLim = new double[] { -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 0.5, 0.7, 0.9, 1.1 };
}
else if ((-2.2 <= min) && (max <= 2.2))
{
labels = new string[] { "-2.4", "", "-1.6", "", "-0.8", "", "0", "", "0.8", "", "1.6", "", "2.4" };
binHiLim = new double[] { -1.8, -1.4, -1.0, -0.6, -0.2, 0.2, 0.6, 1.0, 1.4, 1.8, 2.2 };
}
else if ((-4.4 <= min) && (max <= 4.4))
{
labels = new string[] { "-4.8", "", "-3.2", "", "-1.6", "", "0", "", "1.6", "", "3.2", "", "4.8" };
binHiLim = new double[] { -3.6, -2.8, -2.0, -1.2, -0.4, 0.4, 1.2, 2.0, 2.8, 3.6, 4.4 };
}
else
{
labels = new string[] { "-9.6", "", "-6.4", "", "-3.2", "", "0", "", "3.2", "", "6.4", "", "9.6" };
binHiLim = new double[] { -7.2, -5.6, -4.0, -2.4, -0.8, 0.8, 2.4, 4.0, 5.6, 7.2, 8.8 };
}
int nrBins = Math.Min(labels.Length - 1, binHiLim.Length + 1);
double[] bins = new double[nrBins];
for (int j = 0; j < nrBins; j++) bins[j] = 0;
/// Calculate bins
foreach (var wm in waterMeters)
{
string strValue = item.Print(wm);
double value;
if (!double.TryParse(strValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.CurrentCulture, out value) &&
!double.TryParse(strValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out value))
{
throw new Exception(string.Format("{0} is not a number, cannot calculate histogram", item.Caption));
}
for (int j = 0; j < nrBins - 1; j++)
{
if (value < binHiLim[j])
{
bins[j] += 1.0;
break;
}
}
if (value >= binHiLim[nrBins - 2])
{
bins[nrBins - 1] += 1.0;
}
}
///
/// Draw
///
HistogramCtrl histo = new HistogramCtrl(string.Format("{0} mean = {1}", item.Caption, mean.ToString("F3")), bins, labels);
flowLayoutPanel1.Controls.Add(histo);
}
catch (Exception exc)
{
string msg = exc.Message;
}
}
}
private void closeButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+91
View File
@@ -0,0 +1,91 @@
namespace ResultsBrowser.Forms
{
partial class HistogramOptionsDlg
{
/// <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.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// 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(380, 302);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(95, 38);
this.cancelButton.TabIndex = 9;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// 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(269, 302);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(95, 38);
this.okButton.TabIndex = 8;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(12, 12);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(479, 271);
this.flowLayoutPanel1.TabIndex = 10;
//
// HistogramOptionsDlg
//
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(503, 355);
this.Controls.Add(this.flowLayoutPanel1);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.Name = "HistogramOptionsDlg";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "HistogramOptionsDlg";
this.Load += new System.EventHandler(this.HistogramOptionsDlg_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}
@@ -0,0 +1,67 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using ResultsBrowser.Resources;
namespace ResultsBrowser.Forms
{
public partial class HistogramOptionsDlg : Form
{
IList<Results.WMeterRsltItemSpec> items;
public IList<Results.WMeterRsltItemSpec> SelectedItems;
IList<CheckBox> checkBoxes;
public HistogramOptionsDlg(IList<Results.WMeterRsltItemSpec> items)
{
InitializeComponent();
this.items = items;
checkBoxes = new List<CheckBox>();
}
private void HistogramOptionsDlg_Load(object sender, EventArgs e)
{
Localize();
foreach (var item in items)
{
CheckBox cb = new CheckBox();
cb.Text = item.Caption;
cb.Checked = false;
flowLayoutPanel1.Controls.Add(cb);
checkBoxes.Add(cb);
}
}
void Localize()
{
Text = Strings.Statistics;
okButton.Text = Strings.OkBtnText;
cancelButton.Text = Strings.CancelBtnText;
}
private void okButton_Click(object sender, EventArgs e)
{
SelectedItems = new List<Results.WMeterRsltItemSpec>();
for (int i = 0; i < items.Count; i++)
{
if (checkBoxes[i].Checked) SelectedItems.Add(items[i]);
}
//Program.LocalSettings.RowItemCaption = RowItem.Caption;
// ...
//Program.LocalSettings.Save();
DialogResult = DialogResult.OK;
Close();
}
private void cancelButton_Click(object sender, EventArgs e)
{
}
}
}
@@ -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>
+27 -68
View File
@@ -1,4 +1,7 @@
using System;
///
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Results.Entities;
@@ -11,22 +14,7 @@ namespace ResultsBrowser.Forms
public partial class StatisticsDlg : Form
{
IList<WaterMeter> waterMeters;
bool twoDim;
Results.WMeterRsltItemSpec rowItem;
Results.WMeterRsltItemSpec rowItem2;
Results.WMeterRsltItemSpec rowItem3;
Results.WMeterRsltItemSpec columnItem;
Results.WMeterRsltItemSpec columnItem2;
Results.WMeterRsltItemSpec columnItem3;
string rowTestSpec;
string rowTestSpec2;
string rowTestSpec3;
string columnTestSpec;
string columnTestSpec2;
string columnTestSpec3;
StatisticsOptionsDlg options;
IList<string> rowValues;
IList<string> columnValues;
@@ -36,23 +24,14 @@ namespace ResultsBrowser.Forms
string title;
public StatisticsDlg(IList<WaterMeter> waterMeters, bool twoDim,
Results.WMeterRsltItemSpec rowItem,
Results.WMeterRsltItemSpec rowItem2,
Results.WMeterRsltItemSpec rowItem3,
Results.WMeterRsltItemSpec columnItem,
Results.WMeterRsltItemSpec columnItem2,
Results.WMeterRsltItemSpec columnItem3,
string rowTestSpec,
string rowTestSpec2,
string rowTestSpec3,
string columnTestSpec,
string columnTestSpec2,
string columnTestSpec3,
public StatisticsDlg(IList<WaterMeter> waterMeters, StatisticsOptionsDlg options,
DateTime startDate, DateTime endDate)
{
InitializeComponent();
this.waterMeters = waterMeters;
this.options = options;
if (!string.IsNullOrEmpty(Program.LocalSettings.TimePeriodFormat) && (startDate != new DateTime(0)) && (endDate != new DateTime(0)))
{
title = string.Format(Program.LocalSettings.TimePeriodFormat, startDate, endDate);
@@ -66,26 +45,6 @@ namespace ResultsBrowser.Forms
closeButton.Text = Strings.OkBtnText;
printButton.Text = Strings.Print;
this.waterMeters = waterMeters;
this.twoDim = twoDim;
this.rowItem = rowItem;
this.rowItem2 = rowItem2;
this.rowItem3 = rowItem3;
this.columnItem = columnItem;
this.columnItem2 = columnItem2;
this.columnItem3 = columnItem3;
this.rowTestSpec = rowTestSpec;
this.rowTestSpec2 = rowTestSpec2;
this.rowTestSpec3 = rowTestSpec3;
this.columnTestSpec = columnTestSpec;
this.columnTestSpec2 = columnTestSpec2;
this.columnTestSpec3 = columnTestSpec3;
}
private void StatisticsDlg_Load(object sender, EventArgs e)
@@ -105,16 +64,16 @@ namespace ResultsBrowser.Forms
///
foreach (var wm in waterMeters)
{
string value = rowItem.Print(wm);
if (rowItem2 != null) value = value + " | " + rowItem2.Print(wm);
if (rowItem3 != null) value = value + " | " + rowItem3.Print(wm);
string value = options.RowItem.Print(wm);
if (options.RowItem2 != null) value = value + " | " + options.RowItem2.Print(wm);
if (options.RowItem3 != null) value = value + " | " + options.RowItem3.Print(wm);
if (!rowValues.Contains(value)) rowValues.Add(value);
if (twoDim)
if (options.TwoDim)
{
value = columnItem.Print(wm);
if (columnItem2 != null) value = value + " | " + columnItem2.Print(wm);
if (columnItem3 != null) value = value + " | " + columnItem3.Print(wm);
value = options.ColumnItem.Print(wm);
if (options.ColumnItem2 != null) value = value + " | " + options.ColumnItem2.Print(wm);
if (options.ColumnItem3 != null) value = value + " | " + options.ColumnItem3.Print(wm);
if (!columnValues.Contains(value)) columnValues.Add(value);
}
}
@@ -129,17 +88,17 @@ namespace ResultsBrowser.Forms
{
for (int row = 0; row < rowValues.Count; row++)
{
string rowValue = rowItem.Print(wm);
if (rowItem2 != null) rowValue = rowValue + " | " + rowItem2.Print(wm);
if (rowItem3 != null) rowValue = rowValue + " | " + rowItem3.Print(wm);
string rowValue = options.RowItem.Print(wm);
if (options.RowItem2 != null) rowValue = rowValue + " | " + options.RowItem2.Print(wm);
if (options.RowItem3 != null) rowValue = rowValue + " | " + options.RowItem3.Print(wm);
if (twoDim)
if (options.TwoDim)
{
for (int column = 0; column < columnsCount; column++)
{
string columnValue = columnItem.Print(wm);
if (columnItem2 != null) columnValue = columnValue + " | " + columnItem2.Print(wm);
if (columnItem3 != null) columnValue = columnValue + " | " + columnItem3.Print(wm);
string columnValue = options.ColumnItem.Print(wm);
if (options.ColumnItem2 != null) columnValue = columnValue + " | " + options.ColumnItem2.Print(wm);
if (options.ColumnItem3 != null) columnValue = columnValue + " | " + options.ColumnItem3.Print(wm);
if (rowValue == rowValues[row] && columnValue == columnValues[column])
{
@@ -164,7 +123,7 @@ namespace ResultsBrowser.Forms
statisticsListView.Columns.Add(" ", 200);
for (int column = 0; column < columnsCount; column++)
{
statisticsListView.Columns.Add((twoDim ? columnValues[column] : Strings.Count), 70);
statisticsListView.Columns.Add((options.TwoDim ? columnValues[column] : Strings.Count), 70);
}
for (int row = 0; row < rowValues.Count; row++)
@@ -197,7 +156,7 @@ namespace ResultsBrowser.Forms
table[0, 0] = string.Empty;
for (int column = 0; column < columnsCount; column++)
{
table[0, column + 1] = (twoDim ? columnValues[column] : Strings.Count);
table[0, column + 1] = (options.TwoDim ? columnValues[column] : Strings.Count);
}
for (int row = 0; row < rowValues.Count; row++)
@@ -234,7 +193,7 @@ namespace ResultsBrowser.Forms
{
using (TextWriter writer = new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8))
{
if (twoDim)
if (options.TwoDim)
{
/// Write column headers
for (int i = 0; i < columnValues.Count; i++)
@@ -245,7 +204,7 @@ namespace ResultsBrowser.Forms
}
else
{
writer.WriteLine(string.Format("\"{0}\";\"{1}\"", rowItem.Caption, Strings.Count));
writer.WriteLine(string.Format("\"{0}\";\"{1}\"", options.RowItem.Caption, Strings.Count));
}
int nrColumns = Math.Max(1, columnValues.Count);
+4 -1
View File
@@ -1,4 +1,7 @@
using System;
///
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using ResultsBrowser.Resources;
+2 -2
View File
@@ -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.1140.0")]
[assembly: AssemblyFileVersion("2.18.1140.0")]
[assembly: AssemblyVersion("2.18.1146.0")]
[assembly: AssemblyFileVersion("2.18.1146.0")]
+3
View File
@@ -240,4 +240,7 @@
<data name="Add_data_from_Oracle" xml:space="preserve">
<value>Dohledej údaje z Oracle</value>
</data>
<data name="Histograms" xml:space="preserve">
<value>Histogramy</value>
</data>
</root>
+3
View File
@@ -828,4 +828,7 @@
<data name="Add_data_from_Oracle" xml:space="preserve">
<value>Add data from Oracle</value>
</data>
<data name="Histograms" xml:space="preserve">
<value>Histograms</value>
</data>
</root>
+9
View File
@@ -1257,6 +1257,15 @@ namespace ResultsBrowser.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Histograms.
/// </summary>
internal static string Histograms {
get {
return ResourceManager.GetString("Histograms", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Horizontally.
/// </summary>
+30 -2
View File
@@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;FEWA_50</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;FEWA_50</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -60,6 +60,7 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms.DataVisualization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -133,6 +134,24 @@
<Compile Include="Forms\DatabaseSettingsDlg.Designer.cs">
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
</Compile>
<Compile Include="Forms\HistogramCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\HistogramCtrl.Designer.cs">
<DependentUpon>HistogramCtrl.cs</DependentUpon>
</Compile>
<Compile Include="Forms\HistogramDlg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\HistogramDlg.Designer.cs">
<DependentUpon>HistogramDlg.cs</DependentUpon>
</Compile>
<Compile Include="Forms\HistogramOptionsDlg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\HistogramOptionsDlg.Designer.cs">
<DependentUpon>HistogramOptionsDlg.cs</DependentUpon>
</Compile>
<Compile Include="Forms\NoBenchOrDatabaseDlg.cs">
<SubType>Form</SubType>
</Compile>
@@ -202,6 +221,15 @@
<EmbeddedResource Include="Forms\DatabaseSettingsDlg.resx">
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\HistogramCtrl.resx">
<DependentUpon>HistogramCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\HistogramDlg.resx">
<DependentUpon>HistogramDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\HistogramOptionsDlg.resx">
<DependentUpon>HistogramOptionsDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\NoBenchOrDatabaseDlg.resx">
<DependentUpon>NoBenchOrDatabaseDlg.cs</DependentUpon>
</EmbeddedResource>
+76 -35
View File
@@ -34,10 +34,13 @@
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.groupBox1 = new System.Windows.Forms.GroupBox();
this.histogramBtn = new System.Windows.Forms.Button();
this.statisticsBtn = new System.Windows.Forms.Button();
this.printQueryResultsBtn = new System.Windows.Forms.Button();
this.outputGroupBox = new System.Windows.Forms.GroupBox();
this.exportQueryResultsBtn = new System.Windows.Forms.Button();
this.printQueryResultsBtn = new System.Windows.Forms.Button();
this.printerConfigBtn = 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();
@@ -62,6 +65,8 @@
this.hSplitContainer.SuspendLayout();
this.filtersGroupBox.SuspendLayout();
this.resultsGroupBox.SuspendLayout();
this.groupBox1.SuspendLayout();
this.outputGroupBox.SuspendLayout();
this.testBenchesGroupBox.SuspendLayout();
this.SuspendLayout();
//
@@ -79,10 +84,9 @@
//
// vSplitContainer.Panel2
//
this.vSplitContainer.Panel2.Controls.Add(this.groupBox1);
this.vSplitContainer.Panel2.Controls.Add(this.outputGroupBox);
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);
@@ -154,6 +158,68 @@
this.resultsListView.UseCompatibleStateImageBehavior = false;
this.resultsListView.View = System.Windows.Forms.View.Details;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.histogramBtn);
this.groupBox1.Controls.Add(this.statisticsBtn);
this.groupBox1.Location = new System.Drawing.Point(8, 608);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(125, 93);
this.groupBox1.TabIndex = 13;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Analysis";
//
// histogramBtn
//
this.histogramBtn.Location = new System.Drawing.Point(5, 55);
this.histogramBtn.Name = "histogramBtn";
this.histogramBtn.Size = new System.Drawing.Size(114, 32);
this.histogramBtn.TabIndex = 11;
this.histogramBtn.Text = "Histograms";
this.histogramBtn.UseVisualStyleBackColor = true;
this.histogramBtn.Click += new System.EventHandler(this.histogramBtn_Click);
//
// statisticsBtn
//
this.statisticsBtn.Location = new System.Drawing.Point(5, 18);
this.statisticsBtn.Name = "statisticsBtn";
this.statisticsBtn.Size = new System.Drawing.Size(114, 32);
this.statisticsBtn.TabIndex = 10;
this.statisticsBtn.Text = "Statistics";
this.statisticsBtn.UseVisualStyleBackColor = true;
this.statisticsBtn.Click += new System.EventHandler(this.statisticsBtn_Click);
//
// outputGroupBox
//
this.outputGroupBox.Controls.Add(this.exportQueryResultsBtn);
this.outputGroupBox.Controls.Add(this.printQueryResultsBtn);
this.outputGroupBox.Location = new System.Drawing.Point(8, 509);
this.outputGroupBox.Name = "outputGroupBox";
this.outputGroupBox.Size = new System.Drawing.Size(125, 93);
this.outputGroupBox.TabIndex = 12;
this.outputGroupBox.TabStop = false;
this.outputGroupBox.Text = "Output";
//
// exportQueryResultsBtn
//
this.exportQueryResultsBtn.Location = new System.Drawing.Point(5, 18);
this.exportQueryResultsBtn.Name = "exportQueryResultsBtn";
this.exportQueryResultsBtn.Size = new System.Drawing.Size(114, 32);
this.exportQueryResultsBtn.TabIndex = 8;
this.exportQueryResultsBtn.Text = "Export query results";
this.exportQueryResultsBtn.UseVisualStyleBackColor = true;
this.exportQueryResultsBtn.Click += new System.EventHandler(this.exportQueryResultsBtn_Click);
//
// printQueryResultsBtn
//
this.printQueryResultsBtn.Location = new System.Drawing.Point(5, 55);
this.printQueryResultsBtn.Name = "printQueryResultsBtn";
this.printQueryResultsBtn.Size = new System.Drawing.Size(113, 32);
this.printQueryResultsBtn.TabIndex = 9;
this.printQueryResultsBtn.Text = "Print query results";
this.printQueryResultsBtn.UseVisualStyleBackColor = true;
this.printQueryResultsBtn.Click += new System.EventHandler(this.printQueryResultsBtn_Click);
//
// printerConfigBtn
//
this.printerConfigBtn.Location = new System.Drawing.Point(8, 316);
@@ -164,36 +230,6 @@
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);
@@ -370,6 +406,8 @@
this.hSplitContainer.ResumeLayout(false);
this.filtersGroupBox.ResumeLayout(false);
this.resultsGroupBox.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.outputGroupBox.ResumeLayout(false);
this.testBenchesGroupBox.ResumeLayout(false);
this.testBenchesGroupBox.PerformLayout();
this.ResumeLayout(false);
@@ -402,5 +440,8 @@
private System.Windows.Forms.RadioButton checkBox4;
private System.Windows.Forms.Button printerConfigBtn;
private System.Windows.Forms.RadioButton checkBox6;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox outputGroupBox;
private System.Windows.Forms.Button histogramBtn;
}
}
+26 -8
View File
@@ -1,4 +1,7 @@
using System;
///
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
@@ -489,7 +492,7 @@ namespace ResultsBrowser
IList<Results.WMeterRsltItemSpec> items = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
///
/// Enter options
/// Statistics options
///
Forms.StatisticsOptionsDlg optionsDlg = new Forms.StatisticsOptionsDlg(items);
if (optionsDlg.ShowDialog() != DialogResult.OK) return;
@@ -497,16 +500,31 @@ namespace ResultsBrowser
///
/// Calculate statistics
///
Forms.StatisticsDlg statisticsDlg = new Forms.StatisticsDlg(waterMeters, optionsDlg.TwoDim,
optionsDlg.RowItem, optionsDlg.RowItem2, optionsDlg.RowItem3,
optionsDlg.ColumnItem, optionsDlg.ColumnItem2, optionsDlg.ColumnItem3,
optionsDlg.RowTestSpecifier, optionsDlg.RowTestSpecifier2, optionsDlg.RowTestSpecifier3,
optionsDlg.ColumnTestSpecifier, optionsDlg.ColumnTestSpecifier2, optionsDlg.ColumnTestSpecifier3,
timePeriodStart, timePeriodEnd);
Forms.StatisticsDlg statisticsDlg = new Forms.StatisticsDlg(waterMeters, optionsDlg, timePeriodStart, timePeriodEnd);
statisticsDlg.ShowDialog();
}
private void histogramBtn_Click(object sender, EventArgs e)
{
if (waterMeters == null || waterMeters.Count == 0) return;
IList<Results.WMeterRsltItemSpec> items = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
///
/// Histogram options
///
Forms.HistogramOptionsDlg optionsDlg = new Forms.HistogramOptionsDlg(items);
if (optionsDlg.ShowDialog() != DialogResult.OK) return;
///
/// Calculate and display histograms
///
Forms.HistogramDlg histogramDlg = new Forms.HistogramDlg(waterMeters, optionsDlg, "Histogramy");
histogramDlg.ShowDialog();
}
/// <summary>
/// Updates component factory
/// </summary>
+128 -58
View File
@@ -18,7 +18,6 @@ namespace Statistics
[XmlRootAttribute("Statistics")]
public class LocalSettings
{
public const int BenchesCount = 6;
public const int FlowsCount = 5;
@@ -47,115 +46,166 @@ namespace Statistics
return ((ConnectionStrings != null) && (i >= 0) && (i < ConnectionStrings.Length)) ? ConnectionStrings[i] : string.Empty;
}
///
/// MID-s
///
public string[] MidNames;
///
/// 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)
public bool[] FlowEnabledI5;
public bool[] FlowEnabledI6;
public bool[] FlowEnabledI7;
/// <summary>
/// Get flow enabled info
/// </summary>
/// <param name="midId">1-based MID id</param>
/// <param name="i">0-based flow id</param>
/// <returns>true = enabled</returns>
public bool GetFlowEnabled(int 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;
case 1: return ((FlowEnabledI1 != null) && (i >= 0) && (i < FlowEnabledI1.Length)) ? FlowEnabledI1[i] : false;
case 2: return ((FlowEnabledI2 != null) && (i >= 0) && (i < FlowEnabledI2.Length)) ? FlowEnabledI2[i] : false;
case 3: return ((FlowEnabledI3 != null) && (i >= 0) && (i < FlowEnabledI3.Length)) ? FlowEnabledI3[i] : false;
case 4: return ((FlowEnabledI4 != null) && (i >= 0) && (i < FlowEnabledI4.Length)) ? FlowEnabledI4[i] : false;
case 5: return ((FlowEnabledI5 != null) && (i >= 0) && (i < FlowEnabledI5.Length)) ? FlowEnabledI5[i] : false;
case 6: return ((FlowEnabledI6 != null) && (i >= 0) && (i < FlowEnabledI6.Length)) ? FlowEnabledI6[i] : false;
case 7: return ((FlowEnabledI7 != null) && (i >= 0) && (i < FlowEnabledI7.Length)) ? FlowEnabledI7[i] : false;
default:
return false;
}
}
///
public void SetFlowEnabled(UserControls.MidId midId, int i, bool value)
/// <summary>
/// Set flow enabled info
/// </summary>
/// <param name="midId">1-based MID id</param>
/// <param name="i">0-based flow id</param>
/// <param name="value">true = enabled</param>
public void SetFlowEnabled(int 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;
case 1: if ((FlowEnabledI1 != null) && (i >= 0) && (i < FlowEnabledI1.Length)) { FlowEnabledI1[i] = value; }; break;
case 2: if ((FlowEnabledI2 != null) && (i >= 0) && (i < FlowEnabledI2.Length)) { FlowEnabledI2[i] = value; }; break;
case 3: if ((FlowEnabledI3 != null) && (i >= 0) && (i < FlowEnabledI3.Length)) { FlowEnabledI3[i] = value; }; break;
case 4: if ((FlowEnabledI4 != null) && (i >= 0) && (i < FlowEnabledI4.Length)) { FlowEnabledI4[i] = value; }; break;
case 5: if ((FlowEnabledI5 != null) && (i >= 0) && (i < FlowEnabledI5.Length)) { FlowEnabledI5[i] = value; }; break;
case 6: if ((FlowEnabledI6 != null) && (i >= 0) && (i < FlowEnabledI6.Length)) { FlowEnabledI6[i] = value; }; break;
case 7: if ((FlowEnabledI7 != null) && (i >= 0) && (i < FlowEnabledI7.Length)) { FlowEnabledI7[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)
public double[] FlowFromI5;
public double[] FlowFromI6;
public double[] FlowFromI7;
/// <summary>
/// Get lower limit of the flow
/// </summary>
/// <param name="midId">1-based MID id</param>
/// <param name="i">0-based flow id</param>
/// <returns>Flow in m3/h</returns>
public double GetFlowFrom(int 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;
case 1: return ((FlowFromI1 != null) && (i >= 0) && (i < FlowFromI1.Length)) ? FlowFromI1[i] : 0;
case 2: return ((FlowFromI2 != null) && (i >= 0) && (i < FlowFromI2.Length)) ? FlowFromI2[i] : 0;
case 3: return ((FlowFromI3 != null) && (i >= 0) && (i < FlowFromI3.Length)) ? FlowFromI3[i] : 0;
case 4: return ((FlowFromI4 != null) && (i >= 0) && (i < FlowFromI4.Length)) ? FlowFromI4[i] : 0;
case 5: return ((FlowFromI5 != null) && (i >= 0) && (i < FlowFromI5.Length)) ? FlowFromI5[i] : 0;
case 6: return ((FlowFromI6 != null) && (i >= 0) && (i < FlowFromI6.Length)) ? FlowFromI6[i] : 0;
case 7: return ((FlowFromI7 != null) && (i >= 0) && (i < FlowFromI7.Length)) ? FlowFromI7[i] : 0;
default:
return 0;
}
}
///
public void SetFlowFrom(UserControls.MidId midId, int i, double value)
/// <summary>
/// Set lower limit of the flow
/// </summary>
/// <param name="midId">1-based MID id</param>
/// <param name="i">0-based flow id</param>
/// <param name="value">Flow in m3/h</param>
public void SetFlowFrom(int 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;
case 1: if ((FlowFromI1 != null) && (i >= 0) && (i < FlowFromI1.Length)) { FlowFromI1[i] = value; }; break;
case 2: if ((FlowFromI2 != null) && (i >= 0) && (i < FlowFromI2.Length)) { FlowFromI2[i] = value; }; break;
case 3: if ((FlowFromI3 != null) && (i >= 0) && (i < FlowFromI3.Length)) { FlowFromI3[i] = value; }; break;
case 4: if ((FlowFromI4 != null) && (i >= 0) && (i < FlowFromI4.Length)) { FlowFromI4[i] = value; }; break;
case 5: if ((FlowFromI5 != null) && (i >= 0) && (i < FlowFromI5.Length)) { FlowFromI5[i] = value; }; break;
case 6: if ((FlowFromI6 != null) && (i >= 0) && (i < FlowFromI6.Length)) { FlowFromI6[i] = value; }; break;
case 7: if ((FlowFromI7 != null) && (i >= 0) && (i < FlowFromI7.Length)) { FlowFromI7[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)
public double[] FlowToI5;
public double[] FlowToI6;
public double[] FlowToI7;
/// <summary>
/// Get upper limit of the flow
/// </summary>
/// <param name="midId">1-based MID id</param>
/// <param name="i">0-based flow id</param>
/// <returns>Flow in m3/h</returns>
public double GetFlowTo(int 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;
case 1: return ((FlowToI1 != null) && (i >= 0) && (i < FlowToI1.Length)) ? FlowToI1[i] : 0;
case 2: return ((FlowToI2 != null) && (i >= 0) && (i < FlowToI2.Length)) ? FlowToI2[i] : 0;
case 3: return ((FlowToI3 != null) && (i >= 0) && (i < FlowToI3.Length)) ? FlowToI3[i] : 0;
case 4: return ((FlowToI4 != null) && (i >= 0) && (i < FlowToI4.Length)) ? FlowToI4[i] : 0;
case 5: return ((FlowToI5 != null) && (i >= 0) && (i < FlowToI5.Length)) ? FlowToI5[i] : 0;
case 6: return ((FlowToI6 != null) && (i >= 0) && (i < FlowToI6.Length)) ? FlowToI6[i] : 0;
case 7: return ((FlowToI7 != null) && (i >= 0) && (i < FlowToI7.Length)) ? FlowToI7[i] : 0;
default:
return 0;
}
}
///
public void SetFlowTo(UserControls.MidId midId, int i, double value)
/// <summary>
/// Set upper limit of the flow
/// </summary>
/// <param name="midId">1-based MID id</param>
/// <param name="i">0-based flow id</param>
/// <param name="value">Flow in m3/h</param>
public void SetFlowTo(int 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;
case 1: if ((FlowToI1 != null) && (i >= 0) && (i < FlowToI1.Length)) { FlowToI1[i] = value; }; break;
case 2: if ((FlowToI2 != null) && (i >= 0) && (i < FlowToI2.Length)) { FlowToI2[i] = value; }; break;
case 3: if ((FlowToI3 != null) && (i >= 0) && (i < FlowToI3.Length)) { FlowToI3[i] = value; }; break;
case 4: if ((FlowToI4 != null) && (i >= 0) && (i < FlowToI4.Length)) { FlowToI4[i] = value; }; break;
case 5: if ((FlowToI5 != null) && (i >= 0) && (i < FlowToI5.Length)) { FlowToI5[i] = value; }; break;
case 6: if ((FlowToI6 != null) && (i >= 0) && (i < FlowToI6.Length)) { FlowToI6[i] = value; }; break;
case 7: if ((FlowToI7 != null) && (i >= 0) && (i < FlowToI7.Length)) { FlowToI7[i] = value; }; break;
default:
break;
}
@@ -180,6 +230,18 @@ namespace Statistics
/// </summary>
public LocalSettings()
{
#if GENESIS
Language = "DE";
BenchNames = new string[] { "Genesis" };
ConnectionStrings = new string[]
{
"SERVER=localhost; DATABASE=genesis-r; UID=root; PASSWORD=; CHARSET=utf8;",
};
MidNames = new string[] { string.Empty, "I11", "I12", "I2", "I3", "I4", "I5" }; /// Index is MID-id
#else
Language = "SK";
BenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "PT7" };
@@ -194,23 +256,31 @@ namespace Statistics
"SERVER=10.42.129.26; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
};
FlowEnabledWMs = new bool[FlowsCount];
MidNames = new string[] { string.Empty, "I1", "I2", "I3", "I4" }; /// Index is MID-id
#endif
FlowEnabledI1 = new bool[FlowsCount];
FlowEnabledI2 = new bool[FlowsCount];
FlowEnabledI3 = new bool[FlowsCount];
FlowEnabledI4 = new bool[FlowsCount];
FlowEnabledI5 = new bool[FlowsCount];
FlowEnabledI6 = new bool[FlowsCount];
FlowEnabledI7 = new bool[FlowsCount];
FlowFromWMs = new double[FlowsCount];
FlowFromI1 = new double[FlowsCount];
FlowFromI2 = new double[FlowsCount];
FlowFromI3 = new double[FlowsCount];
FlowFromI4 = new double[FlowsCount];
FlowFromI5 = new double[FlowsCount];
FlowFromI6 = new double[FlowsCount];
FlowFromI7 = new double[FlowsCount];
FlowToWMs = new double[FlowsCount];
FlowToI1 = new double[FlowsCount];
FlowToI2 = new double[FlowsCount];
FlowToI3 = new double[FlowsCount];
FlowToI4 = new double[FlowsCount];
FlowToI5 = new double[FlowsCount];
FlowToI6 = new double[FlowsCount];
FlowToI7 = new double[FlowsCount];
SelectedRadioButtonNumber = 1;
}
+2 -2
View File
@@ -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.1108.0")]
[assembly: AssemblyFileVersion("2.18.1108.0")]
[assembly: AssemblyVersion("2.18.1154.0")]
[assembly: AssemblyFileVersion("2.18.1154.0")]
-1
View File
@@ -80,7 +80,6 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UserControls\Enums.cs" />
<Compile Include="UserControls\MidOrWaterMetersCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
+2 -134
View File
@@ -39,27 +39,11 @@
this.dateTimeFromPicker = new System.Windows.Forms.DateTimePicker();
this.dateTimeToPicker = new System.Windows.Forms.DateTimePicker();
this.midsTabControl = new System.Windows.Forms.TabControl();
this.wr10TabPage = new System.Windows.Forms.TabPage();
this.wmsBenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
this.wr11TabPage = new System.Windows.Forms.TabPage();
this.i1BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
this.wr13TabPage = new System.Windows.Forms.TabPage();
this.i2BbenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
this.wr14TabPage = new System.Windows.Forms.TabPage();
this.i3BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
this.wr15TabPage = new System.Windows.Forms.TabPage();
this.i4BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.timePeriodGroupBox.SuspendLayout();
this.midsTabControl.SuspendLayout();
this.wr10TabPage.SuspendLayout();
this.wr11TabPage.SuspendLayout();
this.wr13TabPage.SuspendLayout();
this.wr14TabPage.SuspendLayout();
this.wr15TabPage.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
@@ -177,11 +161,6 @@
//
// midsTabControl
//
this.midsTabControl.Controls.Add(this.wr10TabPage);
this.midsTabControl.Controls.Add(this.wr11TabPage);
this.midsTabControl.Controls.Add(this.wr13TabPage);
this.midsTabControl.Controls.Add(this.wr14TabPage);
this.midsTabControl.Controls.Add(this.wr15TabPage);
this.midsTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.midsTabControl.Location = new System.Drawing.Point(0, 0);
this.midsTabControl.Name = "midsTabControl";
@@ -189,101 +168,6 @@
this.midsTabControl.Size = new System.Drawing.Size(1368, 732);
this.midsTabControl.TabIndex = 0;
//
// wr10TabPage
//
this.wr10TabPage.Controls.Add(this.wmsBenchesControl);
this.wr10TabPage.Location = new System.Drawing.Point(4, 22);
this.wr10TabPage.Name = "wr10TabPage";
this.wr10TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr10TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr10TabPage.TabIndex = 0;
this.wr10TabPage.Text = "Water meters";
this.wr10TabPage.UseVisualStyleBackColor = true;
//
// wmsBenchesControl
//
this.wmsBenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wmsBenchesControl.Location = new System.Drawing.Point(3, 3);
this.wmsBenchesControl.Name = "wmsBenchesControl";
this.wmsBenchesControl.Size = new System.Drawing.Size(1354, 700);
this.wmsBenchesControl.TabIndex = 0;
//
// wr11TabPage
//
this.wr11TabPage.Controls.Add(this.i1BenchesControl);
this.wr11TabPage.Location = new System.Drawing.Point(4, 22);
this.wr11TabPage.Name = "wr11TabPage";
this.wr11TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr11TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr11TabPage.TabIndex = 1;
this.wr11TabPage.Text = "I1";
this.wr11TabPage.UseVisualStyleBackColor = true;
//
// i1BenchesControl
//
this.i1BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.i1BenchesControl.Location = new System.Drawing.Point(3, 3);
this.i1BenchesControl.Name = "i1BenchesControl";
this.i1BenchesControl.Size = new System.Drawing.Size(1354, 700);
this.i1BenchesControl.TabIndex = 0;
//
// wr13TabPage
//
this.wr13TabPage.Controls.Add(this.i2BbenchesControl);
this.wr13TabPage.Location = new System.Drawing.Point(4, 22);
this.wr13TabPage.Name = "wr13TabPage";
this.wr13TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr13TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr13TabPage.TabIndex = 2;
this.wr13TabPage.Text = "I2";
this.wr13TabPage.UseVisualStyleBackColor = true;
//
// i2BbenchesControl
//
this.i2BbenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.i2BbenchesControl.Location = new System.Drawing.Point(3, 3);
this.i2BbenchesControl.Name = "i2BbenchesControl";
this.i2BbenchesControl.Size = new System.Drawing.Size(1354, 700);
this.i2BbenchesControl.TabIndex = 0;
//
// wr14TabPage
//
this.wr14TabPage.Controls.Add(this.i3BenchesControl);
this.wr14TabPage.Location = new System.Drawing.Point(4, 22);
this.wr14TabPage.Name = "wr14TabPage";
this.wr14TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr14TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr14TabPage.TabIndex = 3;
this.wr14TabPage.Text = "I3";
this.wr14TabPage.UseVisualStyleBackColor = true;
//
// i3BenchesControl
//
this.i3BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.i3BenchesControl.Location = new System.Drawing.Point(3, 3);
this.i3BenchesControl.Name = "i3BenchesControl";
this.i3BenchesControl.Size = new System.Drawing.Size(1354, 700);
this.i3BenchesControl.TabIndex = 0;
//
// wr15TabPage
//
this.wr15TabPage.Controls.Add(this.i4BenchesControl);
this.wr15TabPage.Location = new System.Drawing.Point(4, 22);
this.wr15TabPage.Name = "wr15TabPage";
this.wr15TabPage.Padding = new System.Windows.Forms.Padding(3);
this.wr15TabPage.Size = new System.Drawing.Size(1360, 706);
this.wr15TabPage.TabIndex = 4;
this.wr15TabPage.Text = "I4";
this.wr15TabPage.UseVisualStyleBackColor = true;
//
// i4BenchesControl
//
this.i4BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.i4BenchesControl.Location = new System.Drawing.Point(3, 3);
this.i4BenchesControl.Name = "i4BenchesControl";
this.i4BenchesControl.Size = new System.Drawing.Size(1354, 700);
this.i4BenchesControl.TabIndex = 0;
//
// StatisticsDlg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -291,7 +175,7 @@
this.ClientSize = new System.Drawing.Size(1368, 826);
this.Controls.Add(this.splitContainer1);
this.Name = "StatisticsDlg";
this.Text = "Statistics";
this.Text = "MID Statistics";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.StatisticsDlg_FormClosing);
this.Load += new System.EventHandler(this.StatisticsDlg_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
@@ -301,12 +185,6 @@
this.splitContainer1.ResumeLayout(false);
this.timePeriodGroupBox.ResumeLayout(false);
this.timePeriodGroupBox.PerformLayout();
this.midsTabControl.ResumeLayout(false);
this.wr10TabPage.ResumeLayout(false);
this.wr11TabPage.ResumeLayout(false);
this.wr13TabPage.ResumeLayout(false);
this.wr14TabPage.ResumeLayout(false);
this.wr15TabPage.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -314,26 +192,16 @@
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TabControl midsTabControl;
private System.Windows.Forms.TabPage wr10TabPage;
private System.Windows.Forms.TabPage wr11TabPage;
private System.Windows.Forms.TabPage wr13TabPage;
private System.Windows.Forms.TabPage wr14TabPage;
private System.Windows.Forms.TabPage wr15TabPage;
private System.Windows.Forms.GroupBox timePeriodGroupBox;
private System.Windows.Forms.DateTimePicker dateTimeFromPicker;
private System.Windows.Forms.DateTimePicker dateTimeToPicker;
private System.Windows.Forms.Label toLabel1;
private System.Windows.Forms.Label fromLabel1;
private UserControls.MidOrWaterMetersCtrl wmsBenchesControl;
private UserControls.MidOrWaterMetersCtrl i1BenchesControl;
private UserControls.MidOrWaterMetersCtrl i2BbenchesControl;
private UserControls.MidOrWaterMetersCtrl i3BenchesControl;
private UserControls.MidOrWaterMetersCtrl i4BenchesControl;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton4;
private System.Windows.Forms.TabControl midsTabControl;
}
}
+32 -24
View File
@@ -24,7 +24,7 @@ namespace Statistics
{
public partial class StatisticsDlg : Form
{
static ISessionFactory[] sessionFactories = new ISessionFactory[LocalSettings.BenchesCount];
static ISessionFactory[] sessionFactories = new ISessionFactory[Program.LocalSettings.ConnectionStrings.Length];
public StatisticsDlg()
@@ -33,14 +33,19 @@ namespace Statistics
///ManageCheckGroupBox(timePeriodCheckBox, timePeriodGroupBox);
for (MidId midId = 0; midId < MidId.Count; midId++)
for (int midId = 1; midId < Program.LocalSettings.MidNames.Length; midId++)
{
int i = (int)midId;
midsTabControl.TabPages[i].Text = midId.ToString();
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).MidId = midId;
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).Parent = this;
TabPage tp = new TabPage();
tp.Text = Program.LocalSettings.MidNames[midId];
MidOrWaterMetersCtrl ctrl = new MidOrWaterMetersCtrl();
ctrl.MidId = midId;
ctrl.Parent = this;
ctrl.Dock = DockStyle.Fill;
tp.Controls.Add(ctrl);
midsTabControl.TabPages.Add(tp);
}
midsTabControl.TabPages[0].Text = Strings.Water_meters;
radioButton1.Checked = true;
timePeriodGroupBox.Enabled = false;
@@ -50,7 +55,7 @@ namespace Statistics
void Localize()
{
Text = Strings.Statistics;
Text = string.Format("MID {0}", Strings.Statistics);
//timePeriodCheckBox.Text = Strings.Time_period;
fromLabel1.Text = Strings.From;
toLabel1.Text = Strings.To;
@@ -76,12 +81,12 @@ namespace Statistics
case 4: radioButton4.Checked = true; break;
}
for (int i = 0; i < (int)MidId.Count; i++)
for (int i = 1; i < Program.LocalSettings.MidNames.Length; i++)
{
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).Data2UI();
(midsTabControl.TabPages[i - 1].Controls[0] as MidOrWaterMetersCtrl).Data2UI();
}
for (int i = 0; i < LocalSettings.BenchesCount; i++)
for (int i = 0; i < Program.LocalSettings.ConnectionStrings.Length; i++)
{
if (!string.IsNullOrEmpty(Program.LocalSettings.GetConnectionString(i)))
{
@@ -128,18 +133,18 @@ namespace Statistics
//}
public IList<TestRslt> UpdateRequest(int benchId, MidId midId)
/// <summary>
/// Called by a child form.
/// Reads and returns results from DB required by the child form to update it's content.
/// </summary>
/// <param name="benchId">0-based bench Id.</param>
/// <param name="midId">1-based MID Id.</param>
/// <returns>Required test results</returns>
public IList<TestRslt> UpdateRequest(int benchId, int midId)
{
if ((benchId < 0) || (benchId >= LocalSettings.BenchesCount) || (sessionFactories[benchId] == null) || (midId == MidId.WaterMeters))
if ((benchId < 0) || (benchId >= Program.LocalSettings.BenchNames.Length) || (sessionFactories[benchId] == null))
{
if (midId == MidId.WaterMeters)
{
MessageBox.Show("Loading statistics of water meters is not implemented yet");
}
else
{
MessageBox.Show(string.Format("Cannot load statistics of {0}", Program.LocalSettings.GetBenchName(benchId)));
}
MessageBox.Show(string.Format("Cannot load statistics of {0}", Program.LocalSettings.GetBenchName(benchId)));
return null;
}
@@ -164,7 +169,7 @@ namespace Statistics
{
ISession session = sessionFactories[benchId].OpenSession();
var listOfComponentsWithFlowmeter = session.QueryOver<Components>()
.Where(x => (x.Flowmeter == midId.ToString()))
.Where(x => (x.Flowmeter == Program.LocalSettings.MidNames[midId]))
.List();
IList<TestRslt> testRslts = new List<TestRslt>();
foreach (var cmpnts in listOfComponentsWithFlowmeter)
@@ -248,9 +253,12 @@ namespace Statistics
else if (radioButton4.Checked) ls.SelectedRadioButtonNumber = 4;
else ls.SelectedRadioButtonNumber = 0;
for (int i = 0; i < (int)MidId.Count; i++)
for (int i = 1; i < Math.Min(Program.LocalSettings.MidNames.Length, midsTabControl.TabPages.Count + 1); i++)
{
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).UI2Data();
if (midsTabControl.TabPages[i - 1].Controls.Count > 0 && midsTabControl.TabPages[i - 1].Controls[0] is MidOrWaterMetersCtrl)
{
(midsTabControl.TabPages[i - 1].Controls[0] as MidOrWaterMetersCtrl).UI2Data();
}
}
ls.Save();
-18
View File
@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Statistics.UserControls
{
public enum MidId
{
/// When converted to 'int' it's the MID number, 0 = water meters
WaterMeters,
I1,
I2,
I3,
I4,
Count
}
}
+230 -384
View File
@@ -29,6 +29,26 @@
private void InitializeComponent()
{
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.flow5GroupBox = new System.Windows.Forms.GroupBox();
this.flow5ToExclamation = new System.Windows.Forms.Label();
this.flow5FromExclamation = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.toLabel6 = new System.Windows.Forms.Label();
this.fromLabel6 = new System.Windows.Forms.Label();
this.flow5ToTextBox = new System.Windows.Forms.TextBox();
this.flow5FromTextBox = new System.Windows.Forms.TextBox();
this.flow5CheckBox = new System.Windows.Forms.CheckBox();
this.flow4GroupBox = new System.Windows.Forms.GroupBox();
this.flow4ToExclamation = new System.Windows.Forms.Label();
this.flow4FromExclamation = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.toLabel5 = new System.Windows.Forms.Label();
this.fromLabel5 = new System.Windows.Forms.Label();
this.flow4ToTextBox = new System.Windows.Forms.TextBox();
this.flow4FromTextBox = new System.Windows.Forms.TextBox();
this.flow4CheckBox = new System.Windows.Forms.CheckBox();
this.flow3GroupBox = new System.Windows.Forms.GroupBox();
this.flow3ToExclamation = new System.Windows.Forms.Label();
this.flow3FromExclamation = new System.Windows.Forms.Label();
@@ -60,54 +80,15 @@
this.flow1FromTextBox = new System.Windows.Forms.TextBox();
this.flow1CheckBox = new System.Windows.Forms.CheckBox();
this.benchesTabControl = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.tabPage6 = new System.Windows.Forms.TabPage();
this.flow4GroupBox = new System.Windows.Forms.GroupBox();
this.flow4ToExclamation = new System.Windows.Forms.Label();
this.flow4FromExclamation = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.toLabel5 = new System.Windows.Forms.Label();
this.fromLabel5 = new System.Windows.Forms.Label();
this.flow4ToTextBox = new System.Windows.Forms.TextBox();
this.flow4FromTextBox = new System.Windows.Forms.TextBox();
this.flow4CheckBox = new System.Windows.Forms.CheckBox();
this.flow5GroupBox = new System.Windows.Forms.GroupBox();
this.flow5ToExclamation = new System.Windows.Forms.Label();
this.flow5FromExclamation = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.toLabel6 = new System.Windows.Forms.Label();
this.fromLabel6 = new System.Windows.Forms.Label();
this.flow5ToTextBox = new System.Windows.Forms.TextBox();
this.flow5FromTextBox = new System.Windows.Forms.TextBox();
this.flow5CheckBox = new System.Windows.Forms.CheckBox();
this.wr10StatisticsCtrl1 = new Statistics.UserControls.StatisticsCtrl();
this.wr11StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
this.wr13StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
this.wr14StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
this.wr15StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
this.pt7StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.flow5GroupBox.SuspendLayout();
this.flow4GroupBox.SuspendLayout();
this.flow3GroupBox.SuspendLayout();
this.flow2GroupBox.SuspendLayout();
this.flow1GroupBox.SuspendLayout();
this.benchesTabControl.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.tabPage4.SuspendLayout();
this.tabPage5.SuspendLayout();
this.tabPage6.SuspendLayout();
this.flow4GroupBox.SuspendLayout();
this.flow5GroupBox.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
@@ -134,6 +115,210 @@
this.splitContainer1.SplitterDistance = 90;
this.splitContainer1.TabIndex = 0;
//
// flow5GroupBox
//
this.flow5GroupBox.Controls.Add(this.flow5ToExclamation);
this.flow5GroupBox.Controls.Add(this.flow5FromExclamation);
this.flow5GroupBox.Controls.Add(this.label9);
this.flow5GroupBox.Controls.Add(this.label10);
this.flow5GroupBox.Controls.Add(this.toLabel6);
this.flow5GroupBox.Controls.Add(this.fromLabel6);
this.flow5GroupBox.Controls.Add(this.flow5ToTextBox);
this.flow5GroupBox.Controls.Add(this.flow5FromTextBox);
this.flow5GroupBox.Controls.Add(this.flow5CheckBox);
this.flow5GroupBox.Location = new System.Drawing.Point(939, 7);
this.flow5GroupBox.Name = "flow5GroupBox";
this.flow5GroupBox.Size = new System.Drawing.Size(221, 77);
this.flow5GroupBox.TabIndex = 8;
this.flow5GroupBox.TabStop = false;
//
// flow5ToExclamation
//
this.flow5ToExclamation.AutoSize = true;
this.flow5ToExclamation.ForeColor = System.Drawing.Color.Red;
this.flow5ToExclamation.Location = new System.Drawing.Point(167, 48);
this.flow5ToExclamation.Name = "flow5ToExclamation";
this.flow5ToExclamation.Size = new System.Drawing.Size(10, 13);
this.flow5ToExclamation.TabIndex = 9;
this.flow5ToExclamation.Text = "!";
this.flow5ToExclamation.Visible = false;
//
// flow5FromExclamation
//
this.flow5FromExclamation.AutoSize = true;
this.flow5FromExclamation.ForeColor = System.Drawing.Color.Red;
this.flow5FromExclamation.Location = new System.Drawing.Point(167, 24);
this.flow5FromExclamation.Name = "flow5FromExclamation";
this.flow5FromExclamation.Size = new System.Drawing.Size(10, 13);
this.flow5FromExclamation.TabIndex = 8;
this.flow5FromExclamation.Text = "!";
this.flow5FromExclamation.Visible = false;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(178, 48);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(32, 13);
this.label9.TabIndex = 6;
this.label9.Text = "m3/h";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(177, 23);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(32, 13);
this.label10.TabIndex = 5;
this.label10.Text = "m3/h";
//
// toLabel6
//
this.toLabel6.AutoSize = true;
this.toLabel6.Location = new System.Drawing.Point(14, 48);
this.toLabel6.Name = "toLabel6";
this.toLabel6.Size = new System.Drawing.Size(20, 13);
this.toLabel6.TabIndex = 4;
this.toLabel6.Text = "To";
//
// fromLabel6
//
this.fromLabel6.AutoSize = true;
this.fromLabel6.Location = new System.Drawing.Point(14, 23);
this.fromLabel6.Name = "fromLabel6";
this.fromLabel6.Size = new System.Drawing.Size(30, 13);
this.fromLabel6.TabIndex = 3;
this.fromLabel6.Text = "From";
//
// flow5ToTextBox
//
this.flow5ToTextBox.Location = new System.Drawing.Point(65, 45);
this.flow5ToTextBox.Name = "flow5ToTextBox";
this.flow5ToTextBox.Size = new System.Drawing.Size(100, 20);
this.flow5ToTextBox.TabIndex = 2;
this.flow5ToTextBox.TextChanged += new System.EventHandler(this.flow5ToTextBox_TextChanged);
//
// flow5FromTextBox
//
this.flow5FromTextBox.Location = new System.Drawing.Point(65, 20);
this.flow5FromTextBox.Name = "flow5FromTextBox";
this.flow5FromTextBox.Size = new System.Drawing.Size(100, 20);
this.flow5FromTextBox.TabIndex = 1;
this.flow5FromTextBox.TextChanged += new System.EventHandler(this.flow5FromTextBox_TextChanged);
//
// flow5CheckBox
//
this.flow5CheckBox.AutoSize = true;
this.flow5CheckBox.Location = new System.Drawing.Point(10, 0);
this.flow5CheckBox.Name = "flow5CheckBox";
this.flow5CheckBox.Size = new System.Drawing.Size(57, 17);
this.flow5CheckBox.TabIndex = 0;
this.flow5CheckBox.Text = "Flow 5";
this.flow5CheckBox.UseVisualStyleBackColor = true;
this.flow5CheckBox.CheckedChanged += new System.EventHandler(this.flow5CheckBox_CheckedChanged);
//
// flow4GroupBox
//
this.flow4GroupBox.Controls.Add(this.flow4ToExclamation);
this.flow4GroupBox.Controls.Add(this.flow4FromExclamation);
this.flow4GroupBox.Controls.Add(this.label7);
this.flow4GroupBox.Controls.Add(this.label8);
this.flow4GroupBox.Controls.Add(this.toLabel5);
this.flow4GroupBox.Controls.Add(this.fromLabel5);
this.flow4GroupBox.Controls.Add(this.flow4ToTextBox);
this.flow4GroupBox.Controls.Add(this.flow4FromTextBox);
this.flow4GroupBox.Controls.Add(this.flow4CheckBox);
this.flow4GroupBox.Location = new System.Drawing.Point(706, 7);
this.flow4GroupBox.Name = "flow4GroupBox";
this.flow4GroupBox.Size = new System.Drawing.Size(221, 77);
this.flow4GroupBox.TabIndex = 7;
this.flow4GroupBox.TabStop = false;
//
// flow4ToExclamation
//
this.flow4ToExclamation.AutoSize = true;
this.flow4ToExclamation.ForeColor = System.Drawing.Color.Red;
this.flow4ToExclamation.Location = new System.Drawing.Point(167, 48);
this.flow4ToExclamation.Name = "flow4ToExclamation";
this.flow4ToExclamation.Size = new System.Drawing.Size(10, 13);
this.flow4ToExclamation.TabIndex = 9;
this.flow4ToExclamation.Text = "!";
this.flow4ToExclamation.Visible = false;
//
// flow4FromExclamation
//
this.flow4FromExclamation.AutoSize = true;
this.flow4FromExclamation.ForeColor = System.Drawing.Color.Red;
this.flow4FromExclamation.Location = new System.Drawing.Point(167, 24);
this.flow4FromExclamation.Name = "flow4FromExclamation";
this.flow4FromExclamation.Size = new System.Drawing.Size(10, 13);
this.flow4FromExclamation.TabIndex = 8;
this.flow4FromExclamation.Text = "!";
this.flow4FromExclamation.Visible = false;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(178, 48);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(32, 13);
this.label7.TabIndex = 6;
this.label7.Text = "m3/h";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(177, 23);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(32, 13);
this.label8.TabIndex = 5;
this.label8.Text = "m3/h";
//
// toLabel5
//
this.toLabel5.AutoSize = true;
this.toLabel5.Location = new System.Drawing.Point(14, 48);
this.toLabel5.Name = "toLabel5";
this.toLabel5.Size = new System.Drawing.Size(20, 13);
this.toLabel5.TabIndex = 4;
this.toLabel5.Text = "To";
//
// fromLabel5
//
this.fromLabel5.AutoSize = true;
this.fromLabel5.Location = new System.Drawing.Point(14, 23);
this.fromLabel5.Name = "fromLabel5";
this.fromLabel5.Size = new System.Drawing.Size(30, 13);
this.fromLabel5.TabIndex = 3;
this.fromLabel5.Text = "From";
//
// flow4ToTextBox
//
this.flow4ToTextBox.Location = new System.Drawing.Point(65, 45);
this.flow4ToTextBox.Name = "flow4ToTextBox";
this.flow4ToTextBox.Size = new System.Drawing.Size(100, 20);
this.flow4ToTextBox.TabIndex = 2;
this.flow4ToTextBox.TextChanged += new System.EventHandler(this.flow4ToTextBox_TextChanged);
//
// flow4FromTextBox
//
this.flow4FromTextBox.Location = new System.Drawing.Point(65, 20);
this.flow4FromTextBox.Name = "flow4FromTextBox";
this.flow4FromTextBox.Size = new System.Drawing.Size(100, 20);
this.flow4FromTextBox.TabIndex = 1;
this.flow4FromTextBox.TextChanged += new System.EventHandler(this.flow4FromTextBox_TextChanged);
//
// flow4CheckBox
//
this.flow4CheckBox.AutoSize = true;
this.flow4CheckBox.Location = new System.Drawing.Point(10, 0);
this.flow4CheckBox.Name = "flow4CheckBox";
this.flow4CheckBox.Size = new System.Drawing.Size(57, 17);
this.flow4CheckBox.TabIndex = 0;
this.flow4CheckBox.Text = "Flow 4";
this.flow4CheckBox.UseVisualStyleBackColor = true;
this.flow4CheckBox.CheckedChanged += new System.EventHandler(this.flow4CheckBox_CheckedChanged);
//
// flow3GroupBox
//
this.flow3GroupBox.Controls.Add(this.flow3ToExclamation);
@@ -442,12 +627,6 @@
//
// benchesTabControl
//
this.benchesTabControl.Controls.Add(this.tabPage1);
this.benchesTabControl.Controls.Add(this.tabPage2);
this.benchesTabControl.Controls.Add(this.tabPage3);
this.benchesTabControl.Controls.Add(this.tabPage4);
this.benchesTabControl.Controls.Add(this.tabPage5);
this.benchesTabControl.Controls.Add(this.tabPage6);
this.benchesTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.benchesTabControl.Location = new System.Drawing.Point(0, 0);
this.benchesTabControl.Name = "benchesTabControl";
@@ -455,320 +634,6 @@
this.benchesTabControl.Size = new System.Drawing.Size(1202, 356);
this.benchesTabControl.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.wr10StatisticsCtrl1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1194, 330);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "WR10";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.wr11StatisticsCtrl);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1194, 330);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "WR11";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.wr13StatisticsCtrl);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(1194, 330);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "WR13";
this.tabPage3.UseVisualStyleBackColor = true;
//
// tabPage4
//
this.tabPage4.Controls.Add(this.wr14StatisticsCtrl);
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(1194, 330);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "WR14";
this.tabPage4.UseVisualStyleBackColor = true;
//
// tabPage5
//
this.tabPage5.Controls.Add(this.wr15StatisticsCtrl);
this.tabPage5.Location = new System.Drawing.Point(4, 22);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Size = new System.Drawing.Size(1194, 330);
this.tabPage5.TabIndex = 4;
this.tabPage5.Text = "WR15";
this.tabPage5.UseVisualStyleBackColor = true;
//
// tabPage6
//
this.tabPage6.Controls.Add(this.pt7StatisticsCtrl);
this.tabPage6.Location = new System.Drawing.Point(4, 22);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Size = new System.Drawing.Size(1194, 330);
this.tabPage6.TabIndex = 5;
this.tabPage6.Text = "PT7";
this.tabPage6.UseVisualStyleBackColor = true;
//
// flow4GroupBox
//
this.flow4GroupBox.Controls.Add(this.flow4ToExclamation);
this.flow4GroupBox.Controls.Add(this.flow4FromExclamation);
this.flow4GroupBox.Controls.Add(this.label7);
this.flow4GroupBox.Controls.Add(this.label8);
this.flow4GroupBox.Controls.Add(this.toLabel5);
this.flow4GroupBox.Controls.Add(this.fromLabel5);
this.flow4GroupBox.Controls.Add(this.flow4ToTextBox);
this.flow4GroupBox.Controls.Add(this.flow4FromTextBox);
this.flow4GroupBox.Controls.Add(this.flow4CheckBox);
this.flow4GroupBox.Location = new System.Drawing.Point(706, 7);
this.flow4GroupBox.Name = "flow4GroupBox";
this.flow4GroupBox.Size = new System.Drawing.Size(221, 77);
this.flow4GroupBox.TabIndex = 7;
this.flow4GroupBox.TabStop = false;
//
// flow4ToExclamation
//
this.flow4ToExclamation.AutoSize = true;
this.flow4ToExclamation.ForeColor = System.Drawing.Color.Red;
this.flow4ToExclamation.Location = new System.Drawing.Point(167, 48);
this.flow4ToExclamation.Name = "flow4ToExclamation";
this.flow4ToExclamation.Size = new System.Drawing.Size(10, 13);
this.flow4ToExclamation.TabIndex = 9;
this.flow4ToExclamation.Text = "!";
this.flow4ToExclamation.Visible = false;
//
// flow4FromExclamation
//
this.flow4FromExclamation.AutoSize = true;
this.flow4FromExclamation.ForeColor = System.Drawing.Color.Red;
this.flow4FromExclamation.Location = new System.Drawing.Point(167, 24);
this.flow4FromExclamation.Name = "flow4FromExclamation";
this.flow4FromExclamation.Size = new System.Drawing.Size(10, 13);
this.flow4FromExclamation.TabIndex = 8;
this.flow4FromExclamation.Text = "!";
this.flow4FromExclamation.Visible = false;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(178, 48);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(32, 13);
this.label7.TabIndex = 6;
this.label7.Text = "m3/h";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(177, 23);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(32, 13);
this.label8.TabIndex = 5;
this.label8.Text = "m3/h";
//
// toLabel5
//
this.toLabel5.AutoSize = true;
this.toLabel5.Location = new System.Drawing.Point(14, 48);
this.toLabel5.Name = "toLabel5";
this.toLabel5.Size = new System.Drawing.Size(20, 13);
this.toLabel5.TabIndex = 4;
this.toLabel5.Text = "To";
//
// fromLabel5
//
this.fromLabel5.AutoSize = true;
this.fromLabel5.Location = new System.Drawing.Point(14, 23);
this.fromLabel5.Name = "fromLabel5";
this.fromLabel5.Size = new System.Drawing.Size(30, 13);
this.fromLabel5.TabIndex = 3;
this.fromLabel5.Text = "From";
//
// flow4ToTextBox
//
this.flow4ToTextBox.Location = new System.Drawing.Point(65, 45);
this.flow4ToTextBox.Name = "flow4ToTextBox";
this.flow4ToTextBox.Size = new System.Drawing.Size(100, 20);
this.flow4ToTextBox.TabIndex = 2;
this.flow4ToTextBox.TextChanged += new System.EventHandler(this.flow4ToTextBox_TextChanged);
//
// flow4FromTextBox
//
this.flow4FromTextBox.Location = new System.Drawing.Point(65, 20);
this.flow4FromTextBox.Name = "flow4FromTextBox";
this.flow4FromTextBox.Size = new System.Drawing.Size(100, 20);
this.flow4FromTextBox.TabIndex = 1;
this.flow4FromTextBox.TextChanged += new System.EventHandler(this.flow4FromTextBox_TextChanged);
//
// flow4CheckBox
//
this.flow4CheckBox.AutoSize = true;
this.flow4CheckBox.Location = new System.Drawing.Point(10, 0);
this.flow4CheckBox.Name = "flow4CheckBox";
this.flow4CheckBox.Size = new System.Drawing.Size(57, 17);
this.flow4CheckBox.TabIndex = 0;
this.flow4CheckBox.Text = "Flow 4";
this.flow4CheckBox.UseVisualStyleBackColor = true;
this.flow4CheckBox.CheckedChanged += new System.EventHandler(this.flow4CheckBox_CheckedChanged);
//
// flow5GroupBox
//
this.flow5GroupBox.Controls.Add(this.flow5ToExclamation);
this.flow5GroupBox.Controls.Add(this.flow5FromExclamation);
this.flow5GroupBox.Controls.Add(this.label9);
this.flow5GroupBox.Controls.Add(this.label10);
this.flow5GroupBox.Controls.Add(this.toLabel6);
this.flow5GroupBox.Controls.Add(this.fromLabel6);
this.flow5GroupBox.Controls.Add(this.flow5ToTextBox);
this.flow5GroupBox.Controls.Add(this.flow5FromTextBox);
this.flow5GroupBox.Controls.Add(this.flow5CheckBox);
this.flow5GroupBox.Location = new System.Drawing.Point(939, 7);
this.flow5GroupBox.Name = "flow5GroupBox";
this.flow5GroupBox.Size = new System.Drawing.Size(221, 77);
this.flow5GroupBox.TabIndex = 8;
this.flow5GroupBox.TabStop = false;
//
// flow5ToExclamation
//
this.flow5ToExclamation.AutoSize = true;
this.flow5ToExclamation.ForeColor = System.Drawing.Color.Red;
this.flow5ToExclamation.Location = new System.Drawing.Point(167, 48);
this.flow5ToExclamation.Name = "flow5ToExclamation";
this.flow5ToExclamation.Size = new System.Drawing.Size(10, 13);
this.flow5ToExclamation.TabIndex = 9;
this.flow5ToExclamation.Text = "!";
this.flow5ToExclamation.Visible = false;
//
// flow5FromExclamation
//
this.flow5FromExclamation.AutoSize = true;
this.flow5FromExclamation.ForeColor = System.Drawing.Color.Red;
this.flow5FromExclamation.Location = new System.Drawing.Point(167, 24);
this.flow5FromExclamation.Name = "flow5FromExclamation";
this.flow5FromExclamation.Size = new System.Drawing.Size(10, 13);
this.flow5FromExclamation.TabIndex = 8;
this.flow5FromExclamation.Text = "!";
this.flow5FromExclamation.Visible = false;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(178, 48);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(32, 13);
this.label9.TabIndex = 6;
this.label9.Text = "m3/h";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(177, 23);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(32, 13);
this.label10.TabIndex = 5;
this.label10.Text = "m3/h";
//
// toLabel6
//
this.toLabel6.AutoSize = true;
this.toLabel6.Location = new System.Drawing.Point(14, 48);
this.toLabel6.Name = "toLabel6";
this.toLabel6.Size = new System.Drawing.Size(20, 13);
this.toLabel6.TabIndex = 4;
this.toLabel6.Text = "To";
//
// fromLabel6
//
this.fromLabel6.AutoSize = true;
this.fromLabel6.Location = new System.Drawing.Point(14, 23);
this.fromLabel6.Name = "fromLabel6";
this.fromLabel6.Size = new System.Drawing.Size(30, 13);
this.fromLabel6.TabIndex = 3;
this.fromLabel6.Text = "From";
//
// flow5ToTextBox
//
this.flow5ToTextBox.Location = new System.Drawing.Point(65, 45);
this.flow5ToTextBox.Name = "flow5ToTextBox";
this.flow5ToTextBox.Size = new System.Drawing.Size(100, 20);
this.flow5ToTextBox.TabIndex = 2;
this.flow5ToTextBox.TextChanged += new System.EventHandler(this.flow5ToTextBox_TextChanged);
//
// flow5FromTextBox
//
this.flow5FromTextBox.Location = new System.Drawing.Point(65, 20);
this.flow5FromTextBox.Name = "flow5FromTextBox";
this.flow5FromTextBox.Size = new System.Drawing.Size(100, 20);
this.flow5FromTextBox.TabIndex = 1;
this.flow5FromTextBox.TextChanged += new System.EventHandler(this.flow5FromTextBox_TextChanged);
//
// flow5CheckBox
//
this.flow5CheckBox.AutoSize = true;
this.flow5CheckBox.Location = new System.Drawing.Point(10, 0);
this.flow5CheckBox.Name = "flow5CheckBox";
this.flow5CheckBox.Size = new System.Drawing.Size(57, 17);
this.flow5CheckBox.TabIndex = 0;
this.flow5CheckBox.Text = "Flow 5";
this.flow5CheckBox.UseVisualStyleBackColor = true;
this.flow5CheckBox.CheckedChanged += new System.EventHandler(this.flow5CheckBox_CheckedChanged);
//
// wr10StatisticsCtrl1
//
this.wr10StatisticsCtrl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr10StatisticsCtrl1.Location = new System.Drawing.Point(3, 3);
this.wr10StatisticsCtrl1.Name = "wr10StatisticsCtrl1";
this.wr10StatisticsCtrl1.Size = new System.Drawing.Size(1188, 324);
this.wr10StatisticsCtrl1.TabIndex = 0;
//
// wr11StatisticsCtrl
//
this.wr11StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr11StatisticsCtrl.Location = new System.Drawing.Point(3, 3);
this.wr11StatisticsCtrl.Name = "wr11StatisticsCtrl";
this.wr11StatisticsCtrl.Size = new System.Drawing.Size(1188, 324);
this.wr11StatisticsCtrl.TabIndex = 0;
//
// wr13StatisticsCtrl
//
this.wr13StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr13StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
this.wr13StatisticsCtrl.Name = "wr13StatisticsCtrl";
this.wr13StatisticsCtrl.Size = new System.Drawing.Size(1194, 330);
this.wr13StatisticsCtrl.TabIndex = 0;
//
// wr14StatisticsCtrl
//
this.wr14StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr14StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
this.wr14StatisticsCtrl.Name = "wr14StatisticsCtrl";
this.wr14StatisticsCtrl.Size = new System.Drawing.Size(1194, 330);
this.wr14StatisticsCtrl.TabIndex = 0;
//
// wr15StatisticsCtrl
//
this.wr15StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.wr15StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
this.wr15StatisticsCtrl.Name = "wr15StatisticsCtrl";
this.wr15StatisticsCtrl.Size = new System.Drawing.Size(1194, 330);
this.wr15StatisticsCtrl.TabIndex = 0;
//
// pt7StatisticsCtrl
//
this.pt7StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.pt7StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
this.pt7StatisticsCtrl.Name = "pt7StatisticsCtrl";
this.pt7StatisticsCtrl.Size = new System.Drawing.Size(1194, 330);
this.pt7StatisticsCtrl.TabIndex = 0;
//
// MidOrWaterMetersCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -780,23 +645,16 @@
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.flow5GroupBox.ResumeLayout(false);
this.flow5GroupBox.PerformLayout();
this.flow4GroupBox.ResumeLayout(false);
this.flow4GroupBox.PerformLayout();
this.flow3GroupBox.ResumeLayout(false);
this.flow3GroupBox.PerformLayout();
this.flow2GroupBox.ResumeLayout(false);
this.flow2GroupBox.PerformLayout();
this.flow1GroupBox.ResumeLayout(false);
this.flow1GroupBox.PerformLayout();
this.benchesTabControl.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.tabPage4.ResumeLayout(false);
this.tabPage5.ResumeLayout(false);
this.tabPage6.ResumeLayout(false);
this.flow4GroupBox.ResumeLayout(false);
this.flow4GroupBox.PerformLayout();
this.flow5GroupBox.ResumeLayout(false);
this.flow5GroupBox.PerformLayout();
this.ResumeLayout(false);
}
@@ -805,18 +663,6 @@
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TabControl benchesTabControl;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.TabPage tabPage6;
private StatisticsCtrl wr10StatisticsCtrl1;
private StatisticsCtrl wr11StatisticsCtrl;
private StatisticsCtrl wr13StatisticsCtrl;
private StatisticsCtrl wr14StatisticsCtrl;
private StatisticsCtrl wr15StatisticsCtrl;
private StatisticsCtrl pt7StatisticsCtrl;
private System.Windows.Forms.GroupBox flow3GroupBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
@@ -13,7 +13,7 @@ namespace Statistics.UserControls
{
public partial class MidOrWaterMetersCtrl : UserControl
{
public MidId MidId;
public int MidId; /// 1-based MID Id.
public StatisticsDlg Parent;
@@ -96,14 +96,16 @@ namespace Statistics.UserControls
ManageCheckGroupBox(flow4CheckBox, flow4GroupBox);
ManageCheckGroupBox(flow5CheckBox, flow5GroupBox);
for (int i = 0; i < benchesTabControl.TabPages.Count; i++ )
for (int i = 0; i < Program.LocalSettings.BenchNames.Length; i++)
{
TabPage tp = benchesTabControl.TabPages[i];
if ((tp.Controls.Count > 0) && (tp.Controls[0] is StatisticsCtrl))
{
(tp.Controls[0] as StatisticsCtrl).Id = i;
(tp.Controls[0] as StatisticsCtrl).MidCtrl = this;
}
TabPage tp = new TabPage();
tp.Text = Program.LocalSettings.BenchNames[i];
StatisticsCtrl statistics = new StatisticsCtrl();
statistics.Id = i;
statistics.MidCtrl = this;
statistics.Dock = DockStyle.Fill;
tp.Controls.Add(statistics);
benchesTabControl.TabPages.Add(tp);
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ namespace TBF.BenchControl.Elde
EnduranceCycleStop = 13,
}
#if FUZHOU_300 || IZRAEL_200 || TORINO_50 || BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || TURA_IPERL || TURA_SPECIAL || BADGER_VELKA_TRAT || PUCHONG_200 || SLM_50 || GENESIS || MALTA_WSD25 || SLM_END || WARSAW_END || BERLIN || SLM_150 || PETERSBURG_50 || PETERSBURG_200 || KEMPNO_50 || BAHRAIN_50 || RUM_MOB || KRAKOW_50 || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || SENTEC || FUZHOU_100 || CEVAK_200 || IZRAEL_50
#if FUZHOU_300 || IZRAEL_200 || TORINO_50 || BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || TURA_IPERL || TURA_SPECIAL || BADGER_VELKA_TRAT || PUCHONG_200 || SLM_50 || GENESIS || MALTA_WSD25 || SLM_END || WARSAW_END || BERLIN || SLM_150 || PETERSBURG_50 || PETERSBURG_200 || DEWA_300 || KEMPNO_50 || BAHRAIN_50 || RUM_MOB || KRAKOW_50 || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || SENTEC || FUZHOU_100 || CEVAK_200 || IZRAEL_50
public enum StatusP : ulong
{
RefFlowMeterMask = 0x7, /// bits 0,1,2
+12 -1
View File
@@ -122,8 +122,12 @@ namespace TBF.BenchControl.Elde
/// Initialization data updated by constructors of children components
/// and sent to 'controlCom2panel' by SendCalibData() method.
///
#if DEWA_300
public float[,] TempCalibData = new float[16, 5];
#else
public float[,] TempCalibData = new float[8, 5];
public uint[] DiverterEdge; /// Created and initialized in this.Initialize()
#endif
public uint[] DiverterEdge; /// Created and initialized in this.Initialize()
public byte MeretProtocol = 0;
// Array length is the reference flowmeters count plus one
@@ -138,6 +142,13 @@ namespace TBF.BenchControl.Elde
{100,500}, {100,500}, {100,500}, {100,500} };
public byte[] MeretRS485Address = new byte[4];
public float[] EtCalib = new float[7] { 1, 1, 1, 1, 1, 1, 1 };
#elif DEWA_300
public uint[,] RegValveCalib = new uint[16, 2] { {100,500}, {100,500}, {100,500}, {100,500},
{100,500}, {100,500}, {100,500}, {100,500},
{100,500}, {100,500}, {100,500}, {100,500},
{100,500}, {100,500}, {100,500}, {100,500} };
public byte[] MeretRS485Address = new byte[4];
public float[] EtCalib = new float[8] { 1, 1, 1, 1, 1, 1, 1, 1 };
#elif MUNICH || TORINO_50 || BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || TORUN_50 || CEVAK_40 || TURA_IPERL || TURA_SPECIAL || MURES_40 || FUZHOU_50 || SLM_50 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || KRAKOW_50 || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || FUZHOU_100
public uint[,] RegValveCalib = new uint[8,2] {{100,500},{100,500},{100,500},{100,500},{100,500},{100,500},{100,500},{100,500}};
public byte[] MeretRS485Address = new byte[4];
+7 -7
View File
@@ -56,13 +56,13 @@ namespace TBF.BenchControl.Elde
public float Pressure(int prsNr0) { return ctrlBrdComponent.pressure[prsNr0]; }
public float Temperature(int tmpNr0) { return ctrlBrdComponent.temperature[tmpNr0]; }
public RegulValveState RegulValveState(int rvNr1) { return (RegulValveState)ctrlBrdComponent.rValveStatus[rvNr1 - 1]; }
#if GENESIS || BERLIN || PETERSBURG_200
#if GENESIS || BERLIN || PETERSBURG_200 || DEWA_300
public UInt128 RRoute { get { return ((UInt128)ctrlBrdComponent.rRouteH << 64) | (UInt128)ctrlBrdComponent.rRoute; } }
#else
public UInt128 RRoute { get { return ctrlBrdComponent.rRoute; } }
#endif
#if GENESIS || KEMPNO_50 || KRAKOW_50 || BAHRAIN_50 || BADGER_STREDNA_TRAT || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || SENTEC || FUZHOU_100 || CEVAK_200 || IZRAEL_50
#if GENESIS || KEMPNO_50 || KRAKOW_50 || BAHRAIN_50 || BADGER_STREDNA_TRAT || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || SENTEC || FUZHOU_100 || CEVAK_200 || IZRAEL_50 || DEWA_300
public uint DivTime(int id) { return ctrlBrdComponent.divTime[id]; }
public void SetDivLimit(int divNo, uint limLoPct, uint limHiPct)
{
@@ -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
@@ -353,7 +353,7 @@ namespace TBF.BenchControl.Elde
bool bit39 = (route & 0x00FC000000000000) != 0; /// true if any of bits 50 through 55 is set
route = route & 0xFF03FFFFFFFFFFFF;
if (bit39) route = route | 0x0000008000000000;
#elif PETERSBURG_200
#elif PETERSBURG_200 || DEWA_300
///
/// The following code deals with the situation that all pumps share bit #80.
/// In settings the bits of pumps should be sent as follows: P1=64, P2=65, P3=66, P4=67 and P5=68
@@ -388,7 +388,7 @@ namespace TBF.BenchControl.Elde
uint[] pulsesArr = new uint[] { (uint)totalRefPulses, (uint)massRefPulses };
ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)(route & (UInt128)0xFFFFFFFFFFFFFFFF), (ulong)(route >> 64), pulsesArr, (uint)testMethods,
Convert.ToSingle(filterConstants[0]), fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
#elif GENESIS
#elif GENESIS || DEWA_300
uint[] pulsesArr = new uint[] { (uint)totalRefPulses, (uint)massRefPulses };
ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)(route & (UInt128)0xFFFFFFFFFFFFFFFF), (ulong)(route >> 64), pulsesArr, (uint)testMethods,
filterConstants, fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
@@ -74,6 +74,7 @@ namespace TBF.BenchControl.Elde.Diverter
if (divertersSoFar != null)
{
for (int i = 0; i < divertersSoFar.Length; i++) Diverters[i] = divertersSoFar[i];
}
Diverters[nextIdx - 1] = this;
@@ -107,6 +108,8 @@ namespace TBF.BenchControl.Elde.Diverter
flowMtrNr4Cmd = divNrFromName;
#elif CEVAK_200
flowMtrNr4Cmd = (divNrFromName == 4) ? 5 : divNrFromName;
#elif DEWA_300
flowMtrNr4Cmd = divNrFromName + 2; /// Div1: 1,2,3, Div2: 4, Div3: 5, Div4: 6, Div5: 7
#else
flowMtrNr4Cmd = (divNrFromName == 1) ? 1 : 3;
#endif
@@ -58,7 +58,9 @@ namespace TBF.BenchControl.Elde.PressureMeter
/// <returns>Pressure in mBar</returns>
public float ReadPressure()
{
return (float)Config.Units.ConvertFrom(Config.Unit.kPa, ControlBoard.Pressure(Idx0));
double rawPressure = Config.Units.ConvertFrom(Config.Unit.kPa, ControlBoard.Pressure(Idx0));
double correctedPressure = Config.Formulas.CorrectedValue(rawPressure, Corrections);
return (float)correctedPressure;
}
@@ -0,0 +1,15 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.GenericDevices
{
public interface IParallelOutput : IComponent
{
IOperation SetOutputsOp(ushort outValue);
IOperation ShowBenchWaitingOp();
IOperation ShowBenchErrorOp();
}
}
@@ -63,8 +63,8 @@ namespace TBF.BenchControl.Keithley.Multimeter_2010_RS232
}
/// <summary>
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
/// Connection settings: 19200 Bd 8-bits No-parity 1-stop-bit Flow control: none or hardware.
/// Keithley mulltimeter connected via serial interface (RS232)
/// Connection settings: 9600Bd 8-bits no-parity 1-stop-bit flow control: none
/// </summary>
public Multimeter(Generic.IComponentCfg cfg)
: base(cfg)
+40 -15
View File
@@ -28,6 +28,7 @@ namespace TBF.BenchControl.Modbus.Common
/// Private fields
SerialPort serialPort;
DateTime lastSerialPortWrite;
bool initialRunDeviceCommComplete;
public Queue<byte[]>[] ReceivedTelegrams
{
@@ -82,6 +83,8 @@ namespace TBF.BenchControl.Modbus.Common
//workerThread = new Thread(Worker);
//workerThread.Start();
initialRunDeviceCommComplete = false; /// Causes search for Quido RS modules in the first RunDeviceAfter() call
log.FatalFormat("{0} - Device successfully initialized", Name);
}
@@ -99,7 +102,7 @@ namespace TBF.BenchControl.Modbus.Common
Telegram.UpdateTelegramCRC(message);
if ((DateTime.Now - lastSerialPortWrite) > new TimeSpan(0, 0, 0, 0, 100))
if ((DateTime.Now - lastSerialPortWrite) > new TimeSpan(0, 0, 0, 0, 100) && initialRunDeviceCommComplete)
{
/// More then 100 ms since last 'send' --> do not enqueue the message
SendMessageNow(message);
@@ -174,12 +177,12 @@ namespace TBF.BenchControl.Modbus.Common
Debug.WriteLine(s);
log.Debug(s);
}
else
{
string s = Telegram.LogTelegram(string.Format("{0} - Invalid data received ", Name), buffer);
Debug.WriteLine(s);
log.Debug(s);
}
else
{
string s = Telegram.LogTelegram(string.Format("{0} - Invalid data received ", Name), buffer);
Debug.WriteLine(s);
log.Debug(s);
}
}
}
@@ -188,6 +191,16 @@ namespace TBF.BenchControl.Modbus.Common
{
if (serialPort == null) return;
if (!initialRunDeviceCommComplete)
{
initialRunDeviceCommComplete = true; /// Prevent 2nd invocation of the subsequent code
/// Search Quido RS modules
byte[] searchTelegram = new byte[] { 0xF8, 0x11, 0, 0 };
Telegram.UpdateTelegramCRC(searchTelegram);
SendMessageNow(searchTelegram);
}
if (telegramsToSend.Count > 0 && (DateTime.Now - lastSerialPortWrite) > new TimeSpan(0, 0, 0, 0, 500))
{
SendMessageNow(telegramsToSend.Dequeue());
@@ -197,15 +210,27 @@ namespace TBF.BenchControl.Modbus.Common
/// <summary>Stop this device</summary>
public void StopDevice()
{
if (serialPort != null)
{
//stopWorkerThread = true;
//workerThread.Join(2000);
serialPort.Close();
serialPort = null;
}
}
public void StopDevice2() { }
public void StopDevice2()
{
if (serialPort != null)
{
/// Send telegrams currently in the queue
while (telegramsToSend.Count > 0)
{
while ((DateTime.Now - lastSerialPortWrite) <= new TimeSpan(0, 0, 0, 0, 200))
{
Thread.Sleep(100);
}
SendMessageNow(telegramsToSend.Dequeue());
}
//stopWorkerThread = true;
//workerThread.Join(2000);
serialPort.Close();
serialPort = null;
}
}
}
}
@@ -33,9 +33,6 @@ namespace TBF.BenchControl.Modbus.PressureMeter.Meret
modbus = (GenericDevices.IModbus)TbfComponents.FindComponent(cfg.ParentName, components);
if (modbus == null) throw new Exception("Cannot find " + Name + " parent");
/// Connect to handler
//ModbusAddress.MeretRS485Address[Idx0] = ModbusAddress;
log.Debug(this.ToString());
}
@@ -51,7 +48,9 @@ namespace TBF.BenchControl.Modbus.PressureMeter.Meret
/// <returns>Pressure in mBar</returns>
public float ReadPressure()
{
return (float)Config.Units.ConvertFrom(Config.Unit.kPa, receivedPressure);
double rawPressure = Config.Units.ConvertFrom(Config.Unit.kPa, receivedPressure);
double correctedPressure = Config.Formulas.CorrectedValue(rawPressure, Corrections);
return (float)correctedPressure;
}
/// <summary>
@@ -0,0 +1,98 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using System.Windows.Forms;
using log4net;
using TBF.Resources;
namespace TBF.BenchControl.Modbus.QuidoRS
{
public partial class ConfirmationForm : Form
{
static readonly ILog log = LogManager.GetLogger(typeof(ConfirmationForm));
/// Set to 'true' when the form closes
public bool Completed { get { return completed; } }
bool completed;
public ConfirmationForm(string message, Color backgroundColor)
{
InitializeComponent();
Localize();
messageLabel.Text = message;
BackColor = backgroundColor;
float textWidth = Graphics.FromImage(new Bitmap(1, 1)).MeasureString(messageLabel.Text, messageLabel.Font).Width;
int rqrdFormWidth = (int)textWidth + 80; /// Form width calculated from the text width
if (rqrdFormWidth > Width)
{
int shift = (rqrdFormWidth - Width) / 2;
Width = rqrdFormWidth;
okButton.Left += shift;
}
completed = false;
StartForceCloseHandler();
}
void Localize()
{
okButton.Text = Strings.OkBtnText;
}
private void okButton_Click(object sender, EventArgs e)
{
completed = true;
Close();
}
private void MessageBoxForm_FormClosing(object sender, FormClosingEventArgs e)
{
completed = true;
}
#region Forced close handling
/// <summary>
/// Used by CoverTest, AskYesNoOp and MessageBoxOp.
/// </summary>
public void OnCloseThisForm(object sender, EventArgs args)
{
if (CloseThisFormHandler == null) return;
try
{
CloseThisFormHandler(sender, null);
}
catch (Exception e)
{
log.Error("CloseThisFormHandler(...) failed", e);
}
}
public event EventHandler<EventArgs> CloseThisFormHandler;
public void StartForceCloseHandler()
{
CloseThisFormHandler += 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
}
}
@@ -0,0 +1,85 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
namespace TBF.BenchControl.Modbus.QuidoRS
{
partial class ConfirmationForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.okButton = new System.Windows.Forms.Button();
this.messageLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// okButton
//
this.okButton.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.okButton.ForeColor = System.Drawing.Color.Black;
this.okButton.Location = new System.Drawing.Point(177, 99);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(98, 63);
this.okButton.TabIndex = 1;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// messageLabel
//
this.messageLabel.AutoSize = true;
this.messageLabel.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.messageLabel.Location = new System.Drawing.Point(34, 39);
this.messageLabel.Name = "messageLabel";
this.messageLabel.Size = new System.Drawing.Size(91, 23);
this.messageLabel.TabIndex = 4;
this.messageLabel.Text = "Message";
//
// ConfirmationForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Goldenrod;
this.ClientSize = new System.Drawing.Size(454, 201);
this.Controls.Add(this.messageLabel);
this.Controls.Add(this.okButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ConfirmationForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MessageBoxForm_FormClosing);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Label messageLabel;
}
}
@@ -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 -1
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2016 Sensus Metering Systems
/// Copyright (c) 2015-2016 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
+50 -25
View File
@@ -1,15 +1,17 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using log4net;
using TBF.BenchControl.Generic;
using TBF.Boxes;
using System.Text;
using System.Diagnostics;
namespace TBF.BenchControl.Modbus.QuidoRS
{
public class QuidoRS : ComponentBase, IDevice
public class QuidoRS : ComponentBase, IDevice, GenericDevices.IParallelOutput
{
private static readonly ILog log = LogManager.GetLogger(typeof(QuidoRS));
public override string ToString() { return string.Format("QuidoRS({0})", Cfg.ToString(1)); }
@@ -17,6 +19,8 @@ namespace TBF.BenchControl.Modbus.QuidoRS
readonly QuidoRSCfg quidoRSCfg;
readonly GenericDevices.IModbus modbus;
public QuidoVariant Variant { get { return quidoRSCfg.Variant; } }
private ushort currentOutputs;
private DateTime lastOutputsChange;
@@ -60,12 +64,22 @@ namespace TBF.BenchControl.Modbus.QuidoRS
if (modbus.ReceivedTelegrams[quidoRSCfg.ModbusAddress].Count > 0)
{
modbus.ReceivedTelegrams[quidoRSCfg.ModbusAddress].Dequeue();
byte[] telegram = modbus.ReceivedTelegrams[quidoRSCfg.ModbusAddress].Dequeue();
if ((telegram.Length >= 8) && (telegram[1] == 0x11) && (telegram[2] == telegram.Length - 5))
{
int msgLen = telegram.Length - 7;
byte modbusAddress = telegram[3];
string msg = Encoding.ASCII.GetString(telegram, 5, msgLen);
string s = string.Format("QuidoRS detected: Address={0}, Message={1}", modbusAddress, msg);
Debug.WriteLine(s);
log.Warn(s);
}
}
}
public void RunDeviceAfter() { }
public void StopDevice() { }
public void StopDevice() { SendOutputs(0); }
public void StopDevice2() { }
@@ -124,19 +138,23 @@ namespace TBF.BenchControl.Modbus.QuidoRS
private void SendOutputs(ushort outputs)
{
byte[] msg = new byte[11];
byte addr = quidoRSCfg.ModbusAddress;
byte cmd = (byte)Function.ForceMultipleCoils;
byte dataLo = (byte)(outputs & 0xFF);
byte dataHi = (byte)(outputs >> 8);
msg[0] = quidoRSCfg.ModbusAddress;
msg[1] = (byte)Function.ForceMultipleCoils;
msg[2] = 0; /// Data Hi
msg[3] = 0; /// Data Lo
msg[4] = 0; /// Nr. of coils Hi
msg[5] = 16; /// Nr. of coils Lo
msg[6] = 2; /// Byte count
msg[7] = (byte)(outputs & 0xFF); /// Output data Lo
msg[8] = (byte)(outputs >> 8); /// Output data Hi
modbus.SendMessage(msg);
if (quidoRSCfg.Variant == QuidoVariant.QuidoRS_2_16)
{
modbus.SendMessage(new byte[] { addr, cmd, 0, 0, 0, 16, 2, dataLo, dataHi, 0, 0 });
}
else if (quidoRSCfg.Variant == QuidoVariant.QuidoRS_4_4)
{
modbus.SendMessage(new byte[] { addr, cmd, 0, 0, 0, 4, 1, dataLo, 0, 0 });
}
else if (quidoRSCfg.Variant == QuidoVariant.QuidoRS_8_8)
{
modbus.SendMessage(new byte[] { addr, cmd, 0, 0, 0, 8, 1, dataLo, 0, 0 });
}
lastOutputsChange = DateTime.Now;
}
@@ -145,22 +163,29 @@ namespace TBF.BenchControl.Modbus.QuidoRS
/// <summary>
/// Events: SetOpututsDone, Error
/// </summary>
/// <param name="outValue">Reference to a variable for the pressure in Bar</param>
/// <returns>SetOutputsOp instance reference casted to IOperaton</returns>
/// <param name="outValue">Parallel output data</param>
/// <returns>SetOutputsOp operation casted to IOperaton</returns>
public IOperation SetOutputsOp(ushort outValue)
{
return new SetOutputsOp(this, outValue);
}
/// <summary>
/// Events: pressureDone, Error
/// Events: Event.None
/// </summary>
/// <param name="outValue">Reference to a variable for the pressure in Bar</param>
/// <param name="setOutputsDone">Event returned when SetOutput is done</param>
/// <returns>SetOutputsOp instance reference casted to IOperaton</returns>
public IOperation ReadPressureOp(ushort outValue, Event setOutputsDone)
/// <returns>ShowBenchWaitingOp operation casted to generic IOperaton</returns>
public IOperation ShowBenchWaitingOp()
{
return new SetOutputsOp(this, outValue, setOutputsDone);
return new ShowBenchWaitingOp(this);
}
}
/// <summary>
/// Events: Event.None
/// </summary>
/// <returns>ShowBenchErrorOp operation casted to generic IOperaton</returns>
public IOperation ShowBenchErrorOp()
{
return new ShowBenchErrorOp(this);
}
}
}
+15 -4
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2016 Sensus Metering Systems
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -9,6 +9,14 @@ using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Modbus.QuidoRS
{
public enum QuidoVariant
{
QuidoRS_2_16,
QuidoRS_4_4,
QuidoRS_8_8,
Count
}
public class QuidoRSCfg : ComponentCfgBase, Generic.IChildComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(QuidoRSCfg) })[0];
@@ -19,7 +27,8 @@ namespace TBF.BenchControl.Modbus.QuidoRS
///
/// Serialized parameters
///
public byte ModbusAddress; /// 1..255
public byte ModbusAddress; /// 1..247
public QuidoVariant Variant; /// 'QuidoRS_2_16' or 'QuidoRS_8_8'
public bool WatchdogEnabled;
public int WatchdogBitNr; /// 0..15
@@ -29,7 +38,8 @@ namespace TBF.BenchControl.Modbus.QuidoRS
Name = "QuidoRS";
ParentName = "Modbus";
ModbusAddress = 49;
WatchdogEnabled = true;
Variant = QuidoVariant.QuidoRS_2_16;
WatchdogEnabled = false;
WatchdogBitNr = 4;
}
@@ -41,9 +51,10 @@ namespace TBF.BenchControl.Modbus.QuidoRS
public string ToString(int i)
{
return string.Format("Name={0}, ModbusAddr={1}, Parent={2}",
return string.Format("Name={0}, ModbusAddress={1}, Variant={2}, Parent={2}",
Name,
ModbusAddress,
Variant,
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName));
}
}
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
///
using System;
using System.Windows.Forms;
@@ -46,6 +46,8 @@ namespace TBF.BenchControl.Modbus.QuidoRS
}
}
for (QuidoVariant v = 0; v < QuidoVariant.Count; v++) variantComboBox.Items.Add(v.ToString());
Redraw();
}
@@ -61,6 +63,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
nameTextBox.Text = config.Name;
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
modbusAddressTextBox.Text = config.ModbusAddress.ToString();
variantComboBox.Text = config.Variant.ToString();
watchdogCheckBox.Checked = config.WatchdogEnabled;
watchdogBitNrTextBox.Text = config.WatchdogBitNr.ToString();
}
@@ -70,6 +73,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
nameTextBox.Enabled = true;
parentNameComboBox.Enabled = true;
modbusAddressTextBox.Enabled = true;
variantComboBox.Enabled = true;
watchdogCheckBox.Enabled = true;
watchdogBitNrTextBox.Enabled = true;
}
@@ -84,11 +88,16 @@ namespace TBF.BenchControl.Modbus.QuidoRS
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid 'Parent Name'";
}
if (!int.TryParse(modbusAddressTextBox.Text, out dummy) || dummy < 0 || dummy > 255)
if (!int.TryParse(modbusAddressTextBox.Text, out dummy) || dummy < 1 || dummy > 247)
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Modbus Address' should be between 0 and 255";
}
if (!variantComboBox.Items.Contains(variantComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid 'Variant'";
}
if (!int.TryParse(watchdogBitNrTextBox.Text, out dummy) || dummy < 0 || dummy > 15)
{
flags |= CfgUpdateFlags.Error;
@@ -106,6 +115,10 @@ namespace TBF.BenchControl.Modbus.QuidoRS
config.Name = nameTextBox.Text;
config.ParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
config.ModbusAddress = (byte)int.Parse(modbusAddressTextBox.Text);
for (QuidoVariant v = 0; v < QuidoVariant.Count; v++)
{
if (variantComboBox.Text == v.ToString()) { config.Variant = v; break; }
}
config.WatchdogEnabled = watchdogCheckBox.Checked;
config.WatchdogBitNr = int.Parse(watchdogBitNrTextBox.Text);
+30 -6
View File
@@ -41,6 +41,8 @@ namespace TBF.BenchControl.Modbus.QuidoRS
this.watchdogCheckBox = new System.Windows.Forms.CheckBox();
this.watchdogBitNrTextBox = new System.Windows.Forms.TextBox();
this.watchdogBitNrLabel = new System.Windows.Forms.Label();
this.variantComboBox = new System.Windows.Forms.ComboBox();
this.variantLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// parentNameLabel
@@ -84,7 +86,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
this.modbusAddressLabel.Location = new System.Drawing.Point(28, 108);
this.modbusAddressLabel.Name = "modbusAddressLabel";
this.modbusAddressLabel.Size = new System.Drawing.Size(86, 13);
this.modbusAddressLabel.TabIndex = 7;
this.modbusAddressLabel.TabIndex = 5;
this.modbusAddressLabel.Text = "Modbus Address";
//
// modbusAddressTextBox
@@ -93,7 +95,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
this.modbusAddressTextBox.Location = new System.Drawing.Point(138, 105);
this.modbusAddressTextBox.Name = "modbusAddressTextBox";
this.modbusAddressTextBox.Size = new System.Drawing.Size(46, 20);
this.modbusAddressTextBox.TabIndex = 8;
this.modbusAddressTextBox.TabIndex = 6;
//
// parentNameComboBox
//
@@ -108,7 +110,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
//
this.watchdogCheckBox.AutoSize = true;
this.watchdogCheckBox.Enabled = false;
this.watchdogCheckBox.Location = new System.Drawing.Point(31, 131);
this.watchdogCheckBox.Location = new System.Drawing.Point(31, 164);
this.watchdogCheckBox.Name = "watchdogCheckBox";
this.watchdogCheckBox.Size = new System.Drawing.Size(99, 17);
this.watchdogCheckBox.TabIndex = 9;
@@ -118,7 +120,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
// watchdogBitNrTextBox
//
this.watchdogBitNrTextBox.Enabled = false;
this.watchdogBitNrTextBox.Location = new System.Drawing.Point(138, 153);
this.watchdogBitNrTextBox.Location = new System.Drawing.Point(138, 186);
this.watchdogBitNrTextBox.Name = "watchdogBitNrTextBox";
this.watchdogBitNrTextBox.Size = new System.Drawing.Size(46, 20);
this.watchdogBitNrTextBox.TabIndex = 11;
@@ -126,16 +128,36 @@ namespace TBF.BenchControl.Modbus.QuidoRS
// watchdogBitNrLabel
//
this.watchdogBitNrLabel.AutoSize = true;
this.watchdogBitNrLabel.Location = new System.Drawing.Point(28, 156);
this.watchdogBitNrLabel.Location = new System.Drawing.Point(28, 189);
this.watchdogBitNrLabel.Name = "watchdogBitNrLabel";
this.watchdogBitNrLabel.Size = new System.Drawing.Size(81, 13);
this.watchdogBitNrLabel.TabIndex = 10;
this.watchdogBitNrLabel.Text = "Watchdog bit #";
//
// variantComboBox
//
this.variantComboBox.Enabled = false;
this.variantComboBox.FormattingEnabled = true;
this.variantComboBox.Location = new System.Drawing.Point(138, 131);
this.variantComboBox.Name = "variantComboBox";
this.variantComboBox.Size = new System.Drawing.Size(130, 21);
this.variantComboBox.TabIndex = 8;
//
// variantLabel
//
this.variantLabel.AutoSize = true;
this.variantLabel.Location = new System.Drawing.Point(28, 134);
this.variantLabel.Name = "variantLabel";
this.variantLabel.Size = new System.Drawing.Size(40, 13);
this.variantLabel.TabIndex = 7;
this.variantLabel.Text = "Variant";
//
// QuidoRSCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.variantComboBox);
this.Controls.Add(this.variantLabel);
this.Controls.Add(this.watchdogBitNrTextBox);
this.Controls.Add(this.watchdogBitNrLabel);
this.Controls.Add(this.watchdogCheckBox);
@@ -147,7 +169,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.componentNameLabel);
this.Name = "QuidoRSCfgCtrl";
this.Size = new System.Drawing.Size(300, 200);
this.Size = new System.Drawing.Size(374, 268);
this.Load += new System.EventHandler(this.QuidoRSCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
@@ -166,5 +188,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
private System.Windows.Forms.CheckBox watchdogCheckBox;
private System.Windows.Forms.TextBox watchdogBitNrTextBox;
private System.Windows.Forms.Label watchdogBitNrLabel;
private System.Windows.Forms.ComboBox variantComboBox;
private System.Windows.Forms.Label variantLabel;
}
}
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Copyright (c) 2015 Sensus Slovensko a.s.
///
using System;
using log4net;
@@ -0,0 +1,88 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using log4net;
using TBF.Boxes;
using TBF.Resources;
namespace TBF.BenchControl.Modbus.QuidoRS
{
public class ShowBenchErrorOp : IOperation
{
private static readonly ILog log = LogManager.GetLogger(typeof(ShowBenchErrorOp));
public override string ToString() { return string.Format("ShowBenchErrorOp(.)"); }
const ushort BenchReadyValue = 0x01;
const ushort BenchErrorValue = 0x06;
const ushort BenchConfirmedValue = 0x02;
/// Set by the constructor
readonly QuidoRS quidoRS;
bool confirmed = false;
///
ConfirmationForm confirmationForm;
///
delegate void MessageBoxFormDlgt(ShowBenchErrorOp myRef);
///
void OpenFormDlg(ShowBenchErrorOp myRef)
{
myRef.confirmationForm = new ConfirmationForm(Strings.Mute_alarm, Color.Yellow);
confirmationForm.Show();
}
/// <summary>
/// Events: Event.None
/// </summary>
/// <param name="quidoRS">Pressure meter reference</param>
public ShowBenchErrorOp(QuidoRS quidoRS)
{
if (quidoRS == null) throw new ArgumentNullException("quidoRS");
this.quidoRS = quidoRS;
log.Debug(this.ToString());
}
/// <summary>Start this operation</summary>
public void Start()
{
log.WarnFormat("ShowBenchErrorOp.Start()");
quidoRS.SetOutputs(BenchErrorValue);
confirmed = false;
Program.MainWnd.Invoke(new MessageBoxFormDlgt(OpenFormDlg), this);
}
/// <summary>Run this operation</summary>
public Event Run()
{
if (confirmed || confirmationForm.Completed)
{
log.WarnFormat("ShowBenchWaitingOp.Run() --> Confirmed");
quidoRS.SetOutputs(BenchConfirmedValue);
confirmed = true;
confirmationForm = null;
}
return Event.None;
}
/// <summary>Stop this operation</summary>
public void Stop()
{
log.WarnFormat("ShowBenchErrorOp.Stop()");
quidoRS.SetOutputs(BenchReadyValue);
if (confirmationForm != null)
{
confirmationForm.OnCloseThisForm(this, null);
confirmationForm = null;
}
}
}
}
@@ -0,0 +1,88 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using log4net;
using TBF.Boxes;
using TBF.Resources;
namespace TBF.BenchControl.Modbus.QuidoRS
{
public class ShowBenchWaitingOp : IOperation
{
private static readonly ILog log = LogManager.GetLogger(typeof(ShowBenchWaitingOp));
public override string ToString() { return string.Format("ShowBenchWaitingOp(.)"); }
const ushort BenchReadyValue = 0x01;
const ushort BenchWaitingValue = 0x06;
const ushort BenchConfirmedValue = 0x02;
/// Set by the constructor
readonly QuidoRS quidoRS;
bool confirmed = false;
///
ConfirmationForm confirmationForm;
///
delegate void MessageBoxFormDlgt(ShowBenchWaitingOp myRef);
///
void OpenFormDlg(ShowBenchWaitingOp myRef)
{
myRef.confirmationForm = new ConfirmationForm(Strings.Mute_alarm, Color.Yellow);
confirmationForm.Show();
}
/// <summary>
/// Events: Event.None
/// </summary>
/// <param name="quidoRS">Pressure meter reference</param>
public ShowBenchWaitingOp(QuidoRS quidoRS)
{
if (quidoRS == null) throw new ArgumentNullException("quidoRS");
this.quidoRS = quidoRS;
log.Debug(this.ToString());
}
/// <summary>Start this operation</summary>
public void Start()
{
log.WarnFormat("ShowBenchWaitingOp.Start()");
quidoRS.SetOutputs(BenchWaitingValue);
confirmed = false;
Program.MainWnd.Invoke(new MessageBoxFormDlgt(OpenFormDlg), this);
}
/// <summary>Run this operation</summary>
public Event Run()
{
if (confirmed || confirmationForm.Completed)
{
log.WarnFormat("ShowBenchWaitingOp.Run() --> Confirmed");
quidoRS.SetOutputs(BenchConfirmedValue);
confirmed = true;
confirmationForm = null;
}
return Event.None;
}
/// <summary>Stop this operation</summary>
public void Stop()
{
log.WarnFormat("ShowBenchWaitingOp.Stop()");
quidoRS.SetOutputs(BenchReadyValue);
if (confirmationForm != null)
{
confirmationForm.OnCloseThisForm(this, null);
confirmationForm = null;
}
}
}
}
@@ -92,7 +92,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
"1.2.3.4",
"<multiple>",
WorkstepName,
DateTime.Now + new TimeSpan(8, 0, 0));
DateTime.Now + new TimeSpan(15, 0, 0, 0)); /// Test Bench registered for approx. 2. weeks
session.Flush();
}
}
@@ -89,7 +89,7 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
if (tr.Repeats() == 1)
{
flow = tr.FlowMean;
flow = tr.FlowVolume;
errorMaster = tr.ErrorMaster;
}
else
@@ -100,7 +100,7 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
{
if (tr2.TestDone && (tr2.TestData.Name == tr.TestData.Name))
{
flow += tr2.FlowMean;
flow += tr2.FlowVolume;
errorMaster += tr2.ErrorMaster;
count++;
}
@@ -626,14 +626,23 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
public Retv WriteResultsToDB(OracleConnection conn, Results.Entities.Batch batch, bool safeMode)
{
OracleTransaction transaction = null;
OracleTransaction transaction;
try
{
conn.Open(); /// Open the Oracle database
transaction = conn.BeginTransaction();
}
catch (Exception exc)
{
log.ErrorFormat("Results of batch {0} not written to ORACLE DB (phase 1): {1}",
batch.BatchNr, exc.Message);
conn.Close();
return Retv.Error;
}
try
{
SaveBatchData(conn, batch);
foreach (var wMtr in batch.WaterMeters)
{
@@ -641,20 +650,17 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
}
transaction.Commit();
conn.Close();
log.ErrorFormat("Results of batch {0} correctly written to ORACLE DB", batch.BatchNr);
return Retv.OK;
}
catch (Exception exc)
{
if (transaction != null) transaction.Rollback();
log.ErrorFormat("Results of batch {0} not written to ORACLE database: {1}",
batch.BatchNr, exc.Message);
transaction.Rollback();
conn.Close();
log.ErrorFormat("Results of batch {0} not written to ORACLE DB: {1}", batch.BatchNr, exc.Message);
return Retv.Error;
}
conn.Close();
return Retv.OK;
}
/// <summary>
+124 -8
View File
@@ -14,6 +14,7 @@ using TBF.BenchControl.Operations;
using TBF.BenchControl.GenericDevices;
using TBF.Boxes;
using TBF.Resources;
using System.Threading;
namespace TBF.BenchControl.Sequences
{
@@ -228,7 +229,7 @@ namespace TBF.BenchControl.Sequences
/// </summary>
/// <param name="dummyArg"></param>
/// <returns></returns>
public IList<Event> Execute(Test dummyArg)
public void Execute()
{
IList<Event> e;
Selection selection;
@@ -347,7 +348,7 @@ namespace TBF.BenchControl.Sequences
//--------------------------------------------------------------------------------------------
Bridge.OnActivity(this, Strings.Resetting_scales);
//--------------------------------------------------------------------------------------------
Bridge.Bench2UI(ButtonsEtc.StopBtnEn);
Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// Resetting scales : Enable STOP button
DoubleBox tara1 = new DoubleBox(0);
DoubleBox tara2 = new DoubleBox(0);
@@ -387,7 +388,17 @@ namespace TBF.BenchControl.Sequences
do
{
selection = MakeSelection(MKSelContext.ProcedureNotSelected);
do
{
selection = MakeSelection(MKSelContext.ProcedureNotSelected);
if (selection == Selection.Shutdown)
{
Shutdown();
return;
}
}
while (selection == Selection.Shutdown);
switch (selection)
{
case Selection.Q1: selectedTestName = "Q1"; break;
@@ -446,7 +457,7 @@ namespace TBF.BenchControl.Sequences
///
StateMachine.ControlBoard.ManualUIAllowed = !StateMachine.Procedure.ManualCtrlDisabled;
Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// Enable STOP button
Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// A new cycle started : Enable STOP button
int newBatchNr = Program.LocalSettings.BatchNr;
log.FatalFormat("New measurement session started: batch = {0}, procedure = {1}", newBatchNr, StateMachine.Procedure.Name);
@@ -1245,6 +1256,7 @@ namespace TBF.BenchControl.Sequences
//--------------------------------
State.Create("MainSeq : Procedure configuration error")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.BenchErrorOp)
.AddOperation(new Operations.MessageBoxOp("Test configration error"))
.EnterState();
do
@@ -1259,6 +1271,7 @@ namespace TBF.BenchControl.Sequences
//--------------------------------
State.Create("MainSeq : ERROR -> Closing the valves")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.BenchErrorOp)
.AddOperation(StateMachine.ControlBoard.SetValvesOp(StateMachine.DefaultValvesOpen,
StateMachine.DefaultValvesClose))
.EnterState();
@@ -1270,8 +1283,17 @@ namespace TBF.BenchControl.Sequences
//--------------------------------
State.Create("MainSeq : ERROR state")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.BenchErrorOp)
.EnterState();
while (true) StateMachine.WaitRunDevsRunOps();
do
{
e = StateMachine.WaitRunDevsRunOps();
}
while (!e.Contains(Event.UiCmdShutdown));
Shutdown(true);
return;
}
@@ -1312,7 +1334,7 @@ namespace TBF.BenchControl.Sequences
/// <returns>
/// Selection.PurgeBegin, PurgeEnd, Break, Cycle, Test, Q1, Q2, Q3 or SaveResults
/// </returns>
private Selection MakeSelection(MKSelContext context)
Selection MakeSelection(MKSelContext context)
{
log.WarnFormat("MakeSelection({0})", context);
@@ -1359,6 +1381,7 @@ namespace TBF.BenchControl.Sequences
State.Create("MainSeq : Select an activity")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.BenchWaitingOp)
.AddOperation((StateMachine.Tank1 is IScale) ? (StateMachine.Tank1 as IScale).ReadMassOp(ref mass1) : null)
.AddOperation((StateMachine.Tank2 is IScale) ? (StateMachine.Tank2 as IScale).ReadMassOp(ref mass2) : null)
.AddOperation((StateMachine.Tank3 is IScale) ? (StateMachine.Tank3 as IScale).ReadMassOp(ref mass3) : null)
@@ -1380,7 +1403,8 @@ namespace TBF.BenchControl.Sequences
if (draining3 && StateMachine.Tank3.IsEmpty()) break;
/// Quit the selection loop and leave MakeSelection()
if (e.Contains(Event.UiCmdBreak) && context == MKSelContext.InsideProcedure) return Selection.Break;
if (e.Contains(Event.UiCmdShutdown) && (context == MKSelContext.ProcedureNotSelected)) return Selection.Shutdown;
if (e.Contains(Event.UiCmdBreak) && (context == MKSelContext.InsideProcedure)) return Selection.Break;
if (e.Contains(Event.UiCmdPurgeBegin)) return Selection.PurgeBegin;
if (e.Contains(Event.UiCmdPurgeEnd)) return Selection.PurgeEnd;
if (e.Contains(Event.UiCmdStartCycle)) return Selection.Cycle;
@@ -1400,8 +1424,16 @@ namespace TBF.BenchControl.Sequences
Bridge.OnActivity(this, Strings.Error);
///------------------------------------
State.Create("MainSeq : ERROR state")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.BenchErrorOp)
.EnterState();
while (true) StateMachine.WaitRunDevsRunOps(); /// Endless loop
do
{
e = StateMachine.WaitRunDevsRunOps();
}
while (!e.Contains(Event.UiCmdShutdown));
return Selection.Shutdown;
}
else
{
@@ -1466,6 +1498,90 @@ namespace TBF.BenchControl.Sequences
}
}
void Shutdown(bool skipTankDraining = false)
{
log.WarnFormat(string.Format("Shutdown(skipTankDraining={0})", skipTankDraining));
StateMachine.MachineState = MachineState.ShuttingDown; /// TBF shut down cannot be aborted from now on
Bridge.Bench2UI(0); /// All buttons off
if (!skipTankDraining)
{
/// Drain time
int maxDrainTime = 0;
if ((StateMachine.Tank1 != null) && (StateMachine.Tank1.EmptyTimeSec > maxDrainTime)) maxDrainTime = StateMachine.Tank1.EmptyTimeSec;
if ((StateMachine.Tank2 != null) && (StateMachine.Tank2.EmptyTimeSec > maxDrainTime)) maxDrainTime = StateMachine.Tank2.EmptyTimeSec;
if ((StateMachine.Tank3 != null) && (StateMachine.Tank3.EmptyTimeSec > maxDrainTime)) maxDrainTime = StateMachine.Tank3.EmptyTimeSec;
/// Drain valves
IList<IValve> drainValves = new List<IValve>();
if (StateMachine.DrainValve1 != null) drainValves.Add(StateMachine.DrainValve1);
if (StateMachine.DrainValve2 != null) drainValves.Add(StateMachine.DrainValve2);
if (StateMachine.DrainValve3 != null) drainValves.Add(StateMachine.DrainValve3);
/// Open all drain valves
if (drainValves.Count > 0)
{
Bridge.OnActivity(this, Strings.Emptying_tank); /// Activity message
State.Create("Open all drain valves")
.AddOperation(StateMachine.ControlBoard.SetValvesOp(drainValves, null))
.EnterState();
while (StateMachine.WaitRunDevsRunOps().Contains(Event.ValvesBusy)) { }
}
/// Tank emptying valves states
bool draining1 = (StateMachine.DrainValve1 != null);
bool draining2 = (StateMachine.DrainValve2 != null);
bool draining3 = (StateMachine.DrainValve3 != null);
int drainingStartTime = StateMachine.Time;
/// Quit the following loop when time expires or all tanks are empty
while ((StateMachine.Time < drainingStartTime + maxDrainTime) && (draining1 || draining2 || draining3))
{
int remTime = drainingStartTime + maxDrainTime - StateMachine.Time;
Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", Strings.Emptying_tank, remTime / 60, "min", remTime % 60, Strings.sec));
DoubleBox mass1 = new DoubleBox();
DoubleBox mass2 = new DoubleBox();
DoubleBox mass3 = new DoubleBox();
///
State.Create("MainSeq : Reading mass")
.AddOperation(checkUiOp)
.AddOperation((StateMachine.Tank1 is IScale) ? (StateMachine.Tank1 as IScale).ReadMassOp(ref mass1) : null)
.AddOperation((StateMachine.Tank2 is IScale) ? (StateMachine.Tank2 as IScale).ReadMassOp(ref mass2) : null)
.AddOperation((StateMachine.Tank3 is IScale) ? (StateMachine.Tank3 as IScale).ReadMassOp(ref mass3) : null)
.EnterState();
while (StateMachine.WaitRunDevsRunOps().Contains(Event.Busy)) { }
if (draining1 && StateMachine.Tank1.IsEmpty()) draining1 = false;
if (draining2 && StateMachine.Tank2.IsEmpty()) draining2 = false;
if (draining3 && StateMachine.Tank3.IsEmpty()) draining3 = false;
}
/// Close all drain valves
if (drainValves.Count > 0)
{
State.Create("Close all drain valves")
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, drainValves))
.EnterState();
while (StateMachine.WaitRunDevsRunOps().Contains(Event.ValvesBusy)) { }
}
}
///
/// Shut down the state machine
///
Bridge.OnActivity(this, Strings.Shutting_down_devices); /// Activity message
State.Create("No operations").EnterState(); /// Stop all operations
StateMachine.WaitRunDevsRunOps(true);
BenchControl.StateMachine.StopDevices(); /// Stop all devices - phase 1
Thread.Sleep(100);
BenchControl.StateMachine.StopDevices2(); /// Stop all devices - phase 2
}
/// <summary>
/// Create a new empty batch results from the procedure
+1 -3
View File
@@ -171,8 +171,6 @@ namespace TBF.BenchControl
/// </summary>
public State EnterState()
{
log.Debug(this.ToString());
StopAndStartOperations(State.currentState, this);
State.currentState = this;
UiBridge.Bridge.OnStateChanged(this, State.currentState.ToString());
@@ -236,7 +234,7 @@ namespace TBF.BenchControl
}
}
log.WarnFormat("---------------( {0} )---------------", newState.ToString());
log.WarnFormat("---------------( {0} )---------------", newState);
/// Start() the operations that are in the current (new) state, but aren't in the previous state.
foreach (IOperation operation in newState.Operations)
+68 -64
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
///
using System;
using System.Text;
@@ -16,9 +16,17 @@ using TBF.Resources;
namespace TBF.BenchControl
{
public class QuitStateMachineException : Exception
{
}
public enum MachineState
{
Undefined = 0,
Disabled,
StartingUp, /// Start-up: Initialize() of all devices + start of the worker thread
FailedToStart, /// Most likely Initialize() of any device thrown an exception
Running, /// RunDeviceBefore() and RunDeviceAfter() of all devices, Start()/Run()/Stop() of operations
ShuttingDown, /// Shutdown: StopDevice() and StopDevice2() of all devices
Off, /// Off after the shutdown
}
/// <summary>
/// This class controls real test bench behavior.
@@ -45,7 +53,9 @@ namespace TBF.BenchControl
/// Public components
public static Elde.ControlBoardDev ControlBoard;
public static GenericDevices.IAmbient Ambient;
public static GenericDevices.IScaleOrTank Tank1;
public static IOperation BenchWaitingOp;
public static IOperation BenchErrorOp;
public static GenericDevices.IScaleOrTank Tank1;
public static GenericDevices.IScaleOrTank Tank2;
public static GenericDevices.IScaleOrTank Tank3;
public static GenericDevices.IValve DrainValve1;
@@ -65,11 +75,8 @@ namespace TBF.BenchControl
static DateTime startDateTime; /// DateTime of time instance when the state machine worker thread starts
static int currentTimeSec; /// Time from the start of the state machine in seconds
static bool quitStateMachine; /// flag to stop the worker thread
/// true when the state machine is running
static bool stateMachineRunning;
public static bool Running { get { return stateMachineRunning; } }
public static MachineState MachineState; /// see enum MachineState for explanation
/// Worker thread and database session
static Thread workerThread;
@@ -134,9 +141,7 @@ namespace TBF.BenchControl
{
devices = new List<IDevice>();
states = new List<State>();
currentTimeSec = 0;
quitStateMachine = false;
}
/// <summary>
@@ -241,6 +246,13 @@ namespace TBF.BenchControl
if (cmpnt is IWaterMeter) SequenceBase.WaterMeters.Add(cmpnt as IWaterMeter);
if (cmpnt is ICamera) SequenceBase.Cameras.Add(cmpnt as ICamera);
if (cmpnt is GenericDevices.IAmbient) Ambient = cmpnt as GenericDevices.IAmbient;
if (cmpnt is GenericDevices.IParallelOutput && cmpnt.Name.ToLower().Contains("tower"))
{
BenchWaitingOp = (cmpnt as GenericDevices.IParallelOutput).ShowBenchWaitingOp();
BenchErrorOp = (cmpnt as GenericDevices.IParallelOutput).ShowBenchErrorOp();
}
if (cmpnt is IScaleOrTank)
{
IScaleOrTank tank = cmpnt as IScaleOrTank;
@@ -495,13 +507,18 @@ namespace TBF.BenchControl
/// </summary>
public static void Start()
{
if (stateMachineRunning) return;
if (MachineState != MachineState.StartingUp)
{
/// Unexpected MachineState (not MachineState.StartingUp) --> prevent worker thread from starting
///
MachineState = MachineState.FailedToStart;
return;
}
workerThread = new Thread(Worker);
workerThread.CurrentCulture = Thread.CurrentThread.CurrentCulture;
workerThread.CurrentUICulture = Thread.CurrentThread.CurrentUICulture;
workerThread.Start();
stateMachineRunning = true;
}
/// <summary>
@@ -703,15 +720,6 @@ namespace TBF.BenchControl
}
/// <summary>
/// Stops the state machine (and the worker thread)
/// </summary>
public static void Stop()
{
if (stateMachineRunning) quitStateMachine = true;
}
/*
* This is and example sequence of RunDeviceBefore() / RunOperations() / RunDeviceAfter() calls
* as they are executed during normal run from the progran start to the end.
@@ -748,32 +756,32 @@ namespace TBF.BenchControl
/// </summary>
static void Worker()
{
MachineState = MachineState.Running;
startDateTime = DateTime.Now;
CycleStartTimeStamp = startDateTime; /// To prevent it is undefined
CycleStartTimeStamp = startDateTime; /// Do not leave CycleStartTimeStamp uninitialized
wlog.InfoFormat(" currentTime = {0}s startDateTime = {1}", currentTimeSec.ToString(), startDateTime.ToString());
/// Run all devices for the first time
foreach (var device in devices) device.RunDeviceBefore();
try
{
SequenceBase.ReferenceFlowmetersCount = SequenceBase.FlowMeters.Count;
SequenceBase.CalibratedLtrPerRefPulse = new float[SequenceBase.ReferenceFlowmetersCount];
foreach (var flowmtr in SequenceBase.FlowMeters)
SequenceBase.ReferenceFlowmetersCount = SequenceBase.FlowMeters.Count;
SequenceBase.CalibratedLtrPerRefPulse = new float[SequenceBase.ReferenceFlowmetersCount];
foreach (var flowmtr in SequenceBase.FlowMeters)
{
int ix = flowmtr.Idx1;
if (ix > 0 && ix <= SequenceBase.ReferenceFlowmetersCount)
{
int ix = flowmtr.Idx1;
if (ix > 0 && ix <= SequenceBase.ReferenceFlowmetersCount)
{
SequenceBase.CalibratedLtrPerRefPulse[ix - 1] = flowmtr.NominalFlow / 7200.0f;
}
SequenceBase.CalibratedLtrPerRefPulse[ix - 1] = flowmtr.NominalFlow / 7200.0f;
}
(new Sequences.MainSeq()).Execute(null);
}
catch (QuitStateMachineException)
{
}
///
/// Run the main sequence
///
(new Sequences.MainSeq()).Execute();
StateMachine.MachineState = MachineState.Off; /// Update StateMachine.MachineState
TBF.UiBridge.Bridge.Bench2UI(TBF.UiBridge.ButtonsEtc.Shutdown); /// Let UI know the state machine is shut down now
}
@@ -781,34 +789,35 @@ namespace TBF.BenchControl
/// Do stuff that is repeated in the state execution loops most often
/// </summary>
/// <returns>List of Event-s returned from the state operations, null == quit</returns>
public static IList<Event> WaitRunDevsRunOps()
public static IList<Event> WaitRunDevsRunOps(bool lastTime = false)
{
Thread.Sleep(100); /// Insert 1/10 sec.delay between RunOperations() and RunDeviceAfter()
foreach (var device in devices) device.RunDeviceAfter();
foreach (var device in devices)
{
device.RunDeviceAfter();
}
if (WaitNextTick())
WaitNextTick();
if (lastTime)
{
///
/// Executed when the state machine is stopped
/// Executed when the state machine is being stopped
///
wlog.Fatal("quitStateMachine == true ... The last StopOperaions() start now");
State.StopOperations();
stateMachineRunning = false;
wlog.Fatal("StopOperaions() completed ... stateMachineRunning = false)");
throw new QuitStateMachineException();
return null;
}
foreach (var device in devices) device.RunDeviceBefore();
Thread.Sleep(100); /// Insert 1/10 sec.delay between RunDeviceBefore() and RunOperations()
foreach (var device in devices)
{
device.RunDeviceBefore();
}
IList<Event> events = State.RunOperations();
return events;
///
/// This is followed by a state change in the sequence
///
Thread.Sleep(100); /// Insert 1/10 sec.delay between RunDeviceBefore() and RunOperations()
return State.RunOperations(); /// Returns events from all running operations
/// This is followed by a state change in the sequence
}
@@ -816,20 +825,15 @@ namespace TBF.BenchControl
/// Wait time period - synchronize
/// </summary>
/// <returns>true when interrupted by 'quitStateMachine', otherwise false</returns>
public static bool WaitNextTick()
public static void WaitNextTick()
{
currentTimeSec += Period;
DateTime nextTickDateTime = startDateTime + TimeSpan.FromSeconds(currentTimeSec);
TimeSpan timeFromStart = TimeSpan.FromSeconds(currentTimeSec);
DateTime nextLoopDateTime = startDateTime + timeFromStart;
while (DateTime.Now < nextLoopDateTime)
while (DateTime.Now < nextTickDateTime)
{
Thread.Sleep(100);
if (quitStateMachine) return true;
}
return false;
}
}
}
@@ -67,7 +67,8 @@ namespace TBF.BenchControl.TestMethods.ChangeFlowDirection
Bridge.OnActivity(this, test.Method);
State.Create(string.Format("{0}({1}) : Turn the direction of watermeters", test.Method, test.Name))
.AddOperation(checkUiOp)
.AddOperation(new Operations.MessageBoxOp("Otočte iPerly prosím."))
.AddOperation(StateMachine.BenchWaitingOp)
.AddOperation(new Operations.MessageBoxOp("iPerly jsou otočeny"))
.EnterState();
do
{
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
/// Copyright (c) 2015-2019 Sensus Metering Systems
/// Author: Milan Hanajík
///
using System;
@@ -24,5 +24,16 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
this.CommMessage = commMessage;
this.CommErr = commErr;
}
public override string ToString()
{
return string.Format("Thread={0} WMNr0={1} IHead={2} WM={3} CommMsg={4} CommErr={5}",
ThreadId,
WMNr0,
(Ihead != null) ? Ihead.Name : "null",
Wm.WMPosition,
(CommMessage != null) ? CommMessage : "null",
CommErr);
}
}
}
@@ -400,9 +400,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
foreach (var comp in StateMachine.Components)
{
if (comp is Modbus.QuidoRS.QuidoRS)
Modbus.QuidoRS.QuidoRS q = comp as Modbus.QuidoRS.QuidoRS;
if ((q != null) && (q.Variant == Modbus.QuidoRS.QuidoVariant.QuidoRS_2_16))
{
quido = comp as Modbus.QuidoRS.QuidoRS;
quido = q;
break;
}
}
@@ -632,7 +633,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
/// Set QuidoRS outputs and start the whole communication process
/// by incrementing 'currentGroup'.
///
if (cfg.UseMuxBoards && quido != null)
if (cfg.UseMuxBoards && (quido != null))
{
quido.SetOutputs((ushort)(16 - currentGroup - 1));
Thread.Sleep(2000);
@@ -927,7 +928,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
/// Switch to Active mode in order to change TestModeConfig
error = CommErr.CmdActive;
byte[] cmd = new byte[1] { (byte)6 };
byte[] cmd = new byte[1] { (byte)Command.SetActiveMode };
for (int j = 0; j < cfg.MaxCommRetries; j++)
{
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout)) { error = CommErr.None; break; }
@@ -958,7 +959,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
/// Switch to test mode
error = CommErr.CmdTest;
byte[] cmd = new byte[1] { (byte)7 };
byte[] cmd = new byte[1] { (byte)Command.SetTestMode };
for (int j = 0; j < cfg.MaxCommRetries; j++)
{
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout)) { error = CommErr.None; break; }
@@ -972,13 +973,13 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
/// Verify the configuration
error = CommErr.Verify;
byte[] cfg_0_3 = null;
byte[] config = null;
for (int j = 0; j < cfg.MaxCommRetries; j++)
{
if (0 == ReadRequestPort(threadId, ihead, MessageID.Configuration, 0, 4, out cfg_0_3, cfg.CommTimeout))
if (0 == ReadRequestPort(threadId, ihead, MessageID.Configuration, 0, ConfigStruct.Length, out config, cfg.CommTimeout))
{
ihead.ConfigStruct.Update(0, cfg_0_3);
if (ihead.ConfigStruct.MeterState == MeterState.Test)
ihead.ConfigStruct = ConfigStruct.FromByteArray(config);
if ((ihead.ConfigStruct.MeterState == MeterState.Test) && (ihead.ConfigStruct.TestModeConfig == testModeConfig))
{
error = CommErr.None;
resultStr = ihead.ConfigStruct.ToString(1);
@@ -1008,7 +1009,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
CommErr error = CommErr.CmdActive;
/// Switch to active mode
byte[] cmd = new byte[1] { (byte)6 };
byte[] cmd = new byte[1] { (byte)Command.SetActiveMode };
for (int j = 0; j < cfg.MaxCommRetries; j++)
{
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout))
@@ -2186,100 +2187,108 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
void DoOnCommCompleted(object sender, CommCompletedEventArgs data)
{
///
/// Update the text message
///
if (data.WMNr0 >= 0) messages[data.WMNr0].Text = data.CommMessage;
try
{
///
/// Update the text message
///
if (data.WMNr0 >= 0) messages[data.WMNr0].Text = data.CommMessage;
///
/// Update head active/inactive switch
///
if (data.WMNr0 >= 0 && data.CommErr == CommErr.HeadDisabledByUser)
{
/// iPerl head was disabled by the user
ckbState[data.WMNr0] = false;
checkBoxes[data.WMNr0].Checked = false;
checkBoxes[data.WMNr0].Enabled = false;
if (data.Ihead != null) data.Ihead.Disabled = true;
if (data.Wm != null) data.Wm.Disabled = true;
}
else if (data.WMNr0 >= 0 && data.CommErr == CommErr.None)
{
/// One RFID communication successful => iPerl cannot be disabled by the user anymore
ckbState[data.WMNr0] = true;
checkBoxes[data.WMNr0].Checked = true;
checkBoxes[data.WMNr0].Enabled = false;
}
///
/// Update opto-communication indication
///
for (int i = 0; i < iperlHeads.Count; i++)
{
if (iperlHeads[i] == null || iperlHeads[i].Disabled)
///
/// Update head active/inactive switch
///
if (data.WMNr0 >= 0 && data.CommErr == CommErr.HeadDisabledByUser)
{
counters[i].BackColor = DisabledColor;
/// iPerl head was disabled by the user
ckbState[data.WMNr0] = false;
checkBoxes[data.WMNr0].Checked = false;
checkBoxes[data.WMNr0].Enabled = false;
if (data.Ihead != null) data.Ihead.Disabled = true;
if (data.Wm != null) data.Wm.Disabled = true;
}
else if (data.WMNr0 >= 0 && data.CommErr == CommErr.None)
{
/// One RFID communication successful => iPerl cannot be disabled by the user anymore
ckbState[data.WMNr0] = true;
checkBoxes[data.WMNr0].Checked = true;
checkBoxes[data.WMNr0].Enabled = false;
}
///
/// Update opto-communication indication
///
for (int i = 0; i < iperlHeads.Count; i++)
{
if (iperlHeads[i] == null || iperlHeads[i].Disabled)
{
counters[i].BackColor = DisabledColor;
}
else
{
switch (iperlHeads[i].CheckFlowDirection())
{
case OptoHeadState.OptoAndDirOK:
counters[i].BackColor = OptoAndDirOKColor;
break;
case OptoHeadState.DirNok:
counters[i].BackColor = DirNokColor;
break;
default:
case OptoHeadState.OptoNok:
counters[i].BackColor = OptoNokColor;
break;
}
}
}
#if !TURA_SPECIAL
///
/// Branch
///
lock (this)
{
completedCommCount++;
if (cfg.UseMuxBoards && completedCommCount < muxBrdOrGroup14Nrs.Count) return;
if (!cfg.UseMuxBoards && completedCommCount < 4) return;
completedCommCount = 0;
}
#endif
if (currentGroup < lastGroup)
{
/// Go to the next step / next group
if (quido != null)
{
quido.SetOutputs((ushort)(16 - currentGroup - 1));
Thread.Sleep(2000);
}
currentGroup++;
}
else if (currentActivityStep + 1 < multiTestParams.Count)
{
currentGroup = 0;
currentActivityStep++;
activityLabel.Text = multiTestParams[currentActivityStep].Activity;
if (quido != null)
{
quido.SetOutputs((ushort)(16 - currentGroup - 1));
Thread.Sleep(2000);
}
currentGroup++;
}
else
{
switch (iperlHeads[i].CheckFlowDirection())
{
case OptoHeadState.OptoAndDirOK:
counters[i].BackColor = OptoAndDirOKColor;
break;
case OptoHeadState.DirNok:
counters[i].BackColor = DirNokColor;
break;
default:
case OptoHeadState.OptoNok:
counters[i].BackColor = OptoNokColor;
break;
}
/// Wait until all threads are finished
workerThreads[data.ThreadId].Join(2000);
NormalClose();
}
}
#if !TURA_SPECIAL
///
/// Branch
///
lock (this)
catch (Exception e)
{
completedCommCount++;
if (cfg.UseMuxBoards && completedCommCount < muxBrdOrGroup14Nrs.Count) return;
if (!cfg.UseMuxBoards && completedCommCount < 4) return;
completedCommCount = 0;
}
#endif
if (currentGroup < lastGroup)
{
/// Go to the next step / next group
if (quido != null)
{
quido.SetOutputs((ushort)(16 - currentGroup - 1));
Thread.Sleep(2000);
}
currentGroup++;
}
else if (currentActivityStep + 1 < multiTestParams.Count)
{
currentGroup = 0;
currentActivityStep++;
activityLabel.Text = multiTestParams[currentActivityStep].Activity;
if (quido != null)
{
quido.SetOutputs((ushort)(16 - currentGroup - 1));
Thread.Sleep(2000);
}
currentGroup++;
}
else
{
/// Wait until all threads are finished
workerThreads[data.ThreadId].Join(2000);
NormalClose();
log.ErrorFormat("DoOnCommCompleted({0}) failed: {1}", data, e.Message);
log.FatalFormat("StackTrace : {0}{1}", Environment.NewLine, e.StackTrace);
}
}
@@ -134,7 +134,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
anyMeterError = true;
anyError = true;
message += string.Format("Príliš veľa opakovaní testu vodomera {0}{1}", i, Environment.NewLine);
message += string.Format("Príliš veľa opakovaní testu vodomera {0}{1}", wm.WMPosition, Environment.NewLine);
}
}
#endif
@@ -145,7 +145,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
anyMeterError = true;
anyError = true;
message += string.Format("Q2 korekčné faktory vodomera {0} nesedia{1}", i, Environment.NewLine);
message += string.Format("Q2 korekčné faktory vodomera {0} nesedia{1}", wm.WMPosition, Environment.NewLine);
}
}
#endif
@@ -155,7 +155,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
//{
// anyMeterError = true;
// anyError = true;
// message += string.Format("Príliš veľa opakovaní testu vodomera {0}{1}", i, Environment.NewLine);
// message += string.Format("Príliš veľa opakovaní testu vodomera {0}{1}", wm.WMPosition, Environment.NewLine);
//}
}
}
@@ -84,6 +84,12 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
Count /// Number of meter states
}
public enum Command : byte
{
SetActiveMode = 6,
SetTestMode = 7,
}
public enum FlowState : byte
{
No = 0,
+100
View File
@@ -0,0 +1,100 @@
namespace TBF.Forms
{
partial class ClosingTbfForm
{
/// <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.messageLabel = new System.Windows.Forms.Label();
this.shutDownPCCheckBox = new System.Windows.Forms.CheckBox();
this.yesButton = new System.Windows.Forms.Button();
this.noButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// messageLabel
//
this.messageLabel.AutoSize = true;
this.messageLabel.Location = new System.Drawing.Point(39, 33);
this.messageLabel.Name = "messageLabel";
this.messageLabel.Size = new System.Drawing.Size(220, 13);
this.messageLabel.TabIndex = 0;
this.messageLabel.Text = "Do you want to exit Test Bench Framework ?";
//
// shutDownPCCheckBox
//
this.shutDownPCCheckBox.AutoSize = true;
this.shutDownPCCheckBox.Location = new System.Drawing.Point(42, 66);
this.shutDownPCCheckBox.Name = "shutDownPCCheckBox";
this.shutDownPCCheckBox.Size = new System.Drawing.Size(294, 17);
this.shutDownPCCheckBox.TabIndex = 1;
this.shutDownPCCheckBox.Text = "Shut down computer after exiting Test Bench Framework";
this.shutDownPCCheckBox.UseVisualStyleBackColor = true;
//
// yesButton
//
this.yesButton.DialogResult = System.Windows.Forms.DialogResult.Yes;
this.yesButton.Location = new System.Drawing.Point(104, 109);
this.yesButton.Name = "yesButton";
this.yesButton.Size = new System.Drawing.Size(88, 32);
this.yesButton.TabIndex = 2;
this.yesButton.Text = "Yes";
this.yesButton.UseVisualStyleBackColor = true;
this.yesButton.Click += new System.EventHandler(this.yesButton_Click);
//
// noButton
//
this.noButton.DialogResult = System.Windows.Forms.DialogResult.No;
this.noButton.Location = new System.Drawing.Point(212, 109);
this.noButton.Name = "noButton";
this.noButton.Size = new System.Drawing.Size(88, 32);
this.noButton.TabIndex = 3;
this.noButton.Text = "No";
this.noButton.UseVisualStyleBackColor = true;
//
// ClosingTbfForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(404, 153);
this.Controls.Add(this.noButton);
this.Controls.Add(this.yesButton);
this.Controls.Add(this.shutDownPCCheckBox);
this.Controls.Add(this.messageLabel);
this.Name = "ClosingTbfForm";
this.Text = "Closing the program";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label messageLabel;
private System.Windows.Forms.CheckBox shutDownPCCheckBox;
private System.Windows.Forms.Button yesButton;
private System.Windows.Forms.Button noButton;
}
}
+28
View File
@@ -0,0 +1,28 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Windows.Forms;
using TBF.Resources;
namespace TBF.Forms
{
public partial class ClosingTbfForm : Form
{
public bool ShutDownPC;
public ClosingTbfForm()
{
InitializeComponent();
ShutDownPC = false;
Text = Strings.Closing_the_program;
messageLabel.Text = Strings.Do_you_want_to_exit_TBF;
shutDownPCCheckBox.Text = Strings.Shut_down_computer_after_exiting_TBF;
}
private void yesButton_Click(object sender, EventArgs e)
{
ShutDownPC = shutDownPCCheckBox.Checked;
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+7 -4
View File
@@ -54,9 +54,9 @@ namespace TBF
this.horizontalSplitContainer = new System.Windows.Forms.SplitContainer();
this.mainTabControl = new System.Windows.Forms.TabControl();
this.homeTabPage = new System.Windows.Forms.TabPage();
this.ctrlBrdComponent = new ControlComponent3Munich.UserControl1();
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
this.processTabPage = new System.Windows.Forms.TabPage();
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl6();
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl24();
this.insertTabPage = new System.Windows.Forms.TabPage();
this.resultsTabPage = new System.Windows.Forms.TabPage();
this.resultsTabPageCtrl = new TBF.Screens.ResultsTabPageCtrl();
@@ -676,12 +676,15 @@ namespace TBF
#elif IZRAEL_200 || PUCHONG_200 || GENESIS || BERLIN || SLM_150 || PETERSBURG_200
private ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent;
private TBF.Screens.ProcessTabPageCtrl6 processTabPageCtrl;
#elif TURA_SPECIAL || BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || SLM_END || WARSAW_END || RUM_MOB || SENTEC || CEVAK_200
#elif TURA_SPECIAL || BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || SLM_END || WARSAW_END || RUM_MOB || SENTEC || CEVAK_200 || DEWA_300
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
private TBF.Screens.ProcessTabPageCtrl6 processTabPageCtrl;
#elif TORINO_50 || TORUN_50 || CEVAK_40 || MURES_40 || FUZHOU_50 || MALTA_WSD25 || SLM_50 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || KRAKOW_50 || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || FUZHOU_100
#elif TORINO_50 || TORUN_50 || CEVAK_40 || MURES_40 || FUZHOU_50 || MALTA_WSD25 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || KRAKOW_50 || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || FUZHOU_100
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
private TBF.Screens.ProcessTabPageCtrl24 processTabPageCtrl;
#elif SLM_50
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
private TBF.Screens.ProcessTabPageHeatMetersCtrl processTabPageCtrl;
#elif TURA_IPERL || IZRAEL_50
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
private TBF.Screens.ProcessTabPageCtrl48 processTabPageCtrl;
+160 -186
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
/// Copyright (c) 2013-201 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -25,14 +25,19 @@ namespace TBF
public UiControls.BenchControlPanel BenchControlPanel;
public ProcedureInfo SelectedProcedure;
public Procedure CurrentProcedure;
public bool CycleRunning;
public bool IsShutdownDisabled;
public bool IsShutdownPCAfterClosingTbf;
/// <summary>
/// This dialog is shown when emergency stop is activated
/// </summary>
TBF.Forms.EmergencyStopForm emergencyStopModelessDlg;
bool benchInitializationFailed;
/// <summary>
/// This dialog is shown when TBF program is shutting down
/// </summary>
TBF.Forms.ModelessActivityForm closingTbfMessageForm;
TestProgressControls testProgressControls;
/// <summary>
@@ -119,11 +124,12 @@ namespace TBF
iPerlHeadsToolStripMenuItem.Visible = false;
#endif
CycleRunning = true;
IsShutdownDisabled = true;
IsShutdownPCAfterClosingTbf = false;
benchInitializationFailed = false;
BenchControl.StateMachine.MachineState = Config.Data.CurrentBench.IsRealBench ? BenchControl.MachineState.StartingUp : BenchControl.MachineState.Disabled;
///
if (Config.Data.CurrentBench.IsRealBench)
if (BenchControl.StateMachine.MachineState == BenchControl.MachineState.StartingUp)
{
try
{
@@ -146,7 +152,7 @@ namespace TBF
}
catch (Exception exc)
{
benchInitializationFailed = true;
BenchControl.StateMachine.MachineState = BenchControl.MachineState.FailedToStart;
string errMsg;
if (string.IsNullOrEmpty(BenchControl.TbfComponents.CurrentlyLoadedComponentName))
@@ -197,9 +203,8 @@ namespace TBF
Left = (ls.MainWndLeft != 0) ? ls.MainWndLeft : 75;
Top = (ls.MainWndTop != 0) ? ls.MainWndTop : 5;
}
if (Config.Data.CurrentBench.IsRealBench && !benchInitializationFailed)
if (TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.StartingUp)
{
var form = new TBF.Forms.ModelessActivityForm()
{
@@ -264,7 +269,7 @@ namespace TBF
}
catch (Exception exc)
{
benchInitializationFailed = true;
TBF.BenchControl.StateMachine.MachineState = TBF.BenchControl.MachineState.FailedToStart;
form.CloseForm(null, new EventArgs());
formThread.Join();
@@ -320,21 +325,18 @@ namespace TBF
UpdateUser();
mainTabControl.SelectTab((int)MainTabPageId.Hydraulics);
if (Config.Data.CurrentBench.IsRealBench)
if (TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.StartingUp)
{
if (!benchInitializationFailed)
{
BenchControl.StateMachine.Start();
log.Info("Test bench started");
}
else
{
BenchControlPanel.OnButtonsEtc(null, new ButtonsEtcEventArgs(TBF.UiBridge.ButtonsEtc.None));
MessageBox.Show(Strings.Bench_is_not_running,
Strings.Warning,
System.Windows.Forms.MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.Exclamation);
}
BenchControl.StateMachine.Start();
log.Info("Test bench started");
}
else if (TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.FailedToStart)
{
BenchControlPanel.OnButtonsEtc(null, new ButtonsEtcEventArgs(ButtonsEtc.None));
MessageBox.Show(Strings.Bench_is_not_running,
Strings.Warning,
System.Windows.Forms.MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.Exclamation);
}
}
@@ -402,23 +404,48 @@ namespace TBF
mainProgressBar.Value = 0;
}
/// <summary>
/// This handler is onvoked when state of buttons changes
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
void OnButtonsEtc(object sender, UiBridge.ButtonsEtcEventArgs args)
{
if ((args.Flags & ButtonsEtc.Shutdown) != 0)
{
///
/// TBF program is shutting down and the state machine was proparly stopped
///
UI2Settings();
if (closingTbfMessageForm != null) closingTbfMessageForm.CloseForm(this, null);
if (IsShutdownPCAfterClosingTbf)
{
var psi = new System.Diagnostics.ProcessStartInfo("shutdown", "/s /t 0");
psi.CreateNoWindow = true;
psi.UseShellExecute = false;
System.Diagnostics.Process.Start(psi);
}
Close();
return;
}
if (((args.Flags & ButtonsEtc.ShowBenchEmpty) != 0) ||
((args.Flags & ButtonsEtc.ShowBenchFilled) != 0))
{
return;
}
CycleRunning = ((args.Flags & UiBridge.ButtonsEtc.ProcedureCmbBoxEn) == 0);
procedureComboBox.Enabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0);
iPerlHeadsToolStripMenuItem.Enabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0);
procedureComboBox.Enabled = !CycleRunning;
iPerlHeadsToolStripMenuItem.Enabled = !CycleRunning;
if (!CycleRunning && ProceduresUpdated)
if (procedureComboBox.Enabled && ProceduresUpdated)
{
ReloadProcedureComboBoxItems();
}
IsShutdownDisabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) == 0);
}
public void UpdateUser()
@@ -607,37 +634,63 @@ namespace TBF
}
}
private void MainWnd_FormClosing(object sender, FormClosingEventArgs e)
/// <summary>
/// Save UI settings to Program.LocalSettings and save them to a file.
/// UI settings are:
/// MainWnd size and location and splitter distances.
/// </summary>
void UI2Settings()
{
Program.LocalSettings.RightPaneHorizSplitterDistance = rightHorizSplitContainer.SplitterDistance;
Program.LocalSettings.TopPaneVerticalSplitterDistance = topVerticalSplitContainer.SplitterDistance;
LocalSettings ls = Program.LocalSettings;
Program.LocalSettings.ManiWndMaximized = (WindowState == FormWindowState.Maximized);
if (WindowState == FormWindowState.Normal)
if (ls != null)
{
Program.LocalSettings.MainWndLeft = Location.X;
Program.LocalSettings.MainWndTop = Location.Y;
Program.LocalSettings.MainWndWidth = Size.Width;
Program.LocalSettings.MainWndHeight = Size.Height;
}
else
{
/// Maximized or minimized (when restarted, minimized window is restored as normal)
Program.LocalSettings.MainWndLeft = RestoreBounds.Left;
Program.LocalSettings.MainWndTop = RestoreBounds.Top;
Program.LocalSettings.MainWndWidth = RestoreBounds.Width;
Program.LocalSettings.MainWndHeight = RestoreBounds.Height;
}
Program.LocalSettings.Save();
ls.RightPaneHorizSplitterDistance = rightHorizSplitContainer.SplitterDistance;
ls.TopPaneVerticalSplitterDistance = topVerticalSplitContainer.SplitterDistance;
if (DialogResult == DialogResult.None)
{
exitToolStripMenuItem_Click(sender, e);
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;
}
ls.Save();
}
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
bool TryShutdownTBF()
{
if (TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.Undefined ||
TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.Disabled ||
TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.FailedToStart ||
TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.Off)
{
///
/// StateMachine is not running --> Shutdown immediately without displaying a message box
///
if (closingTbfMessageForm != null) closingTbfMessageForm.CloseForm(this, null);
return true;
}
if (TBF.BenchControl.StateMachine.MachineState == TBF.BenchControl.MachineState.ShuttingDown)
{
///
/// Already shutting down --> Prevent a new shutdown without displaying a message box
///
return false;
}
/// Save emergency stop form state
bool oriEmgStopState = false;
if (emergencyStopModelessDlg != null)
{
@@ -645,155 +698,76 @@ namespace TBF
emergencyStopModelessDlg.Visible = false;
}
if (BenchControl.StateMachine.Running && (messageLabel.ForeColor != Color.Red) && CycleRunning)
if ((messageLabel.ForeColor != Color.Red) && IsShutdownDisabled)
{
///
/// It is not possible to shutdown (most likely a cycle is not completed) --> Display a message and prevent shutdown now
///
MessageBox.Show(Strings.Finish_the_session_please, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
if (e is FormClosingEventArgs)
{
(e as FormClosingEventArgs).Cancel = true;
}
return;
if (emergencyStopModelessDlg != null) emergencyStopModelessDlg.Visible = oriEmgStopState;
return false;
}
if (DialogResult.Yes == MessageBox.Show(Strings.Do_you_want_to_exit_TBF,
Strings.Closing_the_program,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question))
Forms.ClosingTbfForm closingForm = new Forms.ClosingTbfForm();
DialogResult dr = closingForm.ShowDialog();
if (dr == DialogResult.Yes)
{
if (BenchControl.StateMachine.Running)
///
/// User confirmed TBF program shutdown --> 1. Show modeless form, 2. Stop MainSeq and StateMachine, 3. Prevent TBF exit now
///
IsShutdownPCAfterClosingTbf = closingForm.ShutDownPC;
/// Show 'Closing_Test_Bench_Framework' modeless window in separate thread
closingTbfMessageForm = new TBF.Forms.ModelessActivityForm()
{
/// Show 'Closing_Test_Bench_Framework' modeless window in separate thread
var form = new TBF.Forms.ModelessActivityForm()
{
Message = Strings.Closing_Test_Bench_Framework,
FontFamily = "Arial",
FontSize = 24,
FontStyle = FontStyle.Regular,
BackgroundColor = Color.PeachPuff,
StartActivityHandler = true,
};
Thread formThread = new Thread(() => form.ShowDialog());
formThread.Start();
Message = Strings.Closing_Test_Bench_Framework,
FontFamily = "Arial",
FontSize = 24,
FontStyle = FontStyle.Regular,
BackgroundColor = Color.PeachPuff,
StartActivityHandler = true,
};
Thread formThread = new Thread(() => closingTbfMessageForm.ShowDialog());
formThread.Start();
/// Stop the system
BenchControl.StateMachine.Stop();
while (BenchControl.StateMachine.Running) { } /// wait until the last StopOperaions() completes
BenchControl.StateMachine.StopDevices();
BenchControl.StateMachine.StopDevices2();
UiBridge.Bridge.OnEmergencyStopChanged(this, UiBridge.EmergencyStopEventArgs.State.CloseForm);
/// Stop MainSeq and StateMachine
Bridge.Ui2Bench(UI2BenchCmd.Shutdown);
/// Close 'Closing_Test_Bench_Framework' modeless window
form.CloseForm(null, new EventArgs());
formThread.Join();
}
/// Close the main window
DialogResult = DialogResult.OK;
Close();
return;
/// Prevent TBF program exit now
return false;
}
else if (e is FormClosingEventArgs)
else
{
(e as FormClosingEventArgs).Cancel = true;
/// User aborted the shutdown --> Restore emergency stop form state and prevent shutdown now
if (emergencyStopModelessDlg != null) emergencyStopModelessDlg.Visible = oriEmgStopState;
return false;
}
if (emergencyStopModelessDlg != null) emergencyStopModelessDlg.Visible = oriEmgStopState;
}
private void MainWnd_FormClosing(object sender, FormClosingEventArgs e)
{
if (TryShutdownTBF())
{
UI2Settings(); /// Save settings and exit TBF
}
else
{
e.Cancel = true; /// Prevent TBF exit
}
}
//private void printToolStripMenuItem_Click(object sender, EventArgs e)
//{
//TBF.Forms.PrintOrderForm dlg = new TBF.Forms.PrintOrderForm();
//if (dlg.ShowDialog() == DialogResult.OK)
//{
// string purchaseOrder = dlg.PurchaseOrder;
// string tester = dlg.Tester;
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
if (TryShutdownTBF())
{
/// Save settings and exit TBF
UI2Settings();
Close();
}
}
// NHibernate.ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
// IList<TestResult> testResults = session.QueryOver<TestResult>()
// .Where(x => (x.PurchaseOrder == purchaseOrder))
// .List();
// if (testResults.Count == 0)
// {
// MessageBox.Show(Strings.No_results_to_print, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
// return;
// }
// if (dlg.OnlyGoodResults)
// {
// /// Proceed from the end of the list so that items can be removed by index
// for (int i = testResults.Count - 1; i >= 0; i--)
// {
// // TODO: Complete
// }
// }
// if (dlg.OnlyLastResult)
// {
// /// Remove test results if there exist a later test results for the same sn
// /// Proceed from the end of the list so that items can be removed by index
// for (int i = testResults.Count - 1; i >= 0; i--)
// {
// string name = testResults[i].Name;
// int batchNr = testResults[i].BatchNr;
// foreach (var tr in testResults)
// {
// if (tr.Name == name && tr.BatchNr > batchNr)
// {
// bool allWMsAreTheSame = true;
// int cnt = Math.Min(testResults[i].Meters.Count, tr.Meters.Count);
// for (int j = 0; j < cnt; j++)
// {
// if (testResults[i].Meters[j].SerialNr != tr.Meters[j].SerialNr)
// {
// allWMsAreTheSame = false;
// break;
// }
// }
// if (allWMsAreTheSame)
// {
// /// Remove as there exists a more recent measurement with the same meters
// testResults.RemoveAt(i);
// break;
// }
// }
// }
// }
// }
// IList<Procedure> procedure = session.QueryOver<Procedure>()
// .Where(x => (x.ProcedureState == ProcedureState.Active))
// .And(x => (x.Name == testResults[0].ProcedureName))
// .List();
// if (procedure.Count != 1)
// {
// MessageBox.Show(Strings.No_results_to_print, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
// return;
// }
// if ((testResults != null) && (testResults.Count != 0) && (testResults[0].MetersKind == MetersKind.Single))
// {
// PrintOrderDocument doc = new PrintOrderDocument(procedure[0], testResults, tester);
// doc.DefaultPageSettings.Landscape = true;
// doc.Print();
// }
// else if((testResults != null) && (testResults.Count != 0) && (testResults[0].MetersKind == MetersKind.Combined))
// {
// /// Do nothing right now
// }
// else
// {
// MessageBox.Show(Strings.No_results_to_print, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
// return;
// }
//}
//}
private void upgradeTSMenuItem_Click(object sender, EventArgs e)
{
+111 -111
View File
@@ -121,115 +121,115 @@
<data name="benchTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>57, 20</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Testovací stolice Framework</value>
</data>
<data name="aboutTSMenuItem.Text" xml:space="preserve">
<value>O</value>
</data>
<data name="activityGroupBox.Text" xml:space="preserve">
<value>Proces</value>
</data>
<data name="activityStatusLabel.Text" xml:space="preserve">
<value>Prosím, spusťte proceduru</value>
</data>
<data name="benchComponentsTSMenuItem.Text" xml:space="preserve">
<value>Komponenty</value>
</data>
<data name="benchMetrologyTSMenuItem.Text" xml:space="preserve">
<value>Metrologie</value>
</data>
<data name="benchPathsTSMenuItem.Text" xml:space="preserve">
<value>Cesty</value>
</data>
<data name="benchTransitionsToolStripMenuItem.Text" xml:space="preserve">
<value>Přechody</value>
</data>
<data name="benchTSMenuItem.Text" xml:space="preserve">
<value>Stolice</value>
</data>
<data name="databaseSettingsTSMenuItem.Text" xml:space="preserve">
<value>Databáze</value>
</data>
<data name="editTSMenuItem.Text" xml:space="preserve">
<value>Nastavení</value>
</data>
<data name="exitToolStripMenuItem.Text" xml:space="preserve">
<value>Výstup</value>
</data>
<data name="helpTSMenuItem.Text" xml:space="preserve">
<value>Pomoc</value>
</data>
<data name="homeTabPage.Text" xml:space="preserve">
<value>Hydraulika</value>
</data>
<data name="homeTSMenuItem.Text" xml:space="preserve">
<value>Domů</value>
</data>
<data name="insertTabPage.Text" xml:space="preserve">
<value>Vložit</value>
</data>
<data name="localSettingsTSMenuItem.Text" xml:space="preserve">
<value>Jazyk</value>
</data>
<data name="logsTabPage.Text" xml:space="preserve">
<value>Záznamy</value>
</data>
<data name="logsTSMenuItem.Text" xml:space="preserve">
<value>Záznamy</value>
</data>
<data name="mainMenuStrip.Text" xml:space="preserve">
<value>Záhlaví hlavního menu</value>
</data>
<data name="measurementTabPage.Text" xml:space="preserve">
<value>Měření</value>
</data>
<data name="measurementTSMenuItem.Text" xml:space="preserve">
<value>Měření</value>
</data>
<data name="passwortToolStripMenuItem.Text" xml:space="preserve">
<value>Heslo</value>
</data>
<data name="picturesTabPage.Text" xml:space="preserve">
<value>Obrázky</value>
</data>
<data name="picturesTSMItem.Text" xml:space="preserve">
<value>Obrázky</value>
</data>
<data name="printToolStripMenuItem.Text" xml:space="preserve">
<value>Vytisknout</value>
</data>
<data name="procedureGroupBox.Text" xml:space="preserve">
<value>Postup</value>
</data>
<data name="proceduresToolStripMenuItem.Text" xml:space="preserve">
<value>Postupy</value>
</data>
<data name="processTabPage.Text" xml:space="preserve">
<value>Proces</value>
</data>
<data name="processToolStripMenuItem.Text" xml:space="preserve">
<value>Proces</value>
</data>
<data name="progressGroupBox.Text" xml:space="preserve">
<value>Probíhá</value>
</data>
<data name="resultsTabPage.Text" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="resultsToolStripMenuItem.Text" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="resultsTSMenuItem.Text" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="statusStrip1.Text" xml:space="preserve">
<value>Stavový pruh 1</value>
</data>
<data name="userInfoStatusLabel.Text" xml:space="preserve">
<value>Uživatel : admin</value>
</data>
<data name="usersTSMenuItem.Text" xml:space="preserve">
<value>Uživatelé</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Testovací stolice Framework</value>
</data>
<data name="aboutTSMenuItem.Text" xml:space="preserve">
<value>O</value>
</data>
<data name="activityGroupBox.Text" xml:space="preserve">
<value>Proces</value>
</data>
<data name="activityStatusLabel.Text" xml:space="preserve">
<value>Prosím, spusťte proceduru</value>
</data>
<data name="benchComponentsTSMenuItem.Text" xml:space="preserve">
<value>Komponenty</value>
</data>
<data name="benchMetrologyTSMenuItem.Text" xml:space="preserve">
<value>Metrologie</value>
</data>
<data name="benchPathsTSMenuItem.Text" xml:space="preserve">
<value>Cesty</value>
</data>
<data name="benchTransitionsToolStripMenuItem.Text" xml:space="preserve">
<value>Přechody</value>
</data>
<data name="benchTSMenuItem.Text" xml:space="preserve">
<value>Stolice</value>
</data>
<data name="databaseSettingsTSMenuItem.Text" xml:space="preserve">
<value>Databáze</value>
</data>
<data name="editTSMenuItem.Text" xml:space="preserve">
<value>Nastavení</value>
</data>
<data name="exitToolStripMenuItem.Text" xml:space="preserve">
<value>Ukončit</value>
</data>
<data name="helpTSMenuItem.Text" xml:space="preserve">
<value>Pomoc</value>
</data>
<data name="homeTabPage.Text" xml:space="preserve">
<value>Hydraulika</value>
</data>
<data name="homeTSMenuItem.Text" xml:space="preserve">
<value>Domů</value>
</data>
<data name="insertTabPage.Text" xml:space="preserve">
<value>Vložit</value>
</data>
<data name="localSettingsTSMenuItem.Text" xml:space="preserve">
<value>Jazyk</value>
</data>
<data name="logsTabPage.Text" xml:space="preserve">
<value>Záznamy</value>
</data>
<data name="logsTSMenuItem.Text" xml:space="preserve">
<value>Záznamy</value>
</data>
<data name="mainMenuStrip.Text" xml:space="preserve">
<value>Záhlaví hlavního menu</value>
</data>
<data name="measurementTabPage.Text" xml:space="preserve">
<value>Měření</value>
</data>
<data name="measurementTSMenuItem.Text" xml:space="preserve">
<value>Měření</value>
</data>
<data name="passwortToolStripMenuItem.Text" xml:space="preserve">
<value>Heslo</value>
</data>
<data name="picturesTabPage.Text" xml:space="preserve">
<value>Obrázky</value>
</data>
<data name="picturesTSMItem.Text" xml:space="preserve">
<value>Obrázky</value>
</data>
<data name="printToolStripMenuItem.Text" xml:space="preserve">
<value>Vytisknout</value>
</data>
<data name="procedureGroupBox.Text" xml:space="preserve">
<value>Postup</value>
</data>
<data name="proceduresToolStripMenuItem.Text" xml:space="preserve">
<value>Postupy</value>
</data>
<data name="processTabPage.Text" xml:space="preserve">
<value>Proces</value>
</data>
<data name="processToolStripMenuItem.Text" xml:space="preserve">
<value>Proces</value>
</data>
<data name="progressGroupBox.Text" xml:space="preserve">
<value>Probíhá</value>
</data>
<data name="resultsTabPage.Text" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="resultsToolStripMenuItem.Text" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="resultsTSMenuItem.Text" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="statusStrip1.Text" xml:space="preserve">
<value>Stavový pruh 1</value>
</data>
<data name="userInfoStatusLabel.Text" xml:space="preserve">
<value>Uživatel : admin</value>
</data>
<data name="usersTSMenuItem.Text" xml:space="preserve">
<value>Uživatelé</value>
</data>
</root>
+3 -1
View File
@@ -121,7 +121,9 @@ namespace TBF
}
/// Pressure meter tab-pages
if (factory is BenchControl.Elde.PressureMeter.PressureMeterFactory)
if (factory is BenchControl.Elde.PressureMeter.PressureMeterFactory ||
factory is BenchControl.Elde.PressureMeterInternal.PressureMeterFactory ||
factory is BenchControl.Modbus.PressureMeter.Meret.Factory)
{
pressMetersCount++;
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
+3 -3
View File
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Sensus")]
[assembly: AssemblyProduct("TestBenchFramework")]
[assembly: AssemblyCopyright("Copyright © 2013 - 2018 Sensus Slovensko, a.s.")]
[assembly: AssemblyCopyright("Copyright © 2013 - 2019 Sensus Slovensko, a.s.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.1142.0")]
[assembly: AssemblyFileVersion("2.18.1142.0")]
[assembly: AssemblyVersion("2.18.1160.0")]
[assembly: AssemblyFileVersion("2.18.1160.0")]
+43 -7
View File
@@ -1195,7 +1195,7 @@ namespace TBF.Resources {
}
/// <summary>
/// Looks up a localized string similar to Do you want to exit the Test Bench Framework?.
/// Looks up a localized string similar to Do you want to exit Test Bench Framework ?.
/// </summary>
internal static string Do_you_want_to_exit_TBF {
get {
@@ -2356,11 +2356,11 @@ namespace TBF.Resources {
}
/// <summary>
/// Looks up a localized string similar to Meter {0}.
/// Looks up a localized string similar to Meter.
/// </summary>
internal static string Meter_nr {
internal static string Meter {
get {
return ResourceManager.GetString("Meter_nr", resourceCulture);
return ResourceManager.GetString("Meter", resourceCulture);
}
}
@@ -2508,6 +2508,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Mute the alarm.
/// </summary>
internal static string Mute_alarm {
get {
return ResourceManager.GetString("Mute_alarm", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Name.
/// </summary>
@@ -3831,6 +3840,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Result.
/// </summary>
internal static string Result {
get {
return ResourceManager.GetString("Result", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Results.
/// </summary>
@@ -4057,11 +4075,11 @@ namespace TBF.Resources {
}
/// <summary>
/// Looks up a localized string similar to Sensor .
/// Looks up a localized string similar to Sensor.
/// </summary>
internal static string Sensor_ {
internal static string Sensor {
get {
return ResourceManager.GetString("Sensor_", resourceCulture);
return ResourceManager.GetString("Sensor", resourceCulture);
}
}
@@ -4245,6 +4263,24 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Shut down computer after exiting Test Bench Framework.
/// </summary>
internal static string Shut_down_computer_after_exiting_TBF {
get {
return ResourceManager.GetString("Shut_down_computer_after_exiting_TBF", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Shutting down devices.
/// </summary>
internal static string Shutting_down_devices {
get {
return ResourceManager.GetString("Shutting_down_devices", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Side.
/// </summary>
+20 -2
View File
@@ -406,7 +406,7 @@
<value>Vyhodnocení</value>
</data>
<data name="ExitBtnText" xml:space="preserve">
<value>Výstup</value>
<value>Ukončit</value>
</data>
<data name="Failed" xml:space="preserve">
<value>NOK</value>
@@ -825,7 +825,7 @@
<data name="Selected_results" xml:space="preserve">
<value>Vybrané výsledky</value>
</data>
<data name="Sensor_" xml:space="preserve">
<data name="Sensor" xml:space="preserve">
<value>Sensor</value>
</data>
<data name="Sensors" xml:space="preserve">
@@ -1368,4 +1368,22 @@
<data name="repetition" xml:space="preserve">
<value>opakování</value>
</data>
<data name="Meter" xml:space="preserve">
<value>Měřič</value>
</data>
<data name="Result" xml:space="preserve">
<value>Výsledek</value>
</data>
<data name="Results" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="Mute_alarm" xml:space="preserve">
<value>Ztlumit sirénu</value>
</data>
<data name="Shutting_down_devices" xml:space="preserve">
<value>Vypínání zařízení</value>
</data>
<data name="Shut_down_computer_after_exiting_TBF" xml:space="preserve">
<value>Vypnout počítač po ukončení Test Bench Framework</value>
</data>
</root>
+16 -4
View File
@@ -189,8 +189,8 @@
<data name="Balance" xml:space="preserve">
<value>Waage</value>
</data>
<data name="Sensor_" xml:space="preserve">
<value>Messs. </value>
<data name="Sensor" xml:space="preserve">
<value>Messs.</value>
</data>
<data name="T_div" xml:space="preserve">
<value>T div</value>
@@ -1023,8 +1023,8 @@
<data name="Mass_diff_kg_" xml:space="preserve">
<value>Masse dif. [kg]:</value>
</data>
<data name="Meter_nr" xml:space="preserve">
<value>Wasserzähler {0}</value>
<data name="Meter" xml:space="preserve">
<value>Wasserzähler</value>
</data>
<data name="Pr_down" xml:space="preserve">
<value>Dr. un.</value>
@@ -1458,4 +1458,16 @@
<data name="Previous" xml:space="preserve">
<value>Vorherige</value>
</data>
<data name="Result" xml:space="preserve">
<value>Ergebnis</value>
</data>
<data name="Results" xml:space="preserve">
<value>Ergebnisse</value>
</data>
<data name="Mute_alarm" xml:space="preserve">
<value>Stummschaltung des Alarms</value>
</data>
<data name="Shutting_down_devices" xml:space="preserve">
<value>Geräte herunterfahren</value>
</data>
</root>
+6 -3
View File
@@ -204,7 +204,7 @@
<data name="Balance" xml:space="preserve">
<value>Bilance</value>
</data>
<data name="Sensor_" xml:space="preserve">
<data name="Sensor" xml:space="preserve">
<value>sensore</value>
</data>
<data name="T_div" xml:space="preserve">
@@ -1221,8 +1221,8 @@
<data name="Mass_diff_kg_" xml:space="preserve">
<value>mass diff [kg]:</value>
</data>
<data name="Meter_nr" xml:space="preserve">
<value>metri {0}</value>
<data name="Meter" xml:space="preserve">
<value>metri</value>
</data>
<data name="Pr_down" xml:space="preserve">
<value>Pr giù</value>
@@ -1752,4 +1752,7 @@
<data name="Flow_adjustment_failed" xml:space="preserve">
<value>Errore impostazione del flusso</value>
</data>
<data name="Result" xml:space="preserve">
<value>risultato</value>
</data>
</root>
+9 -3
View File
@@ -768,7 +768,7 @@
<data name="Selected_results" xml:space="preserve">
<value>Wybrane wyniki:</value>
</data>
<data name="Sensor_" xml:space="preserve">
<data name="Sensor" xml:space="preserve">
<value>Czujnik</value>
</data>
<data name="Sensors" xml:space="preserve">
@@ -1242,8 +1242,8 @@
<data name="Mass_diff_kg_" xml:space="preserve">
<value>Różnica masy [kg]:</value>
</data>
<data name="Meter_nr" xml:space="preserve">
<value>Wodomierz {0}</value>
<data name="Meter" xml:space="preserve">
<value>Wodomierz</value>
</data>
<data name="Pr_down" xml:space="preserve">
<value>Pr na dół</value>
@@ -1602,4 +1602,10 @@
<data name="Start_the_test_bench" xml:space="preserve">
<value>Uruchom stanowisko pomiarowe</value>
</data>
<data name="Result" xml:space="preserve">
<value>Wynik</value>
</data>
<data name="Shutting_down_devices" xml:space="preserve">
<value>Zamykanie urządzeń</value>
</data>
</root>
+17 -5
View File
@@ -201,8 +201,8 @@
<data name="Balance" xml:space="preserve">
<value>Scale</value>
</data>
<data name="Sensor_" xml:space="preserve">
<value>Sensor </value>
<data name="Sensor" xml:space="preserve">
<value>Sensor</value>
</data>
<data name="T_div" xml:space="preserve">
<value>T div</value>
@@ -1222,8 +1222,8 @@
<data name="Mass" xml:space="preserve">
<value>Mass</value>
</data>
<data name="Meter_nr" xml:space="preserve">
<value>Meter {0}</value>
<data name="Meter" xml:space="preserve">
<value>Meter</value>
</data>
<data name="Pr_down" xml:space="preserve">
<value>Pr down</value>
@@ -1280,7 +1280,7 @@
<value>Closing the program</value>
</data>
<data name="Do_you_want_to_exit_TBF" xml:space="preserve">
<value>Do you want to exit the Test Bench Framework?</value>
<value>Do you want to exit Test Bench Framework ?</value>
</data>
<data name="The_following_components_are_in_simulation_mode_" xml:space="preserve">
<value>The following components are in simulation mode:</value>
@@ -1930,4 +1930,16 @@
<data name="repetition" xml:space="preserve">
<value>repetition</value>
</data>
<data name="Result" xml:space="preserve">
<value>Result</value>
</data>
<data name="Mute_alarm" xml:space="preserve">
<value>Mute the alarm</value>
</data>
<data name="Shutting_down_devices" xml:space="preserve">
<value>Shutting down devices</value>
</data>
<data name="Shut_down_computer_after_exiting_TBF" xml:space="preserve">
<value>Shut down computer after exiting Test Bench Framework</value>
</data>
</root>
+7 -1
View File
@@ -606,7 +606,7 @@
<data name="Selected_results" xml:space="preserve">
<value>Rezultatele selectate:</value>
</data>
<data name="Sensor_" xml:space="preserve">
<data name="Sensor" xml:space="preserve">
<value>Senzor</value>
</data>
<data name="Sensors" xml:space="preserve">
@@ -825,4 +825,10 @@
<data name="Correction" xml:space="preserve">
<value>Corectii</value>
</data>
<data name="Result" xml:space="preserve">
<value>Rezultat</value>
</data>
<data name="Results" xml:space="preserve">
<value>Rezultate</value>
</data>
</root>
+6 -3
View File
@@ -198,7 +198,7 @@
<data name="Balance" xml:space="preserve">
<value>Весы</value>
</data>
<data name="Sensor_" xml:space="preserve">
<data name="Sensor" xml:space="preserve">
<value>Датчик</value>
</data>
<data name="T_div" xml:space="preserve">
@@ -1209,8 +1209,8 @@
<data name="Mass_diff_kg_" xml:space="preserve">
<value>Mass diff. [kg]:</value>
</data>
<data name="Meter_nr" xml:space="preserve">
<value>Счетчик {0}</value>
<data name="Meter" xml:space="preserve">
<value>Счетчик</value>
</data>
<data name="Pr_down" xml:space="preserve">
<value>Pr down</value>
@@ -1599,4 +1599,7 @@
<data name="Resetting_scales" xml:space="preserve">
<value>Сброс весов</value>
</data>
<data name="Result" xml:space="preserve">
<value>Результат</value>
</data>
</root>
+12
View File
@@ -156,4 +156,16 @@
<data name="Side" xml:space="preserve">
<value>Strana</value>
</data>
<data name="Meter" xml:space="preserve">
<value>Merač</value>
</data>
<data name="Result" xml:space="preserve">
<value>Výsledok</value>
</data>
<data name="Sensor" xml:space="preserve">
<value>Senzor</value>
</data>
<data name="Mute_alarm" xml:space="preserve">
<value>Stlmiť sirénu</value>
</data>
</root>
+4 -1
View File
@@ -837,7 +837,7 @@
<data name="Selected_results" xml:space="preserve">
<value>已选结果 :</value>
</data>
<data name="Sensor_" xml:space="preserve">
<data name="Sensor" xml:space="preserve">
<value>传感器</value>
</data>
<data name="Sensors" xml:space="preserve">
@@ -1185,4 +1185,7 @@
<data name="Correction" xml:space="preserve">
<value>更正</value>
</data>
<data name="Result" xml:space="preserve">
<value>重试</value>
</data>
</root>
+2 -2
View File
@@ -155,9 +155,9 @@ namespace TBF.Screens
refErrorCapLabel.Text = Strings.Ref_error_pct_;
GroupBox[] groupBoxes = new GroupBox[] { groupBox1, groupBox2, groupBox3, groupBox4, groupBox5, groupBox6 };
for (int i = 0; i < groupBoxes.Length; i++) groupBoxes[i].Text = string.Format(Strings.Meter_nr, i + 1);
for (int i = 0; i < groupBoxes.Length; i++) groupBoxes[i].Text = string.Format(string.Format("{0} {1}", Strings.Meter, i + 1));
sensor1CapLabel.Text = sensor2CapLabel.Text = sensor3CapLabel.Text = sensor4CapLabel.Text = sensor5CapLabel.Text = sensor6CapLabel.Text = Strings.Sensor_;
sensor1CapLabel.Text = sensor2CapLabel.Text = sensor3CapLabel.Text = sensor4CapLabel.Text = sensor5CapLabel.Text = sensor6CapLabel.Text = Strings.Sensor;
pulses1CapLabel.Text = pulses2CapLabel.Text = pulses3CapLabel.Text = pulses4CapLabel.Text = pulses5CapLabel.Text = pulses6CapLabel.Text = Strings.Pulses_;
refPulses1CapLabel.Text = refPulses2CapLabel.Text = refPulses3CapLabel.Text = refPulses4CapLabel.Text = refPulses5CapLabel.Text = refPulses6CapLabel.Text = Strings.Ref_pulses_;
volume1CapLabel.Text = volume2CapLabel.Text = volume3CapLabel.Text = volume4CapLabel.Text = volume5CapLabel.Text = volume6CapLabel.Text = Strings.Volume + ":";
+835
View File
@@ -0,0 +1,835 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
namespace TBF.Screens
{
partial class ProcessTabPageHeatMetersCtrl
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProcessTabPageHeatMetersCtrl));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.pumpPctTextBox = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.flowMeterPictureBox = new System.Windows.Forms.PictureBox();
this.watermeterPictureBox4 = new System.Windows.Forms.PictureBox();
this.watermeterPictureBox3 = new System.Windows.Forms.PictureBox();
this.watermeterPictureBox2 = new System.Windows.Forms.PictureBox();
this.pumpPictureBox = new System.Windows.Forms.PictureBox();
this.reservoirPictureBox = new System.Windows.Forms.PictureBox();
this.airHumiLabel = new System.Windows.Forms.Label();
this.airPressLabel = new System.Windows.Forms.Label();
this.airTempLabel = new System.Windows.Forms.Label();
this.label34 = new System.Windows.Forms.Label();
this.label33 = new System.Windows.Forms.Label();
this.label32 = new System.Windows.Forms.Label();
this.estmtdTimeLabel = new System.Windows.Forms.Label();
this.targetRefCountLabel = new System.Windows.Forms.Label();
this.label31 = new System.Windows.Forms.Label();
this.targetVolumeLabel = new System.Windows.Forms.Label();
this.targetFlowHighLabel = new System.Windows.Forms.Label();
this.targetFlowLowLabel = new System.Windows.Forms.Label();
this.label30 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label29 = new System.Windows.Forms.Label();
this.label28 = new System.Windows.Forms.Label();
this.refErrorLabel = new System.Windows.Forms.Label();
this.label27 = new System.Windows.Forms.Label();
this.volumeCtvLabel = new System.Windows.Forms.Label();
this.label26 = new System.Windows.Forms.Label();
this.refVolumeLabel = new System.Windows.Forms.Label();
this.label25 = new System.Windows.Forms.Label();
this.massDiffLabel = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.massLabel = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.scaleCmpntLabel = new System.Windows.Forms.Label();
this.tDivCmpntLabel = new System.Windows.Forms.Label();
this.tDivLabel = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.regValvePosLabel = new System.Windows.Forms.Label();
this.regValveCmpntLabel = new System.Windows.Forms.Label();
this.refFlowCmpntLabel = new System.Windows.Forms.Label();
this.refPulsesLabel = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.refFreqLabel = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.refFlowLabel = new System.Windows.Forms.Label();
this.prInCmpntLabel = new System.Windows.Forms.Label();
this.prOutCmpntLabel = new System.Windows.Forms.Label();
this.tOutCmpntLabel = new System.Windows.Forms.Label();
this.tInCmpntLabel = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.prOutLabel = new System.Windows.Forms.Label();
this.tOutLabel = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.prInLabel = new System.Windows.Forms.Label();
this.tInLabel = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.metersListView = new System.Windows.Forms.ListView();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.flowMeterPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pumpPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.reservoirPictureBox)).BeginInit();
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.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.pumpPctTextBox);
this.splitContainer1.Panel1.Controls.Add(this.pictureBox1);
this.splitContainer1.Panel1.Controls.Add(this.flowMeterPictureBox);
this.splitContainer1.Panel1.Controls.Add(this.watermeterPictureBox4);
this.splitContainer1.Panel1.Controls.Add(this.watermeterPictureBox3);
this.splitContainer1.Panel1.Controls.Add(this.watermeterPictureBox2);
this.splitContainer1.Panel1.Controls.Add(this.pumpPictureBox);
this.splitContainer1.Panel1.Controls.Add(this.reservoirPictureBox);
this.splitContainer1.Panel1.Controls.Add(this.airHumiLabel);
this.splitContainer1.Panel1.Controls.Add(this.airPressLabel);
this.splitContainer1.Panel1.Controls.Add(this.airTempLabel);
this.splitContainer1.Panel1.Controls.Add(this.label34);
this.splitContainer1.Panel1.Controls.Add(this.label33);
this.splitContainer1.Panel1.Controls.Add(this.label32);
this.splitContainer1.Panel1.Controls.Add(this.estmtdTimeLabel);
this.splitContainer1.Panel1.Controls.Add(this.targetRefCountLabel);
this.splitContainer1.Panel1.Controls.Add(this.label31);
this.splitContainer1.Panel1.Controls.Add(this.targetVolumeLabel);
this.splitContainer1.Panel1.Controls.Add(this.targetFlowHighLabel);
this.splitContainer1.Panel1.Controls.Add(this.targetFlowLowLabel);
this.splitContainer1.Panel1.Controls.Add(this.label30);
this.splitContainer1.Panel1.Controls.Add(this.label20);
this.splitContainer1.Panel1.Controls.Add(this.label29);
this.splitContainer1.Panel1.Controls.Add(this.label28);
this.splitContainer1.Panel1.Controls.Add(this.refErrorLabel);
this.splitContainer1.Panel1.Controls.Add(this.label27);
this.splitContainer1.Panel1.Controls.Add(this.volumeCtvLabel);
this.splitContainer1.Panel1.Controls.Add(this.label26);
this.splitContainer1.Panel1.Controls.Add(this.refVolumeLabel);
this.splitContainer1.Panel1.Controls.Add(this.label25);
this.splitContainer1.Panel1.Controls.Add(this.massDiffLabel);
this.splitContainer1.Panel1.Controls.Add(this.label23);
this.splitContainer1.Panel1.Controls.Add(this.massLabel);
this.splitContainer1.Panel1.Controls.Add(this.label22);
this.splitContainer1.Panel1.Controls.Add(this.scaleCmpntLabel);
this.splitContainer1.Panel1.Controls.Add(this.tDivCmpntLabel);
this.splitContainer1.Panel1.Controls.Add(this.tDivLabel);
this.splitContainer1.Panel1.Controls.Add(this.label24);
this.splitContainer1.Panel1.Controls.Add(this.label21);
this.splitContainer1.Panel1.Controls.Add(this.regValvePosLabel);
this.splitContainer1.Panel1.Controls.Add(this.regValveCmpntLabel);
this.splitContainer1.Panel1.Controls.Add(this.refFlowCmpntLabel);
this.splitContainer1.Panel1.Controls.Add(this.refPulsesLabel);
this.splitContainer1.Panel1.Controls.Add(this.label19);
this.splitContainer1.Panel1.Controls.Add(this.refFreqLabel);
this.splitContainer1.Panel1.Controls.Add(this.label16);
this.splitContainer1.Panel1.Controls.Add(this.refFlowLabel);
this.splitContainer1.Panel1.Controls.Add(this.prInCmpntLabel);
this.splitContainer1.Panel1.Controls.Add(this.prOutCmpntLabel);
this.splitContainer1.Panel1.Controls.Add(this.tOutCmpntLabel);
this.splitContainer1.Panel1.Controls.Add(this.tInCmpntLabel);
this.splitContainer1.Panel1.Controls.Add(this.label15);
this.splitContainer1.Panel1.Controls.Add(this.prOutLabel);
this.splitContainer1.Panel1.Controls.Add(this.tOutLabel);
this.splitContainer1.Panel1.Controls.Add(this.label17);
this.splitContainer1.Panel1.Controls.Add(this.label18);
this.splitContainer1.Panel1.Controls.Add(this.prInLabel);
this.splitContainer1.Panel1.Controls.Add(this.tInLabel);
this.splitContainer1.Panel1.Controls.Add(this.label14);
this.splitContainer1.Panel1.Controls.Add(this.label13);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.metersListView);
this.splitContainer1.Size = new System.Drawing.Size(1100, 800);
this.splitContainer1.SplitterDistance = 450;
this.splitContainer1.SplitterWidth = 1;
this.splitContainer1.TabIndex = 182;
//
// pumpPctTextBox
//
this.pumpPctTextBox.Location = new System.Drawing.Point(797, 372);
this.pumpPctTextBox.Name = "pumpPctTextBox";
this.pumpPctTextBox.Size = new System.Drawing.Size(42, 20);
this.pumpPctTextBox.TabIndex = 244;
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(884, 94);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(38, 35);
this.pictureBox1.TabIndex = 240;
this.pictureBox1.TabStop = false;
//
// flowMeterPictureBox
//
this.flowMeterPictureBox.ErrorImage = null;
this.flowMeterPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("flowMeterPictureBox.Image")));
this.flowMeterPictureBox.InitialImage = null;
this.flowMeterPictureBox.Location = new System.Drawing.Point(884, 151);
this.flowMeterPictureBox.Name = "flowMeterPictureBox";
this.flowMeterPictureBox.Size = new System.Drawing.Size(38, 38);
this.flowMeterPictureBox.TabIndex = 239;
this.flowMeterPictureBox.TabStop = false;
//
// watermeterPictureBox4
//
this.watermeterPictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("watermeterPictureBox4.Image")));
this.watermeterPictureBox4.Location = new System.Drawing.Point(511, 365);
this.watermeterPictureBox4.Name = "watermeterPictureBox4";
this.watermeterPictureBox4.Size = new System.Drawing.Size(38, 30);
this.watermeterPictureBox4.TabIndex = 238;
this.watermeterPictureBox4.TabStop = false;
//
// watermeterPictureBox3
//
this.watermeterPictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("watermeterPictureBox3.Image")));
this.watermeterPictureBox3.Location = new System.Drawing.Point(370, 365);
this.watermeterPictureBox3.Name = "watermeterPictureBox3";
this.watermeterPictureBox3.Size = new System.Drawing.Size(38, 30);
this.watermeterPictureBox3.TabIndex = 237;
this.watermeterPictureBox3.TabStop = false;
//
// watermeterPictureBox2
//
this.watermeterPictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("watermeterPictureBox2.Image")));
this.watermeterPictureBox2.Location = new System.Drawing.Point(227, 365);
this.watermeterPictureBox2.Name = "watermeterPictureBox2";
this.watermeterPictureBox2.Size = new System.Drawing.Size(38, 30);
this.watermeterPictureBox2.TabIndex = 236;
this.watermeterPictureBox2.TabStop = false;
//
// pumpPictureBox
//
this.pumpPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("pumpPictureBox.Image")));
this.pumpPictureBox.Location = new System.Drawing.Point(799, 396);
this.pumpPictureBox.Name = "pumpPictureBox";
this.pumpPictureBox.Size = new System.Drawing.Size(38, 38);
this.pumpPictureBox.TabIndex = 235;
this.pumpPictureBox.TabStop = false;
//
// reservoirPictureBox
//
this.reservoirPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("reservoirPictureBox.Image")));
this.reservoirPictureBox.Location = new System.Drawing.Point(900, 324);
this.reservoirPictureBox.Name = "reservoirPictureBox";
this.reservoirPictureBox.Size = new System.Drawing.Size(142, 109);
this.reservoirPictureBox.TabIndex = 234;
this.reservoirPictureBox.TabStop = false;
//
// airHumiLabel
//
this.airHumiLabel.AutoSize = true;
this.airHumiLabel.Location = new System.Drawing.Point(141, 95);
this.airHumiLabel.Name = "airHumiLabel";
this.airHumiLabel.Size = new System.Drawing.Size(42, 13);
this.airHumiLabel.TabIndex = 233;
this.airHumiLabel.Text = "airHumi";
//
// airPressLabel
//
this.airPressLabel.AutoSize = true;
this.airPressLabel.Location = new System.Drawing.Point(141, 78);
this.airPressLabel.Name = "airPressLabel";
this.airPressLabel.Size = new System.Drawing.Size(44, 13);
this.airPressLabel.TabIndex = 232;
this.airPressLabel.Text = "airPress";
//
// airTempLabel
//
this.airTempLabel.AutoSize = true;
this.airTempLabel.Location = new System.Drawing.Point(141, 61);
this.airTempLabel.Name = "airTempLabel";
this.airTempLabel.Size = new System.Drawing.Size(45, 13);
this.airTempLabel.TabIndex = 231;
this.airTempLabel.Text = "airTemp";
//
// label34
//
this.label34.AutoSize = true;
this.label34.Location = new System.Drawing.Point(52, 95);
this.label34.Name = "label34";
this.label34.Size = new System.Drawing.Size(80, 13);
this.label34.TabIndex = 230;
this.label34.Text = "Air humidity [%]:";
//
// label33
//
this.label33.AutoSize = true;
this.label33.Location = new System.Drawing.Point(34, 78);
this.label33.Name = "label33";
this.label33.Size = new System.Drawing.Size(98, 13);
this.label33.TabIndex = 229;
this.label33.Text = "Air pressure [mBar]:";
//
// label32
//
this.label32.AutoSize = true;
this.label32.Location = new System.Drawing.Point(31, 61);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(101, 13);
this.label32.TabIndex = 228;
this.label32.Text = "Air temperature [°C]:";
//
// estmtdTimeLabel
//
this.estmtdTimeLabel.AutoSize = true;
this.estmtdTimeLabel.Location = new System.Drawing.Point(375, 143);
this.estmtdTimeLabel.Name = "estmtdTimeLabel";
this.estmtdTimeLabel.Size = new System.Drawing.Size(61, 13);
this.estmtdTimeLabel.TabIndex = 227;
this.estmtdTimeLabel.Text = "estmtdTime";
//
// targetRefCountLabel
//
this.targetRefCountLabel.AutoSize = true;
this.targetRefCountLabel.Location = new System.Drawing.Point(375, 122);
this.targetRefCountLabel.Name = "targetRefCountLabel";
this.targetRefCountLabel.Size = new System.Drawing.Size(79, 13);
this.targetRefCountLabel.TabIndex = 226;
this.targetRefCountLabel.Text = "targetRefCount";
//
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(283, 122);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(89, 13);
this.label31.TabIndex = 225;
this.label31.Text = "Target ref. count:";
//
// targetVolumeLabel
//
this.targetVolumeLabel.AutoSize = true;
this.targetVolumeLabel.Location = new System.Drawing.Point(375, 101);
this.targetVolumeLabel.Name = "targetVolumeLabel";
this.targetVolumeLabel.Size = new System.Drawing.Size(69, 13);
this.targetVolumeLabel.TabIndex = 224;
this.targetVolumeLabel.Text = "targetVolume";
//
// targetFlowHighLabel
//
this.targetFlowHighLabel.AutoSize = true;
this.targetFlowHighLabel.Location = new System.Drawing.Point(375, 81);
this.targetFlowHighLabel.Name = "targetFlowHighLabel";
this.targetFlowHighLabel.Size = new System.Drawing.Size(78, 13);
this.targetFlowHighLabel.TabIndex = 223;
this.targetFlowHighLabel.Text = "targetFlowHigh";
//
// targetFlowLowLabel
//
this.targetFlowLowLabel.AutoSize = true;
this.targetFlowLowLabel.Location = new System.Drawing.Point(375, 61);
this.targetFlowLowLabel.Name = "targetFlowLowLabel";
this.targetFlowLowLabel.Size = new System.Drawing.Size(76, 13);
this.targetFlowLowLabel.TabIndex = 222;
this.targetFlowLowLabel.Text = "targetFlowLow";
//
// label30
//
this.label30.AutoSize = true;
this.label30.Location = new System.Drawing.Point(280, 143);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(92, 13);
this.label30.TabIndex = 221;
this.label30.Text = "Estimated time [s]:";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(283, 101);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(89, 13);
this.label20.TabIndex = 220;
this.label20.Text = "Target volume [l]:";
//
// label29
//
this.label29.AutoSize = true;
this.label29.Location = new System.Drawing.Point(252, 81);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(120, 13);
this.label29.TabIndex = 219;
this.label29.Text = "Target flow high [m3/h]:";
//
// label28
//
this.label28.AutoSize = true;
this.label28.Location = new System.Drawing.Point(256, 61);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(116, 13);
this.label28.TabIndex = 218;
this.label28.Text = "Target flow low [m3/h]:";
//
// refErrorLabel
//
this.refErrorLabel.AutoSize = true;
this.refErrorLabel.Location = new System.Drawing.Point(1009, 287);
this.refErrorLabel.Name = "refErrorLabel";
this.refErrorLabel.Size = new System.Drawing.Size(41, 13);
this.refErrorLabel.TabIndex = 217;
this.refErrorLabel.Text = "refError";
//
// label27
//
this.label27.AutoSize = true;
this.label27.Location = new System.Drawing.Point(934, 287);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(71, 13);
this.label27.TabIndex = 216;
this.label27.Text = "Ref. error [%]:";
//
// volumeCtvLabel
//
this.volumeCtvLabel.AutoSize = true;
this.volumeCtvLabel.Location = new System.Drawing.Point(1009, 265);
this.volumeCtvLabel.Name = "volumeCtvLabel";
this.volumeCtvLabel.Size = new System.Drawing.Size(57, 13);
this.volumeCtvLabel.TabIndex = 215;
this.volumeCtvLabel.Text = "volumeCtv";
//
// label26
//
this.label26.AutoSize = true;
this.label26.Location = new System.Drawing.Point(949, 265);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(56, 13);
this.label26.TabIndex = 214;
this.label26.Text = "Volume [l]:";
//
// refVolumeLabel
//
this.refVolumeLabel.AutoSize = true;
this.refVolumeLabel.Location = new System.Drawing.Point(810, 182);
this.refVolumeLabel.Name = "refVolumeLabel";
this.refVolumeLabel.Size = new System.Drawing.Size(54, 13);
this.refVolumeLabel.TabIndex = 213;
this.refVolumeLabel.Text = "refVolume";
//
// label25
//
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(729, 182);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(78, 13);
this.label25.TabIndex = 212;
this.label25.Text = "Ref. volume [l]:";
//
// massDiffLabel
//
this.massDiffLabel.AutoSize = true;
this.massDiffLabel.Location = new System.Drawing.Point(1009, 244);
this.massDiffLabel.Name = "massDiffLabel";
this.massDiffLabel.Size = new System.Drawing.Size(47, 13);
this.massDiffLabel.TabIndex = 211;
this.massDiffLabel.Text = "massDiff";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(929, 244);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(76, 13);
this.label23.TabIndex = 210;
this.label23.Text = "Mass diff. [kg]:";
//
// massLabel
//
this.massLabel.AutoSize = true;
this.massLabel.Location = new System.Drawing.Point(1009, 224);
this.massLabel.Name = "massLabel";
this.massLabel.Size = new System.Drawing.Size(31, 13);
this.massLabel.TabIndex = 209;
this.massLabel.Text = "mass";
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(949, 224);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(56, 13);
this.label22.TabIndex = 208;
this.label22.Text = "Mass [kg]:";
//
// scaleCmpntLabel
//
this.scaleCmpntLabel.AutoSize = true;
this.scaleCmpntLabel.Location = new System.Drawing.Point(1009, 203);
this.scaleCmpntLabel.Name = "scaleCmpntLabel";
this.scaleCmpntLabel.Size = new System.Drawing.Size(62, 13);
this.scaleCmpntLabel.TabIndex = 207;
this.scaleCmpntLabel.Text = "scaleCmpnt";
//
// tDivCmpntLabel
//
this.tDivCmpntLabel.AutoSize = true;
this.tDivCmpntLabel.Location = new System.Drawing.Point(598, 61);
this.tDivCmpntLabel.Name = "tDivCmpntLabel";
this.tDivCmpntLabel.Size = new System.Drawing.Size(56, 13);
this.tDivCmpntLabel.TabIndex = 206;
this.tDivCmpntLabel.Text = "tDivCmpnt";
//
// tDivLabel
//
this.tDivLabel.AutoSize = true;
this.tDivLabel.Location = new System.Drawing.Point(598, 79);
this.tDivLabel.Name = "tDivLabel";
this.tDivLabel.Size = new System.Drawing.Size(26, 13);
this.tDivLabel.TabIndex = 205;
this.tDivLabel.Text = "tDiv";
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(536, 78);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(54, 13);
this.label24.TabIndex = 204;
this.label24.Text = "T div [°C]:";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(721, 79);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(85, 13);
this.label21.TabIndex = 203;
this.label21.Text = "Reg. valve pos.:";
//
// regValvePosLabel
//
this.regValvePosLabel.AutoSize = true;
this.regValvePosLabel.Location = new System.Drawing.Point(810, 79);
this.regValvePosLabel.Name = "regValvePosLabel";
this.regValvePosLabel.Size = new System.Drawing.Size(67, 13);
this.regValvePosLabel.TabIndex = 202;
this.regValvePosLabel.Text = "regValvePos";
//
// regValveCmpntLabel
//
this.regValveCmpntLabel.AutoSize = true;
this.regValveCmpntLabel.Location = new System.Drawing.Point(810, 61);
this.regValveCmpntLabel.Name = "regValveCmpntLabel";
this.regValveCmpntLabel.Size = new System.Drawing.Size(79, 13);
this.regValveCmpntLabel.TabIndex = 201;
this.regValveCmpntLabel.Text = "regValveCmpnt";
//
// refFlowCmpntLabel
//
this.refFlowCmpntLabel.AutoSize = true;
this.refFlowCmpntLabel.Location = new System.Drawing.Point(810, 108);
this.refFlowCmpntLabel.Name = "refFlowCmpntLabel";
this.refFlowCmpntLabel.Size = new System.Drawing.Size(71, 13);
this.refFlowCmpntLabel.TabIndex = 200;
this.refFlowCmpntLabel.Text = "refFlowCmpnt";
//
// refPulsesLabel
//
this.refPulsesLabel.AutoSize = true;
this.refPulsesLabel.Location = new System.Drawing.Point(810, 126);
this.refPulsesLabel.Name = "refPulsesLabel";
this.refPulsesLabel.Size = new System.Drawing.Size(50, 13);
this.refPulsesLabel.TabIndex = 199;
this.refPulsesLabel.Text = "refPulses";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(743, 126);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(60, 13);
this.label19.TabIndex = 198;
this.label19.Text = "Ref. count:";
//
// refFreqLabel
//
this.refFreqLabel.AutoSize = true;
this.refFreqLabel.Location = new System.Drawing.Point(810, 144);
this.refFreqLabel.Name = "refFreqLabel";
this.refFreqLabel.Size = new System.Drawing.Size(40, 13);
this.refFreqLabel.TabIndex = 197;
this.refFreqLabel.Text = "refFreq";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(727, 144);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(76, 13);
this.label16.TabIndex = 196;
this.label16.Text = "Ref. freq. [Hz]:";
//
// refFlowLabel
//
this.refFlowLabel.AutoSize = true;
this.refFlowLabel.Location = new System.Drawing.Point(810, 163);
this.refFlowLabel.Name = "refFlowLabel";
this.refFlowLabel.Size = new System.Drawing.Size(41, 13);
this.refFlowLabel.TabIndex = 195;
this.refFlowLabel.Text = "refFlow";
//
// prInCmpntLabel
//
this.prInCmpntLabel.AutoSize = true;
this.prInCmpntLabel.Location = new System.Drawing.Point(141, 124);
this.prInCmpntLabel.Name = "prInCmpntLabel";
this.prInCmpntLabel.Size = new System.Drawing.Size(55, 13);
this.prInCmpntLabel.TabIndex = 194;
this.prInCmpntLabel.Text = "prInCmpnt";
//
// prOutCmpntLabel
//
this.prOutCmpntLabel.AutoSize = true;
this.prOutCmpntLabel.Location = new System.Drawing.Point(598, 124);
this.prOutCmpntLabel.Name = "prOutCmpntLabel";
this.prOutCmpntLabel.Size = new System.Drawing.Size(63, 13);
this.prOutCmpntLabel.TabIndex = 193;
this.prOutCmpntLabel.Text = "prOutCmpnt";
//
// tOutCmpntLabel
//
this.tOutCmpntLabel.AutoSize = true;
this.tOutCmpntLabel.Location = new System.Drawing.Point(598, 162);
this.tOutCmpntLabel.Name = "tOutCmpntLabel";
this.tOutCmpntLabel.Size = new System.Drawing.Size(57, 13);
this.tOutCmpntLabel.TabIndex = 192;
this.tOutCmpntLabel.Text = "tOutCmpnt";
//
// tInCmpntLabel
//
this.tInCmpntLabel.AutoSize = true;
this.tInCmpntLabel.Location = new System.Drawing.Point(141, 162);
this.tInCmpntLabel.Name = "tInCmpntLabel";
this.tInCmpntLabel.Size = new System.Drawing.Size(49, 13);
this.tInCmpntLabel.TabIndex = 191;
this.tInCmpntLabel.Text = "tInCmpnt";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(717, 163);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(86, 13);
this.label15.TabIndex = 190;
this.label15.Text = "Ref. flow [m3/h]:";
//
// prOutLabel
//
this.prOutLabel.AutoSize = true;
this.prOutLabel.Location = new System.Drawing.Point(598, 140);
this.prOutLabel.Name = "prOutLabel";
this.prOutLabel.Size = new System.Drawing.Size(33, 13);
this.prOutLabel.TabIndex = 189;
this.prOutLabel.Text = "prOut";
//
// tOutLabel
//
this.tOutLabel.AutoSize = true;
this.tOutLabel.Location = new System.Drawing.Point(598, 178);
this.tOutLabel.Name = "tOutLabel";
this.tOutLabel.Size = new System.Drawing.Size(27, 13);
this.tOutLabel.TabIndex = 188;
this.tOutLabel.Text = "tOut";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(517, 140);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(73, 13);
this.label17.TabIndex = 187;
this.label17.Text = "Pr down [bar]:";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(524, 178);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(66, 13);
this.label18.TabIndex = 186;
this.label18.Text = "T down [°C]:";
//
// prInLabel
//
this.prInLabel.AutoSize = true;
this.prInLabel.Location = new System.Drawing.Point(141, 140);
this.prInLabel.Name = "prInLabel";
this.prInLabel.Size = new System.Drawing.Size(25, 13);
this.prInLabel.TabIndex = 185;
this.prInLabel.Text = "prIn";
//
// tInLabel
//
this.tInLabel.AutoSize = true;
this.tInLabel.Location = new System.Drawing.Point(141, 178);
this.tInLabel.Name = "tInLabel";
this.tInLabel.Size = new System.Drawing.Size(19, 13);
this.tInLabel.TabIndex = 184;
this.tInLabel.Text = "tIn";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(73, 140);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(59, 13);
this.label14.TabIndex = 183;
this.label14.Text = "Pr up [bar]:";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(80, 178);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(52, 13);
this.label13.TabIndex = 182;
this.label13.Text = "T up [°C]:";
//
// metersListView
//
this.metersListView.Dock = System.Windows.Forms.DockStyle.Fill;
this.metersListView.Location = new System.Drawing.Point(0, 0);
this.metersListView.Name = "metersListView";
this.metersListView.Size = new System.Drawing.Size(1100, 349);
this.metersListView.TabIndex = 0;
this.metersListView.UseCompatibleStateImageBehavior = false;
this.metersListView.View = System.Windows.Forms.View.Details;
//
// ProcessTabPageHeatMetersCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.Name = "ProcessTabPageHeatMetersCtrl";
this.Size = new System.Drawing.Size(1100, 800);
this.Load += new System.EventHandler(this.ProcessTabPageCtrl_Load);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.ProcessTabPageCtrl_Paint);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.flowMeterPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.watermeterPictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pumpPictureBox)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.reservoirPictureBox)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TextBox pumpPctTextBox;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox flowMeterPictureBox;
private System.Windows.Forms.PictureBox watermeterPictureBox4;
private System.Windows.Forms.PictureBox watermeterPictureBox3;
private System.Windows.Forms.PictureBox watermeterPictureBox2;
private System.Windows.Forms.PictureBox pumpPictureBox;
private System.Windows.Forms.PictureBox reservoirPictureBox;
private System.Windows.Forms.Label airHumiLabel;
private System.Windows.Forms.Label airPressLabel;
private System.Windows.Forms.Label airTempLabel;
private System.Windows.Forms.Label label34;
private System.Windows.Forms.Label label33;
private System.Windows.Forms.Label label32;
private System.Windows.Forms.Label estmtdTimeLabel;
private System.Windows.Forms.Label targetRefCountLabel;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.Label targetVolumeLabel;
private System.Windows.Forms.Label targetFlowHighLabel;
private System.Windows.Forms.Label targetFlowLowLabel;
private System.Windows.Forms.Label label30;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.Label refErrorLabel;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.Label volumeCtvLabel;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.Label refVolumeLabel;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label massDiffLabel;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label massLabel;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label scaleCmpntLabel;
private System.Windows.Forms.Label tDivCmpntLabel;
private System.Windows.Forms.Label tDivLabel;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.Label regValvePosLabel;
private System.Windows.Forms.Label regValveCmpntLabel;
private System.Windows.Forms.Label refFlowCmpntLabel;
private System.Windows.Forms.Label refPulsesLabel;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label refFreqLabel;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label refFlowLabel;
private System.Windows.Forms.Label prInCmpntLabel;
private System.Windows.Forms.Label prOutCmpntLabel;
private System.Windows.Forms.Label tOutCmpntLabel;
private System.Windows.Forms.Label tInCmpntLabel;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label prOutLabel;
private System.Windows.Forms.Label tOutLabel;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label prInLabel;
private System.Windows.Forms.Label tInLabel;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.ListView metersListView;
}
}
+520
View File
@@ -0,0 +1,520 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using System.Windows.Forms;
using log4net;
using Config.Entities;
using TBF.BenchControl.Sequences;
using TBF.UiBridge;
using TBF.Resources;
#pragma warning disable 162 /// Disables 'Unreachable code detected' warning
namespace TBF.Screens
{
public partial class ProcessTabPageHeatMetersCtrl : UserControl
{
static readonly ILog log = LogManager.GetLogger(typeof(ProcessTabPageHeatMetersCtrl));
MetersKind currentMetersKind;
int textBoxesCount;
Label[] meter;
Label[] sensor;
Label[] pulses;
Label[] refPulses;
Label[] volume;
Label[] error;
Label[] passed;
Label[] cmpndVolume;
Label[] cmpndError;
Label[] cmpndPassed;
bool pumpOn = true;
bool diverterToTank = true;
/// <summary>
/// Constructor, initializes anonymous event handlers
/// </summary>
public ProcessTabPageHeatMetersCtrl()
{
currentMetersKind = MetersKind.Single;
InitializeComponent();
metersListView.Columns.Add(Strings.Meter, 120);
metersListView.Columns.Add(Strings.Sensor, 120);
metersListView.Columns.Add("Pulses count", 120);
metersListView.Columns.Add("Ref. pulses count", 120);
metersListView.Columns.Add(Strings.Volume, 120);
metersListView.Columns.Add(Strings.Error, 120);
metersListView.Columns.Add(Strings.Result, 120);
textBoxesCount = 24;
Bridge.ProcedureSelectedHandler += delegate(object sndr, ProcedureSelectedEventArgs args)
{
try
{
if (InvokeRequired)
Invoke(new EventHandler<ProcedureSelectedEventArgs>(OnProcedureSelected), sndr, args);
else
OnProcedureSelected(sndr, args);
}
catch (Exception e) { log.ErrorFormat("ProcessTabPage24.OnProcedureSelected() failed: {0}", e.Message); }
};
Bridge.TestSelectedHandler += delegate(object sender, TestSelectedEventArgs args)
{
try
{
if (InvokeRequired)
Invoke(new EventHandler<TestSelectedEventArgs>(OnTestSelected), sender, args);
else
OnTestSelected(sender, args);
}
catch (Exception e) { log.ErrorFormat("ProcessTabPage24.OnTestSelected() failed: {0}", e.Message); }
};
Bridge.ProcessDataHandler += delegate(object sender, ProcessDataEventArgs args)
{
try
{
if (InvokeRequired)
Invoke(new EventHandler<ProcessDataEventArgs>(OnProcessDataChanged), sender, args);
else
OnProcessDataChanged(sender, args);
}
catch (Exception e) { log.ErrorFormat("ProcessTabPage24.OnProcessDataChanged() failed: {0}", e.Message); }
};
Bridge.TestCompletedHandler += delegate(object sender, TestCompletedEventArgs args)
{
try
{
if (InvokeRequired)
Invoke(new EventHandler<TestCompletedEventArgs>(OnTestCompleted), sender, args);
else
OnTestCompleted(sender, args);
}
catch (Exception e) { log.ErrorFormat("ProcessTabPage24.OnTestCompleted() failed: {0}", e.Message); }
};
Bridge.ProcedureCompletedHandler += delegate(object sender, ProcedureCompletedEventArgs args)
{
try
{
if (InvokeRequired)
Invoke(new EventHandler<ProcedureCompletedEventArgs>(OnProcedureCompleted), sender, args);
else
OnProcedureCompleted(sender, args);
}
catch (Exception e) { log.ErrorFormat("ProcessTabPage24.OnProcedureCompleted() failed: {0}", e.Message); }
};
}
private void ProcessTabPageCtrl_Load(object sender, EventArgs e)
{
Once();
ResetLabelsAndTargetVals();
ResetReadings();
}
void Once()
{
}
void UpdateVisibility(MetersKind metersKind)
{
bool visible = (metersKind == MetersKind.Single || metersKind == MetersKind.HeatMeter);
for (int i = 2 * Config.Data.CompoundWMsCount; i < textBoxesCount; i++)
{
meter[i].Visible = visible;
sensor[i].Visible = visible;
pulses[i].Visible = visible;
refPulses[i].Visible = visible;
volume[i].Visible = visible;
error[i].Visible = visible;
passed[i].Visible = visible;
}
}
/// <summary>
/// Called when a new procedure is selected
/// </summary>
void ResetLabelsAndTargetVals()
{
/// Target values
targetFlowLowLabel.Text = "---";
targetFlowHighLabel.Text = "---";
targetVolumeLabel.Text = "---";
targetRefCountLabel.Text = "---";
estmtdTimeLabel.Text = "---";
//
refFlowCmpntLabel.Text = "---";
regValveCmpntLabel.Text = "---";
/// Water pressure
prInCmpntLabel.Text = "---";
prOutCmpntLabel.Text = "---";
/// Water temperature
tInCmpntLabel.Text = "---";
tOutCmpntLabel.Text = "---";
tDivCmpntLabel.Text = "---";
scaleCmpntLabel.Text = "---";
watermeterPictureBox2.Visible = true;
watermeterPictureBox3.Visible = true;
watermeterPictureBox4.Visible = true;
}
/// <summary>
/// Called when a new procedure or a new test procedure is selected
/// </summary>
void ResetReadings()
{
/// Top part
airTempLabel.Text = "---";
airPressLabel.Text = "---";
airHumiLabel.Text = "---";
refPulsesLabel.Text = "---";
refFreqLabel.Text = "---";
refFlowLabel.Text = "---";
refVolumeLabel.Text = "---";
regValvePosLabel.Text = "---";
tDivLabel.Text = "---";
tInLabel.Text = "---";
tOutLabel.Text = "---";
prInLabel.Text = "---";
prOutLabel.Text = "---";
massLabel.Text = "---";
massDiffLabel.Text = "---";
volumeCtvLabel.Text = "---";
refErrorLabel.Text = "---";
//for (int i = 0; i < textBoxesCount; i++)
//{
// pulses[i].Text = "---";
// refPulses[i].Text = "---";
// volume[i].Text = "---";
// error[i].Text = "---";
// passed[i].Text = "---";
//}
}
void OnProcedureSelected(object sender, ProcedureSelectedEventArgs args)
{
currentMetersKind = args.Procedure.MetersKind;
UpdateVisibility(currentMetersKind);
ResetLabelsAndTargetVals();
ResetReadings();
Invalidate();
}
void OnTestSelected(object sender, TestSelectedEventArgs args)
{
/// Readings and target values
ResetReadings();
/// Target values
targetFlowLowLabel.Text = args.Test.Qfrom.ToString("F3");
targetFlowHighLabel.Text = args.Test.Qto.ToString("F3");
targetVolumeLabel.Text = args.Test.Volume.ToString("F1");
targetRefCountLabel.Text = args.TotalPulses.ToString();
estmtdTimeLabel.Text = args.Test.TstTime.ToString("F1");
/// Names of virtual bench components
if (args.BenchPath.PressMtrUp != null) prInCmpntLabel.Text = args.BenchPath.PressMtrUp.Name;
if (args.BenchPath.PressMtrDown != null) prOutCmpntLabel.Text = args.BenchPath.PressMtrDown.Name;
if (args.BenchPath.TempMtrUp != null) tInCmpntLabel.Text = args.BenchPath.TempMtrUp.Name;
if (args.BenchPath.TempMtrDown != null) tOutCmpntLabel.Text = args.BenchPath.TempMtrDown.Name;
if (args.OutputPath.TempDiv != null) tDivCmpntLabel.Text = args.OutputPath.TempDiv.Name;
if (args.OutputPath.FlowMeter != null) refFlowCmpntLabel.Text = args.OutputPath.FlowMeter.Name;
if (args.OutputPath.RegulValve != null) regValveCmpntLabel.Text = args.OutputPath.RegulValve.Name;
if (args.OutputPath.Scale != null) scaleCmpntLabel.Text = args.OutputPath.Scale.Name;
for (int i = 0; i < textBoxesCount; i++)
{
sensor[i].Text = (args.MetersPath.RegisterReaders[i] == null) ? "" : args.MetersPath.RegisterReaders[i].Cfg.Name;
}
if (args.FeedingPath != null && (args.FeedingPath.Pump is BenchControl.GenericDevices.IPumpFM))
{
pumpPctTextBox.Visible = true;
pumpPctTextBox.Text = (args.FeedingPath.Pump as BenchControl.GenericDevices.IPumpFM).Power.ToString("F0") + " %";
}
else
{
pumpPctTextBox.Visible = false;
}
}
void OnProcessDataChanged(object sender, ProcessDataEventArgs args)
{
///
/// Always available
///
airTempLabel.Text = ProcessData.AmbTemp.ToString();
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, ProcessData.AmbPress.Val).ToString("F0");
airHumiLabel.Text = ProcessData.AmbHumi.ToString();
tInLabel.Text = ProcessData.TempUp.ToString();
tOutLabel.Text = ProcessData.TempDown.ToString();
tDivLabel.Text = ProcessData.TempDiv.ToString();
prInLabel.Text = ProcessData.PressUp.ToString();
prOutLabel.Text = ProcessData.PressDown.ToString();
massLabel.Text = ProcessData.Mass.ToString();
if (args.TestPhase == Config.Entities.Progress.FlowSetting ||
args.TestPhase == Config.Entities.Progress.Test)
{
///
/// Available when setting the flow and during a test
///
refFreqLabel.Text = ProcessData.RefFreq.ToString();
refFlowLabel.Text = Utils.DoubleToStr(ProcessData.RefFlow.Val, 4);
}
if (args.TestPhase == Config.Entities.Progress.Test)
{
///
/// Available only during a test
///
refPulsesLabel.Text = ProcessData.RefPulses.ToString();
double refVolume = ProcessData.LtrPerRefPulse * (double)ProcessData.RefPulses;
refVolumeLabel.Text = refVolume.ToString("F2");
double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val;
massDiffLabel.Text = massDiff.ToString("F3");
double volumeCtv = 1000 * Config.Formulas.Buoyancy() * massDiff / Config.Formulas.WaterDensityFromTempPress((ProcessData.TempUp.Val + ProcessData.TempDown.Val) / 2,
(ProcessData.PressUp.Val + ProcessData.PressDown.Val) / 2,
Program.LocalSettings.RealDensity,
Program.LocalSettings.AtTemperature); /// [kg/m3]
volumeCtvLabel.Text = volumeCtv.ToString("F2");
double refError = Config.Formulas.ErrorFromVolumes(refVolume, volumeCtv);
refErrorLabel.Text = refError.ToString("F3");
if (currentMetersKind == MetersKind.Single || currentMetersKind == MetersKind.HeatMeter)
{
for (int i = 0; i < Math.Min(textBoxesCount, ProcessData.RegisterReaders.Length); i++)
{
BenchControl.GenericDevices.IRegisterReader rr = ProcessData.RegisterReaders[i];
if (rr != null)
{
pulses[i].Text = rr.WMPulses.ToString();
refPulses[i].Text = rr.WMRefPulses.ToString();
volume[i].Text = rr.WMVolume.ToString("F1");
error[i].Text = Config.Formulas.ErrorFromVolumes(rr.WMVolume, rr.WMRefPulses * ProcessData.LtrPerRefPulse).ToString("F1");
}
}
}
else if (currentMetersKind == MetersKind.Combined)
{
for (int compMtr = 0; compMtr < Config.Data.CompoundWMsCount; compMtr++)
{
int end = Math.Min(2 * compMtr + 2, Math.Min(textBoxesCount, ProcessData.RegisterReaders.Length));
double compoundVolume = 0;
for (int i = 2 * compMtr; i < end; i++)
{
BenchControl.GenericDevices.IRegisterReader rr = ProcessData.RegisterReaders[i];
if (rr != null)
{
pulses[i].Text = rr.WMPulses.ToString();
refPulses[i].Text = rr.WMRefPulses.ToString();
volume[i].Text = rr.WMVolume.ToString("F1");
error[i].Text = Config.Formulas.ErrorFromVolumes(rr.WMVolume, rr.WMRefPulses * ProcessData.LtrPerRefPulse).ToString("F1");
compoundVolume += rr.WMVolume;
}
}
cmpndVolume[compMtr].Text = compoundVolume.ToString("F1");
cmpndError[compMtr].Text = Config.Formulas.ErrorFromVolumes(compoundVolume, refVolume).ToString("F1");
}
}
}
//if (pumpOn != args.PumpOn || diverterToTank != args.DivToTank)
//{
// //if (pumpOn != args.PumpOn)
// //{
// // if (pumpOn) pumpPictureBox.Image = System.Resources.
// // else pumpPictureBox.Image = System.Resources.
// //}
// pumpOn = args.PumpOn;
// diverterToTank = args.DivToTank;
// Invalidate();
//}
}
void OnTestCompleted(object sender, TestCompletedEventArgs args)
{
Results.Entities.TestRslt tRes = args.TestRslt;
if (tRes == null) return;
airTempLabel.Text = tRes.AmbTempMean.ToString("F1");
airPressLabel.Text = Config.Units.ConvertTo(Config.Unit.mbar, tRes.AmbPressMean).ToString("F0");
airHumiLabel.Text = tRes.AmbHumiMean.ToString("F1");
tInLabel.Text = tRes.TempUpMean.ToString("F2");
tOutLabel.Text = tRes.TempDownMean.ToString("F2");
tDivLabel.Text = tRes.TempDivMean.ToString("F2");
prInLabel.Text = tRes.PressUpMean.ToString("F2");
prOutLabel.Text = tRes.PressDownMean.ToString("F2");
massLabel.Text = ProcessData.Mass.ToString();
massDiffLabel.Text = (tRes.MassEnd - tRes.MassStart).ToString("F3");
refPulsesLabel.Text = tRes.PulsesMaster.ToString("F0");
refFreqLabel.Text = "---";
refFlowLabel.Text = Utils.DoubleToStr(tRes.FlowVolume, 4);
refVolumeLabel.Text = tRes.VolumeCTV.ToString("F2");
//regValvePosLabel.Text = tstRslt.
volumeCtvLabel.Text = tRes.VolumeCTV.ToString("F1");
refErrorLabel.Text = (tRes.ErrorMaster == 0) ? "---" : tRes.ErrorMaster.ToString("F3");
if (!tRes.Batch.Compound)
{
for (int i = 0; i < Math.Min(textBoxesCount, ProcessData.BatchRslts.WaterMeters.Length); i++)
{
Results.Entities.WaterMeter wm = ProcessData.BatchRslts.WaterMeters[i];
Results.Entities.MeterTestRslt mtr = (wm != null) ? wm.GetMeterTestRslt(args.TestName) : null;
if (mtr != null)
{
pulses[i].Text = mtr.PulsesMeter.ToString("F0");
refPulses[i].Text = mtr.PulsesMaster.ToString("F0");
volume[i].Text = mtr.VolumeMeter.ToString("F2");
error[i].Text = mtr.Error.ToString("F2");
passed[i].Text = mtr.Passed ? Strings.Passed : Strings.Failed;
}
}
}
else
{
for (int compMtr = 0; compMtr < Config.Data.CompoundWMsCount; compMtr++)
{
Results.Entities.WaterMeter wm = ProcessData.BatchRslts.WaterMeters[compMtr];
if (wm == null) continue;
int end = Math.Min(textBoxesCount, Config.Data.WMsCount);
Results.Entities.MeterTestRslt mtrMain = wm.GetMeterTestRslt(args.TestName, CompoundMeterId.CompoundMain);
if ((mtrMain != null) && (2 * compMtr < end))
{
pulses[2 * compMtr].Text = mtrMain.PulsesMeter.ToString("F0");
refPulses[2 * compMtr].Text = mtrMain.PulsesMaster.ToString("F0");
volume[2 * compMtr].Text = mtrMain.VolumeMeter.ToString("F2");
error[2 * compMtr].Text = mtrMain.Error.ToString("F2");
passed[2 * compMtr].Text = mtrMain.Passed ? Strings.Passed : Strings.Failed;
}
Results.Entities.MeterTestRslt mtrAux = wm.GetMeterTestRslt(args.TestName, CompoundMeterId.CompoundAux);
if ((mtrAux != null) && (2 * compMtr + 1 < end))
{
pulses[2 * compMtr + 1].Text = mtrAux.PulsesMeter.ToString("F0");
refPulses[2 * compMtr + 1].Text = mtrAux.PulsesMaster.ToString("F0");
volume[2 * compMtr + 1].Text = mtrAux.VolumeMeter.ToString("F2");
error[2 * compMtr + 1].Text = mtrAux.Error.ToString("F2");
passed[2 * compMtr + 1].Text = mtrAux.Passed ? Strings.Passed : Strings.Failed;
}
Results.Entities.MeterTestRslt mtrComp = wm.GetMeterTestRslt(args.TestName, CompoundMeterId.Compound);
if (mtrComp != null)
{
cmpndVolume[compMtr].Text = mtrComp.VolumeMeter.ToString("F2");
cmpndError[compMtr].Text = mtrComp.Error.ToString("F2");
cmpndPassed[compMtr].Text = mtrComp.Passed ? Strings.Passed : Strings.Failed;
}
}
}
}
void OnProcedureCompleted(object sender, ProcedureCompletedEventArgs args)
{
}
private void ProcessTabPageCtrl_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Graphics formGraphics = this.CreateGraphics();
System.Drawing.SolidBrush filledBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Blue);
System.Drawing.SolidBrush emptyBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Gray);
System.Drawing.SolidBrush benchBrush = (pumpOn ? filledBrush : emptyBrush);
int diam = 14; // pipe diameter (pixels)
int left = 20; // left-most pipe x-coordinate
int top = 14; // top-most pipe y-coordinate
int topLeft = 876;
int topRight = 966;
int divTop = 40;
int bottom = 504; // bottom-most pipe y-coordinate
int benchTop = 378; // bench-pipe top y-coordinate
int pumpLeft = 779;
int pumpWdth = 38;
/// Pipes
formGraphics.FillRectangle(filledBrush,new Rectangle(pumpLeft+pumpWdth, bottom-diam, 65, diam)); // tank -> pump
formGraphics.FillRectangle(benchBrush, new Rectangle(left, bottom-diam, pumpLeft-left, diam)); // pump ->bench horizontal
formGraphics.FillRectangle(benchBrush, new Rectangle(left, benchTop, diam, bottom-benchTop)); // ->bench vertical
formGraphics.FillRectangle(benchBrush, new Rectangle(left + diam, benchTop, topLeft-left, diam)); // bench horizontal
formGraphics.FillRectangle(benchBrush, new Rectangle(topLeft, top + diam, diam, benchTop-top-diam)); // bench -> top vertical
formGraphics.FillRectangle(benchBrush, new Rectangle(topLeft, top, topRight-topLeft, diam)); // top horizontal
formGraphics.FillRectangle(benchBrush, new Rectangle(topRight-diam, top+diam, diam, divTop-top-diam)); // top -> diverter vertical
/// Diverter
int displacement = diverterToTank ? 25 : -25;
Point[] points = new Point[4];
points[0].X = topRight - diam;
points[0].Y = divTop;
points[1].X = topRight;
points[1].Y = divTop;
points[2].X = topRight + displacement;
points[2].Y = divTop + 50;
points[3].X = topRight - diam + displacement;
points[3].Y = divTop + 50;
formGraphics.FillPolygon(benchBrush, points);
/// Sink
formGraphics.FillEllipse(emptyBrush, topRight - diam / 2 - 45, divTop + 50, 40, 30);
formGraphics.DrawEllipse(Pens.Black, topRight - diam / 2 - 45, divTop + 50, 40, 30);
/// Tank
formGraphics.DrawRectangle(Pens.Black, topRight - diam / 2, divTop + 51, 60, 80);
emptyBrush.Dispose();
filledBrush.Dispose();
formGraphics.Dispose();
}
private void PaintBypass(System.Drawing.Graphics formGraphics, System.Drawing.SolidBrush brush, int startX, int startY)
{
int w = 80;
int h = 43;
int diam = 10; // pipe diameter (pixels)
formGraphics.FillRectangle(brush, new Rectangle(startX, startY, diam, h - diam));
formGraphics.FillRectangle(brush, new Rectangle(startX, startY + h - diam, w, diam));
formGraphics.FillRectangle(brush, new Rectangle(startX + w - diam, startY, diam, h));
}
}
}
@@ -0,0 +1,237 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAjCAYAAAD48HgdAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAN0SURBVFhHxZg5SDNBGIZHiTZBEA9UEESE2ARvxIMIVuJV
qY0iKoithSBok87CIFgZwUIQlEDEo7EQBRuJKNiYSsFSsDJaeRTf7zvLbvb4drObqH/xNNmZ93symWsj
UqkU6RkeHiYhxH9B72ERA1NTU2zH3+T29tbgwIqdnp7KxvPzgoh+j89PQUVFgmZnZy0OrBg4OzuTcuEw
H5orT0/KSE1OTrL1bcXAxcWF7Hxzw4fnAnILCwvZusBRDAQCARny9sYXyIbVVWcpkFEMBINBKijgi3hl
eVkZrYeHB7aWiisxdb5VVvLF3ILFhJyRkRG2jh5XYiAej8vQtTW+qBuqqwUNDQ2x+WZci4GlpSUpt7nJ
F7bj40NQcbGg/v5+NpfDkxhoaGiQcqkUL8GB9kofPpPDsxioqKiQhd7feRE9h4eC8vPz6erqSuu/sbFB
VVVVEp/Pp4mD7u5u2SYrsUQiIUP8fl5GZXtbKZZMJi0ZJycn37t+kZRWpe7u7rTnWYmBo6MjGeY03/C8
tbVV6zM3N0dtbW2aiMri4qL8svr8rMWAWiQWs0oFg4La29tpfHycxsbGDCItLS20srIin4XDYTY7JzFQ
X18vix0cpKUCAeOIgNHRUZqentb6mUfITM5ioLa2lpqarDJYJJ2dnWyfTGQthvsTMMuocH284Flsd3eX
SktLKS8vzyLz/CyorOwPxSYmJqirq8sigom7t7cnf8re3vQcwzN8xmW5xVZsZmZGHracTCQS0dph8vf0
pKUAFgLa4pk+0wsGMezIjY2NFpm+vj65tPVtQU1NDYVCRikVbCHou7W1ZennBoOYuvQBNkanm8Dx8bFs
hyOHEwN1dUoWNmMuwwmDWHNzM0WjUUMDDvV+lkjwQnpwbPn9fnp8fGSz7HA1+fXEYjEplUzyImZw0KM9
9jQuzw7PYpiD5eWCvr54EY54XJHDlYnL5PAk1tHR8T0P+eKZiEYVOYw4l23GtRjOOgRzRd0yMKDI7e/v
szX0uBI7Pz+XgevrfEEv4IUGWVwdPRnF7u/vZdDODl8oG3w+XIuCbD0VR7HLy0t5JuqvND/B66syaniZ
5uoCR7FQKCQDXl74ArkQiSjvAtfX12xtW7HBwUEqKfG2LXgFf9jgi2PDNtdnxRYWFmQHnHe/jd1isIip
b0B/Df4sTHuk6B/rrIep2LXHGgAAAABJRU5ErkJggg==
</value>
</data>
<data name="flowMeterPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAN+SURBVFhHtZi5SgRBEIbbW8QjkRXBKxPWEwRF1EjQSBDE
RFBxDdRdEDxBUDDyJXwBH8DAzNxQQdDIR9g3aOfv3emp6qkd5zL4PHqqqn/6qO5qVa1WdVwqlYpWSqVG
iumztrZm2NraqtlLRo3IW9j6+rphZGQkbO8aS3x8fOiDg4Owc0ImJib04+OjjYvR8Tk5OeH2VIBEuVzm
DqC9XauODq3u76MZH6/Zuf4en5+f+ufnx7Czs8O+tba2RgsbR2DiYNjb0+ruThbSCPj097M46ByiNjY2
WPvKyopZa6Kwl5cXY2AdOju1mp+XO03C7q5WU1NMiM/g4KD++vrSs7OzjYUxUZg2qZMsjI0xUT09PXZa
8T80hISFpu/8XA6ehclJ1kdLS0u0MLbQMVL/IWpxMeiD0Oktl+/vb6vFCkNKsIZYU1LQrFBRXV21NjKt
T09PYWEsT+Wx0F28HGbjg+vr4BtpDwmjH1nAPFhYCGJjpKgogIGofz87OwuEsV2InEOdsrK0FMT2dp9o
A3wbDytsYGCg1ogFf3srO6bB2X3q5ka2A9vb1s4Ks45xjpm4zM0FcbGZrq5kO5/9fWtfLBYdYZJDGpaX
g5i9vbKNRP1cLRQKWnV3d+crbHo6iAeSLI26sKamJvwmQSTjJHjnnI2FG8LFhWzXCH4TsX/IxnGhO7uv
T7b5C1HYzIxsHAc6UkCyiUOuI+ZeY5JOHyU3YXT3pZ0+ChWWOl3QPIWFLtkkpS7MpAsmDHcxycHFzeiX
l7JdEo6PtWpuNvGssC4crOgAiiUnCj37kDzzOsJI5n94eKgJGxoaCjqLOsTpLSHvO5sf18PMIn68vr4G
H1DNSI7u9P119iUBxUc9LgoRKwyYg9PvFNUMdaQ3T1xdom4JaSAz9vz8zIWhQrad47zznaTrcJ6cntr4
o6OjRgsTZv7xBQDPKPI6nAcofuo7Eby/v8vCULa3tbVxMUC6DmcFy4X0sedtOqqFCbONxMEgBc6C8x5S
KpXCGtwG9y3BgGmVOkgD1hSZPuBqAEwYfXVB2Y4KmQbIVNYhJQwPs3iHh4dMDMUKo+9TeODw21Eh02AG
FA7I1JIAytERy+gUd025GGGbm5vMCa8uvgHKdlTI9LsFR1gUzpQBpAS6+xqh7JunR4cX7O3tTTQEq6ur
rJOk+MkzDp59zYlOXyP+83GYU9W/sZE2jpG87/4AAAAASUVORK5CYII=
</value>
</data>
<data name="watermeterPictureBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAeCAYAAABAFGxuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAIGSURBVFhH7de/SwJhGAfwtwJpUlBwaVIEcXDVxcUxQaS1
QdLVwTnQv0AcGgUdo9U1dNAWHVwiEQKFaAkCwZqq5el53rvT03v8cXqeDQ0fjXu97/PFO+w9MZlMYFO1
Wg2EEJbg8vX+iy3i8vW2KHaEznbkgm63C6PRiJ1DtijmQLCjMRLg8/mgUqmwsw5UTEN5UfD7/ZDL5eZm
mSqWz+cxyMpimhZS7r12uy1n4d/GG3O5Y8QFWyWCTpCcRy8lRK3XeUJcoJVGaFrsXj34V9hYrFrtQSj0
wa4Z2VgsGh1Dq9WS79z6PBuLkUbjQZZLJN7Y9ZkVxYrFgQzZl3j83TBz5oDFms02uN3fhrmKAxbzer8M
M2dWFNsH7R4Lh+mXnf+MwsZi6fSLLBUMfrLr82wsVio9ssd5NhYzZ1rsEhXVg4dA3ybN12CnSCQCRCkY
UP0gLmAfnpGQHfQM+zGlIO257hAXZLUMJJPJuQ6yx+KBfr+P/3CreAIVTOoC9uEK8Q8mS3ew5XIZYrEY
nuhCN2qQlQZIQL1eZ+ev3VoHAgFwOOjSXqNXNXRXSqlOp8POJBvt+Xu9ngwS4lQN3oVy+egJybLHt2w2
K0OFOFeHmJFByn5+2eXTM1WMDIdD8Hg8coAQtyquCKGfHVq/kOekUik2k2O6mKZQKOBAKrea0+nE7Y2b
zVhuAr/Ce2bVcGWw1gAAAABJRU5ErkJggg==
</value>
</data>
<data name="watermeterPictureBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAeCAYAAABAFGxuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAIGSURBVFhH7de/SwJhGAfwtwJpUlBwaVIEcXDVxcUxQaS1
QdLVwTnQv0AcGgUdo9U1dNAWHVwiEQKFaAkCwZqq5el53rvT03v8cXqeDQ0fjXu97/PFO+w9MZlMYFO1
Wg2EEJbg8vX+iy3i8vW2KHaEznbkgm63C6PRiJ1DtijmQLCjMRLg8/mgUqmwsw5UTEN5UfD7/ZDL5eZm
mSqWz+cxyMpimhZS7r12uy1n4d/GG3O5Y8QFWyWCTpCcRy8lRK3XeUJcoJVGaFrsXj34V9hYrFrtQSj0
wa4Z2VgsGh1Dq9WS79z6PBuLkUbjQZZLJN7Y9ZkVxYrFgQzZl3j83TBz5oDFms02uN3fhrmKAxbzer8M
M2dWFNsH7R4Lh+mXnf+MwsZi6fSLLBUMfrLr82wsVio9ssd5NhYzZ1rsEhXVg4dA3ybN12CnSCQCRCkY
UP0gLmAfnpGQHfQM+zGlIO257hAXZLUMJJPJuQ6yx+KBfr+P/3CreAIVTOoC9uEK8Q8mS3ew5XIZYrEY
nuhCN2qQlQZIQL1eZ+ev3VoHAgFwOOjSXqNXNXRXSqlOp8POJBvt+Xu9ngwS4lQN3oVy+egJybLHt2w2
K0OFOFeHmJFByn5+2eXTM1WMDIdD8Hg8coAQtyquCKGfHVq/kOekUik2k2O6mKZQKOBAKrea0+nE7Y2b
zVhuAr/Ce2bVcGWw1gAAAABJRU5ErkJggg==
</value>
</data>
<data name="watermeterPictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAeCAYAAABAFGxuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAIGSURBVFhH7de/SwJhGAfwtwJpUlBwaVIEcXDVxcUxQaS1
QdLVwTnQv0AcGgUdo9U1dNAWHVwiEQKFaAkCwZqq5el53rvT03v8cXqeDQ0fjXu97/PFO+w9MZlMYFO1
Wg2EEJbg8vX+iy3i8vW2KHaEznbkgm63C6PRiJ1DtijmQLCjMRLg8/mgUqmwsw5UTEN5UfD7/ZDL5eZm
mSqWz+cxyMpimhZS7r12uy1n4d/GG3O5Y8QFWyWCTpCcRy8lRK3XeUJcoJVGaFrsXj34V9hYrFrtQSj0
wa4Z2VgsGh1Dq9WS79z6PBuLkUbjQZZLJN7Y9ZkVxYrFgQzZl3j83TBz5oDFms02uN3fhrmKAxbzer8M
M2dWFNsH7R4Lh+mXnf+MwsZi6fSLLBUMfrLr82wsVio9ssd5NhYzZ1rsEhXVg4dA3ybN12CnSCQCRCkY
UP0gLmAfnpGQHfQM+zGlIO257hAXZLUMJJPJuQ6yx+KBfr+P/3CreAIVTOoC9uEK8Q8mS3ew5XIZYrEY
nuhCN2qQlQZIQL1eZ+ev3VoHAgFwOOjSXqNXNXRXSqlOp8POJBvt+Xu9ngwS4lQN3oVy+egJybLHt2w2
K0OFOFeHmJFByn5+2eXTM1WMDIdD8Hg8coAQtyquCKGfHVq/kOekUik2k2O6mKZQKOBAKrea0+nE7Y2b
zVhuAr/Ce2bVcGWw1gAAAABJRU5ErkJggg==
</value>
</data>
<data name="pumpPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAALTSURBVFhH7Ze9ajJBFIbXP0iRBAL+QMDa3hRqIbkAQSw1
iCRaWHgHuQBLwU7SpLBKaRmSXhOwScQmZW5AUqWb7Lt6ds7uHmMkO3x8kOKBXefMOw/O7jLHWq1W6jdE
IhFlWVYAqXYf9hbLZDIOXKJUKqlms+nCx+LxuFM/Ho/FvG38SGw6napGo+FZsN/v/4hqterOSaVSqtfr
iWv42SlWLBY9QoQkIcHFOMvlUlyP+FYsl8uJoUCSkNgmhi2W1iREsdFopMrlshtycmLZW2Cp62sdLElI
cLH7e0tdXOiMWCymKpVKYH0ginGp01NLKbXmt2KUc35uqcNDnTWfzwMOATG+fbe3OixMMfD+rrPwz/k9
PGL8Qef/FBGmGHh+1nl45haLRVAMnwQqwjPlDwFhiwFsK40PBoOgGP9O4UGXQkyIARoHATEaaLflycCU
GN5WqqnX6+Sjf4zFLPX0JE8GpsRALqezN+iboyN5EmFS7PFRZ2/QN9IEjkkxcHys8230jVTM+SdijYZc
zDEt9vGh823WF62WXMwxLQao1mZ98Se2A6q1WV/8ie2Aam30jVTIMS32f33HwM2NPIEwKYaD48GBzrfQ
80WjUecGx93PT3kiMCl2d6ezHXDEQDNKPzw8yBOBSTGqKRQKajKZ6PNYMpl0B3E+kiabEiuVdO5wOPQe
FNEh0yBaLCnAhNjbm85MJBKOi0fMudkUAJzF/SFhi728oAnRmbPZTBZD2w5rFOFFwJvCg8IWu7zUea1W
y/UAHjECfR5NQItFQWGJvb5a6upKZ7Xb7YCDKIa2nSYB2tYwxPBM8e0DkoMoBtC2838OnJ3pa0lCgovx
tw90Oh1xbbBVjECHzMMISUKCi3H8z5SfnWJo29Eh+4MlCQm/GF4u/vZtY6cYB80oLZDP51263a5Hho9l
s1mnHl90+nj+hL3EOOl02oFE/dB4rVYT53/PSn0BMb7xlEsaQlIAAAAASUVORK5CYII=
</value>
</data>
<data name="reservoirPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAI4AAABtCAYAAAB3LVkkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAEuSURBVHhe7dIxDoAwEAQx/v/pQFJQBaRM7ZN8zbZzPTcg
mG/AAeGQCIdEOCTCIREOiXBIhEMiHBLhkAiHRDgkwiERDolwSIRDIhwS4ZAIh0Q4JMIhEQ6JcEiEQyIc
EuGQCIdEOCTCIREOiXBIhEMiHBLhkAiHRDgkwiERDolwSIRDIhwS4ZAIh0Q4JMIhEQ6JcEiEQyIcEuGQ
CIdEOCTCIREOiXBIhEMiHBLhkAiHRDgkwiERDolwSIRDIhwS4ZAIh0Q4JMIhEQ6JcEiEQyIcEuGQCIdE
OCTCIREOiXBIhEMiHJIVzm6AP8IhEQ6JcEiEQyIcEuGQCIdEOCTCIREOiXBIhEMiHBLhkKxw5tuN8EU4
JMIhEQ6JcEiEQyIcEuGQCIdEOCTCIXnDgRPXuAF1p5ji1T6jKwAAAABJRU5ErkJggg==
</value>
</data>
</root>
+37 -6
View File
@@ -39,7 +39,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;DEBUG;FEWA_50;STABLE_MASS_EXTRAS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -49,7 +49,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;FEWA_50;STABLE_MASS_EXTRAS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@@ -58,7 +58,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;DEBUG;FEWA_50;STABLE_MASS_EXTRAS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
@@ -67,7 +67,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;FEWA_50;STABLE_MASS_EXTRAS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
@@ -97,8 +97,9 @@
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="ControlComponent3Munich">
<HintPath>..\packages\ControlBoard\Munich\ControlComponent3Munich.dll</HintPath>
<Reference Include="ControlComponent3U, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ControlBoard\FEWA_50\ControlComponent3U.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
@@ -549,6 +550,7 @@
</Compile>
<Compile Include="BenchControl\Elde\ValveEx\ValveFactory.cs" />
<Compile Include="BenchControl\GenericDevices\ICalibInfoCfg.cs" />
<Compile Include="BenchControl\GenericDevices\IParallelOutput.cs" />
<Compile Include="BenchControl\GenericDevices\IReceivesDataFromRadio.cs" />
<Compile Include="BenchControl\GenericDevices\IStartInfoReader.cs" />
<Compile Include="BenchControl\GenericDevices\IHart.cs" />
@@ -677,6 +679,12 @@
<DependentUpon>PressureMeterCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\Modbus\PressureMeter\Meret\ReadPressureOp.cs" />
<Compile Include="BenchControl\Modbus\QuidoRS\ConfirmationForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="BenchControl\Modbus\QuidoRS\ConfirmationForm.designer.cs">
<DependentUpon>ConfirmationForm.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\Modbus\QuidoRS\QuidoRS.cs" />
<Compile Include="BenchControl\Modbus\QuidoRS\QuidoRSCfg.cs" />
<Compile Include="BenchControl\Modbus\QuidoRS\QuidoRSCfgCtrl.cs">
@@ -687,6 +695,8 @@
</Compile>
<Compile Include="BenchControl\Modbus\QuidoRS\Factory.cs" />
<Compile Include="BenchControl\Modbus\QuidoRS\SetOutputsOp.cs" />
<Compile Include="BenchControl\Modbus\QuidoRS\ShowBenchErrorOp.cs" />
<Compile Include="BenchControl\Modbus\QuidoRS\ShowBenchWaitingOp.cs" />
<Compile Include="BenchControl\Modbus\TankSelector\Factory.cs" />
<Compile Include="BenchControl\Modbus\TankSelector\SelectTankOp.cs" />
<Compile Include="BenchControl\Modbus\TankSelector\SetQuidoBitOp.cs" />
@@ -1437,6 +1447,12 @@
<DependentUpon>WaterMeterCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\WaterMeters\WaterMeter\WaterMeterFactory.cs" />
<Compile Include="Forms\ClosingTbfForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ClosingTbfForm.Designer.cs">
<DependentUpon>ClosingTbfForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\DatabaseSettingsDlg.cs">
<SubType>Form</SubType>
</Compile>
@@ -1876,6 +1892,12 @@
<Compile Include="Screens\ProcessTabPageCtrl48.Designer.cs">
<DependentUpon>ProcessTabPageCtrl48.cs</DependentUpon>
</Compile>
<Compile Include="Screens\ProcessTabPageHeatMetersCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Screens\ProcessTabPageHeatMetersCtrl.Designer.cs">
<DependentUpon>ProcessTabPageHeatMetersCtrl.cs</DependentUpon>
</Compile>
<Compile Include="SelectComponentClassDlg.cs">
<SubType>Form</SubType>
</Compile>
@@ -2572,6 +2594,9 @@
<EmbeddedResource Include="BenchControl\Modbus\PressureMeter\Meret\PressureMeterCfgCtrl.resx">
<DependentUpon>PressureMeterCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BenchControl\Modbus\QuidoRS\ConfirmationForm.resx">
<DependentUpon>ConfirmationForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BenchControl\Modbus\QuidoRS\QuidoRSCfgCtrl.resx">
<DependentUpon>QuidoRSCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
@@ -2833,6 +2858,9 @@
<EmbeddedResource Include="Forms\AboutDlg.ru.resx">
<DependentUpon>AboutDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\ClosingTbfForm.resx">
<DependentUpon>ClosingTbfForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\DatabaseSettingsDlg.resx">
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
</EmbeddedResource>
@@ -2933,6 +2961,9 @@
<EmbeddedResource Include="Screens\ProcessTabPageCtrl48.resx">
<DependentUpon>ProcessTabPageCtrl48.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Screens\ProcessTabPageHeatMetersCtrl.resx">
<DependentUpon>ProcessTabPageHeatMetersCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SelectComponentClassDlg.pl.resx">
<DependentUpon>SelectComponentClassDlg.cs</DependentUpon>
</EmbeddedResource>
+26 -26
View File
@@ -35,32 +35,32 @@ namespace TBF.UiBridge
Next, /// Used for debugging
}
public enum ButtonsEtc
{
None = 0,
ProcedureCmbBoxEn = (1 << 0),
TestCmbBoxEn = (1 << 1),
StopBtnEn = (1 << 2),
StartTestBtnsEn = (1 << 3),
StartCycleBtnEn = (1 << 4),
PurgeBeginBtnEn = (1 << 5),
PurgeEndBtnEn = (1 << 6),
DrainTankBtn1En = (1 << 7),
DrainTankBtn1Hi = (1 << 8),
DrainTankBtn2En = (1 << 9),
DrainTankBtn2Hi = (1 << 10),
DrainTankBtn3En = (1 << 11),
DrainTankBtn3Hi = (1 << 12),
Break = (1 << 13),
ResetResultsBtnEn = (1 << 14),
AcceptResultsBtnEn = (1 << 15),
CalibrationBtnEn = (1 << 16),
SensitivityTestBtnEn = (1 << 17),
CustomBtnEn = (1 << 18),
public enum ButtonsEtc
{
None = 0,
ProcedureCmbBoxEn = (1 << 0),
TestCmbBoxEn = (1 << 1),
StopBtnEn = (1 << 2),
StartTestBtnsEn = (1 << 3),
StartCycleBtnEn = (1 << 4),
PurgeBeginBtnEn = (1 << 5),
PurgeEndBtnEn = (1 << 6),
DrainTankBtn1En = (1 << 7),
DrainTankBtn1Hi = (1 << 8),
DrainTankBtn2En = (1 << 9),
DrainTankBtn2Hi = (1 << 10),
DrainTankBtn3En = (1 << 11),
DrainTankBtn3Hi = (1 << 12),
Break = (1 << 13),
ResetResultsBtnEn = (1 << 14),
AcceptResultsBtnEn = (1 << 15),
CalibrationBtnEn = (1 << 16),
SensitivityTestBtnEn = (1 << 17),
CustomBtnEn = (1 << 18),
/// If one of the following flags is set, flags 0x1 through 0x2000 are ignored
///
ShowBenchEmpty = 0x1000000,
ShowBenchFilled = 0x2000000,
/// If one of the following flags is set, flags (1 << 0) through (1 << 18) are ignored
ShowBenchEmpty = (1 << 24),
ShowBenchFilled = (1 << 25),
Shutdown = (1 << 26),
}
}
+1 -1
View File
@@ -63,7 +63,7 @@ namespace TBF.UiControls
int clmn = (int)Column.FixedColumnsCount;
for (int i = 0; i < Config.Data.WMsCount; i++)
{
Columns.Add(Strings.Sensor_ + (i + 1).ToString(), (ls.MetersColumnCount > clmn) ? ls.MetersColumnWidths[clmn] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
Columns.Add(string.Format("{0} {1}", Strings.Sensor, i + 1), (ls.MetersColumnCount > clmn) ? ls.MetersColumnWidths[clmn] : 50 * parent.Dpi / PathsDlg.Dpi100pct);
clmn++;
}
+1 -1
View File
@@ -85,7 +85,7 @@ namespace TBF.UiControls
if (sampleToCreateHeader != null)
{
if (showSensorsColumn) listViewEx.Columns.Add(Strings.Sensor_, 60);
if (showSensorsColumn) listViewEx.Columns.Add(Strings.Sensor, 60);
listViewEx.Columns.Add(Strings.Component, 80);
paramsCount = sampleToCreateHeader.ParamsCount();
@@ -5,9 +5,9 @@ using TracingDB.Entities;
namespace TracingDB
{
public class BatteryInfo
public class BatteryAndFlowtubeInfo
{
static readonly ILog log = LogManager.GetLogger(typeof(BatteryInfo));
static readonly ILog log = LogManager.GetLogger(typeof(BatteryAndFlowtubeInfo));
/// Constants
public const string VitzrocellBatteryPartNr = "68118221";
@@ -18,16 +18,18 @@ namespace TracingDB
public int BattBatchNr; /// Batch number (purchase order)
public string BattMMYY; /// Production date
public string BattSupplier; /// Supplier
public string PrintedBatteryInfo; /// 'T', 'Vi' or '-'
public string FlowtubeSapPartNr; /// Flowtube SAP part number
public bool IsPorexFlowtube; ///
public string PrintedInfo; /// 'T', 'Vi', '-', 'T/P', 'Vi/P' or '-/P'
public DateTime TimeStamp; /// Record creation time
bool complete { get { return (PcbNumber != null) && (BattSapPartNr != null) && (BattBatchNr != 0) && (BattMMYY != null) && (BattSupplier != null); } }
public BatteryInfo()
public BatteryAndFlowtubeInfo()
{
TimeStamp = DateTime.Now;
PrintedBatteryInfo = "-";
PrintedInfo = "-";
}
@@ -35,7 +37,7 @@ namespace TracingDB
/// Search MySQL DB and get battery info, add it into the record.
/// </summary>
/// <returns>true when successful</returns>
public static BatteryInfo GetBatteryInfo(string pcbNumber, IList<Record> records)
public static BatteryAndFlowtubeInfo GetBatteryAndFlowtubeInfo(string pcbNumber, IList<WMPart> parts, string porexSapNumbers)
{
if (string.IsNullOrEmpty(pcbNumber))
{
@@ -43,38 +45,43 @@ namespace TracingDB
return null;
}
BatteryInfo info = new BatteryInfo() { PcbNumber = pcbNumber };
BatteryAndFlowtubeInfo info = new BatteryAndFlowtubeInfo() { PcbNumber = pcbNumber };
try
{
bool error = false;
foreach (var rec in records)
foreach (var part in parts)
{
if (rec.Part.CodeLocation == CodeLocation.OnPallet)
if (part.CodeLocation == CodeLocation.OnPart)
{
if (rec.Part.Name == VitzrocellBatteryPartNr)
if (porexSapNumbers.Contains(part.Name))
{
if (info.BattSapPartNr != null) { error = true; break; }
info.BattSapPartNr = VitzrocellBatteryPartNr;
int battBatchNr;
info.BattBatchNr = int.TryParse(rec.Code, out battBatchNr) ? battBatchNr : 1;
info.BattSupplier = "VITZROCELL";
}
else if (rec.Part.Name == TadiranBatteryPartNr)
{
if (info.BattSapPartNr != null) { error = true; break; }
info.BattSapPartNr = TadiranBatteryPartNr;
int battBatchNr;
info.BattBatchNr = int.TryParse(rec.Code, out battBatchNr) ? battBatchNr : 1;
info.BattSupplier = "TADIRAN";
info.IsPorexFlowtube = true;
info.FlowtubeSapPartNr = part.Name;
}
}
if (rec.Part.CodeType == CodeType.DateMMYY)
if (!string.IsNullOrEmpty(part.OraDBType))
{
string[] oraItems = part.OraDBType.Split(new char[] { ' ' });
string oraType = oraItems[0];
string oraDescr = (oraItems.Length > 1) ? oraItems[1] : string.Empty;
if ((oraType == "Batt") || (oraType == "Batt1") || (oraType == "Batt2"))
{
if (info.BattSapPartNr != null) { error = true; break; }
info.BattSapPartNr = part.Name;
int battBatchNr;
info.BattBatchNr = int.TryParse(part.Code, out battBatchNr) ? battBatchNr : 1;
info.BattSupplier = oraDescr; /// Should be "TADIRAN" or "VITZROCELL"
}
}
if (part.CodeType == CodeType.DateMMYY)
{
if (info.BattMMYY != null) { error = true; break; }
info.BattMMYY = rec.Code;
info.BattMMYY = part.Code;
}
}
@@ -89,13 +96,18 @@ namespace TracingDB
///
if (info.BattSupplier == "VITZROCELL")
{
info.PrintedBatteryInfo = "Vi";
info.PrintedInfo = "Vi";
}
else if (info.BattSupplier == "TADIRAN")
{
info.PrintedBatteryInfo = "T";
info.PrintedInfo = "T";
}
///
/// Append Porex flowtube info in case of a Porex flowtube
///
if (info.IsPorexFlowtube) { info.PrintedInfo += "/P"; }
return info;
}
catch (Exception exc)
@@ -109,7 +121,7 @@ namespace TracingDB
public override string ToString()
{
return string.Format("PcbNr={0}, Battery={1}/{2}/{3}, Time={4}", PcbNumber, BattBatchNr, BattMMYY, BattSupplier, TimeStamp);
return string.Format("PcbNr={0}, Battery={1}/{2}/{3} {4}, Time={5}", PcbNumber, BattBatchNr, BattMMYY, BattSupplier, (IsPorexFlowtube ? "porex" : ""), TimeStamp);
}
}
}
+3 -2
View File
@@ -6,6 +6,7 @@ using NHibernate;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using log4net;
using TracingDB.Entities;
namespace TracingDB
{
@@ -55,7 +56,7 @@ namespace TracingDB
FluentConfiguration cfg = Fluently
.Configure()
.Database(MySQLConfiguration.Standard.ConnectionString(connectionString))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.Process>());
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Process>());
if (createDB)
{
@@ -114,7 +115,7 @@ namespace TracingDB
{
//using (var transaction = session.BeginTransaction())
//{
// var part1 = new TracingDB.Entities.Part("flow tube", CodeType.UniqueNr, CodeForm.QRCode, 0);
// var part1 = new Part("flow tube", CodeType.UniqueNr, CodeForm.QRCode, 0);
// session.SaveOrUpdate(part1);
// transaction.Commit();
//}
-54
View File
@@ -1,54 +0,0 @@
using System;
using System.Collections.Generic;
namespace TracingDB.Entities
{
public class Option1 : Interfaces.IOption
{
public virtual int Id { get; protected set; }
public virtual int ItemNr { get; set; }
public virtual string Name { get; set; }
public virtual string OraDBType { get; set; }
public virtual string Description { get; set; }
public virtual CodeType CodeType { get; set; }
public virtual CodeForm CodeForm { get; set; }
public virtual CodeLocation CodeLocation { get; set; }
public virtual LifetimeManagement LifetimeManagement { get; set; }
public virtual bool Enabled { get; set; }
public Option1()
{
Name = string.Empty;
Description = string.Empty;
}
/// <summary>
/// Create a copy of a part (1) belongig to another process, (2) not assigned to any workstep yet.
/// </summary>
/// <param name="process">Process owning the cloned part</param>
/// <returns>Cloned part</returns>
public virtual Part GetPart(Process owningProcess)
{
Part rslt = new Part();
rslt.Name = Name;
rslt.OraDBType = OraDBType;
rslt.Description = Description;
rslt.CodeType = CodeType;
rslt.CodeForm = CodeForm;
rslt.CodeLocation = CodeLocation;
rslt.LifetimeManagement = LifetimeManagement;
rslt.StepNumber = 0;
rslt.Process = owningProcess;
rslt.Workstep = null;
return rslt;
}
public override string ToString()
{
return string.Format("{0}. {1} ({2})", ItemNr, Name, Description);
}
}
}
-54
View File
@@ -1,54 +0,0 @@
using System;
using System.Collections.Generic;
namespace TracingDB.Entities
{
public class Option2 : Interfaces.IOption
{
public virtual int Id { get; protected set; }
public virtual int ItemNr { get; set; }
public virtual string Name { get; set; }
public virtual string OraDBType { get; set; }
public virtual string Description { get; set; }
public virtual CodeType CodeType { get; set; }
public virtual CodeForm CodeForm { get; set; }
public virtual CodeLocation CodeLocation { get; set; }
public virtual LifetimeManagement LifetimeManagement { get; set; }
public virtual bool Enabled { get; set; }
public Option2()
{
Name = string.Empty;
Description = string.Empty;
}
/// <summary>
/// Create a copy of a part (1) belongig to another process, (2) not assigned to any workstep yet.
/// </summary>
/// <param name="process">Process owning the cloned part</param>
/// <returns>Cloned part</returns>
public virtual Part GetPart(Process owningProcess)
{
Part rslt = new Part();
rslt.Name = Name;
rslt.OraDBType = OraDBType;
rslt.Description = Description;
rslt.CodeType = CodeType;
rslt.CodeForm = CodeForm;
rslt.CodeLocation = CodeLocation;
rslt.LifetimeManagement = LifetimeManagement;
rslt.StepNumber = 0;
rslt.Process = owningProcess;
rslt.Workstep = null;
return rslt;
}
public override string ToString()
{
return string.Format("{0}. {1} ({2})", ItemNr, Name, Description);
}
}
}
+15 -7
View File
@@ -25,6 +25,14 @@ namespace TracingDB.Entities
Description = string.Empty;
}
public Part(string name, Process process, string description)
{
Name = name;
Description = description;
Process = process;
Workstep = null;
}
/// <summary>
/// Constructor used when the part is added to a process
/// </summary>
@@ -51,9 +59,9 @@ namespace TracingDB.Entities
/// </summary>
/// <param name="process">Process owning the cloned part</param>
/// <returns>Cloned part</returns>
public virtual Part Clone(Process owningProcess)
{
Part rslt = new Part();
public virtual Part Clone(Process owningProcess)
{
Part rslt = new Part();
rslt.Name = Name;
rslt.OraDBType = OraDBType;
@@ -61,18 +69,18 @@ namespace TracingDB.Entities
rslt.CodeType = CodeType;
rslt.CodeForm = CodeForm;
rslt.CodeLocation = CodeLocation;
rslt.LifetimeManagement = LifetimeManagement;
rslt.LifetimeManagement = LifetimeManagement;
rslt.StepNumber = StepNumber;
rslt.StepNumber = 0;
rslt.Process = owningProcess;
rslt.Workstep = null;
return rslt;
}
}
public override string ToString()
{
return string.Format("{0} step={1} ({2})", Name, StepNumber, Description);
return string.Format("{0} ({1}: {2})", Name, StepNumber, Description);
}
}
}
+64 -9
View File
@@ -20,13 +20,43 @@ namespace TracingDB.Entities
public virtual IList<Part> Parts { get; set; }
public virtual IList<Workstep> Worksteps { get; set; }
#region SubClass utilities
/// Wrappers
public virtual SubClass GetSubClass() { return (SubClass)SubClass; }
public virtual void SetSubClass(SubClass subClass) { SubClass = (int)subClass; }
/// Convert SubClass to string
public static string SubClass2Str(SubClass subClass)
{
return subClass.ToDescription();
}
/// <summary>
/// Convert string to SubClass
public static SubClass Str2SubClass(string str)
{
foreach (SubClass sc in Enum.GetValues(typeof(SubClass)))
{
if ((str == sc.ToDescription()) && (sc != TracingDB.SubClass.Invalid)) return sc;
}
return TracingDB.SubClass.Invalid;
}
/// Determine whether string is a valid SubClass name
public static bool IsValidSubClassStr(string str)
{
foreach (SubClass sc in Enum.GetValues(typeof(SubClass)))
{
if ((str == sc.ToDescription()) && (sc != TracingDB.SubClass.Invalid)) return true;
}
return false;
}
#endregion SubClass utilities
/// <summary>
/// Default (private) constructor inicializing lists
/// </summary>
protected Process()
@@ -54,21 +84,30 @@ namespace TracingDB.Entities
}
/// <summary>
/// Create a copy of a process with a new name
/// Create a copy of a process with a new name and original 'Created by' user.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public virtual Process Clone(string name)
public virtual Process Clone(string name)
{
return Clone(name, CreatedBy);
}
/// <summary>
/// Create a copy of a process with a new name.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public virtual Process Clone(string name, string userName)
{
Process rslt = new Process(name);
rslt.SubClass = SubClass;
rslt.Description = Description;
rslt.ReleaseNotes = ReleaseNotes;
CreatedBy = "admin";
TimeStamp = DateTime.Now;
ApprovedBy = string.Empty;
TimeStamp2 = DateTime.Now;
ReleaseStatus = ReleaseStatus.In_preparation;
rslt.CreatedBy = userName;
rslt.TimeStamp = DateTime.Now;
rslt.ApprovedBy = string.Empty;
rslt.ReleaseStatus = ReleaseStatus.In_preparation;
foreach (var part in Parts) rslt.Parts.Add(part.Clone(rslt));
foreach (var workstep in Worksteps) rslt.Worksteps.Add(workstep.Clone(rslt));
@@ -76,9 +115,25 @@ namespace TracingDB.Entities
return rslt;
}
/// <summary>
/// Gets a process with a specified name from a list of processes.
/// </summary>
/// <param name="processes">List of processes (ReleasedActive processs)</param>
/// <param name="processName">Process name</param>
/// <returns>Process or null if not found</returns>
public static Process GetProcessFromName(IList<Process> processes, string processName)
{
foreach (var proc in processes)
{
if (proc.Name == processName) return proc;
}
return null;
}
public override string ToString()
{
return string.IsNullOrEmpty(Name) ? string.Empty : Name;
return string.IsNullOrEmpty(Name) ? string.Empty : ((Id != 0) ? Name : string.Format("{0} ({1})", Name, TracingDB.Resources.Strings.unsaved));
}
}
}
+5 -1
View File
@@ -55,7 +55,11 @@ namespace TracingDB.Entities
public override string ToString()
{
return string.Format("code={0} part={1} description='{2}'", Code, Part.Name, Part.Description);
return string.Format("code={0} part={1}{2} description={3}",
Code,
Part.Name,
string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : string.Format(" ORACLE='{0}'", Part.OraDBType),
Part.Description);
}
}
}
+1
View File
@@ -33,6 +33,7 @@ namespace TracingDB.Entities
/// <param name="code">Scanned barcode</param>
public ReferenceRecord(Process process, Workstep workstep, string code,
string userName, string workplace, int result)
: this()
{
Process = process;
Workstep = workstep;
@@ -47,5 +47,10 @@ namespace TracingDB.Entities
this.ProcessName = processName;
this.WorkstepName = workstepName;
}
public override string ToString()
{
return string.Format("Name={0} User={1}", Workplace, UserName);
}
}
}
+36 -34
View File
@@ -9,13 +9,47 @@ namespace TracingDB.Entities
public virtual int WorkstepNr { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual int CheckPartNr { get; set; }
public virtual int CheckPartNr { get; set; } /// 0 == No previous part checked
public virtual bool AllowRepairs { get; set; }
public virtual Process Process { get; set; }
public virtual Part ReferencePart { get; set; }
public virtual IList<Part> Parts { get; set; }
public virtual Workstep Clone(Process owningProcess)
{
Workstep rslt = new Workstep(WorkstepNr, Name, owningProcess);
rslt.Description = Description;
rslt.CheckPartNr = CheckPartNr;
rslt.AllowRepairs = AllowRepairs;
if (ReferencePart != null)
{
foreach (var p in owningProcess.Parts)
{
if (p.Name == ReferencePart.Name)
{
rslt.ReferencePart = p;
break;
}
}
}
foreach (var srcP in Parts)
{
foreach (var p in owningProcess.Parts)
{
if ((p.Name == srcP.Name) && (p.StepNumber == srcP.StepNumber))
{
rslt.Parts.Add(p);
p.Workstep = rslt;
}
}
}
return rslt;
}
/// <summary>
/// Default (private) constructor inicializing a list
@@ -42,41 +76,9 @@ namespace TracingDB.Entities
ReferencePart = null;
}
public virtual Workstep Clone(Process owningProcess)
{
Workstep rslt = new Workstep(WorkstepNr, Name, owningProcess);
rslt.Description = Description;
rslt.CheckPartNr = CheckPartNr;
rslt.AllowRepairs = AllowRepairs;
if (ReferencePart != null)
{
foreach (var p in owningProcess.Parts)
{
if (p.Name == ReferencePart.Name) rslt.ReferencePart = p;
}
}
foreach (var srcP in Parts)
{
foreach (var p in owningProcess.Parts)
{
if (p.Name == srcP.Name)
{
rslt.Parts.Add(p);
p.StepNumber = srcP.StepNumber;
p.Workstep = rslt;
}
}
}
return rslt;
}
public override string ToString()
{
//return string.Format("{0} {1} ({2}) Ref: {3}", WorkstepNr, Name, Description, (ReferencePart != null) ? ReferencePart.Name : "none");
return string.Format("{0}: {1}", WorkstepNr, Name);
return Name; /// Displayed in Pracovisko.WorkstepDlg.workstepComboBox, Items are Workstep objects
}
}
}
+8 -4
View File
@@ -38,13 +38,13 @@ namespace TracingDB
public enum CodeType
{
[Description("-")]
[Description("")]
UniqueNr,
[Description("PCB")]
[Description("Sap6-8")]
FlowtubeNr, /// prvé 3 znaky sa zhodujú s poslednými 3 znakmi názvu
[Description("Flowt.")]
[Description("FT-20")]
FlowtubeNrLU, /// začiatok kódu sa zhoduje s názvom
[Description("1")]
@@ -143,7 +143,9 @@ namespace TracingDB
Workplace,
UserName,
Barcode,
RefPartName,
PartBarcode,
PartName,
TimeStamp2,
Workstep2,
@@ -156,7 +158,9 @@ namespace TracingDB
PurchaseOrder,
TestResult,
MaxPruefindex,
MaxTestindexEx,
TestBenchId,
Process,
}

Some files were not shown because too many files have changed in this diff Show More