Compare commits

...
Author SHA1 Message Date
Milan Hanajik bdd9b3a100 Reconfigured for GENESIS 2018-02-19 10:13:32 +01:00
Milan Hanajik 1a82625f39 Output.DB.SaveFlowmeterCorrections completed, ver. 2.18.818 2018-02-19 09:42:20 +01:00
Milan Hanajik bcc54ccd8f ver. 2.18.817 2018-02-16 16:18:41 +01:00
Milan Hanajik 5df13df7fc Big fixes : Ambient ST/EN result items. 2018-02-16 15:32:00 +01:00
Milan Hanajik 47fd6206f6 Minor changes 2018-02-16 14:16:59 +01:00
Milan Hanajik 776f8ed841 SaveFlowmeterCorr : Support for calibration of multiple flow meters and ranges, part 1, UI, ver. 2.18.816 2018-02-16 12:59:24 +01:00
Milan Hanajik cf20ca885e ver. 2.18.815 2018-02-16 09:44:42 +01:00
Milan Hanajik e2e7a091af Changes in program shutdown reverted, ver. 2.18.814 2018-02-16 06:54:14 +01:00
Milan Hanajik 17e605cfd9 UI2BenCmd.Shutdown is re-sent each 3 sec in MainWnd on exit, CheckUIOp and MainSeq modifications, ver. 2.18.813 2018-02-15 16:05:45 +01:00
Milan Hanajik 80999a8573 ErrorFlags E1 and E21 modified, E1 now checks the mean flow, ver. 2.18.812 2018-02-15 14:17:22 +01:00
Milan Hanajik 8deb18fe9c Procedure numbers displayed in procedureComboBox in MainWnd. 2018-02-15 13:52:00 +01:00
Milan Hanajik bb3688bf7a Cleanup, Polish language, ver. 2.18.812 2018-02-15 13:51:40 +01:00
Milan Hanajik d3c7d54466 GraphsTabPageCtrl bug fix : Crash when 'current' node is used, ver. 2.18.811 2018-02-14 19:44:39 +01:00
Milan Hanajik b844aafcf3 Statistics, ProcesData, Plotter, IPlotter, GraphsTabPageCtrl, FlyingStartMassCollection changes 2018-02-14 19:27:11 +01:00
Milan Hanajik 5f17dabb0b (1) IPlotter interface used in Statistics, (2) Plotter class, (3) Start/Stop statistics in all test methods, (4) Flow simulation in FlyingStartMassCollection (DebugMode.Inherit). 2018-02-12 17:50:39 +01:00
Milan Hanajik e0fb7927ed Bug fix in Output.DB.SaveFowmeterCorrections, ver. 2.18.803 2018-02-11 08:18:58 +01:00
60 changed files with 2831 additions and 1234 deletions
+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;GENESIS;IPERL;LANG_DE</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;GENESIS;IPERL;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+5 -5
View File
@@ -30,7 +30,7 @@ namespace Config
[Description("hr")] hour, /// 1 hour = 60 min = 3600 s
[Description("ms")] ms, /// 1 ms = 0.001 s
[Description("°C")] C, /// * degree Celsius
[Description("°C")] C, /// * degree Celsius (°C)
[Description("°F")] F, /// degree Fahrenheit
[Description("K")] K, /// degree Kelvin
@@ -293,8 +293,8 @@ namespace Config
case Unit.hour: return v / 3600;
case Unit.ms: return 1000 * v;
/// Temperature: internal representation in degree C
case Unit.C: return v; /// degree Celsius
/// Temperature: internal representation in °C
case Unit.C: return v; /// degree Celsius (°C)
case Unit.F: return 1.8 * v + 32; /// degree Fahrenheit
case Unit.K: return v + 273.15; /// degree Kelvin
@@ -360,8 +360,8 @@ namespace Config
case Unit.hour: return 3600 * v;
case Unit.ms: return v / 1000;
/// Temperature: internal representation in degree C
case Unit.C: return v; /// degree Celsius
/// Temperature: internal representation in °C
case Unit.C: return v; /// degree Celsius (°C)
case Unit.F: return 5 * (v-32) / 9; /// degree Fahrenheit
case Unit.K: return v - 273.15; /// degree Kelvin
+41 -1
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
@@ -159,7 +160,46 @@ namespace GraphLib
{
grid_off_y = off_y;
}
/// <summary>
/// Load Samples from a file. Returns loaded points count.
/// </summary>
/// <param name="pathName">File pathname</param>
/// <returns>Loaded points count</returns>
public int LoadSamples(string pathName, out float yMin, out float yMax)
{
yMin = float.MaxValue;
yMax = float.MinValue;
try
{
Int64 size = new FileInfo(pathName).Length;
if ((size % 8) != 0) return 0;
int samplesCount = (int)(size / 8L) - 1;
if (samplesCount <= 0) return 0;
PointF[] newSamples = new PointF[samplesCount];
using (BinaryReader reader = new BinaryReader(File.Open(pathName, FileMode.Open)))
{
for (int i = 0; i < samplesCount; i++)
{
newSamples[i].X = reader.ReadSingle();
newSamples[i].Y = reader.ReadSingle();
}
yMin = reader.ReadSingle();
yMax = reader.ReadSingle();
}
Samples = newSamples;
return samplesCount;
}
catch (Exception exc)
{
return 0;
}
}
[Category("Properties")] // Take this out, and you will soon have problems with serialization;
[DefaultValue(typeof(string), "")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
+8 -1
View File
@@ -374,7 +374,14 @@ namespace GraphLib
if (gPane.Sources.Count > 0)
{
int val = hScrollBar1.Value;
gPane.starting_idx = (int)(gPane.Sources[0].Length * (float)val / 10000.0f);
int maxLen = 0;
foreach (var s in DataSources)
{
if (s.Length > maxLen) maxLen = s.Length;
}
gPane.starting_idx = (int)(maxLen * (float)val / 10000.0f);
gPane.Invalidate();
}
}
+1
View File
@@ -56,6 +56,7 @@ namespace GraphLib
this.tb1.ShowToolTips = true;
this.tb1.Size = new System.Drawing.Size(80, 26);
this.tb1.TabIndex = 1;
this.tb1.Visible = false;
this.tb1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tb1_ButtonClick);
//
// tbbSave
+36 -36
View File
@@ -125,64 +125,64 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACI
DgAAAk1TRnQBSQFMAgEBBAEAAQwBAAEMAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEgBgABIP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AKgADAQECwAABtwGV
AVAB/QHKAZgBWgH/AcoBlwFaAf8BygGXAVoB/wHKAZcBWgH/AcoBlwFZAf8ByQGXAVkB/wHJAZcBWQH/
AcoBmAFaAf8BtwGUAVAB/RQAAxQBHAMRARcDAgEDrAADTgGZA10B0gNNAf8BxwGVAVYB/wH5AfcB9gH/
DgAAAk1TRnQBSQFMAgEBBAEAARQBAAEUAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEgBgABIP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AKgADAQECwAABtgGV
AU8B/QHKAZgBWQH/AcoBlwFZAf8BygGXAVkB/wHKAZcBWQH/AcoBlwFYAf8ByQGXAVgB/wHJAZcBWAH/
AcoBmAFZAf8BtgGUAU8B/RQAAxQBHAMRARcDAgEDrAADTgGZA10B0gNMAf8BxwGVAVUB/wH5AfcB9gH/
AfkB8QHsAf8B+QHxAesB/wH4AfAB6QH/AfcB7QHmAf8B9AHqAeEB/wHyAegB3gH/AfoB+AH2Af8BxwGU
AVYB/wMZAf8DWAHRA0QBeggAAxUBHQFiAlgB6QM6AWEDDQESAwABASwAAxsBJgMbASYDGwEmAxsBJgMb
AVUB/wMYAf8DWAHRA0QBeggAAxUBHQFiAlgB6QM6AWEDDQESAwABASwAAxsBJgMbASYDGwEmAxsBJgMb
ASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEmEAADGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEm
AxsBJgMbASYDGwEmAxsBJgMbASYIAANVAf0DpwH/A7UB/wOBAf8BrwGsAaoB/wHFAcABvQH/AcUBwAG9
Af8BxQHAAb0B/wHFAcABvQH/AcUBwAG9Af8BxQHAAb0B/wGtAaoBqAH/AyEB/wO1Af8DmwH/AxgB/wgA
AxUBHQNNAfoBOwIrAfwDXwHgAysBQgMNARIoAAMbASYDKwH8AYACgQH/AYACgQH/AYACgQH/AYACgQH/
AxsBJgMbASYDGwEmAxsBJgMbASYIAANUAf0DpwH/A7UB/wOBAf8BrwGsAaoB/wHFAcABvQH/AcUBwAG9
Af8BxQHAAb0B/wHFAcABvQH/AcUBwAG9Af8BxQHAAb0B/wGtAaoBqAH/AyAB/wO1Af8DmwH/AxcB/wgA
AxUBHQNNAfoBOgIrAfwDXwHgAysBQgMNARIoAAMbASYDKwH8AYACgQH/AYACgQH/AYACgQH/AYACgQH/
AYACgQH/AYACgQH/AYACgQH/AYACgQH/AYACgQH/AxsBJhAAAxsBJgMrAfwBgAKBAf8BgAKBAf8BgAKB
Af8DIwE0AxsBJgMrAfwBgAKBAf8BgAKBAf8BgAKBAf8DIwE0CAADZQH/A7UB/wO1Af8DlQH/A4EB/wOB
Af8DbgH/A2MB/wNWAf8DRwH/AzgB/wM3Af8DYwH/A7UB/wO1Af8DGgH/CAADFQEdAV8CSgH7AfkB+gH5
Af8DIwE0AxsBJgMrAfwBgAKBAf8BgAKBAf8BgAKBAf8DIwE0CAADZAH/A7UB/wO1Af8DlQH/A4EB/wOB
Af8DbQH/A2IB/wNVAf8DRgH/AzcB/wM2Af8DYgH/A7UB/wO1Af8DGQH/CAADFQEdAV8CSgH7AfkB+gH5
Af8DfwH+AV8BUwFSAfsDVQGyAx0BKgMIAQsgAAMbASYDQAH9IP8DQAH9AxsBJgMAAQEMAAMbASYDQAH9
AfwB/QH8Bf8DQAH9AxsBJgMbASYDQAH9AfwB/QH8Bf8DQAH9AxsBJgMAAQEEAANqAf8DuwH/A7sB/wON
Af8D1AH/A7kB/wO5Af8DuQH/A7kB/wO5Af8DuQH/A9MB/wODAf8DuwH/A7sB/wMfAf8IAAMVAR0DKwH8
AfoC+wH/AfUC9gH/AfkC+gH/ATwBLwEuAfwBbQJRAfcDQgF2AxYBHgMFAQcYAAMbASYDQAH9BP8B1QHb
AfwB/QH8Bf8DQAH9AxsBJgMbASYDQAH9AfwB/QH8Bf8DQAH9AxsBJgMAAQEEAANpAf8DuwH/A7sB/wON
Af8D1AH/A7kB/wO5Af8DuQH/A7kB/wO5Af8DuQH/A9MB/wODAf8DuwH/A7sB/wMeAf8IAAMVAR0DKwH8
AfoC+wH/AfUC9gH/AfkC+gH/ATsBLgEtAfwBbQJRAfcDQgF2AxYBHgMFAQcYAAMbASYDQAH9BP8B1QHb
AdgB/wHUAdsB1wH/AdQB2wHYAf8B0wHbAdcB/wHRAdkB1QH/Ac8B1wHTBf8DQAH9AxsBJgMBAQIMAAMb
ASYDQAH9AeIB5QHkAf8B2AHfAdwB/wNAAf0DGwEmAxsBJgNAAf0D8wH/AfcB+AH3Af8DQAH9AxsBJgMB
AQIEAANvAf8D1wH/A9cB/wOXAf8D2AH/A78B/wO/Af8DvwH/A78B/wO/Af8DvwH/A9cB/wOOAf8D1wH/
A9cB/wM0Af8IAAMWAR4DKwH8A/sB/wHTAdoB1wH/AdoB3wHcAf8B9gH3AfYB/wHyAvMB/wE7AisB/AFg
AQIEAANuAf8D1wH/A9cB/wOXAf8D2AH/A78B/wO/Af8DvwH/A78B/wO/Af8DvwH/A9cB/wOOAf8D1wH/
A9cB/wMzAf8IAAMWAR4DKwH8A/sB/wHTAdoB1wH/AdoB3wHcAf8B9gH3AfYB/wHyAvMB/wE6AisB/AFg
AlkB6wMzAVMDEgEZAwQBBRAAAxsBJgNAAf0E/wHaAeAB3QH/AdsB4QHeAf8B3QHiAeAB/wHdAeIB4AH/
AdsB4QHeAf8B2AHeAdsF/wNAAf0DGwEmAwEBAgwAAxsBJgNAAf0B4gHmAeQB/wHcAeIB3wH/A0AB/QMb
ASYDGwEmA0AB/QHvAfEB8AH/AfAB8wHxAf8DQAH9AxsBJgMBAQIEAANzAf8D+QH/A/kB/wOrAf8D3wH/
A8sB/wPLAf8DywH/A8sB/wPLAf8DywH/A98B/wOjAf8D+QH/A/kB/wNWAf8IAAMWAR4DKwH8A/sB/wHf
ASYDGwEmA0AB/QHvAfEB8AH/AfAB8wHxAf8DQAH9AxsBJgMBAQIEAANyAf8D+QH/A/kB/wOrAf8D3wH/
A8sB/wPLAf8DywH/A8sB/wPLAf8DywH/A98B/wOjAf8D+QH/A/kB/wNVAf8IAAMWAR4DKwH8A/sB/wHf
AeQB4QH/Ad4B4wHhAf8B3gHjAeAB/wHjAecB5QH/AfQC9QH/A38B/gGRAkAB/QNWAbYDJgE5AxABFQwA
AxsBJgNAAf0E/wHdAeMB4AH/AeEB5gHjAf8B5AHpAecB/wHmAeoB6AH/AeUB6QHnAf8B4gHnAeQF/wNA
Af0DGwEmAwEBAgwAAxsBJgNAAf0B5AHoAeUB/wHeAeMB4QH/A0AB/QMbASYDGwEmA0AB/QHsAe8B7gH/
AecB6wHpAf8DQAH9AxsBJgMBAQIEAANqAfkD/AH/A/wB/wPLAf8D8gH/A/IB/wPyAf8D8gH/A/IB/wPy
Af8D8gH/A/IB/wPGAf8D/AH/A/wB/wNwAf4IAAMWAR4DKwH8A/sB/wHqAe4B7AH/AewB7wHuAf8B7AHv
Ae4B/wHrAe4B7QH/AekB7AHrAf8DfwH+ATsCKwH8AVgCVgG7Ax0BKgMGAQgMAAMbASYDQAH9BP8B3wHk
Ae4B/wHrAe4B7QH/AekB7AHrAf8DfwH+AToCKwH8AVgCVgG7Ax0BKgMGAQgMAAMbASYDQAH9BP8B3wHk
AeEB/wHkAekB5gH/AeoB7QHrAf8B7gHxAe8B/wHvAfEB8AH/AewB7wHuBf8DQAH9AxsBJgMBAQIMAAMb
ASYDQAH9AesB7QHsAf8B3QHjAeAB/wNAAf0DGwEmAxsBJgNAAf0B7QHwAe8B/wHfAeQB4QH/A0AB/QMb
ASYDAQECBAADXQTSAf8D6AH/A3IB/wNyAf8DcgH/A3IB/wNyAf8DcgH/A3IB/wNyAf8DcgH/A3IB/wPo
ASYDAQECBAADXQTSAf8D6AH/A3EB/wNxAf8DcQH/A3EB/wNxAf8DcQH/A3EB/wNxAf8DcQH/A3EB/wPo
Af8DxAH/A1wB3AgAAxYBHgMrAfwD+wH/AfUC9gH/AfoB+wH6Af8D+QH/Ad0C3gH/AWoCRwH5A10B7QE6
AjkBYAMNAREUAAMbASYDQAH9BP8B3AHiAd8B/wHkAegB5gH/AesB7gHtAf8B8gH0AfMB/wH3AvgB/wH2
AfgB9wX/A0AB/QMbASYDAQECDAADGwEmA0AB/QHyAfQB8wH/AdoB3wHdAf8DQAH9AxsBJgMcASgDQAH9
AfMB9QH0Af8B1gHdAdkB/wNAAf0DGwEmAwEBAgQAAy0BRQOaAf8DzAH/AccBiwFDAf8B+QH0Ae0B/wH+
AegB2AH/Af4B6AHXAf8B/QHlAdMB/wH8AeQB0QH/AfoB4AHHAf8B+QHdAcMB/wH6AfQB7QH/AccBhQE/
Af8DwwH/A2kB/wMtAUUIAAMWAR4DKwH8A/sB/wHwAfMB8gH/AeYC6AH/A00B+gFiAlIB9AFRAk8BpQMU
AfMB9QH0Af8B1gHdAdkB/wNAAf0DGwEmAwEBAgQAAy0BRQOaAf8DzAH/AccBiwFCAf8B+QH0Ae0B/wH+
AegB2AH/Af4B6AHXAf8B/QHlAdMB/wH8AeQB0QH/AfoB4AHHAf8B+QHdAcMB/wH6AfQB7QH/AccBhQE+
Af8DwwH/A2gB/wMtAUUIAAMWAR4DKwH8A/sB/wHwAfMB8gH/AeYC6AH/A00B+gFiAlIB9AFRAk8BpQMU
ARwDAAEBGAADGwEmA0AB/QT/AdgB3wHcAf8B4AHlAeMB/wHoAesB6gH/Ae8B8gHwAf8B9wH4AfcB/wP9
Bf8DQAH9AxsBJgMBAQIMAAMbASYDQAH9A/wB/wHVAdsB2AH/A0AB/QMbASYDHAEoA0AB/QP8Af8B0gHa
AdYB/wNAAf0DGwEmAwEBAggAAzsBYwNrAfMBxQGJAUEB/wH5AfQB7wH/Af4B5wHXAf8B/QHnAdUB/wH8
AeYB0gH/AfsB4QHMAf8B+AHcAcIB/wH2AdoBvQH/AfoB9AHvAf8BxAGDAT0B/wNdAfMDOwFjDAADFgEe
AysB/AP7Af8BPwIzAfwDTQH6AVoCVwG9AxgBIgMCAQMgAAMbASYDQAH9IP8DQAH9AxsBJgMBAQIMAAMb
ASYDQAH9CP8DQAH9AxsBJgMcASgDQAH9CP8DQAH9AxsBJgMBAQIMAAMHAQkBmgF9AUcC+QH0AfAB/wH8
AeYB0wH/Af0B5wHTAf8B+wHjAc0B/wH6AeAByAH/AfUB1gG7Af8B8wHUAbUB/wH4AfQB8AH/AZkBagFH
AfkDBwEJEAADFgEeA0AB/QFbAjIB+wFgAlwB1AMjATMDBwEKKAADGwEmAysB/AEqAS4BLAH/ASoBLgEs
Af8BKgEuASwB/wEqAS4BLAH/ASoBLgEsAf8BKgEuASwB/wEqAS4BLAH/ASoBLgEsAf8BKgEuASwB/wMb
ASYDAQECDAADGwEmAWMBVwFVAf4BKgEuASwB/wEqAS4BLAH/ASoBLgEsAf8DGwEmAxwBKAFjAVcBVQH+
ASoBLgEsAf8BKgEuASwB/wEqAS4BLAH/AxsBJgMBAQIQAAGWAX0BUQH3AfkB9QHxAf8B/AHjAc8B/wH8
AeQBzwH/AfoB4QHKAf8B+QHdAcQB/wH0AekB3wH/AfcB8gHsAf8B9QHvAekB/wGbAWABRQH7FAADFgEf
AdYB/wNAAf0DGwEmAwEBAggAAzsBYwNqAfMBxQGJAUAB/wH5AfQB7wH/Af4B5wHXAf8B/QHnAdUB/wH8
AeYB0gH/AfsB4QHMAf8B+AHcAcIB/wH2AdoBvQH/AfoB9AHvAf8BxAGDATwB/wNdAfMDOwFjDAADFgEe
AysB/AP7Af8BPgIyAfwDTQH6AVoCVwG9AxgBIgMCAQMgAAMbASYDQAH9IP8DQAH9AxsBJgMBAQIMAAMb
ASYDQAH9CP8DQAH9AxsBJgMcASgDQAH9CP8DQAH9AxsBJgMBAQIMAAMHAQkBlgF6AUcC+QH0AfAB/wH8
AeYB0wH/Af0B5wHTAf8B+wHjAc0B/wH6AeAByAH/AfUB1gG7Af8B8wHUAbUB/wH4AfQB8AH/AZUBagFH
AfkDBwEJEAADFgEeA0AB/QFbAjIB+wFgAlwB1AMjATMDBwEKKAADGwEmAysB/AEpAS0BKwH/ASkBLQEr
Af8BKQEtASsB/wEpAS0BKwH/ASkBLQErAf8BKQEtASsB/wEpAS0BKwH/ASkBLQErAf8BKQEtASsB/wMb
ASYDAQECDAADGwEmAWMBVwFVAf4BKQEtASsB/wEpAS0BKwH/ASkBLQErAf8DGwEmAxwBKAFjAVcBVQH+
ASkBLQErAf8BKQEtASsB/wEpAS0BKwH/AxsBJgMBAQIQAAGSAXoBUQH3AfkB9QHxAf8B/AHjAc8B/wH8
AeQBzwH/AfoB4QHKAf8B+QHdAcQB/wH0AekB3wH/AfcB8gHsAf8B9QHvAekB/wGZAV8BRQH7FAADFgEf
AV4CWgHYAygBPQMNAREwAAMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEm
AxsBJgMAAQEMAAMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMA
AQEQAAGNAW0BSQH2AfkB9QHxAf8B/AHjAc0B/wH7AeMBzQH/AfkB4AHIAf8B+AHcAcIB/wH9AfsB+AH/
AfwB5gHNAf8B4gG2AYQB/wJUAVIBphQAAxYBHwMRARcDAgEDuAABoAF2AU0B+gH3AfIB7AH/AfgB9AHu
Af8B+AHzAe0B/wH4AfMB7QH/AfgB8gHsAf8B8gHmAdcB/wHiAbIBcgH/AZMBcwFiAfYDBQEHFAADAwEE
wAADOgFgAlgBVgG7AbMBfwFPAf4ByAGMAUQB/wGWAYABUQH3AZYBgAFRAfcBsAF/AUwB/gNOAZQUAAFC
AQEQAAGJAWoBSQH2AfkB9QHxAf8B/AHjAc0B/wH7AeMBzQH/AfkB4AHIAf8B+AHcAcIB/wH9AfsB+AH/
AfwB5gHNAf8B4gG2AYQB/wJUAVIBphQAAxYBHwMRARcDAgEDuAABngF1AU0B+gH3AfIB7AH/AfgB9AHu
Af8B+AHzAe0B/wH4AfMB7QH/AfgB8gHsAf8B8gHmAdcB/wHiAbIBcQH/AZABcQFiAfYDBQEHFAADAwEE
wAADOgFgAlgBVgG7AbEBfwFPAf4ByAGMAUMB/wGSAX8BUQH3AZIBfwFRAfcBrgF/AUwB/gNOAZQUAAFC
AU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/gQAB3wX/AeABBwHHBf8CAAHBAf8BwAED
AcABAwIAAcAB/wHAAQMBwAEDAgABwAE/AcABAQHAAQECAAHAAQ8BwAEBAcABAQIAAcABAwHAAQEBwAEB
AgABwAEBAcABAQHAAQECAAHAAQEBwAEBAcABAQIAAcABBwHAAQEBwAEBAgABwAEPAcABAQHAAQEBgAEB
+47 -57
View File
@@ -84,7 +84,7 @@ namespace GraphLib
public float CurXD1 = 0;
public float grid_distance_x = 200; // grid distance in samples ( draw a vertical line every 200 samples )
public float grid_distance_x = 60; // grid distance in samples ( draw a vertical line every 60 samples )
public float grid_off_x = 0;
public float GraphCaptionLineHeight = 28;
@@ -452,7 +452,7 @@ namespace GraphLib
if (layout == LayoutMode.NORMAL)
{
DrawGraphCaption(CurGraphics, source, marker_pos, CurOffX + CurGraphIdx * (10 + yLabelAreaWidth), curOffY);
DrawGraphCaption(CurGraphics, source, marker_pos, CurOffX + CurGraphIdx * (50 + yLabelAreaWidth) + (CurGraphIdx==0 ? 0 : 50), curOffY);
if (CurGraphIdx == 0)
{
@@ -600,7 +600,7 @@ namespace GraphLib
List<int> marker_pos = DrawGraphCurve(CurGraphics, source, CurOffX, curOffY + GraphCaptionLineHeight / 2);
DrawGraphCaption(CurGraphics, source, marker_pos, CurOffX + CurGraphIdx * (10 + yLabelAreaWidth), pad_top);
DrawGraphCaption(CurGraphics, source, marker_pos, CurOffX + CurGraphIdx * (50 + yLabelAreaWidth) + (CurGraphIdx == 0 ? 0 : 50), pad_top);
DrawYLabels(CurGraphics, source, marker_pos, CurOffX, curOffY);
@@ -776,12 +776,15 @@ namespace GraphLib
float y0 = (float)(source.grid_off_y * source.CurGraphHeight / source.DY + source.off_Y);
// draw horizontal zero grid lines
g.DrawLine(p2, new Point((int)CurrOffX, (int)(CurOffY + y0 + 0.5f)), new Point((int)(CurrOffX + source.CurGraphWidth + 0.5f), (int)(CurOffY + y0 + 0.5f)));
if (0 >= source.YD0 && 0 <= source.YD1)
{
g.DrawLine(p2, new Point((int)CurrOffX, (int)(CurOffY + y0 + 0.5f)), new Point((int)(CurrOffX + source.CurGraphWidth + 0.5f), (int)(CurOffY + y0 + 0.5f)));
}
// draw horizontal grid lines
for (Idx = (int)(source.grid_off_y);Idx > (int)(source.YD0 ); Idx -= (int)source.grid_distance_y)
for (float idy = source.grid_off_y; idy > source.YD0; idy -= source.grid_distance_y)
{
float y = (float)(Idx * source.CurGraphHeight) / source.DY + source.off_Y;
float y = (idy * source.CurGraphHeight) / source.DY + source.off_Y;
if (y >= 0 && y < source.CurGraphHeight)
{
@@ -792,9 +795,9 @@ namespace GraphLib
}
// draw horizontal grid lines
for (Idx = (int)(source.grid_off_y); Idx < (int)(source.YD1 ); Idx += (int)source.grid_distance_y)
for (float idy = source.grid_off_y; idy < source.YD1; idy += source.grid_distance_y)
{
float y = (float)Idx * source.CurGraphHeight / source.DY + source.off_Y;
float y = (idy * source.CurGraphHeight) / source.DY + source.off_Y;
if (y >= 0 && y < source.CurGraphHeight)
{
@@ -968,71 +971,58 @@ namespace GraphLib
using (Pen pen = new Pen(b))
{
pen.DashPattern = new float[] { 2, 2 };
float GridDistY = source.grid_distance_y;
///
if (source.AutoScaleY)
{
// calculate a matching grid distance
GridDistY = -Utilities.MostSignificantDigit(source.DY);
if (GridDistY == 0)
{
GridDistY = source.grid_distance_y;
}
}
// draw labels for horizontal lines
if (source.DY != 0)
{
float Idx = 0;
float y0 = (float)(source.grid_off_y * source.CurGraphHeight / source.DY + source.off_Y);
if (y0 >= 0 && y0 < source.CurGraphHeight)
{
String value = (source.OnRenderYAxisLabel == null) ? "0" : source.OnRenderYAxisLabel(source, 0);
SizeF dim = g.MeasureString(value, legendFont);
g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y0 + 0.5f + dim.Height / 2)));
}
float y0 = (float)(source.grid_off_y * source.CurGraphHeight / source.DY + source.off_Y);
String value = "" + Idx;
if (source.OnRenderYAxisLabel != null)
{
value = source.OnRenderYAxisLabel(source, Idx);
}
SizeF dim = g.MeasureString(value, legendFont);
g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y0 + 0.5f + dim.Height / 2)));
float GridDistY = source.grid_distance_y;
if (source.AutoScaleY)
{
// calculate a matching grid distance
GridDistY = - Utilities.MostSignificantDigit(source.DY );
if (GridDistY == 0)
{
GridDistY = source.grid_distance_y;
}
}
for (Idx = (source.grid_off_y); Idx > (source.Cur_YD0); Idx -= GridDistY)
for (float Idx = source.grid_off_y; Idx > source.YD0; Idx -= GridDistY)
{
if (Idx != 0)
{
float y1 = (float)((Idx) * source.CurGraphHeight) / source.DY + source.off_Y;
float y1 = (float)(Idx * source.CurGraphHeight) / source.DY + source.off_Y;
value = "" + (Idx);
if (source.OnRenderYAxisLabel != null)
{
value = source.OnRenderYAxisLabel(source, Idx);
}
dim = g.MeasureString(value, legendFont);
g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y1 + 0.5f + dim.Height / 2)));
if (y1 >= 0 && y1 < source.CurGraphHeight)
{
string value = (source.OnRenderYAxisLabel == null) ? Idx.ToString() : source.OnRenderYAxisLabel(source, Idx);
SizeF dim = g.MeasureString(value, legendFont);
g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y1 + 0.5f + dim.Height / 2)));
}
}
}
for (Idx = (source.grid_off_y); Idx < (source.Cur_YD1); Idx += GridDistY)
for (float Idx = source.grid_off_y; Idx < source.YD1; Idx += GridDistY)
{
if (Idx != 0)
{
float y2 = (float)((Idx) * source.CurGraphHeight) / source.DY + source.off_Y;
float y2 = (float)(Idx * source.CurGraphHeight) / source.DY + source.off_Y;
value = "" + (Idx);
if (source.OnRenderYAxisLabel != null)
{
value = source.OnRenderYAxisLabel(source, Idx);
}
dim = g.MeasureString(value, legendFont);
g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y2 + 0.5f + dim.Height / 2)));
if (y2 >= 0 && y2 < source.CurGraphHeight)
{
string value = (source.OnRenderYAxisLabel == null) ? Idx.ToString() : source.OnRenderYAxisLabel(source, Idx);
SizeF dim = g.MeasureString(value, legendFont);
g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y2 + 0.5f + dim.Height / 2)));
}
}
}
}
+54 -6
View File
@@ -107,13 +107,61 @@ namespace Results.Entities
return (timeSum == 0) ? 0 : (sum / timeSum);
}
public virtual double AmbTempStart() { return (TestRslts.Count > 0) ? TestRslts[0].AmbTempStart : 0; }
public virtual double AmbPressStart() { return (TestRslts.Count > 0) ? TestRslts[0].AmbPressStart : 0; }
public virtual double AmbHumiStart() { return (TestRslts.Count > 0) ? TestRslts[0].AmbHumiStart : 0; }
public virtual double AmbTempStart()
{
for (int i = 0; i < TestRslts.Count; i++)
{
if (TestRslts[i].Publish() == Config.Entities.Publish.Always)
return TestRslts[i].AmbTempStart;
}
return 0;
}
public virtual double AmbPressStart()
{
for (int i = 0; i < TestRslts.Count; i++)
{
if (TestRslts[i].Publish() == Config.Entities.Publish.Always)
return TestRslts[i].AmbPressStart;
}
return 0;
}
public virtual double AmbHumiStart()
{
for (int i = 0; i < TestRslts.Count; i++)
{
if (TestRslts[i].Publish() == Config.Entities.Publish.Always)
return TestRslts[i].AmbHumiStart;
}
return 0;
}
public virtual double AmbTempEnd() { return (TestRslts.Count > 0) ? TestRslts[TestRslts.Count - 1].AmbTempEnd : 0; }
public virtual double AmbPressEnd() { return (TestRslts.Count > 0) ? TestRslts[TestRslts.Count - 1].AmbPressEnd : 0; }
public virtual double AmbHumiEnd() { return (TestRslts.Count > 0) ? TestRslts[TestRslts.Count - 1].AmbHumiEnd : 0; }
public virtual double AmbTempEnd()
{
for (int i = TestRslts.Count - 1; i >= 0; i++)
{
if (TestRslts[i].Publish() == Config.Entities.Publish.Always)
return TestRslts[i].AmbTempEnd;
}
return 0;
}
public virtual double AmbPressEnd()
{
for (int i = TestRslts.Count - 1; i >= 0; i++)
{
if (TestRslts[i].Publish() == Config.Entities.Publish.Always)
return TestRslts[i].AmbPressEnd;
}
return 0;
}
public virtual double AmbHumiEnd()
{
for (int i = TestRslts.Count - 1; i >= 0; i++)
{
if (TestRslts[i].Publish() == Config.Entities.Publish.Always)
return TestRslts[i].AmbHumiEnd;
}
return 0;
}
public virtual double Buoyancy()
{
+1 -1
View File
@@ -109,7 +109,7 @@ namespace Results.Entities
public virtual float FlowMax { get; set; } /// [m3/h]
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
public virtual float Custom2 { get; set; } /// [°C] T ref hi start
public virtual float Custom2 { get; set; } /// [°C] T ref hi start
public virtual float Custom3 { get; set; } /// [°C] T ref hi end
public virtual float Custom4 { get; set; } /// [°C] T ref hi min
public virtual float Custom5 { get; set; } /// [°C] T ref hi max
+1
View File
@@ -211,6 +211,7 @@ namespace Results
Formatted_WM_ID, /// 184, Formated WM ID string:
/// {0}=start DateTime {1}-end DateTime, {2}=batch nr., {3}=wm pos.(1..max), {4}=s/n string
E21, /// 185
Count,
}
+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.782.0")]
[assembly: AssemblyFileVersion("2.18.782.0")]
[assembly: AssemblyVersion("2.18.815.0")]
[assembly: AssemblyFileVersion("2.18.815.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;GENESIS;IPERL;LANG_DE</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;GENESIS;IPERL;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+7 -6
View File
@@ -262,12 +262,12 @@ namespace Results
///
/// Ambient temperature/pressure/humidity/Buoyancy
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, string.Format("{0} Amb M", Strings.VName_Temp), Strings.Tooltip_T_Amb_M, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.GetTestRslt(t) == null) ? w.Batch.AmbTempMean() : w.GetTestRslt(t).AmbTempMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, string.Format("{0} Amb M", Strings.VName_Temp), Strings.Tooltip_T_Amb_M, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.GetTestRslt(t) == null) ? w.Batch.AmbTempMean() : w.GetTestRslt(t).AmbTempMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, string.Format("{0} Amb M", Strings.VName_Press), Strings.Tooltip_P_Amb_M, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? w.Batch.AmbPressMean() : w.GetTestRslt(t).AmbPressMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, string.Format("{0} Amb M", Strings.VName_Humi), Strings.Tooltip_Hu_Amb_M, Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiMean() : w.GetTestRslt(t).AmbHumiMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_temp_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Temp), Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.GetTestRslt(t) == null) ? w.Batch.AmbTempStart() : w.GetTestRslt(t).AmbTempStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbTempEnd() : w.GetTestRslt(t).AmbTempEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_press_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Press), Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? w.Batch.AmbPressStart() : w.GetTestRslt(t).AmbPressStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbPressEnd() : w.GetTestRslt(t).AmbPressEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_humi_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Humi), Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiStart() : w.GetTestRslt(t).AmbHumiStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiEnd() : w.GetTestRslt(t).AmbHumiEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, string.Format("{0} Amb M", Strings.VName_Humi), Strings.Tooltip_Hu_Amb_M, Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiMean() : w.GetTestRslt(t).AmbHumiMean)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_temp_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Temp), Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.GetTestRslt(t) == null) ? w.Batch.AmbTempStart() : w.GetTestRslt(t).AmbTempStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbTempEnd() : w.GetTestRslt(t).AmbTempEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_press_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Press), Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? w.Batch.AmbPressStart(): w.GetTestRslt(t).AmbPressStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbPressEnd() : w.GetTestRslt(t).AmbPressEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_humi_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Humi), Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiStart() : w.GetTestRslt(t).AmbHumiStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiEnd() : w.GetTestRslt(t).AmbHumiEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Buoyancy, "Buoyancy ()", Quantity.Number, ItemCategory.TestResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? FormatDbl(u, f, p, "V6", w.Batch.Buoyancy()) : ((w.GetTestRslt(t) != null) ? FormatDbl(u, f, p, "V6", (w.GetTestRslt(t).Buoyancy)) : "")));
///
@@ -392,6 +392,7 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.E14, "E14 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x2000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E15, "E15 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x4000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E16, "E16 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x8000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E21, "E21 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x100000) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_row_nr, "Table row #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableRowNr.ToString() : string.Format(f, TableRowNr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_column_nr, "Table column #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableColumnNr.ToString() : string.Format(f, TableColumnNr)));
@@ -458,7 +459,7 @@ namespace Results
public static string FormatDbl(Config.Unit units, string format, string precisionOrEmpty, string dfltPrecision, double v1, double v2, CultureInfo ci)
{
double val1 = Config.Units.ConvertTo(units, v1);
double val2 = Config.Units.ConvertTo(units, v1);
double val2 = Config.Units.ConvertTo(units, v2);
string precision = string.IsNullOrEmpty(precisionOrEmpty) ? dfltPrecision : precisionOrEmpty;
-237
View File
@@ -1,237 +0,0 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
namespace ResultsBrowser.Forms
{
partial class ResultsConfig
{
/// <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.cancelButton = new System.Windows.Forms.Button();
this.availableResultsListBox = new System.Windows.Forms.ListBox();
this.selectedResultsListBox = new System.Windows.Forms.ListBox();
this.availableResultsLabel = new System.Windows.Forms.Label();
this.selectedResultsLabel = new System.Windows.Forms.Label();
this.removeAllButton = new System.Windows.Forms.Button();
this.removeButton = new System.Windows.Forms.Button();
this.addButton = new System.Windows.Forms.Button();
this.unlockButton = new System.Windows.Forms.Button();
this.singleRadioButton = new System.Windows.Forms.RadioButton();
this.combinedRadioButton = new System.Windows.Forms.RadioButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(283, 57);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(104, 30);
this.okButton.TabIndex = 4;
this.okButton.Text = "Close";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(283, 94);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(104, 30);
this.cancelButton.TabIndex = 5;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Visible = false;
//
// availableResultsListBox
//
this.availableResultsListBox.Enabled = false;
this.availableResultsListBox.FormattingEnabled = true;
this.availableResultsListBox.Location = new System.Drawing.Point(12, 162);
this.availableResultsListBox.Name = "availableResultsListBox";
this.availableResultsListBox.Size = new System.Drawing.Size(135, 186);
this.availableResultsListBox.TabIndex = 6;
this.availableResultsListBox.DoubleClick += new System.EventHandler(this.availableResultsListBox_DoubleClick);
//
// selectedResultsListBox
//
this.selectedResultsListBox.Enabled = false;
this.selectedResultsListBox.FormattingEnabled = true;
this.selectedResultsListBox.Location = new System.Drawing.Point(252, 162);
this.selectedResultsListBox.Name = "selectedResultsListBox";
this.selectedResultsListBox.Size = new System.Drawing.Size(135, 186);
this.selectedResultsListBox.TabIndex = 7;
this.selectedResultsListBox.DoubleClick += new System.EventHandler(this.selectedResultsListBox_DoubleClick);
//
// availableResultsLabel
//
this.availableResultsLabel.AutoSize = true;
this.availableResultsLabel.Location = new System.Drawing.Point(12, 140);
this.availableResultsLabel.Name = "availableResultsLabel";
this.availableResultsLabel.Size = new System.Drawing.Size(86, 13);
this.availableResultsLabel.TabIndex = 8;
this.availableResultsLabel.Text = "Available results:";
//
// selectedResultsLabel
//
this.selectedResultsLabel.AutoSize = true;
this.selectedResultsLabel.Location = new System.Drawing.Point(249, 140);
this.selectedResultsLabel.Name = "selectedResultsLabel";
this.selectedResultsLabel.Size = new System.Drawing.Size(85, 13);
this.selectedResultsLabel.TabIndex = 9;
this.selectedResultsLabel.Text = "Selected results:";
//
// removeAllButton
//
this.removeAllButton.Anchor = System.Windows.Forms.AnchorStyles.None;
this.removeAllButton.Enabled = false;
this.removeAllButton.Location = new System.Drawing.Point(153, 273);
this.removeAllButton.Name = "removeAllButton";
this.removeAllButton.Size = new System.Drawing.Size(94, 30);
this.removeAllButton.TabIndex = 46;
this.removeAllButton.Text = "<< R&emove all";
this.removeAllButton.UseVisualStyleBackColor = true;
this.removeAllButton.Click += new System.EventHandler(this.removeAllButton_Click);
//
// removeButton
//
this.removeButton.Anchor = System.Windows.Forms.AnchorStyles.None;
this.removeButton.Enabled = false;
this.removeButton.Location = new System.Drawing.Point(153, 238);
this.removeButton.Name = "removeButton";
this.removeButton.Size = new System.Drawing.Size(93, 30);
this.removeButton.TabIndex = 45;
this.removeButton.Text = "< &Remove";
this.removeButton.UseVisualStyleBackColor = true;
this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
//
// addButton
//
this.addButton.Anchor = System.Windows.Forms.AnchorStyles.None;
this.addButton.Enabled = false;
this.addButton.Location = new System.Drawing.Point(153, 203);
this.addButton.Name = "addButton";
this.addButton.Size = new System.Drawing.Size(93, 30);
this.addButton.TabIndex = 44;
this.addButton.Text = "&Add >";
this.addButton.UseVisualStyleBackColor = true;
this.addButton.Click += new System.EventHandler(this.addButton_Click);
//
// unlockButton
//
this.unlockButton.Location = new System.Drawing.Point(283, 21);
this.unlockButton.Name = "unlockButton";
this.unlockButton.Size = new System.Drawing.Size(104, 30);
this.unlockButton.TabIndex = 47;
this.unlockButton.Text = "Unlock";
this.unlockButton.UseVisualStyleBackColor = true;
this.unlockButton.Click += new System.EventHandler(this.unlockButton_Click);
//
// singleRadioButton
//
this.singleRadioButton.Appearance = System.Windows.Forms.Appearance.Button;
this.singleRadioButton.AutoSize = true;
this.singleRadioButton.Checked = true;
this.singleRadioButton.Location = new System.Drawing.Point(19, 24);
this.singleRadioButton.Name = "singleRadioButton";
this.singleRadioButton.Size = new System.Drawing.Size(46, 23);
this.singleRadioButton.TabIndex = 48;
this.singleRadioButton.TabStop = true;
this.singleRadioButton.Text = "Single";
this.singleRadioButton.UseVisualStyleBackColor = true;
this.singleRadioButton.CheckedChanged += new System.EventHandler(this.singleRadioButton_CheckedChanged);
//
// combinedRadioButton
//
this.combinedRadioButton.Appearance = System.Windows.Forms.Appearance.Button;
this.combinedRadioButton.AutoSize = true;
this.combinedRadioButton.Location = new System.Drawing.Point(71, 24);
this.combinedRadioButton.Name = "combinedRadioButton";
this.combinedRadioButton.Size = new System.Drawing.Size(64, 23);
this.combinedRadioButton.TabIndex = 49;
this.combinedRadioButton.Text = "Combined";
this.combinedRadioButton.UseVisualStyleBackColor = true;
this.combinedRadioButton.CheckedChanged += new System.EventHandler(this.combinedRadioButton_CheckedChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.combinedRadioButton);
this.groupBox1.Controls.Add(this.singleRadioButton);
this.groupBox1.Location = new System.Drawing.Point(12, 21);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(153, 60);
this.groupBox1.TabIndex = 52;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Water Meter";
//
// ResultsConfig
//
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(399, 358);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.unlockButton);
this.Controls.Add(this.removeAllButton);
this.Controls.Add(this.removeButton);
this.Controls.Add(this.addButton);
this.Controls.Add(this.selectedResultsLabel);
this.Controls.Add(this.availableResultsLabel);
this.Controls.Add(this.selectedResultsListBox);
this.Controls.Add(this.availableResultsListBox);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.Name = "ResultsConfig";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ResultsConfig";
this.Load += new System.EventHandler(this.ResultsConfig_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.ListBox availableResultsListBox;
private System.Windows.Forms.ListBox selectedResultsListBox;
private System.Windows.Forms.Label availableResultsLabel;
private System.Windows.Forms.Label selectedResultsLabel;
private System.Windows.Forms.Button removeAllButton;
private System.Windows.Forms.Button removeButton;
private System.Windows.Forms.Button addButton;
private System.Windows.Forms.Button unlockButton;
private System.Windows.Forms.RadioButton singleRadioButton;
private System.Windows.Forms.RadioButton combinedRadioButton;
private System.Windows.Forms.GroupBox groupBox1;
}
}
-219
View File
@@ -1,219 +0,0 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Results.Entities;
using ResultsBrowser.Resources;
namespace ResultsBrowser.Forms
{
public partial class ResultsConfig : Form
{
/// <summary>
/// Required access rights to make changes with this form
/// </summary>
const Users.Grp.GID RequiredGroupMembership = Users.Grp.GID.Metrologists;
public Config.Entities.TestsArrangement TestsArrangement;
public Config.Entities.MetersArrangement MetersArrangement;
public int NrMetersInOneGroup;
public IList<Results.ItemSpec> currentlyAvailableItems;
public IList<Results.ItemSpec> ReportItems_Single;
public IList<Results.ItemSpec> ReportItems_Compound;
bool combined; /// false = single meter items, true = combined meter items
Config.Entities.Device device; /// Screen, Printer or Disk
bool unlocked; /// true = changes enabled
public ResultsConfig(bool combined)
{
InitializeComponent();
this.combined = combined;
device = Config.Entities.Device.Screen;
unlocked = false;
cancelButton.Visible = false;
}
void Localize()
{
Text = Strings.Configuration;
groupBox1.Text = Strings.Water_Meter;
singleRadioButton.Text = Strings.SingleBtnText;
combinedRadioButton.Text = Strings.CombinedBtnText;
availableResultsLabel.Text = Strings.Available_results;
selectedResultsLabel.Text = Strings.Selected_results;
addButton.Text = Strings.Add;
removeButton.Text = Strings.Remove;
removeAllButton.Text = Strings.Remove_all;
unlockButton.Text = Strings.UnlockBtnText;
okButton.Text = Strings.CloseBtnText;
cancelButton.Text = Strings.CancelBtnText;
}
void ResultsConfig_Load(object sender, EventArgs e)
{
Localize();
singleRadioButton.Checked = !combined;
combinedRadioButton.Checked = combined;
RedrawAvailable();
RedrawSelected();
}
/// <summary>
/// Gets the list of selected items based on watermeter type and device selections
/// </summary>
/// <returns>List of selected result items</returns>
IList<Results.ItemSpec> GetSelectedItems()
{
if (combined)
{
return ReportItems_Compound;
}
else
{
return ReportItems_Single;
}
}
/// <summary>
/// Redraw selected items (right hand side)
/// </summary>
void RedrawAvailable()
{
availableResultsListBox.Items.Clear();
currentlyAvailableItems = new List<Results.ItemSpec>();
foreach (var item in Results.ItemSpec.AllItems)
{
if (!GetSelectedItems().Contains(item) && (combined ? item.CanPrintCompoundMeter : item.CanPrintSingle))
{
currentlyAvailableItems.Add(item);
availableResultsListBox.Items.Add(item.Name);
}
}
}
/// <summary>
/// Redraw selected items (right hand side)
/// </summary>
void RedrawSelected()
{
selectedResultsListBox.Items.Clear();
foreach (var item in GetSelectedItems())
{
selectedResultsListBox.Items.Add(item.Name);
}
}
void unlockButton_Click(object sender, EventArgs e)
{
if (!unlocked)
{
//if (!User.CurrentUser.IsMemberOf(RequiredGroupMembership))
//{
// if ((new LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK) return;
//}
unlocked = true;
///
/// Unlock user interface controls
///
unlockButton.Enabled = false;
okButton.Text = Strings.OkBtnText;
cancelButton.Visible = true;
availableResultsListBox.Enabled = true;
selectedResultsListBox.Enabled = true;
addButton.Enabled = true;
removeButton.Enabled = true;
removeAllButton.Enabled = true;
}
}
void okButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
void availableResultsListBox_DoubleClick(object sender, EventArgs e)
{
/// Double click works when just one item is selected
IList<Results.ItemSpec> itemsToRemove = new List<Results.ItemSpec>();
if (availableResultsListBox.SelectedIndices.Count == 1)
{
var item = currentlyAvailableItems[availableResultsListBox.SelectedIndices[0]];
GetSelectedItems().Add(item);
RedrawAvailable();
RedrawSelected();
}
}
void addButton_Click(object sender, EventArgs e)
{
/// Append at the end, this code supports multiple selected items,
/// although ListBox control settings may limit the max.number of selected items to one.
for (int i = availableResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
{
var item = currentlyAvailableItems[availableResultsListBox.SelectedIndices[i]];
GetSelectedItems().Add(item);
}
RedrawAvailable();
RedrawSelected();
}
private void selectedResultsListBox_DoubleClick(object sender, EventArgs e)
{
/// Double click works when just one item is selected
if (selectedResultsListBox.SelectedIndices.Count == 1)
{
GetSelectedItems().RemoveAt(selectedResultsListBox.SelectedIndices[0]);
RedrawAvailable();
RedrawSelected();
}
}
void removeButton_Click(object sender, EventArgs e)
{
/// Remove from the list (the last selected item first so that the indexes are not affected)
for (int i = selectedResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
{
GetSelectedItems().RemoveAt(selectedResultsListBox.SelectedIndices[i]);
}
RedrawAvailable();
RedrawSelected();
}
void removeAllButton_Click(object sender, EventArgs e)
{
/// Remove all items from 'Selected' list
GetSelectedItems().Clear();
RedrawAvailable();
RedrawSelected();
}
private void singleRadioButton_CheckedChanged(object sender, EventArgs e)
{
}
private void combinedRadioButton_CheckedChanged(object sender, EventArgs e)
{
combined = combinedRadioButton.Checked;
RedrawAvailable();
RedrawSelected();
}
}
}
-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>
+2 -11
View File
@@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;GENESIS;IPERL;LANG_DE</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;GENESIS;IPERL;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -125,12 +125,6 @@
<Compile Include="Forms\NoBenchOrDatabaseDlg.designer.cs">
<DependentUpon>NoBenchOrDatabaseDlg.cs</DependentUpon>
</Compile>
<Compile Include="Forms\ResultsConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ResultsConfig.designer.cs">
<DependentUpon>ResultsConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\StatisticsDlg.cs">
<SubType>Form</SubType>
</Compile>
@@ -188,9 +182,6 @@
<EmbeddedResource Include="Forms\NoBenchOrDatabaseDlg.resx">
<DependentUpon>NoBenchOrDatabaseDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\ResultsConfig.resx">
<DependentUpon>ResultsConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\StatisticsDlg.resx">
<DependentUpon>StatisticsDlg.cs</DependentUpon>
</EmbeddedResource>
@@ -0,0 +1,16 @@
///
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System;
namespace TBF.BenchControl.GenericDevices
{
public interface IPlotter
{
int StartGraph(int batchNr, string testName, int repetition);
void UpdateGraph(int graphId, float x, float y);
void StopGraph(int graphId, float ymin, float ymax);
}
}
+9 -2
View File
@@ -55,12 +55,12 @@ namespace TBF.BenchControl.Operations
public Event Run()
{
if (Bridge.Ui2MachineQueue.Count <= 0) return Event.None;
UI2BenchCmd cmd;
lock (Bridge.Ui2MachineQueue)
{
if (Bridge.Ui2MachineQueue.Count <= 0) return Event.None;
if (Bridge.Ui2MachineQueue.Contains(UI2BenchCmd.Stop))
{
do {
@@ -68,6 +68,13 @@ namespace TBF.BenchControl.Operations
}
while (cmd != UI2BenchCmd.Stop);
}
else if (Bridge.Ui2MachineQueue.Contains(UI2BenchCmd.Shutdown))
{
do {
cmd = Bridge.Ui2MachineQueue.Dequeue();
}
while (cmd != UI2BenchCmd.Shutdown);
}
else
{
cmd = Bridge.Ui2MachineQueue.Dequeue();
@@ -72,17 +72,18 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
}
IList<MeasurementCorrection> GetCorrections(Results.Entities.Batch batch, string flowmeter, int rangeIx)
IList<MeasurementCorrection> GetCorrections(Results.Entities.Batch batch, string flowmeterName, int rngIx, double tempRngLo, double tempRngHi)
{
IList<MeasurementCorrection> rslt = new List<MeasurementCorrection>();
foreach (var tr in batch.TestRslts)
{
if (tr.Components.Flowmeter == flowmeter && tr.Evaluate())
float testTempLimLo = tr.TempLimLo();
float testTempLimHi = tr.TempLimHi();
if (tr.Components.Flowmeter == flowmeterName && tr.Evaluate() && testTempLimLo >= tempRngLo && testTempLimHi <= tempRngHi)
{
float measurement = tr.FlowMean;
float correction = (float)BenchControl.Formulas.CorrectionFromError(measurement, tr.ErrorMaster);
rslt.Add(new MeasurementCorrection { RangeIx = rangeIx, Measurement = measurement, Correction = correction });
double correction = BenchControl.Formulas.CorrectionFromError(tr.FlowMean, tr.ErrorMaster);
rslt.Add(new MeasurementCorrection { RangeIx = rngIx, Measurement = tr.FlowMean, Correction = (float)correction });
}
}
@@ -92,17 +93,25 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
void DeleteExistingCorrections(ISession session, Component cmpnt, int rangeIx)
{
foreach (var mc in cmpnt.Corrections) session.Delete(mc);
cmpnt.Corrections.Clear();
for (int i = cmpnt.Corrections.Count - 1; i >= 0; i--)
{
if (cmpnt.Corrections[i].RangeIx == rangeIx)
{
session.Delete(cmpnt.Corrections[i]);
cmpnt.Corrections.RemoveAt(i);
}
}
session.SaveOrUpdate(cmpnt);
}
void SaveNewCorrections(ISession session, Component cmpnt, int rangeIx, IList<MeasurementCorrection> corrections)
{
if (cmpnt.Corrections == null) cmpnt.Corrections = new List<MeasurementCorrection>();
foreach (var mc in corrections)
{
mc.RangeIx = rangeIx;
cmpnt.Corrections.Add(mc);
session.SaveOrUpdate(mc);
}
@@ -115,15 +124,13 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
{
opCompleted = false;
anyError = false;
newCorrections = GetCorrections(batch, myCfg.Flowmeter, myCfg.RangeIx);
}
/// <summary>Run this operation</summary>
/// <returns>Event.ResultsWritten or Event.Error</returns>
public Event Run()
{
if (myCfg.DebugLevel == DebugMode.Simulate || newCorrections == null || newCorrections.Count == 0)
if (myCfg.DebugLevel == DebugMode.Simulate)
{
opCompleted = true;
return Event.ResultsWritten;
@@ -139,28 +146,49 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
transaction = session.BeginTransaction();
var cmpnts = session.QueryOver<Component>()
.Where(cmpnt => (cmpnt.Name == myCfg.Flowmeter))
.List();
for (int fmtr = 1; fmtr <= myCfg.FlowmetersCount(); fmtr++)
{
string flowmeterName = myCfg.GetFlowmeterName(fmtr);
Elde.FlowMeter.FlowMeter flowmeter = TbfComponents.FindComponent(flowmeterName) as Elde.FlowMeter.FlowMeter;
if (cmpnts.Count != 1) throw (new Exception(string.Format("No unique component in SaveNewCorrections(.,{0},{1})", myCfg.Flowmeter, myCfg.RangeIx)));
if (flowmeter != null)
{
var cmpntEntities = session.QueryOver<Component>()
.Where(cmpnt => (cmpnt.Name == flowmeterName))
.List();
DeleteExistingCorrections(session, cmpnts[0], myCfg.RangeIx);
SaveNewCorrections(session, cmpnts[0], myCfg.RangeIx, newCorrections);
if (cmpntEntities.Count != 1)
{
log.ErrorFormat("No unique flowmeter named {0}", myCfg.GetFlowmeterName(fmtr));
continue;
}
for (int rng = 0; rng <= myCfg.RangesCount(); rng++)
{
if (myCfg.FlowmtrRangeEnabled(fmtr, rng))
{
double tempRngLo = flowmeter.GetTempLo(rng);
double tempRngHi = flowmeter.GetTempHi(rng);
newCorrections = GetCorrections(batch, flowmeterName, rng, tempRngLo, tempRngHi);
DeleteExistingCorrections(session, cmpntEntities[0], rng);
SaveNewCorrections(session, cmpntEntities[0], rng, newCorrections);
}
}
}
}
transaction.Commit();
session.Flush();
opCompleted = true;
log.ErrorFormat("Measurement corrections of {0}/{1} saved", myCfg.Flowmeter, myCfg.RangeIx);
log.WarnFormat("Measurement corrections successfully saved");
}
catch (Exception exc)
{
if (transaction != null && !transaction.WasCommitted) transaction.Rollback();
anyError = true;
log.WarnFormat("Failed to write batch {0} results to measurement {1}/{2} corrections: {3}",
batch.BatchNr, myCfg.Flowmeter, myCfg.RangeIx, exc.Message);
log.ErrorFormat("Failed to write corrections calculated from batch {0}: {1}", batch.BatchNr, exc.Message);
}
}
@@ -13,16 +13,195 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
public IComponentCfgCtrl GetControl() { return new SaveFlowmeterCorrCfgCtrl(); }
public string Flowmeter;
public int RangeIx;
public string Flowmeter1;
public string Flowmeter2;
public string Flowmeter3;
public string Flowmeter4;
public string Flowmeter5;
public string Flowmeter6;
public string Flowmeter7;
public bool Flowm1Rng1;
public bool Flowm1Rng2;
public bool Flowm1Rng3;
public bool Flowm1Rng4;
public bool Flowm1Rng5;
public bool Flowm2Rng1;
public bool Flowm2Rng2;
public bool Flowm2Rng3;
public bool Flowm2Rng4;
public bool Flowm2Rng5;
public bool Flowm3Rng1;
public bool Flowm3Rng2;
public bool Flowm3Rng3;
public bool Flowm3Rng4;
public bool Flowm3Rng5;
public bool Flowm4Rng1;
public bool Flowm4Rng2;
public bool Flowm4Rng3;
public bool Flowm4Rng4;
public bool Flowm4Rng5;
public bool Flowm5Rng1;
public bool Flowm5Rng2;
public bool Flowm5Rng3;
public bool Flowm5Rng4;
public bool Flowm5Rng5;
public bool Flowm6Rng1;
public bool Flowm6Rng2;
public bool Flowm6Rng3;
public bool Flowm6Rng4;
public bool Flowm6Rng5;
public bool Flowm7Rng1;
public bool Flowm7Rng2;
public bool Flowm7Rng3;
public bool Flowm7Rng4;
public bool Flowm7Rng5;
public int FlowmetersCount() { return 7; }
public int RangesCount() { return 5; }
/// <summary>
/// Get flowmeter name
/// </summary>
/// <param name="f">Flowmeter index 1 .. FlowmetersCount()==7</param>
/// <returns>Flowmeter name or null</returns>
public string GetFlowmeterName(int f)
{
switch (f)
{
case 1: return Flowmeter1;
case 2: return Flowmeter2;
case 3: return Flowmeter3;
case 4: return Flowmeter4;
case 5: return Flowmeter5;
case 6: return Flowmeter6;
case 7: return Flowmeter7;
default: return null;
}
}
/// <summary>
/// Is range enabled
/// </summary>
/// <param name="f">Flowmeter index 1 .. FlowmetersCount()==7</param>
/// <param name="r">Range index 0 .. RangesCount()==5</param>
/// <returns>ture if the range is enabled</returns>
public bool FlowmtrRangeEnabled(int f, int r)
{
if (f == 1)
{
switch (r)
{
case 0: return !(Flowm1Rng1 || Flowm1Rng2 || Flowm1Rng3 || Flowm1Rng4 || Flowm1Rng5);
case 1: return Flowm1Rng1;
case 2: return Flowm1Rng2;
case 3: return Flowm1Rng3;
case 4: return Flowm1Rng4;
case 5: return Flowm1Rng5;
default: break;
}
}
else if (f == 2)
{
switch (r)
{
case 0: return !(Flowm2Rng1 || Flowm2Rng2 || Flowm2Rng3 || Flowm2Rng4 || Flowm2Rng5);
case 1: return Flowm2Rng1;
case 2: return Flowm2Rng2;
case 3: return Flowm2Rng3;
case 4: return Flowm2Rng4;
case 5: return Flowm2Rng5;
default: break;
}
}
else if (f == 3)
{
switch (r)
{
case 0: return !(Flowm3Rng1 || Flowm3Rng2 || Flowm3Rng3 || Flowm3Rng4 || Flowm3Rng5);
case 1: return Flowm3Rng1;
case 2: return Flowm3Rng2;
case 3: return Flowm3Rng3;
case 4: return Flowm3Rng4;
case 5: return Flowm3Rng5;
default: break;
}
}
else if (f == 4)
{
switch (r)
{
case 0: return !(Flowm4Rng1 || Flowm4Rng2 || Flowm4Rng3 || Flowm4Rng4 || Flowm4Rng5);
case 1: return Flowm4Rng1;
case 2: return Flowm4Rng2;
case 3: return Flowm4Rng3;
case 4: return Flowm4Rng4;
case 5: return Flowm4Rng5;
default: break;
}
}
else if (f == 5)
{
switch (r)
{
case 0: return !(Flowm5Rng1 || Flowm5Rng2 || Flowm5Rng3 || Flowm5Rng4 || Flowm5Rng5);
case 1: return Flowm5Rng1;
case 2: return Flowm5Rng2;
case 3: return Flowm5Rng3;
case 4: return Flowm5Rng4;
case 5: return Flowm5Rng5;
default: break;
}
}
else if (f == 6)
{
switch (r)
{
case 0: return !(Flowm6Rng1 || Flowm6Rng2 || Flowm6Rng3 || Flowm6Rng4 || Flowm6Rng5);
case 1: return Flowm6Rng1;
case 2: return Flowm6Rng2;
case 3: return Flowm6Rng3;
case 4: return Flowm6Rng4;
case 5: return Flowm6Rng5;
default: break;
}
}
else if (f == 7)
{
switch (r)
{
case 0: return !(Flowm7Rng1 || Flowm7Rng2 || Flowm7Rng3 || Flowm7Rng4 || Flowm7Rng5);
case 1: return Flowm7Rng1;
case 2: return Flowm7Rng2;
case 3: return Flowm7Rng3;
case 4: return Flowm7Rng4;
case 5: return Flowm7Rng5;
default: break;
}
}
return false;
}
/// Private parameterless constructor invoked by all other (public) constructors
SaveFlowmeterCorrCfg()
{
{
ParentName = string.Empty;
Flowmeter = "I1";
RangeIx = 0;
}
Flowmeter1 = "I1";
Flowmeter2 = "I2";
Flowmeter3 = "I3";
Flowmeter4 = null;
Flowmeter5 = null;
Flowmeter6 = null;
Flowmeter7 = null;
}
public SaveFlowmeterCorrCfg(string name, IComponentFactory factory)
: this()
@@ -33,7 +212,8 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
public string ToString(int i)
{
return string.Format("Name={0}, Flowmtr={1}, RangeIx={2}", Name, Flowmeter, RangeIx);
return string.Format("Name={0}, Flowmtr1={1}, Flowmtr2={2}, Flowmtr3={3}, Flowmtr4={4}, Flowmtr5={5}, Flowmtr6={6}, Flowmtr7={7}",
Name, Flowmeter1, Flowmeter2, Flowmeter3, Flowmeter4, Flowmeter5, Flowmeter6, Flowmeter7);
}
}
}
@@ -41,11 +41,25 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
if (parent.TbfComponents != null)
{
flowmeter1ComboBox.Items.Add("---");
flowmeter2ComboBox.Items.Add("---");
flowmeter3ComboBox.Items.Add("---");
flowmeter4ComboBox.Items.Add("---");
flowmeter5ComboBox.Items.Add("---");
flowmeter6ComboBox.Items.Add("---");
flowmeter7ComboBox.Items.Add("---");
///
foreach (var cmpnt in parent.TbfComponents)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.BenchControl.Elde.FlowMeter.FlowMeterFactory)
{
flowmeterComboBox.Items.Add(cmpnt.Name);
flowmeter1ComboBox.Items.Add(cmpnt.Name);
flowmeter2ComboBox.Items.Add(cmpnt.Name);
flowmeter3ComboBox.Items.Add(cmpnt.Name);
flowmeter4ComboBox.Items.Add(cmpnt.Name);
flowmeter5ComboBox.Items.Add(cmpnt.Name);
flowmeter6ComboBox.Items.Add(cmpnt.Name);
flowmeter7ComboBox.Items.Add(cmpnt.Name);
}
}
}
@@ -63,32 +77,218 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
flowmeterComboBox.Text = config.Flowmeter;
rangeIdTextBox.Text = config.RangeIx.ToString();
}
flowmeter1ComboBox.Text = string.IsNullOrEmpty(config.Flowmeter1) ? "---" : config.Flowmeter1;
flowm1Rng1CheckBox.Checked = config.Flowm1Rng1;
flowm1Rng2CheckBox.Checked = config.Flowm1Rng2;
flowm1Rng3CheckBox.Checked = config.Flowm1Rng3;
flowm1Rng4CheckBox.Checked = config.Flowm1Rng4;
flowm1Rng5CheckBox.Checked = config.Flowm1Rng5;
flowm1Rng0CheckBox.Checked = !(config.Flowm1Rng1 || config.Flowm1Rng2 || config.Flowm1Rng3 || config.Flowm1Rng4 || config.Flowm1Rng5);
flowmeter2ComboBox.Text = string.IsNullOrEmpty(config.Flowmeter2) ? "---" : config.Flowmeter2;
flowm2Rng1CheckBox.Checked = config.Flowm2Rng1;
flowm2Rng2CheckBox.Checked = config.Flowm2Rng2;
flowm2Rng3CheckBox.Checked = config.Flowm2Rng3;
flowm2Rng4CheckBox.Checked = config.Flowm2Rng4;
flowm2Rng5CheckBox.Checked = config.Flowm2Rng5;
flowm2Rng0CheckBox.Checked = !(config.Flowm2Rng1 || config.Flowm2Rng2 || config.Flowm2Rng3 || config.Flowm2Rng4 || config.Flowm2Rng5);
flowmeter3ComboBox.Text = string.IsNullOrEmpty(config.Flowmeter3) ? "---" : config.Flowmeter3;
flowm3Rng1CheckBox.Checked = config.Flowm3Rng1;
flowm3Rng2CheckBox.Checked = config.Flowm3Rng2;
flowm3Rng3CheckBox.Checked = config.Flowm3Rng3;
flowm3Rng4CheckBox.Checked = config.Flowm3Rng4;
flowm3Rng5CheckBox.Checked = config.Flowm3Rng5;
flowm3Rng0CheckBox.Checked = !(config.Flowm3Rng1 || config.Flowm3Rng2 || config.Flowm3Rng3 || config.Flowm3Rng4 || config.Flowm3Rng5);
flowmeter4ComboBox.Text = string.IsNullOrEmpty(config.Flowmeter4) ? "---" : config.Flowmeter4;
flowm4Rng1CheckBox.Checked = config.Flowm4Rng1;
flowm4Rng2CheckBox.Checked = config.Flowm4Rng2;
flowm4Rng3CheckBox.Checked = config.Flowm4Rng3;
flowm4Rng4CheckBox.Checked = config.Flowm4Rng4;
flowm4Rng5CheckBox.Checked = config.Flowm4Rng5;
flowm4Rng0CheckBox.Checked = !(config.Flowm4Rng1 || config.Flowm4Rng2 || config.Flowm4Rng3 || config.Flowm4Rng4 || config.Flowm4Rng5);
flowmeter5ComboBox.Text = string.IsNullOrEmpty(config.Flowmeter5) ? "---" : config.Flowmeter5;
flowm5Rng1CheckBox.Checked = config.Flowm5Rng1;
flowm5Rng2CheckBox.Checked = config.Flowm5Rng2;
flowm5Rng3CheckBox.Checked = config.Flowm5Rng3;
flowm5Rng4CheckBox.Checked = config.Flowm5Rng4;
flowm5Rng5CheckBox.Checked = config.Flowm5Rng5;
flowm5Rng0CheckBox.Checked = !(config.Flowm5Rng1 || config.Flowm5Rng2 || config.Flowm5Rng3 || config.Flowm5Rng4 || config.Flowm5Rng5);
flowmeter6ComboBox.Text = string.IsNullOrEmpty(config.Flowmeter6) ? "---" : config.Flowmeter6;
flowm6Rng1CheckBox.Checked = config.Flowm6Rng1;
flowm6Rng2CheckBox.Checked = config.Flowm6Rng2;
flowm6Rng3CheckBox.Checked = config.Flowm6Rng3;
flowm6Rng4CheckBox.Checked = config.Flowm6Rng4;
flowm6Rng5CheckBox.Checked = config.Flowm6Rng5;
flowm6Rng0CheckBox.Checked = !(config.Flowm6Rng1 || config.Flowm6Rng2 || config.Flowm6Rng3 || config.Flowm6Rng4 || config.Flowm6Rng5);
flowmeter7ComboBox.Text = string.IsNullOrEmpty(config.Flowmeter7) ? "---" : config.Flowmeter7;
flowm7Rng1CheckBox.Checked = config.Flowm7Rng1;
flowm7Rng2CheckBox.Checked = config.Flowm7Rng2;
flowm7Rng3CheckBox.Checked = config.Flowm7Rng3;
flowm7Rng4CheckBox.Checked = config.Flowm7Rng4;
flowm7Rng5CheckBox.Checked = config.Flowm7Rng5;
flowm7Rng0CheckBox.Checked = !(config.Flowm7Rng1 || config.Flowm7Rng2 || config.Flowm7Rng3 || config.Flowm7Rng4 || config.Flowm7Rng5);
}
public void Unlock()
{
nameTextBox.Enabled = true;
flowmeterComboBox.Enabled = true;
rangeIdTextBox.Enabled = true;
}
flowmeter1ComboBox.Enabled = true;
flowm1Rng0CheckBox.Enabled = true;
flowm1Rng1CheckBox.Enabled = true;
flowm1Rng2CheckBox.Enabled = true;
flowm1Rng3CheckBox.Enabled = true;
flowm1Rng4CheckBox.Enabled = true;
flowm1Rng5CheckBox.Enabled = true;
flowmeter2ComboBox.Enabled = true;
flowm2Rng0CheckBox.Enabled = true;
flowm2Rng1CheckBox.Enabled = true;
flowm2Rng2CheckBox.Enabled = true;
flowm2Rng3CheckBox.Enabled = true;
flowm2Rng4CheckBox.Enabled = true;
flowm2Rng5CheckBox.Enabled = true;
flowmeter3ComboBox.Enabled = true;
flowm3Rng0CheckBox.Enabled = true;
flowm3Rng1CheckBox.Enabled = true;
flowm3Rng2CheckBox.Enabled = true;
flowm3Rng3CheckBox.Enabled = true;
flowm3Rng4CheckBox.Enabled = true;
flowm3Rng5CheckBox.Enabled = true;
flowmeter4ComboBox.Enabled = true;
flowm4Rng0CheckBox.Enabled = true;
flowm4Rng1CheckBox.Enabled = true;
flowm4Rng2CheckBox.Enabled = true;
flowm4Rng3CheckBox.Enabled = true;
flowm4Rng4CheckBox.Enabled = true;
flowm4Rng5CheckBox.Enabled = true;
flowmeter5ComboBox.Enabled = true;
flowm5Rng0CheckBox.Enabled = true;
flowm5Rng1CheckBox.Enabled = true;
flowm5Rng2CheckBox.Enabled = true;
flowm5Rng3CheckBox.Enabled = true;
flowm5Rng4CheckBox.Enabled = true;
flowm5Rng5CheckBox.Enabled = true;
flowmeter6ComboBox.Enabled = true;
flowm6Rng0CheckBox.Enabled = true;
flowm6Rng1CheckBox.Enabled = true;
flowm6Rng2CheckBox.Enabled = true;
flowm6Rng3CheckBox.Enabled = true;
flowm6Rng4CheckBox.Enabled = true;
flowm6Rng5CheckBox.Enabled = true;
flowmeter7ComboBox.Enabled = true;
flowm7Rng0CheckBox.Enabled = true;
flowm7Rng1CheckBox.Enabled = true;
flowm7Rng2CheckBox.Enabled = true;
flowm7Rng3CheckBox.Enabled = true;
flowm7Rng4CheckBox.Enabled = true;
flowm7Rng5CheckBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
{
CfgUpdateFlags flags = CfgUpdateFlags.None;
if (!flowmeterComboBox.Items.Contains(flowmeterComboBox.Text))
if (!flowmeter1ComboBox.Items.Contains(flowmeter1ComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid {0}", flowmeterLabel.Text);
message += Environment.NewLine + string.Format("Invalid {0}", flowmeter1Label.Text);
}
if ((flowmeter1ComboBox.Text != "---") &&
(flowm1Rng0CheckBox.Checked == (flowm1Rng1CheckBox.Checked || flowm1Rng2CheckBox.Checked || flowm1Rng3CheckBox.Checked ||
flowm1Rng4CheckBox.Checked || flowm1Rng5CheckBox.Checked)))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid ranges for {0}", flowmeter1Label.Text);
}
int dummy;
if (!int.TryParse(rangeIdTextBox.Text, out dummy) || dummy < 0 || dummy > 5)
if (!flowmeter2ComboBox.Items.Contains(flowmeter2ComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid {0}", rangeIdLabel.Text);
message += Environment.NewLine + string.Format("Invalid {0}", flowmeter2Label.Text);
}
if ((flowmeter2ComboBox.Text != "---") &&
(flowm2Rng0CheckBox.Checked == (flowm2Rng1CheckBox.Checked || flowm2Rng2CheckBox.Checked || flowm2Rng3CheckBox.Checked ||
flowm2Rng4CheckBox.Checked || flowm2Rng5CheckBox.Checked)))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid ranges for {0}", flowmeter2Label.Text);
}
if (!flowmeter3ComboBox.Items.Contains(flowmeter3ComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid {0}", flowmeter3Label.Text);
}
if ((flowmeter3ComboBox.Text != "---") &&
(flowm3Rng0CheckBox.Checked == (flowm3Rng1CheckBox.Checked || flowm3Rng2CheckBox.Checked || flowm3Rng3CheckBox.Checked ||
flowm3Rng4CheckBox.Checked || flowm3Rng5CheckBox.Checked)))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid ranges for {0}", flowmeter3Label.Text);
}
if (!flowmeter4ComboBox.Items.Contains(flowmeter4ComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid {0}", flowmeter4Label.Text);
}
if ((flowmeter4ComboBox.Text != "---") &&
(flowm4Rng0CheckBox.Checked == (flowm4Rng1CheckBox.Checked || flowm4Rng2CheckBox.Checked || flowm4Rng3CheckBox.Checked ||
flowm4Rng4CheckBox.Checked || flowm4Rng5CheckBox.Checked)))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid ranges for {0}", flowmeter4Label.Text);
}
if (!flowmeter5ComboBox.Items.Contains(flowmeter5ComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid {0}", flowmeter5Label.Text);
}
if ((flowmeter5ComboBox.Text != "---") &&
(flowm5Rng0CheckBox.Checked == (flowm5Rng1CheckBox.Checked || flowm5Rng2CheckBox.Checked || flowm5Rng3CheckBox.Checked ||
flowm5Rng4CheckBox.Checked || flowm5Rng5CheckBox.Checked)))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid ranges for {0}", flowmeter5Label.Text);
}
if (!flowmeter6ComboBox.Items.Contains(flowmeter6ComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid {0}", flowmeter6Label.Text);
}
if ((flowmeter6ComboBox.Text != "---") &&
(flowm6Rng0CheckBox.Checked == (flowm6Rng1CheckBox.Checked || flowm6Rng2CheckBox.Checked || flowm6Rng3CheckBox.Checked ||
flowm6Rng4CheckBox.Checked || flowm6Rng5CheckBox.Checked)))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid ranges for {0}", flowmeter6Label.Text);
}
if (!flowmeter7ComboBox.Items.Contains(flowmeter7ComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid {0}", flowmeter7Label.Text);
}
if ((flowmeter7ComboBox.Text != "---") &&
(flowm7Rng0CheckBox.Checked == (flowm7Rng1CheckBox.Checked || flowm7Rng2CheckBox.Checked || flowm7Rng3CheckBox.Checked ||
flowm7Rng4CheckBox.Checked || flowm7Rng5CheckBox.Checked)))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + string.Format("Invalid ranges for {0}", flowmeter7Label.Text);
}
return flags;
@@ -106,10 +306,56 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
flags |= CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd;
}
flags |= UpdateDifferent(ref config.Flowmeter, flowmeterComboBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.RangeIx, rangeIdTextBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowmeter1, flowmeter1ComboBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm1Rng1, flowm1Rng1CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm1Rng2, flowm1Rng2CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm1Rng3, flowm1Rng3CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm1Rng4, flowm1Rng4CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm1Rng5, flowm1Rng5CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
return flags;
flags |= UpdateDifferent(ref config.Flowmeter2, flowmeter2ComboBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm2Rng1, flowm2Rng1CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm2Rng2, flowm2Rng2CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm2Rng3, flowm2Rng3CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm2Rng4, flowm2Rng4CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm2Rng5, flowm2Rng5CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowmeter3, flowmeter3ComboBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm3Rng1, flowm3Rng1CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm3Rng2, flowm3Rng2CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm3Rng3, flowm3Rng3CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm3Rng4, flowm3Rng4CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm3Rng5, flowm3Rng5CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowmeter4, flowmeter4ComboBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm4Rng1, flowm4Rng1CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm4Rng2, flowm4Rng2CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm4Rng3, flowm4Rng3CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm4Rng4, flowm4Rng4CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm4Rng5, flowm4Rng5CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowmeter5, flowmeter5ComboBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm5Rng1, flowm5Rng1CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm5Rng2, flowm5Rng2CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm5Rng3, flowm5Rng3CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm5Rng4, flowm5Rng4CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm5Rng5, flowm5Rng5CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowmeter6, flowmeter6ComboBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm6Rng1, flowm6Rng1CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm6Rng2, flowm6Rng2CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm6Rng3, flowm6Rng3CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm6Rng4, flowm6Rng4CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm6Rng5, flowm6Rng5CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowmeter7, flowmeter7ComboBox.Text, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm7Rng1, flowm7Rng1CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm7Rng2, flowm7Rng2CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm7Rng3, flowm7Rng3CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm7Rng4, flowm7Rng4CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
flags |= UpdateDifferent(ref config.Flowm7Rng5, flowm7Rng5CheckBox.Checked, CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
return flags;
}
}
}
@@ -34,18 +34,71 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.flowmeterLabel = new System.Windows.Forms.Label();
this.rangeIdTextBox = new System.Windows.Forms.TextBox();
this.rangeIdLabel = new System.Windows.Forms.Label();
this.flowmeterComboBox = new System.Windows.Forms.ComboBox();
this.flowmeter1Label = new System.Windows.Forms.Label();
this.flowmeter1ComboBox = new System.Windows.Forms.ComboBox();
this.flowm1Rng1CheckBox = new System.Windows.Forms.CheckBox();
this.flowm1Rng2CheckBox = new System.Windows.Forms.CheckBox();
this.flowm1Rng3CheckBox = new System.Windows.Forms.CheckBox();
this.flowm1Rng4CheckBox = new System.Windows.Forms.CheckBox();
this.flowm1Rng5CheckBox = new System.Windows.Forms.CheckBox();
this.flowm2Rng5CheckBox = new System.Windows.Forms.CheckBox();
this.flowm2Rng4CheckBox = new System.Windows.Forms.CheckBox();
this.flowm2Rng3CheckBox = new System.Windows.Forms.CheckBox();
this.flowm2Rng2CheckBox = new System.Windows.Forms.CheckBox();
this.flowm2Rng1CheckBox = new System.Windows.Forms.CheckBox();
this.flowmeter2ComboBox = new System.Windows.Forms.ComboBox();
this.flowmeter2Label = new System.Windows.Forms.Label();
this.flowm3Rng5CheckBox = new System.Windows.Forms.CheckBox();
this.flowm3Rng4CheckBox = new System.Windows.Forms.CheckBox();
this.flowm3Rng3CheckBox = new System.Windows.Forms.CheckBox();
this.flowm3Rng2CheckBox = new System.Windows.Forms.CheckBox();
this.flowm3Rng1CheckBox = new System.Windows.Forms.CheckBox();
this.flowmeter3ComboBox = new System.Windows.Forms.ComboBox();
this.flowmeter3Label = new System.Windows.Forms.Label();
this.flowm4Rng5CheckBox = new System.Windows.Forms.CheckBox();
this.flowm4Rng4CheckBox = new System.Windows.Forms.CheckBox();
this.flowm4Rng3CheckBox = new System.Windows.Forms.CheckBox();
this.flowm4Rng2CheckBox = new System.Windows.Forms.CheckBox();
this.flowm4Rng1CheckBox = new System.Windows.Forms.CheckBox();
this.flowmeter4ComboBox = new System.Windows.Forms.ComboBox();
this.flowmeter4Label = new System.Windows.Forms.Label();
this.flowm5Rng5CheckBox = new System.Windows.Forms.CheckBox();
this.flowm5Rng4CheckBox = new System.Windows.Forms.CheckBox();
this.flowm5Rng3CheckBox = new System.Windows.Forms.CheckBox();
this.flowm5Rng2CheckBox = new System.Windows.Forms.CheckBox();
this.flowm5Rng1CheckBox = new System.Windows.Forms.CheckBox();
this.flowmeter5ComboBox = new System.Windows.Forms.ComboBox();
this.flowmeter5Label = new System.Windows.Forms.Label();
this.flowm5Rng0CheckBox = new System.Windows.Forms.CheckBox();
this.flowm4Rng0CheckBox = new System.Windows.Forms.CheckBox();
this.flowm3Rng0CheckBox = new System.Windows.Forms.CheckBox();
this.flowm2Rng0CheckBox = new System.Windows.Forms.CheckBox();
this.flowm1Rng0CheckBox = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.flowm6Rng0CheckBox = new System.Windows.Forms.CheckBox();
this.flowm6Rng5CheckBox = new System.Windows.Forms.CheckBox();
this.flowm6Rng4CheckBox = new System.Windows.Forms.CheckBox();
this.flowm6Rng3CheckBox = new System.Windows.Forms.CheckBox();
this.flowm6Rng2CheckBox = new System.Windows.Forms.CheckBox();
this.flowm6Rng1CheckBox = new System.Windows.Forms.CheckBox();
this.flowmeter6ComboBox = new System.Windows.Forms.ComboBox();
this.flowmeter6Label = new System.Windows.Forms.Label();
this.flowm7Rng0CheckBox = new System.Windows.Forms.CheckBox();
this.flowm7Rng5CheckBox = new System.Windows.Forms.CheckBox();
this.flowm7Rng4CheckBox = new System.Windows.Forms.CheckBox();
this.flowm7Rng3CheckBox = new System.Windows.Forms.CheckBox();
this.flowm7Rng2CheckBox = new System.Windows.Forms.CheckBox();
this.flowm7Rng1CheckBox = new System.Windows.Forms.CheckBox();
this.flowmeter7ComboBox = new System.Windows.Forms.ComboBox();
this.flowmeter7Label = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(110, 41);
this.nameTextBox.Location = new System.Drawing.Point(95, 41);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(225, 20);
this.nameTextBox.Size = new System.Drawing.Size(285, 20);
this.nameTextBox.TabIndex = 2;
//
// nameLabel
@@ -66,54 +119,669 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// flowmeterLabel
// flowmeter1Label
//
this.flowmeterLabel.AutoSize = true;
this.flowmeterLabel.Location = new System.Drawing.Point(15, 70);
this.flowmeterLabel.Name = "flowmeterLabel";
this.flowmeterLabel.Size = new System.Drawing.Size(55, 13);
this.flowmeterLabel.TabIndex = 3;
this.flowmeterLabel.Text = "Flowmeter";
this.flowmeter1Label.AutoSize = true;
this.flowmeter1Label.Location = new System.Drawing.Point(15, 96);
this.flowmeter1Label.Name = "flowmeter1Label";
this.flowmeter1Label.Size = new System.Drawing.Size(64, 13);
this.flowmeter1Label.TabIndex = 3;
this.flowmeter1Label.Text = "Flowmeter 1";
//
// rangeIdTextBox
// flowmeter1ComboBox
//
this.rangeIdTextBox.Enabled = false;
this.rangeIdTextBox.Location = new System.Drawing.Point(110, 93);
this.rangeIdTextBox.Name = "rangeIdTextBox";
this.rangeIdTextBox.Size = new System.Drawing.Size(36, 20);
this.rangeIdTextBox.TabIndex = 22;
this.flowmeter1ComboBox.Enabled = false;
this.flowmeter1ComboBox.FormattingEnabled = true;
this.flowmeter1ComboBox.Location = new System.Drawing.Point(95, 93);
this.flowmeter1ComboBox.Name = "flowmeter1ComboBox";
this.flowmeter1ComboBox.Size = new System.Drawing.Size(69, 21);
this.flowmeter1ComboBox.TabIndex = 4;
//
// rangeIdLabel
// flowm1Rng1CheckBox
//
this.rangeIdLabel.AutoSize = true;
this.rangeIdLabel.Location = new System.Drawing.Point(15, 96);
this.rangeIdLabel.Name = "rangeIdLabel";
this.rangeIdLabel.Size = new System.Drawing.Size(51, 13);
this.rangeIdLabel.TabIndex = 21;
this.rangeIdLabel.Text = "Range Id";
this.flowm1Rng1CheckBox.AutoSize = true;
this.flowm1Rng1CheckBox.Enabled = false;
this.flowm1Rng1CheckBox.Location = new System.Drawing.Point(245, 96);
this.flowm1Rng1CheckBox.Name = "flowm1Rng1CheckBox";
this.flowm1Rng1CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm1Rng1CheckBox.TabIndex = 6;
this.flowm1Rng1CheckBox.Text = "1";
this.flowm1Rng1CheckBox.UseVisualStyleBackColor = true;
//
// flowmeterComboBox
// flowm1Rng2CheckBox
//
this.flowmeterComboBox.Enabled = false;
this.flowmeterComboBox.FormattingEnabled = true;
this.flowmeterComboBox.Location = new System.Drawing.Point(110, 67);
this.flowmeterComboBox.Name = "flowmeterComboBox";
this.flowmeterComboBox.Size = new System.Drawing.Size(225, 21);
this.flowmeterComboBox.TabIndex = 23;
this.flowm1Rng2CheckBox.AutoSize = true;
this.flowm1Rng2CheckBox.Enabled = false;
this.flowm1Rng2CheckBox.Location = new System.Drawing.Point(275, 96);
this.flowm1Rng2CheckBox.Name = "flowm1Rng2CheckBox";
this.flowm1Rng2CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm1Rng2CheckBox.TabIndex = 7;
this.flowm1Rng2CheckBox.Text = "2";
this.flowm1Rng2CheckBox.UseVisualStyleBackColor = true;
//
// flowm1Rng3CheckBox
//
this.flowm1Rng3CheckBox.AutoSize = true;
this.flowm1Rng3CheckBox.Enabled = false;
this.flowm1Rng3CheckBox.Location = new System.Drawing.Point(305, 96);
this.flowm1Rng3CheckBox.Name = "flowm1Rng3CheckBox";
this.flowm1Rng3CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm1Rng3CheckBox.TabIndex = 8;
this.flowm1Rng3CheckBox.Text = "3";
this.flowm1Rng3CheckBox.UseVisualStyleBackColor = true;
//
// flowm1Rng4CheckBox
//
this.flowm1Rng4CheckBox.AutoSize = true;
this.flowm1Rng4CheckBox.Enabled = false;
this.flowm1Rng4CheckBox.Location = new System.Drawing.Point(335, 96);
this.flowm1Rng4CheckBox.Name = "flowm1Rng4CheckBox";
this.flowm1Rng4CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm1Rng4CheckBox.TabIndex = 9;
this.flowm1Rng4CheckBox.Text = "4";
this.flowm1Rng4CheckBox.UseVisualStyleBackColor = true;
//
// flowm1Rng5CheckBox
//
this.flowm1Rng5CheckBox.AutoSize = true;
this.flowm1Rng5CheckBox.Enabled = false;
this.flowm1Rng5CheckBox.Location = new System.Drawing.Point(365, 96);
this.flowm1Rng5CheckBox.Name = "flowm1Rng5CheckBox";
this.flowm1Rng5CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm1Rng5CheckBox.TabIndex = 10;
this.flowm1Rng5CheckBox.Text = "5";
this.flowm1Rng5CheckBox.UseVisualStyleBackColor = true;
//
// flowm2Rng5CheckBox
//
this.flowm2Rng5CheckBox.AutoSize = true;
this.flowm2Rng5CheckBox.Enabled = false;
this.flowm2Rng5CheckBox.Location = new System.Drawing.Point(365, 123);
this.flowm2Rng5CheckBox.Name = "flowm2Rng5CheckBox";
this.flowm2Rng5CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm2Rng5CheckBox.TabIndex = 18;
this.flowm2Rng5CheckBox.Text = "5";
this.flowm2Rng5CheckBox.UseVisualStyleBackColor = true;
//
// flowm2Rng4CheckBox
//
this.flowm2Rng4CheckBox.AutoSize = true;
this.flowm2Rng4CheckBox.Enabled = false;
this.flowm2Rng4CheckBox.Location = new System.Drawing.Point(335, 123);
this.flowm2Rng4CheckBox.Name = "flowm2Rng4CheckBox";
this.flowm2Rng4CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm2Rng4CheckBox.TabIndex = 17;
this.flowm2Rng4CheckBox.Text = "4";
this.flowm2Rng4CheckBox.UseVisualStyleBackColor = true;
//
// flowm2Rng3CheckBox
//
this.flowm2Rng3CheckBox.AutoSize = true;
this.flowm2Rng3CheckBox.Enabled = false;
this.flowm2Rng3CheckBox.Location = new System.Drawing.Point(305, 123);
this.flowm2Rng3CheckBox.Name = "flowm2Rng3CheckBox";
this.flowm2Rng3CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm2Rng3CheckBox.TabIndex = 16;
this.flowm2Rng3CheckBox.Text = "3";
this.flowm2Rng3CheckBox.UseVisualStyleBackColor = true;
//
// flowm2Rng2CheckBox
//
this.flowm2Rng2CheckBox.AutoSize = true;
this.flowm2Rng2CheckBox.Enabled = false;
this.flowm2Rng2CheckBox.Location = new System.Drawing.Point(275, 123);
this.flowm2Rng2CheckBox.Name = "flowm2Rng2CheckBox";
this.flowm2Rng2CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm2Rng2CheckBox.TabIndex = 15;
this.flowm2Rng2CheckBox.Text = "2";
this.flowm2Rng2CheckBox.UseVisualStyleBackColor = true;
//
// flowm2Rng1CheckBox
//
this.flowm2Rng1CheckBox.AutoSize = true;
this.flowm2Rng1CheckBox.Enabled = false;
this.flowm2Rng1CheckBox.Location = new System.Drawing.Point(245, 123);
this.flowm2Rng1CheckBox.Name = "flowm2Rng1CheckBox";
this.flowm2Rng1CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm2Rng1CheckBox.TabIndex = 14;
this.flowm2Rng1CheckBox.Text = "1";
this.flowm2Rng1CheckBox.UseVisualStyleBackColor = true;
//
// flowmeter2ComboBox
//
this.flowmeter2ComboBox.Enabled = false;
this.flowmeter2ComboBox.FormattingEnabled = true;
this.flowmeter2ComboBox.Location = new System.Drawing.Point(95, 120);
this.flowmeter2ComboBox.Name = "flowmeter2ComboBox";
this.flowmeter2ComboBox.Size = new System.Drawing.Size(69, 21);
this.flowmeter2ComboBox.TabIndex = 12;
//
// flowmeter2Label
//
this.flowmeter2Label.AutoSize = true;
this.flowmeter2Label.Location = new System.Drawing.Point(15, 123);
this.flowmeter2Label.Name = "flowmeter2Label";
this.flowmeter2Label.Size = new System.Drawing.Size(64, 13);
this.flowmeter2Label.TabIndex = 11;
this.flowmeter2Label.Text = "Flowmeter 2";
//
// flowm3Rng5CheckBox
//
this.flowm3Rng5CheckBox.AutoSize = true;
this.flowm3Rng5CheckBox.Enabled = false;
this.flowm3Rng5CheckBox.Location = new System.Drawing.Point(365, 150);
this.flowm3Rng5CheckBox.Name = "flowm3Rng5CheckBox";
this.flowm3Rng5CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm3Rng5CheckBox.TabIndex = 26;
this.flowm3Rng5CheckBox.Text = "5";
this.flowm3Rng5CheckBox.UseVisualStyleBackColor = true;
//
// flowm3Rng4CheckBox
//
this.flowm3Rng4CheckBox.AutoSize = true;
this.flowm3Rng4CheckBox.Enabled = false;
this.flowm3Rng4CheckBox.Location = new System.Drawing.Point(335, 150);
this.flowm3Rng4CheckBox.Name = "flowm3Rng4CheckBox";
this.flowm3Rng4CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm3Rng4CheckBox.TabIndex = 25;
this.flowm3Rng4CheckBox.Text = "4";
this.flowm3Rng4CheckBox.UseVisualStyleBackColor = true;
//
// flowm3Rng3CheckBox
//
this.flowm3Rng3CheckBox.AutoSize = true;
this.flowm3Rng3CheckBox.Enabled = false;
this.flowm3Rng3CheckBox.Location = new System.Drawing.Point(305, 150);
this.flowm3Rng3CheckBox.Name = "flowm3Rng3CheckBox";
this.flowm3Rng3CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm3Rng3CheckBox.TabIndex = 24;
this.flowm3Rng3CheckBox.Text = "3";
this.flowm3Rng3CheckBox.UseVisualStyleBackColor = true;
//
// flowm3Rng2CheckBox
//
this.flowm3Rng2CheckBox.AutoSize = true;
this.flowm3Rng2CheckBox.Enabled = false;
this.flowm3Rng2CheckBox.Location = new System.Drawing.Point(275, 150);
this.flowm3Rng2CheckBox.Name = "flowm3Rng2CheckBox";
this.flowm3Rng2CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm3Rng2CheckBox.TabIndex = 23;
this.flowm3Rng2CheckBox.Text = "2";
this.flowm3Rng2CheckBox.UseVisualStyleBackColor = true;
//
// flowm3Rng1CheckBox
//
this.flowm3Rng1CheckBox.AutoSize = true;
this.flowm3Rng1CheckBox.Enabled = false;
this.flowm3Rng1CheckBox.Location = new System.Drawing.Point(245, 150);
this.flowm3Rng1CheckBox.Name = "flowm3Rng1CheckBox";
this.flowm3Rng1CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm3Rng1CheckBox.TabIndex = 22;
this.flowm3Rng1CheckBox.Text = "1";
this.flowm3Rng1CheckBox.UseVisualStyleBackColor = true;
//
// flowmeter3ComboBox
//
this.flowmeter3ComboBox.Enabled = false;
this.flowmeter3ComboBox.FormattingEnabled = true;
this.flowmeter3ComboBox.Location = new System.Drawing.Point(95, 147);
this.flowmeter3ComboBox.Name = "flowmeter3ComboBox";
this.flowmeter3ComboBox.Size = new System.Drawing.Size(69, 21);
this.flowmeter3ComboBox.TabIndex = 20;
//
// flowmeter3Label
//
this.flowmeter3Label.AutoSize = true;
this.flowmeter3Label.Location = new System.Drawing.Point(15, 150);
this.flowmeter3Label.Name = "flowmeter3Label";
this.flowmeter3Label.Size = new System.Drawing.Size(64, 13);
this.flowmeter3Label.TabIndex = 19;
this.flowmeter3Label.Text = "Flowmeter 3";
//
// flowm4Rng5CheckBox
//
this.flowm4Rng5CheckBox.AutoSize = true;
this.flowm4Rng5CheckBox.Enabled = false;
this.flowm4Rng5CheckBox.Location = new System.Drawing.Point(365, 177);
this.flowm4Rng5CheckBox.Name = "flowm4Rng5CheckBox";
this.flowm4Rng5CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm4Rng5CheckBox.TabIndex = 34;
this.flowm4Rng5CheckBox.Text = "5";
this.flowm4Rng5CheckBox.UseVisualStyleBackColor = true;
//
// flowm4Rng4CheckBox
//
this.flowm4Rng4CheckBox.AutoSize = true;
this.flowm4Rng4CheckBox.Enabled = false;
this.flowm4Rng4CheckBox.Location = new System.Drawing.Point(335, 177);
this.flowm4Rng4CheckBox.Name = "flowm4Rng4CheckBox";
this.flowm4Rng4CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm4Rng4CheckBox.TabIndex = 33;
this.flowm4Rng4CheckBox.Text = "4";
this.flowm4Rng4CheckBox.UseVisualStyleBackColor = true;
//
// flowm4Rng3CheckBox
//
this.flowm4Rng3CheckBox.AutoSize = true;
this.flowm4Rng3CheckBox.Enabled = false;
this.flowm4Rng3CheckBox.Location = new System.Drawing.Point(305, 177);
this.flowm4Rng3CheckBox.Name = "flowm4Rng3CheckBox";
this.flowm4Rng3CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm4Rng3CheckBox.TabIndex = 32;
this.flowm4Rng3CheckBox.Text = "3";
this.flowm4Rng3CheckBox.UseVisualStyleBackColor = true;
//
// flowm4Rng2CheckBox
//
this.flowm4Rng2CheckBox.AutoSize = true;
this.flowm4Rng2CheckBox.Enabled = false;
this.flowm4Rng2CheckBox.Location = new System.Drawing.Point(275, 177);
this.flowm4Rng2CheckBox.Name = "flowm4Rng2CheckBox";
this.flowm4Rng2CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm4Rng2CheckBox.TabIndex = 31;
this.flowm4Rng2CheckBox.Text = "2";
this.flowm4Rng2CheckBox.UseVisualStyleBackColor = true;
//
// flowm4Rng1CheckBox
//
this.flowm4Rng1CheckBox.AutoSize = true;
this.flowm4Rng1CheckBox.Enabled = false;
this.flowm4Rng1CheckBox.Location = new System.Drawing.Point(245, 177);
this.flowm4Rng1CheckBox.Name = "flowm4Rng1CheckBox";
this.flowm4Rng1CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm4Rng1CheckBox.TabIndex = 30;
this.flowm4Rng1CheckBox.Text = "1";
this.flowm4Rng1CheckBox.UseVisualStyleBackColor = true;
//
// flowmeter4ComboBox
//
this.flowmeter4ComboBox.Enabled = false;
this.flowmeter4ComboBox.FormattingEnabled = true;
this.flowmeter4ComboBox.Location = new System.Drawing.Point(95, 174);
this.flowmeter4ComboBox.Name = "flowmeter4ComboBox";
this.flowmeter4ComboBox.Size = new System.Drawing.Size(69, 21);
this.flowmeter4ComboBox.TabIndex = 28;
//
// flowmeter4Label
//
this.flowmeter4Label.AutoSize = true;
this.flowmeter4Label.Location = new System.Drawing.Point(15, 177);
this.flowmeter4Label.Name = "flowmeter4Label";
this.flowmeter4Label.Size = new System.Drawing.Size(64, 13);
this.flowmeter4Label.TabIndex = 27;
this.flowmeter4Label.Text = "Flowmeter 4";
//
// flowm5Rng5CheckBox
//
this.flowm5Rng5CheckBox.AutoSize = true;
this.flowm5Rng5CheckBox.Enabled = false;
this.flowm5Rng5CheckBox.Location = new System.Drawing.Point(365, 204);
this.flowm5Rng5CheckBox.Name = "flowm5Rng5CheckBox";
this.flowm5Rng5CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm5Rng5CheckBox.TabIndex = 42;
this.flowm5Rng5CheckBox.Text = "5";
this.flowm5Rng5CheckBox.UseVisualStyleBackColor = true;
//
// flowm5Rng4CheckBox
//
this.flowm5Rng4CheckBox.AutoSize = true;
this.flowm5Rng4CheckBox.Enabled = false;
this.flowm5Rng4CheckBox.Location = new System.Drawing.Point(335, 204);
this.flowm5Rng4CheckBox.Name = "flowm5Rng4CheckBox";
this.flowm5Rng4CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm5Rng4CheckBox.TabIndex = 41;
this.flowm5Rng4CheckBox.Text = "4";
this.flowm5Rng4CheckBox.UseVisualStyleBackColor = true;
//
// flowm5Rng3CheckBox
//
this.flowm5Rng3CheckBox.AutoSize = true;
this.flowm5Rng3CheckBox.Enabled = false;
this.flowm5Rng3CheckBox.Location = new System.Drawing.Point(305, 204);
this.flowm5Rng3CheckBox.Name = "flowm5Rng3CheckBox";
this.flowm5Rng3CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm5Rng3CheckBox.TabIndex = 40;
this.flowm5Rng3CheckBox.Text = "3";
this.flowm5Rng3CheckBox.UseVisualStyleBackColor = true;
//
// flowm5Rng2CheckBox
//
this.flowm5Rng2CheckBox.AutoSize = true;
this.flowm5Rng2CheckBox.Enabled = false;
this.flowm5Rng2CheckBox.Location = new System.Drawing.Point(275, 204);
this.flowm5Rng2CheckBox.Name = "flowm5Rng2CheckBox";
this.flowm5Rng2CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm5Rng2CheckBox.TabIndex = 39;
this.flowm5Rng2CheckBox.Text = "2";
this.flowm5Rng2CheckBox.UseVisualStyleBackColor = true;
//
// flowm5Rng1CheckBox
//
this.flowm5Rng1CheckBox.AutoSize = true;
this.flowm5Rng1CheckBox.Enabled = false;
this.flowm5Rng1CheckBox.Location = new System.Drawing.Point(245, 204);
this.flowm5Rng1CheckBox.Name = "flowm5Rng1CheckBox";
this.flowm5Rng1CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm5Rng1CheckBox.TabIndex = 38;
this.flowm5Rng1CheckBox.Text = "1";
this.flowm5Rng1CheckBox.UseVisualStyleBackColor = true;
//
// flowmeter5ComboBox
//
this.flowmeter5ComboBox.Enabled = false;
this.flowmeter5ComboBox.FormattingEnabled = true;
this.flowmeter5ComboBox.Location = new System.Drawing.Point(95, 201);
this.flowmeter5ComboBox.Name = "flowmeter5ComboBox";
this.flowmeter5ComboBox.Size = new System.Drawing.Size(69, 21);
this.flowmeter5ComboBox.TabIndex = 36;
//
// flowmeter5Label
//
this.flowmeter5Label.AutoSize = true;
this.flowmeter5Label.Location = new System.Drawing.Point(15, 204);
this.flowmeter5Label.Name = "flowmeter5Label";
this.flowmeter5Label.Size = new System.Drawing.Size(64, 13);
this.flowmeter5Label.TabIndex = 35;
this.flowmeter5Label.Text = "Flowmeter 5";
//
// flowm5Rng0CheckBox
//
this.flowm5Rng0CheckBox.AutoSize = true;
this.flowm5Rng0CheckBox.Enabled = false;
this.flowm5Rng0CheckBox.Location = new System.Drawing.Point(196, 204);
this.flowm5Rng0CheckBox.Name = "flowm5Rng0CheckBox";
this.flowm5Rng0CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm5Rng0CheckBox.TabIndex = 37;
this.flowm5Rng0CheckBox.Text = "0";
this.flowm5Rng0CheckBox.UseVisualStyleBackColor = true;
//
// flowm4Rng0CheckBox
//
this.flowm4Rng0CheckBox.AutoSize = true;
this.flowm4Rng0CheckBox.Enabled = false;
this.flowm4Rng0CheckBox.Location = new System.Drawing.Point(196, 177);
this.flowm4Rng0CheckBox.Name = "flowm4Rng0CheckBox";
this.flowm4Rng0CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm4Rng0CheckBox.TabIndex = 29;
this.flowm4Rng0CheckBox.Text = "0";
this.flowm4Rng0CheckBox.UseVisualStyleBackColor = true;
//
// flowm3Rng0CheckBox
//
this.flowm3Rng0CheckBox.AutoSize = true;
this.flowm3Rng0CheckBox.Enabled = false;
this.flowm3Rng0CheckBox.Location = new System.Drawing.Point(196, 150);
this.flowm3Rng0CheckBox.Name = "flowm3Rng0CheckBox";
this.flowm3Rng0CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm3Rng0CheckBox.TabIndex = 21;
this.flowm3Rng0CheckBox.Text = "0";
this.flowm3Rng0CheckBox.UseVisualStyleBackColor = true;
//
// flowm2Rng0CheckBox
//
this.flowm2Rng0CheckBox.AutoSize = true;
this.flowm2Rng0CheckBox.Enabled = false;
this.flowm2Rng0CheckBox.Location = new System.Drawing.Point(196, 123);
this.flowm2Rng0CheckBox.Name = "flowm2Rng0CheckBox";
this.flowm2Rng0CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm2Rng0CheckBox.TabIndex = 13;
this.flowm2Rng0CheckBox.Text = "0";
this.flowm2Rng0CheckBox.UseVisualStyleBackColor = true;
//
// flowm1Rng0CheckBox
//
this.flowm1Rng0CheckBox.AutoSize = true;
this.flowm1Rng0CheckBox.Enabled = false;
this.flowm1Rng0CheckBox.Location = new System.Drawing.Point(196, 96);
this.flowm1Rng0CheckBox.Name = "flowm1Rng0CheckBox";
this.flowm1Rng0CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm1Rng0CheckBox.TabIndex = 5;
this.flowm1Rng0CheckBox.Text = "0";
this.flowm1Rng0CheckBox.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(193, 72);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(179, 13);
this.label1.TabIndex = 43;
this.label1.Text = "Ranges to calibrate (either 0 or 1...5)";
//
// flowm6Rng0CheckBox
//
this.flowm6Rng0CheckBox.AutoSize = true;
this.flowm6Rng0CheckBox.Enabled = false;
this.flowm6Rng0CheckBox.Location = new System.Drawing.Point(196, 231);
this.flowm6Rng0CheckBox.Name = "flowm6Rng0CheckBox";
this.flowm6Rng0CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm6Rng0CheckBox.TabIndex = 46;
this.flowm6Rng0CheckBox.Text = "0";
this.flowm6Rng0CheckBox.UseVisualStyleBackColor = true;
//
// flowm6Rng5CheckBox
//
this.flowm6Rng5CheckBox.AutoSize = true;
this.flowm6Rng5CheckBox.Enabled = false;
this.flowm6Rng5CheckBox.Location = new System.Drawing.Point(365, 231);
this.flowm6Rng5CheckBox.Name = "flowm6Rng5CheckBox";
this.flowm6Rng5CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm6Rng5CheckBox.TabIndex = 51;
this.flowm6Rng5CheckBox.Text = "5";
this.flowm6Rng5CheckBox.UseVisualStyleBackColor = true;
//
// flowm6Rng4CheckBox
//
this.flowm6Rng4CheckBox.AutoSize = true;
this.flowm6Rng4CheckBox.Enabled = false;
this.flowm6Rng4CheckBox.Location = new System.Drawing.Point(335, 231);
this.flowm6Rng4CheckBox.Name = "flowm6Rng4CheckBox";
this.flowm6Rng4CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm6Rng4CheckBox.TabIndex = 50;
this.flowm6Rng4CheckBox.Text = "4";
this.flowm6Rng4CheckBox.UseVisualStyleBackColor = true;
//
// flowm6Rng3CheckBox
//
this.flowm6Rng3CheckBox.AutoSize = true;
this.flowm6Rng3CheckBox.Enabled = false;
this.flowm6Rng3CheckBox.Location = new System.Drawing.Point(305, 231);
this.flowm6Rng3CheckBox.Name = "flowm6Rng3CheckBox";
this.flowm6Rng3CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm6Rng3CheckBox.TabIndex = 49;
this.flowm6Rng3CheckBox.Text = "3";
this.flowm6Rng3CheckBox.UseVisualStyleBackColor = true;
//
// flowm6Rng2CheckBox
//
this.flowm6Rng2CheckBox.AutoSize = true;
this.flowm6Rng2CheckBox.Enabled = false;
this.flowm6Rng2CheckBox.Location = new System.Drawing.Point(275, 231);
this.flowm6Rng2CheckBox.Name = "flowm6Rng2CheckBox";
this.flowm6Rng2CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm6Rng2CheckBox.TabIndex = 48;
this.flowm6Rng2CheckBox.Text = "2";
this.flowm6Rng2CheckBox.UseVisualStyleBackColor = true;
//
// flowm6Rng1CheckBox
//
this.flowm6Rng1CheckBox.AutoSize = true;
this.flowm6Rng1CheckBox.Enabled = false;
this.flowm6Rng1CheckBox.Location = new System.Drawing.Point(245, 231);
this.flowm6Rng1CheckBox.Name = "flowm6Rng1CheckBox";
this.flowm6Rng1CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm6Rng1CheckBox.TabIndex = 47;
this.flowm6Rng1CheckBox.Text = "1";
this.flowm6Rng1CheckBox.UseVisualStyleBackColor = true;
//
// flowmeter6ComboBox
//
this.flowmeter6ComboBox.Enabled = false;
this.flowmeter6ComboBox.FormattingEnabled = true;
this.flowmeter6ComboBox.Location = new System.Drawing.Point(95, 228);
this.flowmeter6ComboBox.Name = "flowmeter6ComboBox";
this.flowmeter6ComboBox.Size = new System.Drawing.Size(69, 21);
this.flowmeter6ComboBox.TabIndex = 45;
//
// flowmeter6Label
//
this.flowmeter6Label.AutoSize = true;
this.flowmeter6Label.Location = new System.Drawing.Point(15, 231);
this.flowmeter6Label.Name = "flowmeter6Label";
this.flowmeter6Label.Size = new System.Drawing.Size(64, 13);
this.flowmeter6Label.TabIndex = 44;
this.flowmeter6Label.Text = "Flowmeter 6";
//
// flowm7Rng0CheckBox
//
this.flowm7Rng0CheckBox.AutoSize = true;
this.flowm7Rng0CheckBox.Enabled = false;
this.flowm7Rng0CheckBox.Location = new System.Drawing.Point(196, 258);
this.flowm7Rng0CheckBox.Name = "flowm7Rng0CheckBox";
this.flowm7Rng0CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm7Rng0CheckBox.TabIndex = 54;
this.flowm7Rng0CheckBox.Text = "0";
this.flowm7Rng0CheckBox.UseVisualStyleBackColor = true;
//
// flowm7Rng5CheckBox
//
this.flowm7Rng5CheckBox.AutoSize = true;
this.flowm7Rng5CheckBox.Enabled = false;
this.flowm7Rng5CheckBox.Location = new System.Drawing.Point(365, 258);
this.flowm7Rng5CheckBox.Name = "flowm7Rng5CheckBox";
this.flowm7Rng5CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm7Rng5CheckBox.TabIndex = 59;
this.flowm7Rng5CheckBox.Text = "5";
this.flowm7Rng5CheckBox.UseVisualStyleBackColor = true;
//
// flowm7Rng4CheckBox
//
this.flowm7Rng4CheckBox.AutoSize = true;
this.flowm7Rng4CheckBox.Enabled = false;
this.flowm7Rng4CheckBox.Location = new System.Drawing.Point(335, 258);
this.flowm7Rng4CheckBox.Name = "flowm7Rng4CheckBox";
this.flowm7Rng4CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm7Rng4CheckBox.TabIndex = 58;
this.flowm7Rng4CheckBox.Text = "4";
this.flowm7Rng4CheckBox.UseVisualStyleBackColor = true;
//
// flowm7Rng3CheckBox
//
this.flowm7Rng3CheckBox.AutoSize = true;
this.flowm7Rng3CheckBox.Enabled = false;
this.flowm7Rng3CheckBox.Location = new System.Drawing.Point(305, 258);
this.flowm7Rng3CheckBox.Name = "flowm7Rng3CheckBox";
this.flowm7Rng3CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm7Rng3CheckBox.TabIndex = 57;
this.flowm7Rng3CheckBox.Text = "3";
this.flowm7Rng3CheckBox.UseVisualStyleBackColor = true;
//
// flowm7Rng2CheckBox
//
this.flowm7Rng2CheckBox.AutoSize = true;
this.flowm7Rng2CheckBox.Enabled = false;
this.flowm7Rng2CheckBox.Location = new System.Drawing.Point(275, 258);
this.flowm7Rng2CheckBox.Name = "flowm7Rng2CheckBox";
this.flowm7Rng2CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm7Rng2CheckBox.TabIndex = 56;
this.flowm7Rng2CheckBox.Text = "2";
this.flowm7Rng2CheckBox.UseVisualStyleBackColor = true;
//
// flowm7Rng1CheckBox
//
this.flowm7Rng1CheckBox.AutoSize = true;
this.flowm7Rng1CheckBox.Enabled = false;
this.flowm7Rng1CheckBox.Location = new System.Drawing.Point(245, 258);
this.flowm7Rng1CheckBox.Name = "flowm7Rng1CheckBox";
this.flowm7Rng1CheckBox.Size = new System.Drawing.Size(32, 17);
this.flowm7Rng1CheckBox.TabIndex = 55;
this.flowm7Rng1CheckBox.Text = "1";
this.flowm7Rng1CheckBox.UseVisualStyleBackColor = true;
//
// flowmeter7ComboBox
//
this.flowmeter7ComboBox.Enabled = false;
this.flowmeter7ComboBox.FormattingEnabled = true;
this.flowmeter7ComboBox.Location = new System.Drawing.Point(95, 255);
this.flowmeter7ComboBox.Name = "flowmeter7ComboBox";
this.flowmeter7ComboBox.Size = new System.Drawing.Size(69, 21);
this.flowmeter7ComboBox.TabIndex = 53;
//
// flowmeter7Label
//
this.flowmeter7Label.AutoSize = true;
this.flowmeter7Label.Location = new System.Drawing.Point(15, 258);
this.flowmeter7Label.Name = "flowmeter7Label";
this.flowmeter7Label.Size = new System.Drawing.Size(64, 13);
this.flowmeter7Label.TabIndex = 52;
this.flowmeter7Label.Text = "Flowmeter 7";
//
// SaveFlowmeterCorrCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.flowmeterComboBox);
this.Controls.Add(this.rangeIdTextBox);
this.Controls.Add(this.rangeIdLabel);
this.Controls.Add(this.flowmeterLabel);
this.Controls.Add(this.flowm7Rng0CheckBox);
this.Controls.Add(this.flowm7Rng5CheckBox);
this.Controls.Add(this.flowm7Rng4CheckBox);
this.Controls.Add(this.flowm7Rng3CheckBox);
this.Controls.Add(this.flowm7Rng2CheckBox);
this.Controls.Add(this.flowm7Rng1CheckBox);
this.Controls.Add(this.flowmeter7ComboBox);
this.Controls.Add(this.flowmeter7Label);
this.Controls.Add(this.flowm6Rng0CheckBox);
this.Controls.Add(this.flowm6Rng5CheckBox);
this.Controls.Add(this.flowm6Rng4CheckBox);
this.Controls.Add(this.flowm6Rng3CheckBox);
this.Controls.Add(this.flowm6Rng2CheckBox);
this.Controls.Add(this.flowm6Rng1CheckBox);
this.Controls.Add(this.flowmeter6ComboBox);
this.Controls.Add(this.flowmeter6Label);
this.Controls.Add(this.label1);
this.Controls.Add(this.flowm5Rng0CheckBox);
this.Controls.Add(this.flowm4Rng0CheckBox);
this.Controls.Add(this.flowm3Rng0CheckBox);
this.Controls.Add(this.flowm2Rng0CheckBox);
this.Controls.Add(this.flowm1Rng0CheckBox);
this.Controls.Add(this.flowm5Rng5CheckBox);
this.Controls.Add(this.flowm5Rng4CheckBox);
this.Controls.Add(this.flowm5Rng3CheckBox);
this.Controls.Add(this.flowm5Rng2CheckBox);
this.Controls.Add(this.flowm5Rng1CheckBox);
this.Controls.Add(this.flowmeter5ComboBox);
this.Controls.Add(this.flowmeter5Label);
this.Controls.Add(this.flowm4Rng5CheckBox);
this.Controls.Add(this.flowm4Rng4CheckBox);
this.Controls.Add(this.flowm4Rng3CheckBox);
this.Controls.Add(this.flowm4Rng2CheckBox);
this.Controls.Add(this.flowm4Rng1CheckBox);
this.Controls.Add(this.flowmeter4ComboBox);
this.Controls.Add(this.flowmeter4Label);
this.Controls.Add(this.flowm3Rng5CheckBox);
this.Controls.Add(this.flowm3Rng4CheckBox);
this.Controls.Add(this.flowm3Rng3CheckBox);
this.Controls.Add(this.flowm3Rng2CheckBox);
this.Controls.Add(this.flowm3Rng1CheckBox);
this.Controls.Add(this.flowmeter3ComboBox);
this.Controls.Add(this.flowmeter3Label);
this.Controls.Add(this.flowm2Rng5CheckBox);
this.Controls.Add(this.flowm2Rng4CheckBox);
this.Controls.Add(this.flowm2Rng3CheckBox);
this.Controls.Add(this.flowm2Rng2CheckBox);
this.Controls.Add(this.flowm2Rng1CheckBox);
this.Controls.Add(this.flowmeter2ComboBox);
this.Controls.Add(this.flowmeter2Label);
this.Controls.Add(this.flowm1Rng5CheckBox);
this.Controls.Add(this.flowm1Rng4CheckBox);
this.Controls.Add(this.flowm1Rng3CheckBox);
this.Controls.Add(this.flowm1Rng2CheckBox);
this.Controls.Add(this.flowm1Rng1CheckBox);
this.Controls.Add(this.flowmeter1ComboBox);
this.Controls.Add(this.flowmeter1Label);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "SaveFlowmeterCorrCfgCtrl";
this.Size = new System.Drawing.Size(450, 230);
this.Size = new System.Drawing.Size(450, 300);
this.Load += new System.EventHandler(this.WriterCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
@@ -125,9 +793,62 @@ namespace TBF.BenchControl.Output.DB.SaveFlowmeterCorrections
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Label flowmeterLabel;
private System.Windows.Forms.TextBox rangeIdTextBox;
private System.Windows.Forms.Label rangeIdLabel;
private System.Windows.Forms.ComboBox flowmeterComboBox;
private System.Windows.Forms.Label flowmeter1Label;
private System.Windows.Forms.ComboBox flowmeter1ComboBox;
private System.Windows.Forms.CheckBox flowm1Rng1CheckBox;
private System.Windows.Forms.CheckBox flowm1Rng2CheckBox;
private System.Windows.Forms.CheckBox flowm1Rng3CheckBox;
private System.Windows.Forms.CheckBox flowm1Rng4CheckBox;
private System.Windows.Forms.CheckBox flowm1Rng5CheckBox;
private System.Windows.Forms.CheckBox flowm2Rng5CheckBox;
private System.Windows.Forms.CheckBox flowm2Rng4CheckBox;
private System.Windows.Forms.CheckBox flowm2Rng3CheckBox;
private System.Windows.Forms.CheckBox flowm2Rng2CheckBox;
private System.Windows.Forms.CheckBox flowm2Rng1CheckBox;
private System.Windows.Forms.ComboBox flowmeter2ComboBox;
private System.Windows.Forms.Label flowmeter2Label;
private System.Windows.Forms.CheckBox flowm3Rng5CheckBox;
private System.Windows.Forms.CheckBox flowm3Rng4CheckBox;
private System.Windows.Forms.CheckBox flowm3Rng3CheckBox;
private System.Windows.Forms.CheckBox flowm3Rng2CheckBox;
private System.Windows.Forms.CheckBox flowm3Rng1CheckBox;
private System.Windows.Forms.ComboBox flowmeter3ComboBox;
private System.Windows.Forms.Label flowmeter3Label;
private System.Windows.Forms.CheckBox flowm4Rng5CheckBox;
private System.Windows.Forms.CheckBox flowm4Rng4CheckBox;
private System.Windows.Forms.CheckBox flowm4Rng3CheckBox;
private System.Windows.Forms.CheckBox flowm4Rng2CheckBox;
private System.Windows.Forms.CheckBox flowm4Rng1CheckBox;
private System.Windows.Forms.ComboBox flowmeter4ComboBox;
private System.Windows.Forms.Label flowmeter4Label;
private System.Windows.Forms.CheckBox flowm5Rng5CheckBox;
private System.Windows.Forms.CheckBox flowm5Rng4CheckBox;
private System.Windows.Forms.CheckBox flowm5Rng3CheckBox;
private System.Windows.Forms.CheckBox flowm5Rng2CheckBox;
private System.Windows.Forms.CheckBox flowm5Rng1CheckBox;
private System.Windows.Forms.ComboBox flowmeter5ComboBox;
private System.Windows.Forms.Label flowmeter5Label;
private System.Windows.Forms.CheckBox flowm5Rng0CheckBox;
private System.Windows.Forms.CheckBox flowm4Rng0CheckBox;
private System.Windows.Forms.CheckBox flowm3Rng0CheckBox;
private System.Windows.Forms.CheckBox flowm2Rng0CheckBox;
private System.Windows.Forms.CheckBox flowm1Rng0CheckBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox flowm6Rng0CheckBox;
private System.Windows.Forms.CheckBox flowm6Rng5CheckBox;
private System.Windows.Forms.CheckBox flowm6Rng4CheckBox;
private System.Windows.Forms.CheckBox flowm6Rng3CheckBox;
private System.Windows.Forms.CheckBox flowm6Rng2CheckBox;
private System.Windows.Forms.CheckBox flowm6Rng1CheckBox;
private System.Windows.Forms.ComboBox flowmeter6ComboBox;
private System.Windows.Forms.Label flowmeter6Label;
private System.Windows.Forms.CheckBox flowm7Rng0CheckBox;
private System.Windows.Forms.CheckBox flowm7Rng5CheckBox;
private System.Windows.Forms.CheckBox flowm7Rng4CheckBox;
private System.Windows.Forms.CheckBox flowm7Rng3CheckBox;
private System.Windows.Forms.CheckBox flowm7Rng2CheckBox;
private System.Windows.Forms.CheckBox flowm7Rng1CheckBox;
private System.Windows.Forms.ComboBox flowmeter7ComboBox;
private System.Windows.Forms.Label flowmeter7Label;
}
}
+58 -100
View File
@@ -304,7 +304,6 @@ namespace TBF.BenchControl.Sequences
selection = MakeSelection(MKSelContext.ProcedureNotSelected);
switch (selection)
{
case Selection.Shutdown: return null; /// Return from MainSeq.Execute()
case Selection.Q1: selectedTestName = "Q1"; break;
case Selection.Q2: selectedTestName = "Q2"; break;
case Selection.Q3: selectedTestName = "Q3"; break;
@@ -522,7 +521,6 @@ namespace TBF.BenchControl.Sequences
selection = MakeSelection(MKSelContext.InsideProcedure);
switch (selection)
{
case Selection.Shutdown: return null; /// Return from MainSeq.Execute()
case Selection.Q1: selectedTestName = "Q1"; break;
case Selection.Q2: selectedTestName = "Q2"; break;
case Selection.Q3: selectedTestName = "Q3"; break;
@@ -1177,9 +1175,7 @@ namespace TBF.BenchControl.Sequences
private Selection MakeSelection(MKSelContext context)
{
log.WarnFormat("MakeSelection({0})", context);
bool shutdownInProgress = false;
/// Tank emptying valves states
bool draining1 = false;
bool draining2 = false;
@@ -1233,19 +1229,8 @@ namespace TBF.BenchControl.Sequences
e = StateMachine.WaitRunDevsRunOps();
/// Handled inside MakeSelection() inside the selection loop
if (e.Contains(Event.UiCmdShutdown))
{
#if true
/// TBF shutdown without tank draining
return Selection.Shutdown;
#else
/// TBF shutdown with tank draining
shutdownInProgress = true;
break;
#endif
}
if (e.Contains(Event.Error)) break;
if (!draining1 && e.Contains(Event.UiCmdDrainTank1)) break;
if (e.Contains(Event.Error)) break;
if (!draining1 && e.Contains(Event.UiCmdDrainTank1)) break;
if (!draining2 && e.Contains(Event.UiCmdDrainTank2)) break;
if (!draining3 && e.Contains(Event.UiCmdDrainTank3)) break;
if (draining1 && e.Contains(Event.UiCmdStopDrainingTank1)) break;
@@ -1280,93 +1265,66 @@ namespace TBF.BenchControl.Sequences
.EnterState();
while (true) StateMachine.WaitRunDevsRunOps(); /// Endless loop
}
else
{
string stateText = "MainSeq : ";
IList<IValve> openValves = new List<IValve>();
IList<IValve> closeValves = new List<IValve>();
else
{
string stateText = "MainSeq : ";
IList<IValve> openValves = new List<IValve>();
IList<IValve> closeValves = new List<IValve>();
if (e.Contains(Event.UiCmdShutdown))
{
if (StateMachine.DrainValve1 != null && !draining1)
{
draining1 = true;
openValves.Add(StateMachine.DrainValve1);
stateText = stateText + "open tank 1, ";
}
if (StateMachine.DrainValve2 != null && !draining2)
{
draining2 = true;
openValves.Add(StateMachine.DrainValve2);
stateText = stateText + "open tank 2, ";
}
if (StateMachine.DrainValve3 != null && !draining3)
{
draining3 = true;
openValves.Add(StateMachine.DrainValve3);
stateText = stateText + "open tank 3, ";
}
}
else if (draining1 && (StateMachine.Scale1.IsEmpty(mass1.Val) || e.Contains(Event.UiCmdStopDrainingTank1)))
{
draining1 = false;
closeValves.Add(StateMachine.DrainValve1);
stateText = stateText + "close tank 1, ";
}
else if (draining2 && (StateMachine.Scale2.IsEmpty(mass2.Val) || e.Contains(Event.UiCmdStopDrainingTank2)))
{
draining2 = false;
closeValves.Add(StateMachine.DrainValve2);
stateText = stateText + "close tank 2, ";
}
else if (draining3 && (StateMachine.Scale3.IsEmpty(mass3.Val) || e.Contains(Event.UiCmdStopDrainingTank3)))
{
draining3 = false;
closeValves.Add(StateMachine.DrainValve3);
stateText = stateText + "close tank 3, ";
}
else if (!draining1 && e.Contains(Event.UiCmdDrainTank1))
{
draining1 = true;
openValves.Add(StateMachine.DrainValve1);
stateText = stateText + "open tank 1, ";
}
else if (!draining2 && e.Contains(Event.UiCmdDrainTank2))
{
draining2 = true;
openValves.Add(StateMachine.DrainValve2);
stateText = stateText + "open tank 2, ";
}
else if (!draining3 && e.Contains(Event.UiCmdDrainTank3))
{
draining3 = true;
openValves.Add(StateMachine.DrainValve3);
stateText = stateText + "open tank 3, ";
}
if (draining1 && (StateMachine.Scale1.IsEmpty(mass1.Val) || e.Contains(Event.UiCmdStopDrainingTank1)))
{
draining1 = false;
closeValves.Add(StateMachine.DrainValve1);
stateText = stateText + "close tank 1, ";
}
else if (draining2 && (StateMachine.Scale2.IsEmpty(mass2.Val) || e.Contains(Event.UiCmdStopDrainingTank2)))
{
draining2 = false;
closeValves.Add(StateMachine.DrainValve2);
stateText = stateText + "close tank 2, ";
}
else if (draining3 && (StateMachine.Scale3.IsEmpty(mass3.Val) || e.Contains(Event.UiCmdStopDrainingTank3)))
{
draining3 = false;
closeValves.Add(StateMachine.DrainValve3);
stateText = stateText + "close tank 3, ";
}
else if (!draining1 && e.Contains(Event.UiCmdDrainTank1))
{
draining1 = true;
openValves.Add(StateMachine.DrainValve1);
stateText = stateText + "open tank 1, ";
}
else if (!draining2 && e.Contains(Event.UiCmdDrainTank2))
{
draining2 = true;
openValves.Add(StateMachine.DrainValve2);
stateText = stateText + "open tank 2, ";
}
else if (!draining3 && e.Contains(Event.UiCmdDrainTank3))
{
draining3 = true;
openValves.Add(StateMachine.DrainValve3);
stateText = stateText + "open tank 3, ";
}
draining = draining1 || draining2 || draining3;
if (draining && !shutdownInProgress) Bridge.OnActivity(this, Strings.Emptying_tank);
draining = draining1 || draining2 || draining3;
if (draining) Bridge.OnActivity(this, Strings.Emptying_tank);
Bridge.Bench2UI(((context == MKSelContext.ProcedureNotSelected) ? ButtonsEtc.ProcedureCmbBoxEn : 0) |
((StateMachine.DrainValve1 == null) ? 0 : (draining1 ? ButtonsEtc.DrainTankBtn1Hi : ButtonsEtc.DrainTankBtn1En)) |
((StateMachine.DrainValve2 == null) ? 0 : (draining2 ? ButtonsEtc.DrainTankBtn2Hi : ButtonsEtc.DrainTankBtn2En)) |
((StateMachine.DrainValve3 == null) ? 0 : (draining3 ? ButtonsEtc.DrainTankBtn3Hi : ButtonsEtc.DrainTankBtn3En)));
Bridge.Bench2UI(((context == MKSelContext.ProcedureNotSelected) ? ButtonsEtc.ProcedureCmbBoxEn : 0) |
((StateMachine.DrainValve1 == null) ? 0 : (draining1 ? ButtonsEtc.DrainTankBtn1Hi : ButtonsEtc.DrainTankBtn1En)) |
((StateMachine.DrainValve2 == null) ? 0 : (draining2 ? ButtonsEtc.DrainTankBtn2Hi : ButtonsEtc.DrainTankBtn2En)) |
((StateMachine.DrainValve3 == null) ? 0 : (draining3 ? ButtonsEtc.DrainTankBtn3Hi : ButtonsEtc.DrainTankBtn3En)));
State.Create(stateText)
.AddOperation(StateMachine.ControlBoard.SetValvesOp(openValves, closeValves))
.EnterState();
do
{
State.Create(stateText)
.AddOperation(StateMachine.ControlBoard.SetValvesOp(openValves, closeValves))
.EnterState();
do
{
e = StateMachine.WaitRunDevsRunOps();
}
while (e.Contains(Event.ValvesBusy));
if (shutdownInProgress && !draining)
{
/// Shutdown is in progress and draining was completed => quit the main sequence
return Selection.Shutdown;
}
}
}
while (e.Contains(Event.ValvesBusy));
}
}
}
+80
View File
@@ -0,0 +1,80 @@
///
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System;
using System.IO;
using System.Collections.Generic;
using log4net;
namespace TBF.BenchControl.Sequences
{
public class Plotter : BenchControl.GenericDevices.IPlotter
{
static readonly ILog log = LogManager.GetLogger(typeof(Plotter));
static readonly Dictionary<int, BinaryWriter> writers = new Dictionary<int, BinaryWriter>();
static int nextGraphId = 1;
readonly string caption;
///
public Plotter(string caption)
{
this.caption = caption;
}
public int StartGraph(int batchNr, string testName, int repetition)
{
try
{
int graphId = nextGraphId++;
string directory = Path.Combine(TBF.Program.GraphsDir, batchNr.ToString(), testName, repetition.ToString());
Directory.CreateDirectory(directory);
BinaryWriter writer = new BinaryWriter(File.Open(Path.Combine(directory, caption), FileMode.Create));
writers.Add(graphId, writer);
log.InfoFormat("Graph file #{0} successfully created (batch={1} test={2} repet={3} caption={4})",
graphId, batchNr, testName, repetition, caption);
return graphId;
}
catch (Exception exc)
{
log.ErrorFormat("Failed to create a graph file (batch={0} test={1} repet={2} caption={3}): {4}",
batchNr, testName, repetition, caption, exc.Message);
return 0;
}
}
public void UpdateGraph(int graphId, float x, float y)
{
try
{
BinaryWriter writer = writers[graphId];
writer.Write(x);
writer.Write(y);
}
catch (Exception exc)
{
log.ErrorFormat("Failed to update graph file #{0}: {1}", graphId, exc.Message);
}
}
public void StopGraph(int graphId, float ymin, float ymax)
{
try
{
BinaryWriter writer = writers[graphId];
writer.Write(ymin);
writer.Write(ymax);
writer.Close();
writers.Remove(graphId);
}
catch (Exception exc)
{
log.ErrorFormat("Failed to close graph file #{0}: {1}", graphId, exc.Message);
}
}
}
}
+51 -30
View File
@@ -77,49 +77,49 @@ namespace TBF.BenchControl.Sequences
///
/// Statistics of 'continuous' variables (temperature, pressure, flow, etc.)
///
public static Statistics AmbTempStat = new Statistics();
public static Statistics AmbPressStat = new Statistics();
public static Statistics AmbHumiStat = new Statistics();
public static Statistics AmbTempStat = new Statistics(new Plotter("Ambient temperature"));
public static Statistics AmbPressStat = new Statistics(new Plotter("Ambient pressure"));
public static Statistics AmbHumiStat = new Statistics(new Plotter("Ambient humidity"));
public static Statistics TempUpStat = new Statistics(0, 5, true);
public static Statistics TempDownStat = new Statistics(0, 5, true);
public static Statistics TempDiffStat = new Statistics(0, 5, true);
public static Statistics TempDivStat = new Statistics(0, 5, true);
public static Statistics PressUpStat = new Statistics(5, 5, true);
public static Statistics PressDownStat = new Statistics(5, 5, true);
public static Statistics PressDeltaStat = new Statistics(5, 5, true);
public static Statistics RefFlowStat = new Statistics(5, 5, true);
public static Statistics TempUpStat = new Statistics(0, 7, true, new Plotter("Temperature up"));
public static Statistics TempDownStat = new Statistics(0, 7, true, new Plotter("Temperature down"));
public static Statistics TempDiffStat = new Statistics(0, 7, true);
public static Statistics TempDivStat = new Statistics(0, 7, true, new Plotter("Temperature div"));
public static Statistics PressUpStat = new Statistics(5, 7, true, new Plotter("Pressure up"));
public static Statistics PressDownStat = new Statistics(5, 7, true, new Plotter("Pressure down"));
public static Statistics PressDeltaStat = new Statistics(5, 7, true);
public static Statistics RefFlowStat = new Statistics(5, 7, true, new Plotter("Flow"));
public static Statistics TempRefHiStat = new Statistics();
public static Statistics TempRefLoStat = new Statistics();
public static Statistics Energy = new Statistics();
public static Statistics TempRefHiStat = new Statistics();
public static Statistics TempRefLoStat = new Statistics();
public static Statistics Energy = new Statistics();
public static Statistics VolumeForEnergy = new Statistics();
public static int lastEnergyUpdateTime;
public static int machineTimeStart;
public static int lastMachineTime;
protected static void ClearAllStatistics(int machineTime)
protected static void StartNewStatistics(int machineTime, int batchNr, string testName, int repetition)
{
lastMachineTime = machineTimeStart = machineTime;
AmbTempStat.Clear();
AmbPressStat.Clear();
AmbHumiStat.Clear();
AmbTempStat.Start(batchNr, testName, repetition);
AmbPressStat.Start(batchNr, testName, repetition);
AmbHumiStat.Start(batchNr, testName, repetition);
TempUpStat.Clear();
TempDownStat.Clear();
TempDiffStat.Clear();
TempDivStat.Clear();
PressUpStat.Clear();
PressDownStat.Clear();
PressDeltaStat.Clear();
RefFlowStat.Clear();
TempUpStat.Start(batchNr, testName, repetition);
TempDownStat.Start(batchNr, testName, repetition);
TempDiffStat.Start(batchNr, testName, repetition);
TempDivStat.Start(batchNr, testName, repetition);
PressUpStat.Start(batchNr, testName, repetition);
PressDownStat.Start(batchNr, testName, repetition);
PressDeltaStat.Start(batchNr, testName, repetition);
RefFlowStat.Start(batchNr, testName, repetition);
TempRefHiStat.Clear();
TempRefLoStat.Clear();
Energy.Clear();
VolumeForEnergy.Clear();
TempRefHiStat.Start(batchNr, testName, repetition);
TempRefLoStat.Start(batchNr, testName, repetition);
Energy.Start(batchNr, testName, repetition);
VolumeForEnergy.Start(batchNr, testName, repetition);
lastEnergyUpdateTime = 0;
}
@@ -148,5 +148,26 @@ namespace TBF.BenchControl.Sequences
lastMachineTime = machineTime;
}
protected static void StopRecordingStatistics()
{
AmbTempStat.Stop();
AmbPressStat.Stop();
AmbHumiStat.Stop();
TempUpStat.Stop();
TempDownStat.Stop();
TempDiffStat.Stop();
TempDivStat.Stop();
PressUpStat.Stop();
PressDownStat.Stop();
PressDeltaStat.Stop();
RefFlowStat.Stop();
TempRefHiStat.Stop();
TempRefLoStat.Stop();
Energy.Stop();
VolumeForEnergy.Stop();
}
}
}
+11 -6
View File
@@ -842,8 +842,8 @@ namespace TBF.BenchControl.Sequences
sb.Append(tstRslt.StartTime);
sb.Append(";"); sb.Append(tstRslt.Batch.BatchNr);
sb.Append(";"); sb.Append(tstRslt.Name());
sb.Append(";"); sb.Append(tstRslt.Repeats());
sb.Append(";"); sb.Append(tstRslt.RepetitionNr);
sb.Append(";"); sb.Append("1");
sb.Append(";"); sb.Append(tstRslt.Method());
sb.Append(";"); sb.Append(tstRslt.TargetVolume());
sb.Append(";"); sb.Append(tstRslt.Qfrom());
@@ -1130,8 +1130,11 @@ namespace TBF.BenchControl.Sequences
tstRslt.TempDownMax = 20.0f;
tstRslt.TempDivMax = 20.0f;
tstRslt.FlowMean = 0; /// TODO
tstRslt.FlowMax = 0; /// TODO
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
{
@@ -1235,9 +1238,11 @@ namespace TBF.BenchControl.Sequences
tstRslt.TempDownMax = 20.0f;
tstRslt.TempDivMax = 20.0f;
tstRslt.FlowMean = 0; /// TODO
tstRslt.FlowMax = 0; /// TODO
tstRslt.FlowMean = (float)RefFlowStat.Average;
tstRslt.FlowStart = (float)RefFlowStat.First;
tstRslt.FlowEnd = (float)RefFlowStat.Last;
tstRslt.FlowMin = (float)RefFlowStat.Min;
tstRslt.FlowMax = (float)RefFlowStat.Max;
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
{
+71 -17
View File
@@ -1,14 +1,16 @@
using System;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.Sequences
{
public class Statistics
{
public readonly int SkippedSamplesCount; /// 0 = do not skip any samples
public readonly int FilterSize; /// 0 = no filter
public readonly bool MedianFilter; /// true - median filter instead of average
public readonly int SkippedSamplesCount; /// 0 = do not skip any samples
public readonly int FilterSize; /// 0 = no filter
public readonly bool MedianFilter; /// true - median filter instead of average
public readonly IPlotter plotter;
bool recordingInProgress;
double[] fifo;
double[] sorted;
double first;
@@ -16,42 +18,58 @@ namespace TBF.BenchControl.Sequences
double min;
double max;
double sum;
UInt32 totalCount; /// Number of samples passed to Update()
UInt32 count; /// Number of processed and filtered samples
UInt32 fifoCount; /// Number of samples inserted into FIFO
int totalCount; /// Number of samples passed to Update()
int count; /// Number of processed and filtered samples
int fifoCount; /// Number of samples inserted into FIFO
int graphId;
public bool RecordingIProgress { get { return recordingInProgress; } }
public double First { get { return first; } }
public double Last { get { return last; } }
public double Min { get { return (count > 0) ? min : 0; } } /// 0 when there were no samples
public double Max { get { return (count > 0) ? max : 0; } } /// 0 when there were no samples
public double Average { get { return (count > 0) ? (sum / (double)count) : 0; } }
public UInt32 Count { get { return count; } }
public int Count { get { return count; } }
public double Sum { get { return sum; } }
public Statistics(int skippedSamplesCount, int filterSize, bool medianFilter)
public Statistics(int skippedSamplesCount, int filterSize, bool medianFilter, IPlotter plotter)
{
this.SkippedSamplesCount = skippedSamplesCount;
this.FilterSize = filterSize;
this.MedianFilter = medianFilter;
this.plotter = plotter;
Clear();
if (FilterSize > 0)
if (filterSize > 0)
{
fifo = new double[FilterSize];
sorted = new double[FilterSize];
}
recordingInProgress = false;
}
public Statistics() : this(0, 0, false)
public Statistics(int skippedSamplesCount, int filterSize, bool medianFilter)
: this(skippedSamplesCount, filterSize, medianFilter, new DummyPlotter())
{
}
public Statistics(IPlotter plotter)
: this(0, 0, false, plotter)
{
}
public Statistics()
: this(0, 0, false, new DummyPlotter())
{
}
/// <summary>
/// Resets statistics
/// Resets statistics and start collecting
/// </summary>
public void Clear()
public void Start(int batchNr, string testName, int repetition)
{
sum = 0;
min = double.MaxValue;
@@ -61,6 +79,22 @@ namespace TBF.BenchControl.Sequences
totalCount = 0;
count = 0;
fifoCount = 0;
recordingInProgress = true;
graphId = plotter.StartGraph(batchNr, testName, repetition);
}
/// <summary>
/// Resets statistics
/// </summary>
public void Stop()
{
if (recordingInProgress)
{
recordingInProgress = false;
plotter.StopGraph(graphId, (float)min, (float)max);
}
}
@@ -88,11 +122,14 @@ namespace TBF.BenchControl.Sequences
/// <param name="value">New value</param>
public void Update(double value)
{
if (totalCount >= SkippedSamplesCount)
if (recordingInProgress)
{
Process(value);
if (totalCount >= SkippedSamplesCount)
{
Process(value);
}
totalCount++;
}
totalCount++;
}
@@ -112,6 +149,8 @@ namespace TBF.BenchControl.Sequences
if (value < min) min = filteredValue;
if (value > max) max = filteredValue;
plotter.UpdateGraph(graphId, (float)(count + SkippedSamplesCount + FilterSize / 2), (float)value);
count++;
}
}
@@ -151,7 +190,13 @@ namespace TBF.BenchControl.Sequences
if (MedianFilter)
{
Array.Sort(sorted);
#if false
filteredValue = sorted[FilterSize / 2];
#else
double sum2 = 0;
for (int j = 1; j < FilterSize - 1; j++) sum2 += sorted[j];
filteredValue = sum2 / (FilterSize - 2);
#endif
}
else
{
@@ -162,4 +207,13 @@ namespace TBF.BenchControl.Sequences
}
}
}
class DummyPlotter : IPlotter
{
public DummyPlotter() { }
public int StartGraph(int batchNr, string testName, int repetition) { return 1; }
public void UpdateGraph(int graphId, float x, float y) { }
public void StopGraph(int graphId, float ymin, float ymax) { }
}
}
+53 -18
View File
@@ -66,6 +66,7 @@ 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;
@@ -133,6 +134,7 @@ namespace TBF.BenchControl
states = new List<State>();
currentTimeSec = 0;
quitStateMachine = false;
}
/// <summary>
@@ -346,7 +348,11 @@ namespace TBF.BenchControl
/// </summary>
public static void StopDevices()
{
foreach (var dev in devices) dev.StopDevice();
foreach (var dev in devices)
{
UiBridge.Bridge.OnActivity(null, string.Format("1. {0}", dev.Name)); /// Info
dev.StopDevice();
}
}
/// <summary>
@@ -356,7 +362,11 @@ namespace TBF.BenchControl
/// </summary>
public static void StopDevices2()
{
foreach (var dev in devices) dev.StopDevice2();
foreach (var dev in devices)
{
UiBridge.Bridge.OnActivity(null, string.Format("2. {0}", dev.Name)); /// Info
dev.StopDevice2();
}
}
@@ -560,6 +570,15 @@ 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.
@@ -604,22 +623,24 @@ namespace TBF.BenchControl
/// Run all devices for the first time
foreach (var device in devices) device.RunDeviceBefore();
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)
try
{
SequenceBase.ReferenceFlowmetersCount = SequenceBase.FlowMeters.Count;
SequenceBase.CalibratedLtrPerRefPulse = new float[SequenceBase.ReferenceFlowmetersCount];
foreach (var flowmtr in SequenceBase.FlowMeters)
{
SequenceBase.CalibratedLtrPerRefPulse[ix - 1] = flowmtr.NominalFlow / 7200.0f;
int ix = flowmtr.Idx1;
if (ix > 0 && ix <= SequenceBase.ReferenceFlowmetersCount)
{
SequenceBase.CalibratedLtrPerRefPulse[ix - 1] = flowmtr.NominalFlow / 7200.0f;
}
}
(new Sequences.MainSeq()).Execute(null);
}
catch (QuitStateMachineException)
{
}
new Sequences.MainSeq().Execute(null);
State.StopOperations();
stateMachineRunning = false;
}
@@ -630,8 +651,19 @@ namespace TBF.BenchControl
public static IList<Event> WaitRunDevsRunOps()
{
foreach (var device in devices) device.RunDeviceAfter();
WaitNextTick();
if (WaitNextTick())
{
///
/// Executed when the state machine is stopped
///
wlog.Fatal("quitStateMachine == true ... The last StopOperaions() start now");
State.StopOperations();
stateMachineRunning = false;
wlog.Fatal("StopOperaions() completed ... stateMachineRunning = false)");
throw new QuitStateMachineException();
}
foreach (var device in devices) device.RunDeviceBefore();
@@ -647,7 +679,7 @@ namespace TBF.BenchControl
/// Wait time period - synchronize
/// </summary>
/// <returns>true when interrupted by 'quitStateMachine', otherwise false</returns>
public static void WaitNextTick()
public static bool WaitNextTick()
{
currentTimeSec += Period;
@@ -657,7 +689,10 @@ namespace TBF.BenchControl
while (DateTime.Now < nextLoopDateTime)
{
Thread.Sleep(100);
if (quitStateMachine) return true;
}
return false;
}
}
}
@@ -326,7 +326,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
queryEnd1 = cBrd.QueryMeasurementEndOp();
queryEnd2 = cBrd.QueryMeasurementEndOp();
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
/// Measurement loop - begin
while (true)
@@ -491,7 +491,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
queryEnd1 = cBrd.QueryMeasurementEndOp();
queryEnd2 = cBrd.QueryMeasurementEndOp();
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
/// Read the diverter switch time
@@ -267,7 +267,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
queryEnd1 = cBrd.QueryMeasurementEndOp();
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
/// Measurement loop - begin
State.Create(string.Format("{0}({1}) : Reading watermeters", test.Method, test.Name))
@@ -323,6 +323,8 @@ namespace TBF.BenchControl.TestMethods.Endurance
test_completed:
StopRecordingStatistics();
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
//------------------------------------------------
@@ -492,7 +494,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
while (!e.Contains(Event.PreviousStopped));
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
///
@@ -642,6 +644,8 @@ namespace TBF.BenchControl.TestMethods.Endurance
stopTest:
StopRecordingStatistics();
///
/// Quit this sequence
///
@@ -325,7 +325,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
queryEnd1 = cBrd.QueryMeasurementEndOp();
queryEnd2 = cBrd.QueryMeasurementEndOp();
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
/// Measurement loop - begin
@@ -368,6 +368,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
test_completed:
StopRecordingStatistics();
State.Create("FixedStartAdvanced : Closing the start/stop valve at the end of the fixed start test")
.AddOperation(checkUiOp)
.AddOperation(StateMachine.ControlBoard.SetValvesOp(null, outPath.StartValve))
@@ -587,6 +589,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
stopTest:
StopRecordingStatistics();
///
/// Quit this sequence
///
@@ -614,8 +614,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
queryEnd1 = cBrd.QueryMeasurementEndOp();
queryEnd2 = cBrd.QueryMeasurementEndOp();
ClearAllStatistics(StateMachine.Time);
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
/// Measurement loop - begin
do
@@ -692,6 +692,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
test_completed:
StopRecordingStatistics();
EndTime = (double)StateMachine.Time;
State.Create(string.Format("{0}({1}) : Closing the start/stop valve at the end of the fixed start test", test.Method, test.Name))
@@ -944,6 +946,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
stopTest:
StopRecordingStatistics();
///
/// Quit this sequence
///
@@ -611,8 +611,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
queryEnd1 = cBrd.QueryMeasurementEndOp();
queryEnd2 = cBrd.QueryMeasurementEndOp();
ClearAllStatistics(StateMachine.Time);
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
/// Measurement loop - begin
do
@@ -689,6 +689,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
test_completed:
StopRecordingStatistics();
EndTime = (double)StateMachine.Time;
State.Create(string.Format("{0}({1}) : Closing the start/stop valve at the end of the fixed start test", test.Method, test.Name))
@@ -1148,6 +1150,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
stopTest:
StopRecordingStatistics();
///
/// Quit this sequence
///
@@ -416,7 +416,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
queryEnd1 = cBrd.QueryMeasurementEndOp();
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
/// Measurement loop - begin
State.Create("Read water meters")
@@ -490,6 +490,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
test_completed:
StopRecordingStatistics();
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
//------------------------------------------------
@@ -754,6 +756,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
stopTest:
StopRecordingStatistics();
///
/// Quit this sequence
///
@@ -582,7 +582,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
queryEnd1 = cBrd.QueryMeasurementEndOp(); /// ???
int estimtdEndTime = StateMachine.Time + (int)((repetitionNr == 1) ? test.TstTime : (test.TstTime * nextTestVolume / test.Volume));
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
if (repetitionNr == 1)
{
@@ -667,6 +667,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
test_completed:
StopRecordingStatistics();
if (repetitionNr == 1)
{
///
@@ -1093,6 +1095,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
stopTest:
StopRecordingStatistics();
///
/// Quit this sequence
///
@@ -585,7 +585,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
/// Read the diverter switch time
switchTimeStart = 0.001f * (float)cBrd.DivTime(0);
@@ -667,6 +667,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
test_completed:
StopRecordingStatistics();
///
/// (Berlin:) Water is stopped immediately after the test and before the 2nd mass measurement in case:
/// - no 'transition sequence after test' is used
@@ -1061,6 +1063,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
stopTest:
StopRecordingStatistics();
///
/// Quit this sequence
///
@@ -90,8 +90,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
//-------------------------------------------------------------------
State.Create(string.Format("{0}({1}) : Simulation", test.Method, test.Name))
.AddOperation(checkUiOp)
.EnterState();
.AddOperation(checkUiOp)
.EnterState();
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) retVal = Event.UiCmdStop;
@@ -101,6 +101,69 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
retListSim.Add(retVal);
return retListSim;
}
else if (debugLevel == Config.Entities.DebugMode.Inherit)
{
///
/// Test method with flow chart simulation
///
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
/// Simulate flow
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
IntBox remainingTime = new IntBox((int)test.TstTime);
State.Create(string.Format("{0}({1}) : Simulation", test.Method, test.Name))
.AddOperation(checkUiOp)
.AddOperation(new Operations.TimerOp((int)test.TstTime, remainingTime))
.EnterState();
do
{
e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; }
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
if (remainingTime.Val > 60)
{
Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", Strings.Test_in_progress, remainingTime.Val / 60, "min", remainingTime.Val % 60, Strings.sec));
}
else
{
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime.Val));
}
//------------------------------------------------
RefFlow.Val = (1.0 + 0.2 * Math.Sin(2 * Math.PI * (float)remainingTime.Val / test.TstTime)) * (test.Qfrom + test.Qto) / 2.0;
PressUp.Val = 2.7f;
PressDown.Val = 2.2f;
UpdateAllStatistics(StateMachine.Time);
}
while (!e.Contains(Event.TimerExpired));
StopRecordingStatistics();
if (retVal != Event.UiCmdStop)
{
float errorPctBase = -1.0f;
if (test.Name.ToLower().Contains("q3")) errorPctBase = -0.5f;
else if (test.Name.ToLower().Contains("q2")) errorPctBase = 0.5f;
else if (test.Name.ToLower().Contains("q1")) errorPctBase = -5.1f;
MakeSimulated(test.Name, test.Repeats, repetitionNr, 0, errorPctBase + repetitionNr * 0.1f);
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Completed));
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file
}
/// Create a list with one item 'retVal' (default is Event.Done) and return it
IList<Event> retListSim = new List<Event>(1);
retListSim.Add(retVal);
return retListSim;
}
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;
@@ -573,7 +636,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
/// Read the diverter switch time
switchTimeStart = 0.001f * (float)cBrd.DivTime(0);
@@ -655,6 +718,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
test_completed:
StopRecordingStatistics();
///
/// (Berlin:) Water is stopped immediately after the test and before the 2nd mass measurement in case:
/// - no 'transition sequence after test' is used
@@ -1071,6 +1136,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
stopTest:
StopRecordingStatistics(); /// Make sure graph files are closed
///
/// Quit this sequence
///
@@ -121,7 +121,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
pressure_set:
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
UpdateAllStatistics(StateMachine.Time);
startTime = StateMachine.Time;
@@ -216,7 +216,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
TestStartTime = DateTime.Now;
startTime = StateMachine.Time;
estimtdEndTime = startTime + testParams.DurationLeak;
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_in_progress);
@@ -255,6 +255,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest
test_completed:
StopRecordingStatistics();
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
//------------------------------------------------
@@ -364,6 +366,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest
stopTest:
StopRecordingStatistics();
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter));
///
@@ -122,7 +122,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
pressure_set:
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
UpdateAllStatistics(StateMachine.Time);
startTime = StateMachine.Time;
@@ -166,6 +166,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
test_completed:
StopRecordingStatistics();
TestEndTime = DateTime.Now;
//------------------------------------------------
@@ -275,6 +277,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
stopTest:
StopRecordingStatistics();
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter));
///
@@ -206,7 +206,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
queryEnd1 = cBrd.QueryMeasurementEndOp();
queryEnd2 = cBrd.QueryMeasurementEndOp();
ClearAllStatistics(StateMachine.Time);
StartNewStatistics(StateMachine.Time, BatchRslts.Batch.BatchNr, test.Name, repetitionNr);
/// Read the diverter switch time
switchTimeStart = 0.001f * (float)cBrd.DivTime(0);
@@ -233,6 +233,9 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
/// Measurement loop - end
test_completed:
StopRecordingStatistics();
State.Create("ReferenceFlowmeterCalibration : Waiting before mass measurement")
.AddOperation(checkUiOp)
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
@@ -378,6 +381,8 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
stopTest:
StopRecordingStatistics();
///
/// Quit this sequence
///
+14 -3
View File
@@ -42,9 +42,9 @@ namespace TBF.BenchControl.Various.ErrorFlags
/// Any E# is 'true' on error, 'false' when OK
/// Max. and min. flow
bool E1 = ProcessData.RefFlowStat.Min < testRslt.Qfrom()
|| ProcessData.RefFlowStat.Max > testRslt.Qto();
/// Average flow
bool E1 = ProcessData.RefFlowStat.Average < testRslt.Qfrom()
|| ProcessData.RefFlowStat.Average > testRslt.Qto();
/// Max. and min. up and down water temperature
bool E2 = ProcessData.TempUpStat.Min < testRslt.TempLimLo()
@@ -99,6 +99,10 @@ namespace TBF.BenchControl.Various.ErrorFlags
|| ProcessData.PressDownStat.Min < errorsCfg.TestParams.Pressure_min
|| ProcessData.PressDownStat.Max > errorsCfg.TestParams.Pressure_max;
/// Max. and min. flow
bool E21 = ProcessData.RefFlowStat.Min < testRslt.Qfrom()
|| ProcessData.RefFlowStat.Max > testRslt.Qto();
int ErrorFlags = 0;
if (errorsCfg.TestParams.E1 && E1) ErrorFlags |= 0x0001;
if (errorsCfg.TestParams.E2 && E2) ErrorFlags |= 0x0002;
@@ -114,6 +118,13 @@ namespace TBF.BenchControl.Various.ErrorFlags
if (errorsCfg.TestParams.E12 && E12) ErrorFlags |= 0x0800;
if (errorsCfg.TestParams.E13 && E13) ErrorFlags |= 0x1000;
if (errorsCfg.TestParams.E14 && E14) ErrorFlags |= 0x2000;
//E15 0x4000
//E16 0x8000
//E17 0x10000
//E18 0x20000
//E19 0x40000
//E20 0x80000
if (errorsCfg.TestParams.E21 && E21) ErrorFlags |= 0x100000;
return ErrorFlags;
}
@@ -31,6 +31,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
public bool E14;
public bool E15;
public bool E16;
public bool E21;
public float Delta_Q_pct; /// [%] max deviation from the mean flow
public float Delta_T; /// [°C] max. T_up or T_down deviation from the mean temperature
@@ -66,6 +67,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
E14 = true;
E15 = true;
E16 = true;
E21 = true;
Delta_Q_pct = 2.5f; /// [%]
Delta_T = 10.0f; /// [°C]
@@ -102,6 +104,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
"E14",
"E15",
"E16",
"E21",
"Delta Q [%]",
"Delta T [°C]",
@@ -141,21 +144,22 @@ namespace TBF.BenchControl.Various.ErrorFlags
case 13: return (E13 ? Strings.yes : Strings.no);
case 14: return (E14 ? Strings.yes : Strings.no);
case 15: return (E15 ? Strings.yes : Strings.no);
case 16: return (E16 ? Strings.yes : Strings.no);
case 16: return (E16 ? Strings.yes : Strings.no);
case 17: return (E21 ? Strings.yes : Strings.no);
case 17: return Delta_Q_pct.ToString();
case 18: return Delta_T.ToString();
case 19: return Delta_Tup_Tdn.ToString();
case 20: return TestTime_min.ToString();
case 21: return TestTime_max.ToString();
case 22: return AmbTemp_min.ToString();
case 23: return AmbTemp_max.ToString();
case 24: return Pressure_min.ToString();
case 25: return Pressure_max.ToString();
case 26: return Coef_E9.ToString();
case 27: return Coef_E10.ToString();
case 28: return Coef_E11.ToString();
case 29: return Coef_E12.ToString();
case 18: return Delta_Q_pct.ToString();
case 19: return Delta_T.ToString();
case 20: return Delta_Tup_Tdn.ToString();
case 21: return TestTime_min.ToString();
case 22: return TestTime_max.ToString();
case 23: return AmbTemp_min.ToString();
case 24: return AmbTemp_max.ToString();
case 25: return Pressure_min.ToString();
case 26: return Pressure_max.ToString();
case 27: return Coef_E9.ToString();
case 28: return Coef_E10.ToString();
case 29: return Coef_E11.ToString();
case 30: return Coef_E12.ToString();
default: return string.Empty;
}
@@ -192,20 +196,21 @@ namespace TBF.BenchControl.Various.ErrorFlags
case 14: E14 = (strValue == Strings.yes); return;
case 15: E15 = (strValue == Strings.yes); return;
case 16: E16 = (strValue == Strings.yes); return;
case 17: E21 = (strValue == Strings.yes); return;
case 17: Delta_Q_pct = Utils.ParseUFloat(strValue); return;
case 18: Delta_T = Utils.ParseUFloat(strValue); return;
case 19: Delta_Tup_Tdn = Utils.ParseUFloat(strValue); return;
case 20: TestTime_min = Utils.ParseUFloat(strValue); return;
case 21: TestTime_max = Utils.ParseUFloat(strValue); return;
case 22: AmbTemp_min = Utils.ParseUFloat(strValue); return;
case 23: AmbTemp_max = Utils.ParseUFloat(strValue); return;
case 24: Pressure_min = Utils.ParseUFloat(strValue); return;
case 25: Pressure_max = Utils.ParseUFloat(strValue); return;
case 26: Coef_E9 = Utils.ParseUFloat(strValue); return;
case 27: Coef_E10 = Utils.ParseUFloat(strValue); return;
case 28: Coef_E11 = Utils.ParseUFloat(strValue); return;
case 29: Coef_E12 = Utils.ParseUFloat(strValue); return;
case 18: Delta_Q_pct = Utils.ParseUFloat(strValue); return;
case 19: Delta_T = Utils.ParseUFloat(strValue); return;
case 20: Delta_Tup_Tdn = Utils.ParseUFloat(strValue); return;
case 21: TestTime_min = Utils.ParseUFloat(strValue); return;
case 22: TestTime_max = Utils.ParseUFloat(strValue); return;
case 23: AmbTemp_min = Utils.ParseUFloat(strValue); return;
case 24: AmbTemp_max = Utils.ParseUFloat(strValue); return;
case 25: Pressure_min = Utils.ParseUFloat(strValue); return;
case 26: Pressure_max = Utils.ParseUFloat(strValue); return;
case 27: Coef_E9 = Utils.ParseUFloat(strValue); return;
case 28: Coef_E10 = Utils.ParseUFloat(strValue); return;
case 29: Coef_E11 = Utils.ParseUFloat(strValue); return;
case 30: Coef_E12 = Utils.ParseUFloat(strValue); return;
default: return;
}
@@ -242,10 +247,10 @@ namespace TBF.BenchControl.Various.ErrorFlags
case 14:
case 15:
case 16:
if (strValue == Strings.yes || strValue == Strings.no) return true;
case 17:
if (strValue == Strings.yes || strValue == Strings.no) return true;
break;
case 17:
case 18:
case 19:
case 20:
@@ -258,6 +263,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
case 27:
case 28:
case 29:
case 30:
if (Utils.TryParseUFloat(strValue, out fdummy)) return true;
break;
@@ -289,6 +295,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
prms.E14 = this.E14;
prms.E15 = this.E15;
prms.E16 = this.E16;
prms.E21 = this.E21;
prms.Delta_Q_pct = this.Delta_Q_pct;
prms.Delta_T = this.Delta_T;
+3 -3
View File
@@ -54,10 +54,10 @@ namespace TBF.Boxes
/// string.Format(FormatEx, val.ToString(Format))
/// If the value is invalid, the conversion result is 'FormatInvalid'.
///
public string Format = null; /// Used as an argument of ToString.) function
public string FormatEx = "{0}"; /// Used as the first argument of string.Format(...), can be modified to contain units, etc.
public string Format = null; /// Used as an argument of ToString.) function
public string FormatEx = "{0}"; /// Used as the first argument of string.Format(...), can be modified to contain units, etc.
public string FormatInvalid = "---";
public float Factor = 1.0f;
public float Factor = 1.0f; /// Factor is used when converting to/from string by ToString(), UpdateParam() and ValidateParam()
public float LimitLo = float.MinValue;
public float LimitHi = float.MaxValue;
+2 -1
View File
@@ -79,7 +79,8 @@ namespace TBF.Forms
if (batch.BatchNr == data.BatchNr)
{
TBF.UiBridge.Bridge.BatchNr = batch.BatchNr;
Program.MainWnd.UpdateProcedure(batch.ProcedureName);
Program.MainWnd.ReloadProcedures(batch.ProcedureName);
TBF.UiBridge.Bridge.Ui2Bench(TBF.UiBridge.UI2BenchCmd.ReloadBatch);
break;
}
+10
View File
@@ -50,6 +50,7 @@ namespace TBF
/// </summary>
[XmlElementAttribute("LastProcedure")]
public string LastProcedureName;
public int LastProcedureNr;
public int BatchNr;
public double RealDensity; /// water density [kg/m3]
@@ -218,6 +219,15 @@ namespace TBF
public string[] RsltItems_Printer_CombinedWM; /// obsolete
public string[] RsltItems_Printer_HeatM; /// obsolete
/// Configuration of graphs
public bool Graph1_On;
public bool Graph2_On;
public bool Graph3_On;
public bool Graph4_On;
public bool Graph5_On;
public bool Graph6_On;
public GraphLib.PlotterGraphPaneEx.LayoutMode GraphsLayoutMode;
[XmlArrayAttribute("RsltsClmnWidths")]
public int[] RsltsClmnWidths;
[XmlIgnore]
+1 -1
View File
@@ -54,7 +54,7 @@ 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_Izrael2014.UserControl1();
this.processTabPage = new System.Windows.Forms.TabPage();
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl6();
this.insertTabPage = new System.Windows.Forms.TabPage();
+52 -35
View File
@@ -114,7 +114,7 @@ namespace TBF
iPerlHeadsToolStripMenuItem.Visible = false;
#endif
CycleRunning = false;
CycleRunning = true;
benchInitializationFailed = false;
///
@@ -254,7 +254,7 @@ namespace TBF
}
}
procedureComboBox.Text = Program.LocalSettings.LastProcedureName;
procedureComboBox.Text = string.Format("{0} {1}", Program.LocalSettings.LastProcedureNr, Program.LocalSettings.LastProcedureName);
ProcedureName = Program.LocalSettings.LastProcedureName;
rightHorizSplitContainer.SplitterDistance = Program.LocalSettings.RightPaneHorizSplitterDistance;
topVerticalSplitContainer.SplitterDistance = Program.LocalSettings.TopPaneVerticalSplitterDistance;
@@ -441,35 +441,46 @@ namespace TBF
/// Read the database and re-initialize procedureComboBox items.
/// Try to preserve the original selection.
/// </summary>
public void ReloadProcedures()
public void ReloadProcedures()
{
ReloadProcedures(procedureComboBox.Text.Substring(procedureComboBox.Text.IndexOf(" ") + 2));
}
public void ReloadProcedures(string procedureNameToSelect)
{
if (procedureComboBox.Enabled)
{
string oriProcName = procedureComboBox.Text;
IList<Procedure> procedures = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config)
.QueryOver<Procedure>()
.Where(x => (x.ProcedureState == ProcedureState.Active))
.OrderBy(x => x.ItemNr).Asc
.List();
.QueryOver<Procedure>()
.Where(x => (x.ProcedureState == ProcedureState.Active))
.OrderBy(x => x.ItemNr).Asc
.List();
bool procedureSet = false;
procedureComboBox.Items.Clear();
foreach (var proc in procedures) procedureComboBox.Items.Add(proc.Name);
foreach (var proc in procedures)
{
string itemText = string.Format("{0} {1}", proc.ItemNr + 1, proc.Name);
procedureComboBox.Items.Add(itemText);
if (procedureNameToSelect == proc.Name)
{
procedureComboBox.Text = itemText;
ProcedureName = procedureNameToSelect;
procedureSet = true;
}
}
if (procedureComboBox.Items.Contains(oriProcName))
if (!procedureSet)
{
procedureComboBox.Text = oriProcName;
ProcedureName = oriProcName;
}
else if (procedures.Count > 0)
{
procedureComboBox.Text = procedures[0].Name;
ProcedureName = procedures[0].Name;
}
else
{
procedureComboBox.Text = string.Empty;
ProcedureName = null;
if (procedures.Count > 0)
{
procedureComboBox.Text = string.Format("{0} {1}", procedures[0].ItemNr + 1, procedures[0].Name);
ProcedureName = procedures[0].Name;
}
else
{
procedureComboBox.Text = string.Empty;
ProcedureName = null;
}
}
ProceduresUpdated = false;
@@ -484,12 +495,14 @@ namespace TBF
private void procedureComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
UpdateProcedure(procedureComboBox.Text);
int ix = procedureComboBox.Text.IndexOf(" ");
int procNr = int.Parse(procedureComboBox.Text.Substring(0, ix));
string procName = procedureComboBox.Text.Substring(ix + 2);
UpdateProcedure(procNr, procName);
}
public void UpdateProcedure(string procedureName)
public void UpdateProcedure(int procedureNr, string procedureName)
{
procedureComboBox.Text = procedureName;
ProcedureName = procedureName;
BenchControlPanel.ReloadTests();
if (CurrentProcedure != null && CurrentProcedure.Description != null)
@@ -500,9 +513,10 @@ namespace TBF
{
testProgressControls.ProcedureSelectedInUI(this, new UiBridge.ProcedureSelectedEventArgs(CurrentProcedure));
}
if (!string.IsNullOrEmpty(ProcedureName))
if (!string.IsNullOrEmpty(procedureName))
{
Program.LocalSettings.LastProcedureName = ProcedureName;
Program.LocalSettings.LastProcedureName = procedureName;
Program.LocalSettings.LastProcedureNr = procedureNr;
Program.LocalSettings.Save();
}
}
@@ -547,8 +561,11 @@ namespace TBF
if (BenchControl.StateMachine.Running && CycleRunning)
{
MessageBox.Show(Strings.Finish_the_session_please, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Information);
if (e is FormClosingEventArgs) (e as FormClosingEventArgs).Cancel = true;
MessageBox.Show(Strings.Finish_the_session_please, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
if (e is FormClosingEventArgs)
{
(e as FormClosingEventArgs).Cancel = true;
}
return;
}
@@ -567,14 +584,14 @@ namespace TBF
FontSize = 24,
FontStyle = FontStyle.Regular,
BackgroundColor = Color.PeachPuff,
StartActivityHandler = false,
StartActivityHandler = true,
};
Thread formThread = new Thread(() => form.ShowDialog());
formThread.Start();
Bridge.Ui2Bench(UI2BenchCmd.Shutdown); /// Drain tanks and quit the main sequence
while (BenchControl.StateMachine.Running) { } /// Wait until StateMachine.Worker() completes
/// Stop the system
BenchControl.StateMachine.Stop();
while (BenchControl.StateMachine.Running) { } /// wait until the last StopOperaions() completes
BenchControl.StateMachine.StopDevices();
BenchControl.StateMachine.StopDevices2();
+2 -1
View File
@@ -16,7 +16,8 @@ namespace TBF
public class Program
{
public const string HomeDir = "C:\\Tbf\\"; /// Contains subdirectories Results, Logs, Images, ...
public const string ImagesDir = "C:\\Tbf\\Images\\";
public const string GraphsDir = "C:\\Tbf\\Graphs\\";
public const string ImagesDir = "C:\\Tbf\\Images\\";
public const string TempImagesDir = "C:\\Tbf\\Images\\Temp\\";
/// log4net
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.802.0")]
[assembly: AssemblyFileVersion("2.18.802.0")]
[assembly: AssemblyVersion("2.18.818.0")]
[assembly: AssemblyFileVersion("2.18.818.0")]
+36
View File
@@ -996,6 +996,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to current.
/// </summary>
internal static string current {
get {
return ResourceManager.GetString("current", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Data.
/// </summary>
@@ -1680,6 +1689,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Flow.
/// </summary>
internal static string Flow {
get {
return ResourceManager.GetString("Flow", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Flow [m3/h].
/// </summary>
@@ -2868,6 +2886,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Pressure.
/// </summary>
internal static string Pressure {
get {
return ResourceManager.GetString("Pressure", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Pressure [bar].
/// </summary>
@@ -3462,6 +3489,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Refresh.
/// </summary>
internal static string Refresh {
get {
return ResourceManager.GetString("Refresh", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Reg. valve.
/// </summary>
+12
View File
@@ -1320,4 +1320,16 @@
<data name="Finish_the_session_please" xml:space="preserve">
<value>Ukončete měření prosím</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Obnovit</value>
</data>
<data name="current" xml:space="preserve">
<value>současný</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Průtok</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>Tlak</value>
</data>
</root>
+12
View File
@@ -1461,4 +1461,16 @@
<data name="Finish_the_session_please" xml:space="preserve">
<value>Beenden Sie die Messungen bitte</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Aktualisierung</value>
</data>
<data name="current" xml:space="preserve">
<value>aktuell</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Durchfluss</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>Druck</value>
</data>
</root>
+3
View File
@@ -1629,4 +1629,7 @@
<data name="Correction" xml:space="preserve">
<value>Korekta</value>
</data>
<data name="Start_the_test_bench" xml:space="preserve">
<value>Uruchom stanowisko pomiarowe</value>
</data>
</root>
+12
View File
@@ -1852,4 +1852,16 @@
<data name="Finish_the_session_please" xml:space="preserve">
<value>Finish measurements please</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Refresh</value>
</data>
<data name="current" xml:space="preserve">
<value>current</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Flow</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>Pressure</value>
</data>
</root>
+274 -122
View File
@@ -1,101 +1,292 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using TBF.Resources;
using TBF.UiBridge;
using GraphLib;
using log4net;
namespace TBF.Screens
{
public partial class GraphsTabPageCtrl : UserControl
{
readonly int numGraphs;
DataSource[] dataSources;
static readonly ILog log = LogManager.GetLogger(typeof(GraphsTabPageCtrl));
static readonly GraphInfo[] SupportedGraphs = new GraphInfo[] {
new GraphInfo { FileName = "Flow", Caption = string.Format("Q [m3/h]", Strings.Flow) },
new GraphInfo { FileName = "Pressure up", Caption = string.Format("Pr up [bar]", Strings.Pressure) },
new GraphInfo { FileName = "Pressure down", Caption = string.Format("Pr dw [bar]", Strings.Pressure) },
new GraphInfo { FileName = "Temperature up", Caption = string.Format("T up [°C]", Strings.Temperature) },
new GraphInfo { FileName = "Temperature down", Caption = string.Format("T dw [°C]", Strings.Temperature) },
new GraphInfo { FileName = "Temperature div", Caption = string.Format("T di [°C]", Strings.Temperature) },
};
PlotterGraphPaneEx.LayoutMode layoutMode;
CheckBox[] checkBoxes;
string selectedGraphsPath;
int selectedBatchNr;
string selectedTestName;
public GraphsTabPageCtrl()
{
InitializeComponent();
button1.Text = Strings.ClearBtnText;
plotterDisplayEx.Smoothing = System.Drawing.Drawing2D.SmoothingMode.None;
/// checkBoxes array must be initialized before other actions
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6 };
dataSources = CreateDataSources(new string[] { "Flow", "Temperature", "Pressure", "Reg. valve position" });
numGraphs = dataSources.Length;
CalcDataGraphs(plotterDisplayEx, dataSources);
Localize();
plotterDisplayEx.Refresh();
UpdateCheckBoxesVisibility();
checkBox1.Checked = Program.LocalSettings.Graph1_On;
checkBox2.Checked = Program.LocalSettings.Graph2_On;
checkBox3.Checked = Program.LocalSettings.Graph3_On;
checkBox4.Checked = Program.LocalSettings.Graph4_On;
checkBox5.Checked = Program.LocalSettings.Graph5_On;
checkBox6.Checked = Program.LocalSettings.Graph6_On;
Bridge.ProcessDataHandler += delegate(object sender, ProcessDataEventArgs args)
layoutMode = Program.LocalSettings.GraphsLayoutMode;
layoutModeComboBox.Text = layoutMode.ToString();
for (PlotterGraphPaneEx.LayoutMode mode = 0; mode <= PlotterGraphPaneEx.LayoutMode.TILES_HOR; mode++)
{
if (InvokeRequired)
{
Invoke(new EventHandler<ProcessDataEventArgs>(OnProcessData), sender, args);
}
else OnProcessData(sender, args);
};
}
layoutModeComboBox.Items.Add(mode.ToString());
}
private void button1_Click(object sender, EventArgs e)
{
/// TODO: implement
}
UpdateTestsHistory(testsHistoryTreeView);
selectedGraphsPath = null;
void OnProcessData(object sender, ProcessDataEventArgs args)
{
//if (!paused && isRunning == true)
//Bridge.ProcessDataHandler += delegate(object sender, ProcessDataEventArgs args)
//{
//try
//{
// gPane.starting_idx += Math.Min(RichTextBoxFinds.BenchControl.StateMachine.;
// UpdateScrollBar();
// gPane.Invalidate();
//}
//catch { }
//}
// if (InvokeRequired)
// {
// Invoke(new EventHandler<ProcessDataEventArgs>(OnProcessData), sender, args);
// }
// else OnProcessData(sender, args);
//};
}
DataSource[] CreateDataSources(string[] names)
//void OnProcessData(object sender, ProcessDataEventArgs args)
//{
// if (!paused && isRunning == true)
// {
// try
// {
// gPane.starting_idx += Math.Min(RichTextBoxFinds.BenchControl.StateMachine.;
// UpdateScrollBar();
// gPane.Invalidate();
// }
// catch { }
// }
//}
void Localize()
{
DataSource[] ds = new DataSource[names.Length];
for (int i = 0; i < names.Length; i++)
refreshButton.Text = Strings.Refresh;
for (int i = 0; i < checkBoxes.Length; i++)
{
ds[i] = new DataSource();
ds[i].Name = names[i];
ds[i].OnRenderXAxisLabel += RenderXLabel;
ds[i].OnRenderYAxisLabel = RenderYLabel;
ds[i].Length = 5800;
ds[i].AutoScaleY = false;
ds[i].SetDisplayRangeY(-250, 250);
ds[i].SetGridDistanceY(100);
if (i < SupportedGraphs.Length)
{
checkBoxes[i].Text = SupportedGraphs[i].Caption;
}
}
return ds;
}
protected void CalcDataGraphs(PlotterDisplayEx display, DataSource[] dataSources)
{
this.SuspendLayout();
display.SetDisplayRangeX(0, 400);
display.PanelLayout = PlotterGraphPaneEx.LayoutMode.STACKED;
display.DataSources.Clear();
for (int j = 0; j < dataSources.Length; j++)
{
display.DataSources.Add(dataSources[j]);
void UpdateCheckBoxesVisibility()
{
for (int i = 0; i < checkBoxes.Length; i++)
{
checkBoxes[i].Visible = (i < SupportedGraphs.Length);
}
}
ApplyColorSchema(display);
private void refreshButton_Click(object sender, EventArgs e)
{
UpdateTestsHistory(testsHistoryTreeView);
}
void UpdateTestsHistory(TreeView treeView)
{
try
{
string[] batches = Directory.GetDirectories(Program.GraphsDir);
treeView.Nodes.Clear();
for (int i = batches.Length - 1; i >= Math.Max(0, batches.Length - 20); i--)
{
string b = batches[i];
string batchNrSstr = Path.GetFileName(b);
string rootNodeName = Path.GetFileName(b);
if ((TBF.BenchControl.Sequences.ProcessData.BatchRslts != null) && rootNodeName.Equals(TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.BatchNr.ToString()))
{
rootNodeName = Strings.current;
}
TreeNode node = new TreeNode(rootNodeName);
node.Tag = null;
treeView.Nodes.Add(node);
string[] tests = Directory.GetDirectories(b);
foreach (var t in tests)
{
string testNameStr = Path.GetFileName(t);
TreeNode subnode = new TreeNode(testNameStr);
node.Nodes.Add(subnode);
string[] repetitions = Directory.GetDirectories(t);
if (repetitions.Length == 1)
{
subnode.Tag = string.Format("{0}~{1}~{2}", repetitions[0], batchNrSstr, testNameStr);
}
else if (repetitions.Length > 1)
{
subnode.Tag = null;
foreach (var r in repetitions)
{
string repetStr = Path.GetFileName(r);
TreeNode subsubnode = new TreeNode(repetStr);
subsubnode.Tag = string.Format("{0}~{1}~{2}/{3}", r, batchNrSstr, testNameStr, repetStr);
subnode.Nodes.Add(subsubnode);
}
}
else
{
subnode.Tag = null;
}
}
}
}
catch (Exception exc)
{
log.ErrorFormat("UpdateTestsHistory() failed: {0}", exc.Message);
}
}
private void testsHistoryTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
if (e.Node.Tag is string)
{
string[] fields = (e.Node.Tag as string).Split(new char[]{'~'});
selectedGraphsPath = fields[0];
selectedBatchNr = int.Parse(fields[1]);
selectedTestName = fields[2];
ShowGraphs(plotterDisplayEx, selectedGraphsPath, selectedBatchNr, selectedTestName);
}
}
void ShowGraphs(PlotterDisplayEx display, string path, int batchNr, string testName)
{
Color[] colors = { Color.DarkRed,
Color.DarkSlateGray,
Color.DarkCyan,
Color.DarkGreen,
Color.DarkBlue ,
Color.DarkMagenta,
Color.DeepPink };
float[] gridY = { 0.0002f, 0.0005f, 0.001f, 0.002f, 0.005f, 0.01f, 0.02f, 0.05f, 0.1f, 0.2f, 0.5f, 1, 2, 5, 10, 20, 50, 100, 200, 500 };
this.SuspendLayout();
display.Smoothing = System.Drawing.Drawing2D.SmoothingMode.None;
display.SetDisplayRangeX(0, 300);
display.PanelLayout = layoutMode;
display.BackgroundColorTop = Color.White;
display.BackgroundColorBot = Color.White;
display.SolidGridColor = Color.LightGray;
display.DashedGridColor = Color.LightGray;
display.DataSources.Clear();
bool first = true;
for (int i = 0; i < checkBoxes.Length; i++)
{
if (checkBoxes[i].Checked && SupportedGraphs.Length > i)
{
DataSource dataSrc = new DataSource();
float ymin;
float ymax;
int samplesCount = dataSrc.LoadSamples(Path.Combine(path, SupportedGraphs[i].FileName), out ymin, out ymax);
/// Following section of code makes sure graps 1, 2 and graphs 3, 4, 5 use the same scale (Y-axis)
DataSource dummyDS = new DataSource();
float y1, y2, y3, y4;
switch (i)
{
case 0:
default:
break;
case 1:
dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[2].FileName), out y1, out y2);
if (y1 < ymin) ymin = y1;
if (y2 > ymax) ymax = y2;
break;
case 2:
dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[1].FileName), out y1, out y2);
if (y1 < ymin) ymin = y1;
if (y2 > ymax) ymax = y2;
break;
case 3:
dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[4].FileName), out y1, out y2);
dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[5].FileName), out y3, out y4);
if (y1 < ymin) ymin = y1;
if (y2 > ymax) ymax = y2;
if (y3 < ymin) ymin = y3;
if (y4 > ymax) ymax = y4;
break;
case 4:
dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[3].FileName), out y1, out y2);
dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[5].FileName), out y3, out y4);
if (y1 < ymin) ymin = y1;
if (y2 > ymax) ymax = y2;
if (y3 < ymin) ymin = y3;
if (y4 > ymax) ymax = y4;
break;
case 5:
dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[3].FileName), out y1, out y2);
dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[4].FileName), out y3, out y4);
if (y1 < ymin) ymin = y1;
if (y2 > ymax) ymax = y2;
if (y3 < ymin) ymin = y3;
if (y4 > ymax) ymax = y4;
break;
}
if (first)
{
first = false;
dataSrc.Name = string.Format("{0} {1} {2}", batchNr, testName, SupportedGraphs[i].Caption);
}
else
{
dataSrc.Name = SupportedGraphs[i].Caption;
}
dataSrc.OnRenderXAxisLabel += RenderXLabel;
dataSrc.OnRenderYAxisLabel = RenderYLabel;
dataSrc.AutoScaleY = false;
dataSrc.SetDisplayRangeY(ymin * 0.9f, ymax * 1.1f);
float d = ymax * 1.1f - ymin * 0.9f;
int j = gridY.Length - 1;
while ((2 * gridY[j] > d) && (j > 0)) j--;
dataSrc.SetGridDistanceY(gridY[j]);
dataSrc.GraphColor = colors[i % colors.Length];
display.DataSources.Add(dataSrc);
}
}
this.ResumeLayout();
display.Refresh();
}
private string RenderXLabel(DataSource s, int idx)
{
if (s.AutoScaleX)
@@ -107,7 +298,7 @@ namespace TBF.Screens
}
else
{
return string.Format("{0}\"", (int)(s.Samples[idx].X / 200));
return ((int)(s.Samples[idx].X)).ToString();
}
}
@@ -116,76 +307,37 @@ namespace TBF.Screens
return string.Format("{0:0.0}", value);
}
void ApplyColorSchema(PlotterDisplayEx display)
private void checkBox1_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph1_On = checkBox1.Checked; AnyCBChanged(); }
private void checkBox2_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph2_On = checkBox2.Checked; AnyCBChanged(); }
private void checkBox3_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph3_On = checkBox3.Checked; AnyCBChanged(); }
private void checkBox4_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph4_On = checkBox4.Checked; AnyCBChanged(); }
private void checkBox5_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph5_On = checkBox5.Checked; AnyCBChanged(); }
private void checkBox6_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph6_On = checkBox6.Checked; AnyCBChanged(); }
void AnyCBChanged()
{
Color[] colors = { Color.DarkRed,
Color.DarkSlateGray,
Color.DarkCyan,
Color.DarkGreen,
Color.DarkBlue ,
Color.DarkMagenta,
Color.DeepPink };
for (int i = 0; i < numGraphs; i++)
if (selectedGraphsPath != null)
{
display.DataSources[i].GraphColor = colors[i % 7];
}
display.BackgroundColorTop = Color.White;
display.BackgroundColorBot = Color.White;
display.SolidGridColor = Color.LightGray;
display.DashedGridColor = Color.LightGray;
}
protected void CalcSinusFunction_0(DataSource dataSrc, int idx)
{
for (int i = 0; i < dataSrc.Length; i++)
{
dataSrc.Samples[i].X = i;
dataSrc.Samples[i].Y = (float)(((float)200 * Math.Sin((idx + 1) * (i + 1.0) * 48 / dataSrc.Length)));
ShowGraphs(plotterDisplayEx, selectedGraphsPath, selectedBatchNr, selectedTestName);
}
}
protected void CalcSinusFunction_1(DataSource dataSrc, int idx)
private void layoutModeComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
for (int i = 0; i < dataSrc.Length; i++)
for (PlotterGraphPaneEx.LayoutMode mode = 0; mode <= PlotterGraphPaneEx.LayoutMode.TILES_HOR; mode++)
{
dataSrc.Samples[i].X = i;
dataSrc.Samples[i].Y = (float)(((float)20 *
Math.Sin(20 * (idx + 1) * (i + 1) * Math.PI / dataSrc.Length)) *
Math.Sin(40 * (idx + 1) * (i + 1) * Math.PI / dataSrc.Length)) +
(float)(((float)200 *
Math.Sin(200 * (idx + 1) * (i + 1) * Math.PI / dataSrc.Length)));
}
}
protected void CalcSinusFunction_2(DataSource dataSrc, int idx)
{
for (int i = 0; i < dataSrc.Length; i++)
{
dataSrc.Samples[i].X = i;
dataSrc.Samples[i].Y = (float)(((float)20 *
Math.Sin(40 * (idx + 1) * i * Math.PI / dataSrc.Length)) *
Math.Sin(160 * (idx + 1) * i * Math.PI / dataSrc.Length)) +
(float)(((float)200 *
Math.Sin(4 * (idx + 1) * i * Math.PI / dataSrc.Length)));
}
}
protected void CalcSinusFunction_3(DataSource dataSrc, int idx, float time)
{
PointF[] samps = dataSrc.Samples;
for (int i = 0; i < samps.Length; i++)
{
samps[i].X = i;
samps[i].Y = 200 + (float)((200 * Math.Sin((idx + 1) * (time + i * 100) / 8000.0))) +
+(float)((40 * Math.Sin((idx + 1) * (time + i * 200) / 2000.0)));
/**
(float)( 4* Math.Sin( ((time + (i+8) * 100) / 900.0)))+
(float)(28 * Math.Sin(((time + (i + 8) * 100) / 290.0))); */
if (layoutModeComboBox.Text.Equals(mode.ToString()) && layoutMode != mode)
{
Program.LocalSettings.GraphsLayoutMode = layoutMode = mode;
ShowGraphs(plotterDisplayEx, selectedGraphsPath, selectedBatchNr, selectedTestName);
}
}
}
}
class GraphInfo
{
public string FileName; /// Name of a file written y the plotter
public string Caption; /// Displayed graph lable
}
}
+114 -11
View File
@@ -33,22 +33,28 @@ namespace TBF.Screens
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GraphsTabPageCtrl));
this.button1 = new System.Windows.Forms.Button();
this.splitContainer = new System.Windows.Forms.SplitContainer();
this.testsHistoryTreeView = new System.Windows.Forms.TreeView();
this.plotterDisplayEx = new GraphLib.PlotterDisplayEx();
this.refreshButton = new System.Windows.Forms.Button();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.layoutModeComboBox = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
this.splitContainer.Panel1.SuspendLayout();
this.splitContainer.Panel2.SuspendLayout();
this.splitContainer.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
resources.ApplyResources(this.button1, "button1");
this.button1.Name = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// splitContainer
//
resources.ApplyResources(this.splitContainer, "splitContainer");
@@ -58,12 +64,18 @@ namespace TBF.Screens
// splitContainer.Panel1
//
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control;
this.splitContainer.Panel1.Controls.Add(this.button1);
this.splitContainer.Panel1.Controls.Add(this.testsHistoryTreeView);
//
// splitContainer.Panel2
//
this.splitContainer.Panel2.Controls.Add(this.plotterDisplayEx);
//
// testsHistoryTreeView
//
resources.ApplyResources(this.testsHistoryTreeView, "testsHistoryTreeView");
this.testsHistoryTreeView.Name = "testsHistoryTreeView";
this.testsHistoryTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.testsHistoryTreeView_NodeMouseClick);
//
// plotterDisplayEx
//
this.plotterDisplayEx.BackColor = System.Drawing.Color.Transparent;
@@ -75,25 +87,116 @@ namespace TBF.Screens
this.plotterDisplayEx.Name = "plotterDisplayEx";
this.plotterDisplayEx.SolidGridColor = System.Drawing.Color.DarkGray;
//
// refreshButton
//
resources.ApplyResources(this.refreshButton, "refreshButton");
this.refreshButton.Name = "refreshButton";
this.refreshButton.UseVisualStyleBackColor = true;
this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.layoutModeComboBox);
this.splitContainer1.Panel1.Controls.Add(this.checkBox6);
this.splitContainer1.Panel1.Controls.Add(this.checkBox5);
this.splitContainer1.Panel1.Controls.Add(this.checkBox4);
this.splitContainer1.Panel1.Controls.Add(this.checkBox3);
this.splitContainer1.Panel1.Controls.Add(this.checkBox2);
this.splitContainer1.Panel1.Controls.Add(this.checkBox1);
this.splitContainer1.Panel1.Controls.Add(this.refreshButton);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer);
//
// checkBox6
//
resources.ApplyResources(this.checkBox6, "checkBox6");
this.checkBox6.Name = "checkBox6";
this.checkBox6.UseVisualStyleBackColor = true;
this.checkBox6.CheckedChanged += new System.EventHandler(this.checkBox6_CheckedChanged);
//
// checkBox5
//
resources.ApplyResources(this.checkBox5, "checkBox5");
this.checkBox5.Name = "checkBox5";
this.checkBox5.UseVisualStyleBackColor = true;
this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);
//
// checkBox4
//
resources.ApplyResources(this.checkBox4, "checkBox4");
this.checkBox4.Name = "checkBox4";
this.checkBox4.UseVisualStyleBackColor = true;
this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
//
// checkBox3
//
resources.ApplyResources(this.checkBox3, "checkBox3");
this.checkBox3.Name = "checkBox3";
this.checkBox3.UseVisualStyleBackColor = true;
this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
//
// checkBox2
//
resources.ApplyResources(this.checkBox2, "checkBox2");
this.checkBox2.Name = "checkBox2";
this.checkBox2.UseVisualStyleBackColor = true;
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
// checkBox1
//
resources.ApplyResources(this.checkBox1, "checkBox1");
this.checkBox1.Name = "checkBox1";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// layoutModeComboBox
//
this.layoutModeComboBox.FormattingEnabled = true;
resources.ApplyResources(this.layoutModeComboBox, "layoutModeComboBox");
this.layoutModeComboBox.Name = "layoutModeComboBox";
this.layoutModeComboBox.SelectedIndexChanged += new System.EventHandler(this.layoutModeComboBox_SelectedIndexChanged);
//
// GraphsTabPageCtrl
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Silver;
this.Controls.Add(this.splitContainer);
this.Controls.Add(this.splitContainer1);
this.Name = "GraphsTabPageCtrl";
this.splitContainer.Panel1.ResumeLayout(false);
this.splitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
this.splitContainer.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.SplitContainer splitContainer;
private GraphLib.PlotterDisplayEx plotterDisplayEx;
private System.Windows.Forms.TreeView testsHistoryTreeView;
private System.Windows.Forms.Button refreshButton;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.CheckBox checkBox6;
private System.Windows.Forms.CheckBox checkBox5;
private System.Windows.Forms.CheckBox checkBox4;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.ComboBox layoutModeComboBox;
}
}
+294 -39
View File
@@ -117,51 +117,42 @@
<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="button1.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="button1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 34</value>
</data>
<data name="button1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
<value>42, 30</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="button1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="button1.Text" xml:space="preserve">
<value>&amp;Btn1</value>
</data>
<data name="&gt;&gt;button1.Name" xml:space="preserve">
<value>button1</value>
</data>
<data name="&gt;&gt;button1.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;button1.Parent" xml:space="preserve">
<value>splitContainer.Panel1</value>
</data>
<data name="&gt;&gt;button1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="splitContainer.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="splitContainer.IsSplitterFixed" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="splitContainer.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="testsHistoryTreeView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="testsHistoryTreeView.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="testsHistoryTreeView.Size" type="System.Drawing.Size, System.Drawing">
<value>125, 655</value>
</data>
<data name="testsHistoryTreeView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;testsHistoryTreeView.Name" xml:space="preserve">
<value>testsHistoryTreeView</value>
</data>
<data name="&gt;&gt;testsHistoryTreeView.Type" xml:space="preserve">
<value>System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;testsHistoryTreeView.Parent" xml:space="preserve">
<value>splitContainer.Panel1</value>
</data>
<data name="&gt;&gt;testsHistoryTreeView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer.Panel1.Name" xml:space="preserve">
<value>splitContainer.Panel1</value>
</data>
@@ -181,7 +172,7 @@
<value>0, 0</value>
</data>
<data name="plotterDisplayEx.Size" type="System.Drawing.Size, System.Drawing">
<value>896, 689</value>
<value>836, 655</value>
</data>
<data name="plotterDisplayEx.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@@ -211,10 +202,10 @@
<value>1</value>
</data>
<data name="splitContainer.Size" type="System.Drawing.Size, System.Drawing">
<value>965, 689</value>
<value>965, 655</value>
</data>
<data name="splitContainer.SplitterDistance" type="System.Int32, mscorlib">
<value>65</value>
<value>125</value>
</data>
<data name="splitContainer.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@@ -226,11 +217,275 @@
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer.Parent" xml:space="preserve">
<value>$this</value>
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;splitContainer.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="refreshButton.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 2</value>
</data>
<data name="refreshButton.Size" type="System.Drawing.Size, System.Drawing">
<value>125, 28</value>
</data>
<data name="refreshButton.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="refreshButton.Text" xml:space="preserve">
<value>Refresh</value>
</data>
<data name="&gt;&gt;refreshButton.Name" xml:space="preserve">
<value>refreshButton</value>
</data>
<data name="&gt;&gt;refreshButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;refreshButton.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;refreshButton.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="splitContainer1.IsSplitterFixed" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value>
</data>
<data name="layoutModeComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>129, 6</value>
</data>
<data name="layoutModeComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>137, 21</value>
</data>
<data name="layoutModeComboBox.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;layoutModeComboBox.Name" xml:space="preserve">
<value>layoutModeComboBox</value>
</data>
<data name="&gt;&gt;layoutModeComboBox.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;layoutModeComboBox.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;layoutModeComboBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="checkBox6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBox6.Location" type="System.Drawing.Point, System.Drawing">
<value>880, 10</value>
</data>
<data name="checkBox6.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 17</value>
</data>
<data name="checkBox6.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="checkBox6.Text" xml:space="preserve">
<value>checkBox6</value>
</data>
<data name="&gt;&gt;checkBox6.Name" xml:space="preserve">
<value>checkBox6</value>
</data>
<data name="&gt;&gt;checkBox6.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBox6.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;checkBox6.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="checkBox5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBox5.Location" type="System.Drawing.Point, System.Drawing">
<value>760, 10</value>
</data>
<data name="checkBox5.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 17</value>
</data>
<data name="checkBox5.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="checkBox5.Text" xml:space="preserve">
<value>checkBox5</value>
</data>
<data name="&gt;&gt;checkBox5.Name" xml:space="preserve">
<value>checkBox5</value>
</data>
<data name="&gt;&gt;checkBox5.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBox5.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;checkBox5.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="checkBox4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBox4.Location" type="System.Drawing.Point, System.Drawing">
<value>640, 10</value>
</data>
<data name="checkBox4.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 17</value>
</data>
<data name="checkBox4.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="checkBox4.Text" xml:space="preserve">
<value>checkBox4</value>
</data>
<data name="&gt;&gt;checkBox4.Name" xml:space="preserve">
<value>checkBox4</value>
</data>
<data name="&gt;&gt;checkBox4.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBox4.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;checkBox4.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="checkBox3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBox3.Location" type="System.Drawing.Point, System.Drawing">
<value>520, 10</value>
</data>
<data name="checkBox3.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 17</value>
</data>
<data name="checkBox3.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="checkBox3.Text" xml:space="preserve">
<value>checkBox3</value>
</data>
<data name="&gt;&gt;checkBox3.Name" xml:space="preserve">
<value>checkBox3</value>
</data>
<data name="&gt;&gt;checkBox3.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBox3.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;checkBox3.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="checkBox2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>400, 10</value>
</data>
<data name="checkBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 17</value>
</data>
<data name="checkBox2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="checkBox2.Text" xml:space="preserve">
<value>checkBox2</value>
</data>
<data name="&gt;&gt;checkBox2.Name" xml:space="preserve">
<value>checkBox2</value>
</data>
<data name="&gt;&gt;checkBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBox2.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;checkBox2.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="checkBox1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>280, 10</value>
</data>
<data name="checkBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 17</value>
</data>
<data name="checkBox1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="checkBox1.Text" xml:space="preserve">
<value>checkBox1</value>
</data>
<data name="&gt;&gt;checkBox1.Name" xml:space="preserve">
<value>checkBox1</value>
</data>
<data name="&gt;&gt;checkBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBox1.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;checkBox1.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Parent" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Name" xml:space="preserve">
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Parent" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>965, 689</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;splitContainer1.Name" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
+9 -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;GENESIS;IPERL;CAMERA;LANG_DE</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;GENESIS;IPERL;CAMERA;LANG_DE</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;GENESIS;IPERL;CAMERA;LANG_DE</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;GENESIS;IPERL;CAMERA;LANG_DE</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\Genesis\ControlComponent3U.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
@@ -523,6 +524,7 @@
<Compile Include="BenchControl\GenericDevices\ICameraDisplay.cs" />
<Compile Include="BenchControl\GenericDevices\IDataEntryForCamera.cs" />
<Compile Include="BenchControl\GenericDevices\IErrorFlags.cs" />
<Compile Include="BenchControl\GenericDevices\IPlotter.cs" />
<Compile Include="BenchControl\GenericDevices\IRoiForFixedStart.cs" />
<Compile Include="BenchControl\GenericDevices\IScaleCfg.cs" />
<Compile Include="BenchControl\GenericDevices\ICalibInfoCfg.cs" />
@@ -865,6 +867,7 @@
<DependentUpon>WriterCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="BenchControl\Sequences\DeferredTestEvaluationData.cs" />
<Compile Include="BenchControl\Sequences\Plotter.cs" />
<Compile Include="BenchControl\Sequences\Statistics.cs" />
<Compile Include="BenchControl\Sequences\ProcessData.cs" />
<Compile Include="BenchControl\TestMethods\Adjustment\WMErrorsForm12.cs">