Compare commits

..
Author SHA1 Message Date
Milan Hanajik d0b746d104 Reconfigured for SLM-50 2019-02-13 15:40:41 +01:00
43 changed files with 211 additions and 1490 deletions
+2 -2
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;DEBUG;SLM_50;HEAT_METERS;LANG_SK</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;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;SLM_50;HEAT_METERS;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+3 -45
View File
@@ -276,14 +276,7 @@ namespace DeviceTest
radioButton3.Text = "SelectTank 3";
radioButton4.Text = "SelectTank -";
}
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";
else radioButton1.Text = "spare";
}
///
void UpdateOperations2(string className)
@@ -303,14 +296,7 @@ namespace DeviceTest
radioButton23.Text = "SelectTank 3";
radioButton24.Text = "SelectTank -";
}
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";
else radioButton21.Text = "spare";
}
///
void UpdateOperations3(string className)
@@ -330,14 +316,7 @@ namespace DeviceTest
radioButton33.Text = "SelectTank 3";
radioButton34.Text = "SelectTank -";
}
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";
else radioButton31.Text = "spare";
}
@@ -693,13 +672,6 @@ 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)
@@ -732,13 +704,6 @@ 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)
@@ -771,13 +736,6 @@ 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;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;DEBUG;SLM_50;HEAT_METERS;LANG_SK</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;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;SLM_50;HEAT_METERS;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
-76
View File
@@ -1,76 +0,0 @@
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
@@ -1,42 +0,0 @@
///
/// 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;
}
}
}
}
}
-120
View File
@@ -1,120 +0,0 @@
<?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>
-150
View File
@@ -1,150 +0,0 @@
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
@@ -1,152 +0,0 @@
///
/// 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
@@ -1,120 +0,0 @@
<?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
@@ -1,91 +0,0 @@
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;
}
}
@@ -1,67 +0,0 @@
///
/// 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)
{
}
}
}
@@ -1,120 +0,0 @@
<?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>
+68 -27
View File
@@ -1,7 +1,4 @@
///
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
///
using System;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Results.Entities;
@@ -14,7 +11,22 @@ namespace ResultsBrowser.Forms
public partial class StatisticsDlg : Form
{
IList<WaterMeter> waterMeters;
StatisticsOptionsDlg options;
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;
IList<string> rowValues;
IList<string> columnValues;
@@ -24,14 +36,23 @@ namespace ResultsBrowser.Forms
string title;
public StatisticsDlg(IList<WaterMeter> waterMeters, StatisticsOptionsDlg options,
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,
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);
@@ -45,6 +66,26 @@ 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)
@@ -64,16 +105,16 @@ namespace ResultsBrowser.Forms
///
foreach (var wm in waterMeters)
{
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);
string value = rowItem.Print(wm);
if (rowItem2 != null) value = value + " | " + rowItem2.Print(wm);
if (rowItem3 != null) value = value + " | " + rowItem3.Print(wm);
if (!rowValues.Contains(value)) rowValues.Add(value);
if (options.TwoDim)
if (twoDim)
{
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);
value = columnItem.Print(wm);
if (columnItem2 != null) value = value + " | " + columnItem2.Print(wm);
if (columnItem3 != null) value = value + " | " + columnItem3.Print(wm);
if (!columnValues.Contains(value)) columnValues.Add(value);
}
}
@@ -88,17 +129,17 @@ namespace ResultsBrowser.Forms
{
for (int row = 0; row < rowValues.Count; row++)
{
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);
string rowValue = rowItem.Print(wm);
if (rowItem2 != null) rowValue = rowValue + " | " + rowItem2.Print(wm);
if (rowItem3 != null) rowValue = rowValue + " | " + rowItem3.Print(wm);
if (options.TwoDim)
if (twoDim)
{
for (int column = 0; column < columnsCount; column++)
{
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);
string columnValue = columnItem.Print(wm);
if (columnItem2 != null) columnValue = columnValue + " | " + columnItem2.Print(wm);
if (columnItem3 != null) columnValue = columnValue + " | " + columnItem3.Print(wm);
if (rowValue == rowValues[row] && columnValue == columnValues[column])
{
@@ -123,7 +164,7 @@ namespace ResultsBrowser.Forms
statisticsListView.Columns.Add(" ", 200);
for (int column = 0; column < columnsCount; column++)
{
statisticsListView.Columns.Add((options.TwoDim ? columnValues[column] : Strings.Count), 70);
statisticsListView.Columns.Add((twoDim ? columnValues[column] : Strings.Count), 70);
}
for (int row = 0; row < rowValues.Count; row++)
@@ -156,7 +197,7 @@ namespace ResultsBrowser.Forms
table[0, 0] = string.Empty;
for (int column = 0; column < columnsCount; column++)
{
table[0, column + 1] = (options.TwoDim ? columnValues[column] : Strings.Count);
table[0, column + 1] = (twoDim ? columnValues[column] : Strings.Count);
}
for (int row = 0; row < rowValues.Count; row++)
@@ -193,7 +234,7 @@ namespace ResultsBrowser.Forms
{
using (TextWriter writer = new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8))
{
if (options.TwoDim)
if (twoDim)
{
/// Write column headers
for (int i = 0; i < columnValues.Count; i++)
@@ -204,7 +245,7 @@ namespace ResultsBrowser.Forms
}
else
{
writer.WriteLine(string.Format("\"{0}\";\"{1}\"", options.RowItem.Caption, Strings.Count));
writer.WriteLine(string.Format("\"{0}\";\"{1}\"", rowItem.Caption, Strings.Count));
}
int nrColumns = Math.Max(1, columnValues.Count);
+1 -4
View File
@@ -1,7 +1,4 @@
///
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
///
using System;
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.1146.0")]
[assembly: AssemblyFileVersion("2.18.1146.0")]
[assembly: AssemblyVersion("2.18.1140.0")]
[assembly: AssemblyFileVersion("2.18.1140.0")]
-3
View File
@@ -240,7 +240,4 @@
<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,7 +828,4 @@
<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,15 +1257,6 @@ 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>
+2 -30
View File
@@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;DEBUG;SLM_50;HEAT_METERS;LANG_SK</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;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;SLM_50;HEAT_METERS;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -60,7 +60,6 @@
</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" />
@@ -134,24 +133,6 @@
<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>
@@ -221,15 +202,6 @@
<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>
+36 -77
View File
@@ -34,13 +34,10 @@
this.filtersFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.resultsGroupBox = new System.Windows.Forms.GroupBox();
this.resultsListView = new System.Windows.Forms.ListView();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.histogramBtn = new System.Windows.Forms.Button();
this.statisticsBtn = 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.statisticsBtn = new System.Windows.Forms.Button();
this.printQueryResultsBtn = new System.Windows.Forms.Button();
this.exportQueryResultsBtn = new System.Windows.Forms.Button();
this.formatOfResultsBtn = new System.Windows.Forms.Button();
this.clearFiltersBtn = new System.Windows.Forms.Button();
this.settingsBtn = new System.Windows.Forms.Button();
@@ -65,8 +62,6 @@
this.hSplitContainer.SuspendLayout();
this.filtersGroupBox.SuspendLayout();
this.resultsGroupBox.SuspendLayout();
this.groupBox1.SuspendLayout();
this.outputGroupBox.SuspendLayout();
this.testBenchesGroupBox.SuspendLayout();
this.SuspendLayout();
//
@@ -84,9 +79,10 @@
//
// 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);
@@ -158,68 +154,6 @@
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);
@@ -230,6 +164,36 @@
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);
@@ -406,8 +370,6 @@
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);
@@ -440,8 +402,5 @@
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;
}
}
+8 -26
View File
@@ -1,7 +1,4 @@
///
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
///
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
@@ -492,7 +489,7 @@ namespace ResultsBrowser
IList<Results.WMeterRsltItemSpec> items = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
///
/// Statistics options
/// Enter options
///
Forms.StatisticsOptionsDlg optionsDlg = new Forms.StatisticsOptionsDlg(items);
if (optionsDlg.ShowDialog() != DialogResult.OK) return;
@@ -500,31 +497,16 @@ namespace ResultsBrowser
///
/// Calculate statistics
///
Forms.StatisticsDlg statisticsDlg = new Forms.StatisticsDlg(waterMeters, optionsDlg, timePeriodStart, timePeriodEnd);
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);
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>
@@ -1,15 +0,0 @@
///
/// 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();
}
}
+15 -40
View File
@@ -28,7 +28,6 @@ namespace TBF.BenchControl.Modbus.Common
/// Private fields
SerialPort serialPort;
DateTime lastSerialPortWrite;
bool initialRunDeviceCommComplete;
public Queue<byte[]>[] ReceivedTelegrams
{
@@ -83,8 +82,6 @@ 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);
}
@@ -102,7 +99,7 @@ namespace TBF.BenchControl.Modbus.Common
Telegram.UpdateTelegramCRC(message);
if ((DateTime.Now - lastSerialPortWrite) > new TimeSpan(0, 0, 0, 0, 100) && initialRunDeviceCommComplete)
if ((DateTime.Now - lastSerialPortWrite) > new TimeSpan(0, 0, 0, 0, 100))
{
/// More then 100 ms since last 'send' --> do not enqueue the message
SendMessageNow(message);
@@ -177,12 +174,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);
}
}
}
@@ -191,16 +188,6 @@ 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());
@@ -210,27 +197,15 @@ 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()
{
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;
}
}
public void StopDevice2() { }
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2016 Sensus Slovensko a.s.
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
+25 -44
View File
@@ -1,17 +1,15 @@
///
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
/// Copyright (c) 2015 Sensus Metering Systems
///
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, GenericDevices.IParallelOutput
public class QuidoRS : ComponentBase, IDevice
{
private static readonly ILog log = LogManager.GetLogger(typeof(QuidoRS));
public override string ToString() { return string.Format("QuidoRS({0})", Cfg.ToString(1)); }
@@ -62,22 +60,12 @@ namespace TBF.BenchControl.Modbus.QuidoRS
if (modbus.ReceivedTelegrams[quidoRSCfg.ModbusAddress].Count > 0)
{
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);
}
modbus.ReceivedTelegrams[quidoRSCfg.ModbusAddress].Dequeue();
}
}
public void RunDeviceAfter() { }
public void StopDevice() { SendOutputs(0); }
public void StopDevice() { }
public void StopDevice2() { }
@@ -136,19 +124,19 @@ namespace TBF.BenchControl.Modbus.QuidoRS
private void SendOutputs(ushort outputs)
{
byte addr = quidoRSCfg.ModbusAddress;
byte cmd = (byte)Function.ForceMultipleCoils;
byte dataLo = (byte)(outputs & 0xFF);
byte dataHi = (byte)(outputs >> 8);
byte[] msg = new byte[11];
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_8_8)
{
modbus.SendMessage(new byte[] { addr, cmd, 0, 0, 0, 8, 1, dataLo, 0, 0 });
}
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);
lastOutputsChange = DateTime.Now;
}
@@ -157,29 +145,22 @@ namespace TBF.BenchControl.Modbus.QuidoRS
/// <summary>
/// Events: SetOpututsDone, Error
/// </summary>
/// <param name="outValue">Parallel output data</param>
/// <returns>SetOutputsOp operation casted to IOperaton</returns>
/// <param name="outValue">Reference to a variable for the pressure in Bar</param>
/// <returns>SetOutputsOp instance reference casted to IOperaton</returns>
public IOperation SetOutputsOp(ushort outValue)
{
return new SetOutputsOp(this, outValue);
}
/// <summary>
/// Events: Event.None
/// Events: pressureDone, Error
/// </summary>
/// <returns>ShowBenchWaitingOp operation casted to generic IOperaton</returns>
public IOperation ShowBenchWaitingOp()
/// <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)
{
return new ShowBenchWaitingOp(this);
return new SetOutputsOp(this, outValue, setOutputsDone);
}
/// <summary>
/// Events: Event.None
/// </summary>
/// <returns>ShowBenchErrorOp operation casted to generic IOperaton</returns>
public IOperation ShowBenchErrorOp()
{
return new ShowBenchErrorOp(this);
}
}
}
}
+4 -14
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@@ -9,13 +9,6 @@ using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Modbus.QuidoRS
{
public enum QuidoVariant
{
QuidoRS_2_16,
QuidoRS_8_8,
Count
}
public class QuidoRSCfg : ComponentCfgBase, Generic.IChildComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(QuidoRSCfg) })[0];
@@ -26,8 +19,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
///
/// Serialized parameters
///
public byte ModbusAddress; /// 1..247
public QuidoVariant Variant; /// 'QuidoRS_2_16' or 'QuidoRS_8_8'
public byte ModbusAddress; /// 1..255
public bool WatchdogEnabled;
public int WatchdogBitNr; /// 0..15
@@ -37,8 +29,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
Name = "QuidoRS";
ParentName = "Modbus";
ModbusAddress = 49;
Variant = QuidoVariant.QuidoRS_2_16;
WatchdogEnabled = false;
WatchdogEnabled = true;
WatchdogBitNr = 4;
}
@@ -50,10 +41,9 @@ namespace TBF.BenchControl.Modbus.QuidoRS
public string ToString(int i)
{
return string.Format("Name={0}, ModbusAddress={1}, Variant={2}, Parent={2}",
return string.Format("Name={0}, ModbusAddr={1}, Parent={2}",
Name,
ModbusAddress,
Variant,
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName));
}
}
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
/// Copyright (c) 2015 Sensus Metering Systems
///
using System;
using System.Windows.Forms;
@@ -46,8 +46,6 @@ namespace TBF.BenchControl.Modbus.QuidoRS
}
}
for (QuidoVariant v = 0; v < QuidoVariant.Count; v++) variantComboBox.Items.Add(v.ToString());
Redraw();
}
@@ -63,7 +61,6 @@ 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();
}
@@ -73,7 +70,6 @@ namespace TBF.BenchControl.Modbus.QuidoRS
nameTextBox.Enabled = true;
parentNameComboBox.Enabled = true;
modbusAddressTextBox.Enabled = true;
variantComboBox.Enabled = true;
watchdogCheckBox.Enabled = true;
watchdogBitNrTextBox.Enabled = true;
}
@@ -88,16 +84,11 @@ namespace TBF.BenchControl.Modbus.QuidoRS
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid 'Parent Name'";
}
if (!int.TryParse(modbusAddressTextBox.Text, out dummy) || dummy < 1 || dummy > 247)
if (!int.TryParse(modbusAddressTextBox.Text, out dummy) || dummy < 0 || dummy > 255)
{
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;
@@ -115,10 +106,6 @@ 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);
+6 -30
View File
@@ -41,8 +41,6 @@ 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
@@ -86,7 +84,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 = 5;
this.modbusAddressLabel.TabIndex = 7;
this.modbusAddressLabel.Text = "Modbus Address";
//
// modbusAddressTextBox
@@ -95,7 +93,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 = 6;
this.modbusAddressTextBox.TabIndex = 8;
//
// parentNameComboBox
//
@@ -110,7 +108,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
//
this.watchdogCheckBox.AutoSize = true;
this.watchdogCheckBox.Enabled = false;
this.watchdogCheckBox.Location = new System.Drawing.Point(31, 164);
this.watchdogCheckBox.Location = new System.Drawing.Point(31, 131);
this.watchdogCheckBox.Name = "watchdogCheckBox";
this.watchdogCheckBox.Size = new System.Drawing.Size(99, 17);
this.watchdogCheckBox.TabIndex = 9;
@@ -120,7 +118,7 @@ namespace TBF.BenchControl.Modbus.QuidoRS
// watchdogBitNrTextBox
//
this.watchdogBitNrTextBox.Enabled = false;
this.watchdogBitNrTextBox.Location = new System.Drawing.Point(138, 186);
this.watchdogBitNrTextBox.Location = new System.Drawing.Point(138, 153);
this.watchdogBitNrTextBox.Name = "watchdogBitNrTextBox";
this.watchdogBitNrTextBox.Size = new System.Drawing.Size(46, 20);
this.watchdogBitNrTextBox.TabIndex = 11;
@@ -128,36 +126,16 @@ namespace TBF.BenchControl.Modbus.QuidoRS
// watchdogBitNrLabel
//
this.watchdogBitNrLabel.AutoSize = true;
this.watchdogBitNrLabel.Location = new System.Drawing.Point(28, 189);
this.watchdogBitNrLabel.Location = new System.Drawing.Point(28, 156);
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);
@@ -169,7 +147,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(374, 268);
this.Size = new System.Drawing.Size(300, 200);
this.Load += new System.EventHandler(this.QuidoRSCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
@@ -188,7 +166,5 @@ 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 Slovensko a.s.
/// Copyright (c) 2015 Sensus Metering Systems
///
using System;
using log4net;
@@ -1,51 +0,0 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using log4net;
using TBF.Boxes;
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;
/// Set by the constructor
readonly QuidoRS quidoRS;
/// <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()
{
quidoRS.SetOutputs(BenchErrorValue);
}
/// <summary>Run this operation</summary>
public Event Run()
{
return Event.None;
}
/// <summary>Stop this operation</summary>
public void Stop()
{
quidoRS.SetOutputs(BenchReadyValue);
}
}
}
@@ -1,51 +0,0 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using log4net;
using TBF.Boxes;
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;
/// Set by the constructor
readonly QuidoRS quidoRS;
/// <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()
{
quidoRS.SetOutputs(BenchWaitingValue);
}
/// <summary>Run this operation</summary>
public Event Run()
{
return Event.None;
}
/// <summary>Stop this operation</summary>
public void Stop()
{
quidoRS.SetOutputs(BenchReadyValue);
}
}
}
@@ -626,23 +626,14 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
public Retv WriteResultsToDB(OracleConnection conn, Results.Entities.Batch batch, bool safeMode)
{
OracleTransaction transaction;
OracleTransaction transaction = null;
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
{
transaction = conn.BeginTransaction();
SaveBatchData(conn, batch);
foreach (var wMtr in batch.WaterMeters)
{
@@ -650,17 +641,20 @@ 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)
{
transaction.Rollback();
if (transaction != null) transaction.Rollback();
log.ErrorFormat("Results of batch {0} not written to ORACLE database: {1}",
batch.BatchNr, exc.Message);
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>
-5
View File
@@ -1245,7 +1245,6 @@ namespace TBF.BenchControl.Sequences
//--------------------------------
State.Create("MainSeq : Procedure configuration error")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.BenchErrorOp)
.AddOperation(new Operations.MessageBoxOp("Test configration error"))
.EnterState();
do
@@ -1260,7 +1259,6 @@ 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();
@@ -1272,7 +1270,6 @@ namespace TBF.BenchControl.Sequences
//--------------------------------
State.Create("MainSeq : ERROR state")
.AddOperation(StateMachine.BenchErrorOp)
.EnterState();
while (true) StateMachine.WaitRunDevsRunOps();
}
@@ -1362,7 +1359,6 @@ 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)
@@ -1404,7 +1400,6 @@ namespace TBF.BenchControl.Sequences
Bridge.OnActivity(this, Strings.Error);
///------------------------------------
State.Create("MainSeq : ERROR state")
.AddOperation(StateMachine.BenchErrorOp)
.EnterState();
while (true) StateMachine.WaitRunDevsRunOps(); /// Endless loop
}
+3 -1
View File
@@ -171,6 +171,8 @@ 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());
@@ -234,7 +236,7 @@ namespace TBF.BenchControl
}
}
log.WarnFormat("---------------( {0} )---------------", newState);
log.WarnFormat("---------------( {0} )---------------", newState.ToString());
/// Start() the operations that are in the current (new) state, but aren't in the previous state.
foreach (IOperation operation in newState.Operations)
+1 -10
View File
@@ -45,9 +45,7 @@ namespace TBF.BenchControl
/// Public components
public static Elde.ControlBoardDev ControlBoard;
public static GenericDevices.IAmbient Ambient;
public static IOperation BenchWaitingOp;
public static IOperation BenchErrorOp;
public static GenericDevices.IScaleOrTank Tank1;
public static GenericDevices.IScaleOrTank Tank1;
public static GenericDevices.IScaleOrTank Tank2;
public static GenericDevices.IScaleOrTank Tank3;
public static GenericDevices.IValve DrainValve1;
@@ -243,13 +241,6 @@ 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;
@@ -67,7 +67,6 @@ 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(StateMachine.BenchWaitingOp)
.AddOperation(new Operations.MessageBoxOp("Otočte iPerly prosím."))
.EnterState();
do
@@ -927,7 +927,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
/// Switch to Active mode in order to change TestModeConfig
error = CommErr.CmdActive;
byte[] cmd = new byte[1] { (byte)Command.SetActiveMode };
byte[] cmd = new byte[1] { (byte)6 };
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 +958,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
/// Switch to test mode
error = CommErr.CmdTest;
byte[] cmd = new byte[1] { (byte)Command.SetTestMode };
byte[] cmd = new byte[1] { (byte)7 };
for (int j = 0; j < cfg.MaxCommRetries; j++)
{
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout)) { error = CommErr.None; break; }
@@ -1008,7 +1008,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
CommErr error = CommErr.CmdActive;
/// Switch to active mode
byte[] cmd = new byte[1] { (byte)Command.SetActiveMode };
byte[] cmd = new byte[1] { (byte)6 };
for (int j = 0; j < cfg.MaxCommRetries; j++)
{
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout))
@@ -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}", wm.WMPosition, Environment.NewLine);
message += string.Format("Príliš veľa opakovaní testu vodomera {0}{1}", i, 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}", wm.WMPosition, Environment.NewLine);
message += string.Format("Q2 korekčné faktory vodomera {0} nesedia{1}", i, 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}", wm.WMPosition, Environment.NewLine);
// message += string.Format("Príliš veľa opakovaní testu vodomera {0}{1}", i, Environment.NewLine);
//}
}
}
@@ -84,12 +84,6 @@ 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,
+1 -1
View File
@@ -56,7 +56,7 @@ namespace TBF
this.homeTabPage = new System.Windows.Forms.TabPage();
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
this.processTabPage = new System.Windows.Forms.TabPage();
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl48();
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();
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.1147.0")]
[assembly: AssemblyFileVersion("2.18.1147.0")]
[assembly: AssemblyVersion("2.18.1142.0")]
[assembly: AssemblyFileVersion("2.18.1142.0")]
+7 -9
View File
@@ -39,7 +39,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;DEBUG;SLM_50;HEAT_METERS;LANG_SK;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;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;SLM_50;HEAT_METERS;LANG_SK;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;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;DEBUG;SLM_50;HEAT_METERS;LANG_SK;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;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<DefineConstants>TRACE;SLM_50;HEAT_METERS;LANG_SK;STABLE_MASS_EXTRAS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
@@ -97,8 +97,9 @@
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="ControlComponent3U">
<HintPath>..\packages\ControlBoard\iPerlST\ControlComponent3U.dll</HintPath>
<Reference Include="ControlComponent3U, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ControlBoard\SLM-PT50\ControlComponent3U.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
@@ -549,7 +550,6 @@
</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" />
@@ -688,8 +688,6 @@
</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" />
+2 -2
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;TURA_IPERL;LANG_SK</DefineConstants>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -26,7 +26,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;TURA_IPERL;LANG_SK</DefineConstants>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>