Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fae4841d18 | ||
|
|
c8749ae7dc | ||
|
|
a9dc196974 | ||
|
|
5829f37b27 | ||
|
|
6dc970a2ee | ||
|
|
a7e58ceaca | ||
|
|
0dc2f56519 | ||
|
|
ec22907186 | ||
|
|
d71a40f7ab | ||
|
|
825230d9e9 | ||
|
|
cb13e3f108 | ||
|
|
2552949c59 | ||
|
|
317e0f16cb | ||
|
|
8e046046cd | ||
|
|
e440981068 | ||
|
|
299f3ecb68 | ||
|
|
39aa02f9ab | ||
|
|
d502873d17 | ||
|
|
da192a207c | ||
|
|
23560f1702 | ||
|
|
36a6fba408 |
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;BADGER_STREDNA_TRAT;LANG_CS</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
+7
-1
@@ -14,12 +14,18 @@ namespace Config
|
||||
public const int CompoundWMsCount = 3;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif DN100 || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || CEVAK_200
|
||||
#elif DN100 || BADGER_VELKA_TRAT || CEVAK_200
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif BADGER_STREDNA_TRAT
|
||||
public const int WMsCount = 8;
|
||||
public const int LineSize = 8;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif FUZHOU_300 || FUZHOU_150 || IZRAEL_200 || GENESIS || SLM_150 || PETERSBURG_200
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
|
||||
+11
-5
@@ -130,13 +130,19 @@ namespace Results
|
||||
|
||||
public static BatchResults FromBatch(Batch batch)
|
||||
{
|
||||
int wmCount = batch.WaterMeters.Count;
|
||||
if (wmCount == 0) return null;
|
||||
if (batch.WaterMeters == null || batch.WaterMeters.Count == 0) return null;
|
||||
|
||||
BatchResults batchResults = new BatchResults(wmCount);
|
||||
int wmPosMax = 0;
|
||||
foreach (var wm in batch.WaterMeters) if (wm.WMPosition > wmPosMax) wmPosMax = wm.WMPosition;
|
||||
|
||||
BatchResults batchResults = new BatchResults(wmPosMax);
|
||||
batchResults.Batch = batch;
|
||||
batchResults.WaterMeters = new WaterMeter[wmCount];
|
||||
for (int i = 0; i < wmCount; i++) batchResults.WaterMeters[i] = batch.WaterMeters[i];
|
||||
batchResults.WaterMeters = new WaterMeter[wmPosMax];
|
||||
for (int i = 0; i < batch.WaterMeters.Count; i++)
|
||||
{
|
||||
WaterMeter wm = batch.WaterMeters[i];
|
||||
batchResults.WaterMeters[wm.WMPosition - 1] = wm;
|
||||
}
|
||||
|
||||
return batchResults;
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ namespace Results.Entities
|
||||
public virtual double TargetTime() { return TestData.TargetTime; }
|
||||
public virtual string Method() { return TestData.Method; }
|
||||
public virtual string RefFlowmeter() { return (Components != null) ? Components.Flowmeter : string.Empty; }
|
||||
public virtual string Scale() { return (Components != null) ? Components.Scale : string.Empty; }
|
||||
public virtual bool IsRelErrTest() { return (MethodClass != null) ? (MethodClass.Contains("FixedStart") || MethodClass.Contains("FlyingStart") || MethodClass.Contains("CombinedWithDetection") || MethodClass.Contains("DiverterTest")) : true; }
|
||||
public virtual bool IsPMaxTest() { return (MethodClass != null) ? (MethodClass.Contains("PMaxTest") || MethodClass.Contains("LeakTest")) : true; }
|
||||
public virtual bool IsStartStop() { return (MethodClass != null) ? MethodClass.Contains("FixedStart") : true; }
|
||||
|
||||
@@ -126,12 +126,9 @@ namespace Results.Forms
|
||||
int displayedControlsCount = 0;
|
||||
for (int i = 0; i < results.WaterMeters.Length; i++)
|
||||
{
|
||||
if (results.WaterMeters[i] != null)
|
||||
if (((results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled) || ShowDisabledPositions)
|
||||
{
|
||||
if (ShowDisabledPositions || !results.WaterMeters[i].Disabled)
|
||||
{
|
||||
displayedControlsCount++;
|
||||
}
|
||||
displayedControlsCount++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,16 +167,23 @@ namespace Results.Forms
|
||||
firstEnabledControl = null;
|
||||
for (int i = 0; i < results.WaterMeters.Length; i++)
|
||||
{
|
||||
if (results.WaterMeters[i] != null)
|
||||
if (((results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled) || ShowDisabledPositions)
|
||||
{
|
||||
if (!results.WaterMeters[i].Disabled || ShowDisabledPositions)
|
||||
/// Create one water meter position / control
|
||||
wmRsltsCtrl[ix] = (TestsArrangement == TestsArrangement.Rows)
|
||||
? new OneWMResultsRowsCtrl() as IOneWMResultsCtrl
|
||||
: new OneWMResultsColumnsCtrl() as IOneWMResultsCtrl;
|
||||
wmRsltsCtrl[ix].Width = oneWidth;
|
||||
wmRsltsCtrl[ix].Height = oneHeight;
|
||||
|
||||
if ((results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled)
|
||||
{
|
||||
/// Create one water meter position / control
|
||||
wmRsltsCtrl[ix] = (TestsArrangement == TestsArrangement.Rows)
|
||||
? new OneWMResultsRowsCtrl() as IOneWMResultsCtrl
|
||||
: new OneWMResultsColumnsCtrl() as IOneWMResultsCtrl;
|
||||
wmRsltsCtrl[ix].Width = oneWidth;
|
||||
wmRsltsCtrl[ix].Height = oneHeight;
|
||||
if ((firstEnabledControl == null) && (results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled)
|
||||
{
|
||||
firstEnabledControl = wmRsltsCtrl[ix];
|
||||
}
|
||||
|
||||
//wmRsltsCtrl[ix].Update(results.WaterMeters[i].WMPosition);
|
||||
wmRsltsCtrl[ix].Update(Items);
|
||||
wmRsltsCtrl[ix].WMResultsClickedHandler += delegate(object s, Results.Forms.WaterMeterEventArgs args)
|
||||
{
|
||||
@@ -192,11 +196,10 @@ namespace Results.Forms
|
||||
OnDoubleClick(s, args);
|
||||
}
|
||||
};
|
||||
|
||||
flowLayoutPanel.Controls.Add(wmRsltsCtrl[ix] as UserControl);
|
||||
if ((firstEnabledControl == null) && !results.WaterMeters[i].Disabled) firstEnabledControl = wmRsltsCtrl[ix];
|
||||
ix++;
|
||||
}
|
||||
|
||||
flowLayoutPanel.Controls.Add(wmRsltsCtrl[ix] as UserControl);
|
||||
ix++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,16 +209,16 @@ namespace Results.Forms
|
||||
}
|
||||
|
||||
|
||||
void UpdateResults(Results.BatchResults batchResults)
|
||||
void UpdateResults(Results.BatchResults results)
|
||||
{
|
||||
if ((batchResults != null) && (batchResults.WaterMeters != null))
|
||||
if ((results != null) && (results.WaterMeters != null))
|
||||
{
|
||||
int ctrlIx = 0;
|
||||
for (int i = 0; i < batchResults.WaterMeters.Length; i++)
|
||||
for (int i = 0; i < results.WaterMeters.Length; i++)
|
||||
{
|
||||
if (!batchResults.WaterMeters[i].Disabled || ShowDisabledPositions)
|
||||
if (((results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled) || ShowDisabledPositions)
|
||||
{
|
||||
if (ctrlIx < wmRsltsCtrl.Length) wmRsltsCtrl[ctrlIx++].Update(batchResults.WaterMeters[i]);
|
||||
if (ctrlIx < wmRsltsCtrl.Length) wmRsltsCtrl[ctrlIx++].Update(results.WaterMeters[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,11 +90,11 @@ namespace Results.Forms
|
||||
#endif
|
||||
|
||||
/// Header
|
||||
lView.Columns.Add(wmPosition.ToString(), (columnWidths.Length > 0) ? columnWidths[0] : 40);
|
||||
lView.Columns.Add(wmPosition.ToString(), (columnWidths != null && columnWidths.Length > 0) ? columnWidths[0] : 40);
|
||||
int col = 1;
|
||||
foreach (var str in wMtr.GetAllDecoratedTestNames())
|
||||
{
|
||||
lView.Columns.Add(str, (columnWidths.Length > col) ? columnWidths[col] : 70);
|
||||
lView.Columns.Add(str, (columnWidths != null && columnWidths.Length > col) ? columnWidths[col] : 70);
|
||||
col++;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,13 +67,13 @@ namespace Results.Forms
|
||||
|
||||
/// Always draw ListView header
|
||||
lView.Columns.Clear();
|
||||
lView.Columns.Add(wmPosition.ToString(), (columnWidths.Length > 0) ? columnWidths[0] : 40);
|
||||
lView.Columns.Add(wmPosition.ToString(), (columnWidths != null && columnWidths.Length > 0) ? columnWidths[0] : 40);
|
||||
|
||||
if (items == null || items.Count == 0) return;
|
||||
int col = 1;
|
||||
foreach (var item in items)
|
||||
{
|
||||
lView.Columns.Add(item.Caption, (columnWidths.Length > col) ? columnWidths[col] : 70);
|
||||
lView.Columns.Add(item.Caption, (columnWidths != null && columnWidths.Length > col) ? columnWidths[col] : 70);
|
||||
col++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,6 +318,19 @@ namespace Results
|
||||
TimeBtwnMassMsrmnts, /// 270
|
||||
TestTimeCorrection, /// 271
|
||||
|
||||
ThreeState, /// 272
|
||||
|
||||
Conduct, /// 273
|
||||
Conduct_start, /// 274
|
||||
Conduct_end, /// 275
|
||||
Conduct_avg, /// 276
|
||||
Conduct_min, /// 277
|
||||
Conduct_max, /// 278
|
||||
|
||||
InfoFlags, /// 279
|
||||
|
||||
Scale, /// 280
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,17 +13,25 @@ namespace Results.Output
|
||||
{
|
||||
public static Chart GetChart(WaterMeter wm, bool isPrinter)
|
||||
{
|
||||
return GetChart(wm, isPrinter, Config.Unit.lph, false);
|
||||
return GetChart(wm, isPrinter, Config.Unit.lph);
|
||||
}
|
||||
|
||||
public static Chart GetChart(WaterMeter wm, bool isPrinter, Config.Unit flowUnit, bool isQ4)
|
||||
public static Chart GetChart(WaterMeter wm, bool isPrinter, Config.Unit flowUnit)
|
||||
{
|
||||
double maxFlow_m3h = 0;
|
||||
IList<PointF> unsortedPoints = new List<PointF>();
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if (mtr.IsPilotRslt() && mtr.TestRslt.TestData.Evaluate && (mtr.TestRslt.TestTime > 0) && (mtr.TestRslt.PulsesMaster > 0))
|
||||
{
|
||||
double flow = Config.Units.ConvertTo(flowUnit, 3.6 * mtr.TestRslt.VolumeCTV / mtr.TestRslt.TestTime);
|
||||
double flow_m3h = (mtr.TestTime != 0)
|
||||
? (3.6 * mtr.TestRslt.VolumeCTV / mtr.TestTime * mtr.PulsesMaster / mtr.TestRslt.PulsesMaster)
|
||||
: (3.6 * mtr.TestRslt.VolumeCTV / mtr.TestRslt.TestTime);
|
||||
|
||||
if (flow_m3h > maxFlow_m3h) maxFlow_m3h = flow_m3h;
|
||||
|
||||
double flow = Config.Units.ConvertTo(flowUnit, flow_m3h); /// Convert to specified units
|
||||
|
||||
if (flow > 0)
|
||||
{
|
||||
unsortedPoints.Add(new PointF((float)flow, (float)mtr.Error));
|
||||
@@ -32,6 +40,8 @@ namespace Results.Output
|
||||
}
|
||||
IEnumerable<PointF> sortedPoints = unsortedPoints.OrderBy(x => x.X);
|
||||
|
||||
bool isQ4 = (maxFlow_m3h > 1.1 * wm.WaterMeterData.Q3_Qn);
|
||||
|
||||
Chart chart = new Chart
|
||||
{
|
||||
Name = "chart",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;BADGER_STREDNA_TRAT;LANG_CS</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -325,6 +325,7 @@ namespace Results
|
||||
: ((w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr(f))));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.RefFlowmeter, "Ref. flowmeter", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null) ? FormatStr(f, w.GetTestRslt(t).RefFlowmeter()) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Scale, "Scale", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null) ? FormatStr(f, w.GetTestRslt(t).Scale()) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ResultOrErrorFlags, "Winiki lub E", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.PassedOrErrorFlagsStr()))); /// PL specific result
|
||||
|
||||
///
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;BADGER_STREDNA_TRAT;LANG_CS</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -471,17 +471,20 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
///
|
||||
void UpdateExclamation(int uiCtrlPos) /// uiCtrlPos = 0 .. TextBoxesCount-1
|
||||
{
|
||||
try
|
||||
{
|
||||
double startVolumeLtr = Utils.ParseUDouble(startTextBoxes[uiCtrlPos].Text) * regReaders[phys2wm[uiCtrlPos] - 1].LtrsPerPulse;
|
||||
double endVolumeLtr = Utils.ParseUDouble(endTextBoxes[uiCtrlPos].Text) * regReaders[phys2wm[uiCtrlPos] - 1].LtrsPerPulse;
|
||||
double err = 100.0 * (endVolumeLtr - startVolumeLtr - refVolume) / refVolume;
|
||||
exclamations[uiCtrlPos].Visible = (err < warningLimLo) || (err > warningLimHi);
|
||||
}
|
||||
catch
|
||||
{
|
||||
exclamations[uiCtrlPos].Visible = false;
|
||||
}
|
||||
if ((mode == Tst.End) || (mode == Tst.Both))
|
||||
{
|
||||
try
|
||||
{
|
||||
double startVolumeLtr = Utils.ParseUDouble(startTextBoxes[uiCtrlPos].Text) * regReaders[phys2wm[uiCtrlPos] - 1].LtrsPerPulse;
|
||||
double endVolumeLtr = Utils.ParseUDouble(endTextBoxes[uiCtrlPos].Text) * regReaders[phys2wm[uiCtrlPos] - 1].LtrsPerPulse;
|
||||
double err = 100.0 * (endVolumeLtr - startVolumeLtr - refVolume) / refVolume;
|
||||
exclamations[uiCtrlPos].Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
catch
|
||||
{
|
||||
exclamations[uiCtrlPos].Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Text;
|
||||
@@ -43,7 +43,9 @@ namespace TBF.BenchControl.Elde
|
||||
public StatusP StatusP { get { return controlCom.StatusP; } }
|
||||
public int EtPulses(int wmNr1) { return controlCom.EtPulses(wmNr1); }
|
||||
public int EtPulsesK { get { return controlCom.EtPulsesK; } }
|
||||
public UInt16 WMeterPulses(int wmNr1) { return controlCom.WMeterPulses(wmNr1); }
|
||||
public int EtPulses2 { get { return controlCom.EtPulses2; } } /// DEWA_300: pulses from I12
|
||||
public int EtPulses3 { get { return controlCom.EtPulses3; } } /// DEWA_300: pulses from I13
|
||||
public UInt16 WMeterPulses(int wmNr1) { return controlCom.WMeterPulses(wmNr1); }
|
||||
public int WMeterReference(int wmNr0) { return controlCom.WMeterReference(wmNr0); }
|
||||
public uint RegulValveDAC(int rvNr0) { return controlCom.RegulValveDAC(rvNr0); }
|
||||
public float Pressure(int prsNr0) { return controlCom.Pressure(prsNr0); }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -28,6 +28,8 @@ namespace TBF.BenchControl.Elde
|
||||
}
|
||||
|
||||
public int EtPulsesK { get { return 1; } }
|
||||
public int EtPulses2 { get { return 0; } }
|
||||
public int EtPulses3 { get { return 0; } }
|
||||
|
||||
double[] errFactor = new double[Config.Data.WMsCount + 1]; /// Internal
|
||||
double[] wMeterPulsesF = new double[Config.Data.WMsCount + 1]; /// Internal
|
||||
|
||||
@@ -50,6 +50,13 @@ namespace TBF.BenchControl.Elde
|
||||
public int EtPulsesK { get { return (int)ctrlBrdComponent.etPulsesK; } }
|
||||
#endif
|
||||
|
||||
#if DEWA_300
|
||||
public int EtPulses2 { get { return (int)ctrlBrdComponent.EtPulses2; } }
|
||||
public int EtPulses3 { get { return (int)ctrlBrdComponent.EtPulses3; } }
|
||||
#else
|
||||
public int EtPulses2 { get { return 0; } }
|
||||
public int EtPulses3 { get { return 0; } }
|
||||
#endif
|
||||
public UInt16 WMeterPulses(int wmNr1) { return (UInt16)ctrlBrdComponent.wMeterPuls[wmNr1]; }
|
||||
public int WMeterReference(int wmNr0) { return (int)ctrlBrdComponent.wMeterReference[wmNr0]; }
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
|
||||
public double LtrPerPulseCorrected(double flow, int rangeIx)
|
||||
{
|
||||
if (flow < 0.1 * NominalFlow) return LtrPerPulse; /// No correction for small flow
|
||||
|
||||
/// Apply correction
|
||||
var rangeCorrections = new List<Config.Entities.MeasurementCorrection>();
|
||||
foreach (var corr in Corrections)
|
||||
|
||||
@@ -28,22 +28,66 @@ namespace TBF.BenchControl.Elde.FlowMeterDewa
|
||||
public double NominalFlow { get { return nominalFlow; } }
|
||||
public double LtrPerPulse { get { return ltrPerPulse; } }
|
||||
|
||||
double[] refFreq;
|
||||
double[] refFreq; /// 0..sum, 1..I11, 2..I12, 3..I13
|
||||
int[] refPulses;
|
||||
|
||||
public double LtrPerPulseCorrected(double flow, int rangeIx)
|
||||
{
|
||||
if (flow < 0.1 * NominalFlow) return LtrPerPulse; /// No correction for small flow
|
||||
log.DebugFormat("LtrPerPulseCorrected({0}, {1}) started", flow, rangeIx);
|
||||
|
||||
refFreq[0] = controlBoard.ReferenceFreqs(0);
|
||||
refFreq[1] = controlBoard.ReferenceFreqs(1);
|
||||
refFreq[2] = controlBoard.ReferenceFreqs(2);
|
||||
refFreq[3] = controlBoard.ReferenceFreqs(3);
|
||||
log.DebugFormat("refFreq[] = ({0}, {1}, {2}, {3})", refFreq[0], refFreq[1], refFreq[2], refFreq[3]);
|
||||
|
||||
refFreq[1] = refFreq[0] - refFreq[2] - refFreq[3];
|
||||
|
||||
double ltrPerPulseCorrected = 0;
|
||||
if (flowMeter1 != null) ltrPerPulseCorrected += refFreq[1] * flowMeter1.LtrPerPulseCorrected(flow * refFreq[1] / refFreq[0], rangeIx);
|
||||
if (flowMeter2 != null) ltrPerPulseCorrected += refFreq[2] * flowMeter2.LtrPerPulseCorrected(flow * refFreq[2] / refFreq[0], rangeIx);
|
||||
if (flowMeter3 != null) ltrPerPulseCorrected += refFreq[3] * flowMeter3.LtrPerPulseCorrected(flow * refFreq[3] / refFreq[0], rangeIx);
|
||||
return ltrPerPulseCorrected / refFreq[0];
|
||||
refPulses[0] = controlBoard.EtPulses(0);
|
||||
refPulses[2] = controlBoard.EtPulses2;
|
||||
refPulses[3] = controlBoard.EtPulses3;
|
||||
refPulses[1] = refPulses[0] - refPulses[2] - refPulses[3];
|
||||
|
||||
log.DebugFormat("refPulses[] = ({0}, {1}, {2}, {3})", refPulses[0], refPulses[1], refPulses[2], refPulses[3]);
|
||||
|
||||
double flow1, flow2, flow3;
|
||||
double contribution1, contribution2, contribution3;
|
||||
if (refFreq[0] != 0)
|
||||
{
|
||||
double ltrPerPulseCorrected = 0;
|
||||
if (flowMeter1 != null)
|
||||
{
|
||||
double ratio = (double)refPulses[flowMeter1.Idx1] / (double)refPulses[0];
|
||||
flow1 = flow * ratio;
|
||||
contribution1 = flowMeter1.LtrPerPulseCorrected(flow1, rangeIx) * ratio;
|
||||
ltrPerPulseCorrected += contribution1;
|
||||
log.DebugFormat("flowmeter1 = {0}, flow1 = {1}, contribution1 = {2}", flowMeter1.Name, flow1, contribution1);
|
||||
}
|
||||
if (flowMeter2 != null)
|
||||
{
|
||||
double ratio = (double)refPulses[flowMeter2.Idx1] / (double)refPulses[0];
|
||||
flow2 = flow * ratio;
|
||||
contribution2 = flowMeter2.LtrPerPulseCorrected(flow2, rangeIx) * ratio;
|
||||
ltrPerPulseCorrected += contribution2;
|
||||
log.DebugFormat("flowmeter2 = {0}, flow2 = {1}, contribution2 = {2}", flowMeter2.Name, flow2, contribution2);
|
||||
}
|
||||
if (flowMeter3 != null)
|
||||
{
|
||||
double ratio = (double)refPulses[flowMeter3.Idx1] / (double)refPulses[0];
|
||||
flow3 = flow * ratio;
|
||||
contribution3 = flowMeter3.LtrPerPulseCorrected(flow3, rangeIx) * ratio;
|
||||
ltrPerPulseCorrected += contribution3;
|
||||
log.DebugFormat("flowmeter3 = {0}, flow3 = {1}, contribution3 = {2}", flowMeter3.Name, flow3, contribution3);
|
||||
}
|
||||
|
||||
log.DebugFormat("LtrPerPulseCorrected() returns {0}", ltrPerPulseCorrected);
|
||||
return ltrPerPulseCorrected;
|
||||
}
|
||||
else
|
||||
{
|
||||
log.DebugFormat("LtrPerPulseCorrected() returns 1");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +100,9 @@ namespace TBF.BenchControl.Elde.FlowMeterDewa
|
||||
|
||||
public FlowMeter()
|
||||
{
|
||||
}
|
||||
refFreq = new double[4];
|
||||
refPulses = new int[4];
|
||||
}
|
||||
|
||||
public FlowMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -80,6 +126,7 @@ namespace TBF.BenchControl.Elde.FlowMeterDewa
|
||||
ltrPerPulse = nominalFlow / (flowMetersCount * 7200.0); /// Nominal freq. is flowMetersCount * 2000 Hz (2000, 4000 or 6000 Hz)
|
||||
|
||||
refFreq = new double[4];
|
||||
refPulses = new int[4];
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ namespace TBF.BenchControl.Elde.FlowMeterTriplet
|
||||
|
||||
public double LtrPerPulseCorrected(double flow, int rangeIx)
|
||||
{
|
||||
if (flow < 0.1 * NominalFlow) return LtrPerPulse; /// No correction for small flow
|
||||
|
||||
/// Apply correction
|
||||
double correctedFlow = Config.Formulas.CorrectedValue(flow, Corrections);
|
||||
return (LtrPerPulse * correctedFlow / flow);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using Dirichlet.Numerics;
|
||||
@@ -11,7 +11,9 @@ namespace TBF.BenchControl.Elde
|
||||
StatusP StatusP { get; }
|
||||
int EtPulses(int wmNr1);
|
||||
int EtPulsesK { get; }
|
||||
UInt16 WMeterPulses(int wmNr1);
|
||||
int EtPulses2 { get; }
|
||||
int EtPulses3 { get; }
|
||||
UInt16 WMeterPulses(int wmNr1);
|
||||
int WMeterReference(int wmNr0);
|
||||
uint RegulValveDAC(int rvNr0);
|
||||
float Pressure(int prsNr0);
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
this.GetType().Namespace.Substring(17),
|
||||
CameraCfg.Name,
|
||||
CameraCfg.HardwareAddress,
|
||||
ipAddress == null ? "not detected" : ipAddress.ToString(),
|
||||
string.IsNullOrEmpty(cpuSerialNr) ? "not detected" : cpuSerialNr,
|
||||
string.IsNullOrEmpty(sdCardVer) ? "not detected" : sdCardVer);
|
||||
CameraCfg.DebugLevel == DebugMode.Simulate ? "simulated" : ((ipAddress == null) ? "not detected" : ipAddress.ToString()),
|
||||
CameraCfg.DebugLevel == DebugMode.Simulate ? "simulated" : (string.IsNullOrEmpty(cpuSerialNr) ? "not detected" : cpuSerialNr),
|
||||
CameraCfg.DebugLevel == DebugMode.Simulate ? "simulated" : (string.IsNullOrEmpty(sdCardVer) ? "not detected" : sdCardVer));
|
||||
}
|
||||
|
||||
|
||||
@@ -161,13 +161,16 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
{
|
||||
cameraIdx = GetCameraIdx();
|
||||
|
||||
if (CameraCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
if (CameraCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
UiBridge.Bridge.OnCameraInfo(this.cameraIdx, string.Format("{0} s/n {1} si simulated", Name, CameraCfg.HardwareAddress));
|
||||
return;
|
||||
}
|
||||
|
||||
/// Detect a camera
|
||||
bool cameraDetected = DetectCamera(CameraCfg.HardwareAddress % 100, ref ipAddress, true,
|
||||
out cpuHardware, out cpuRevision, out cpuSerialNr, out sdCardVer);
|
||||
|
||||
|
||||
if (CameraCfg.DebugLevel == DebugMode.AutoDetect)
|
||||
{
|
||||
CameraCfg.DebugLevel = cameraDetected ? DebugMode.DetectedOn : DebugMode.DetectedOff;
|
||||
@@ -219,46 +222,55 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
|
||||
public void StopDevice()
|
||||
{
|
||||
running = false;
|
||||
if ((CameraCfg.DebugLevel != DebugMode.Simulate) && (CameraCfg.DebugLevel != DebugMode.DetectedOff))
|
||||
{
|
||||
running = false;
|
||||
|
||||
stopScpThreadFlag = true;
|
||||
stopRtpListenerFlag = true;
|
||||
stopMsrmntListenerFlag = true;
|
||||
stopScpThreadFlag = true;
|
||||
stopRtpListenerFlag = true;
|
||||
stopMsrmntListenerFlag = true;
|
||||
|
||||
if (Telnet != null)
|
||||
{
|
||||
Telnet.Dispose();
|
||||
Telnet = null;
|
||||
}
|
||||
if (Telnet != null)
|
||||
{
|
||||
Telnet.Dispose();
|
||||
Telnet = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void StopDevice2()
|
||||
{
|
||||
if (scpThread != null) scpThread.Join(50);
|
||||
if (rtpListenerThread != null) rtpListenerThread.Join(50);
|
||||
if (msrmntListenerThread != null) msrmntListenerThread.Join(50);
|
||||
if ((CameraCfg.DebugLevel != DebugMode.Simulate) && (CameraCfg.DebugLevel != DebugMode.DetectedOff))
|
||||
{
|
||||
if (scpThread != null) scpThread.Join(50);
|
||||
if (rtpListenerThread != null) rtpListenerThread.Join(50);
|
||||
if (msrmntListenerThread != null) msrmntListenerThread.Join(50);
|
||||
|
||||
if (rtpUdpClient != null)
|
||||
{
|
||||
rtpUdpClient.Close();
|
||||
rtpUdpClient = null;
|
||||
}
|
||||
if (rtpUdpClient != null)
|
||||
{
|
||||
rtpUdpClient.Close();
|
||||
rtpUdpClient = null;
|
||||
}
|
||||
|
||||
if (msrmntUdpClient != null)
|
||||
{
|
||||
msrmntUdpClient.Close();
|
||||
msrmntUdpClient = null;
|
||||
}
|
||||
if (msrmntUdpClient != null)
|
||||
{
|
||||
msrmntUdpClient.Close();
|
||||
msrmntUdpClient = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
if (sha1sumResponse != null && !sha1sumResponseProcessed)
|
||||
{
|
||||
scpThread = new Thread(new ThreadStart(ScpWorker));
|
||||
scpThread.Start();
|
||||
|
||||
sha1sumResponseProcessed = true;
|
||||
if ((CameraCfg.DebugLevel != DebugMode.Simulate) && (CameraCfg.DebugLevel != DebugMode.DetectedOff))
|
||||
{
|
||||
if (sha1sumResponse != null && !sha1sumResponseProcessed)
|
||||
{
|
||||
scpThread = new Thread(new ThreadStart(ScpWorker));
|
||||
scpThread.Start();
|
||||
|
||||
sha1sumResponseProcessed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void RunDeviceAfter() { }
|
||||
|
||||
@@ -50,10 +50,13 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
grabImageCommandSent = false;
|
||||
transferringGrabbedImage = false;
|
||||
|
||||
telnet.promptReceivedHandler += delegate(object sndr, PromptReceivedEventArgs a)
|
||||
{
|
||||
OnPromptReceived(sndr, a);
|
||||
};
|
||||
if (camera.DebugLevel == DebugMode.Normal || camera.DebugLevel == DebugMode.DetectedOn)
|
||||
{
|
||||
telnet.promptReceivedHandler += delegate(object sndr, PromptReceivedEventArgs a)
|
||||
{
|
||||
OnPromptReceived(sndr, a);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void OnPromptReceived(object sndr, PromptReceivedEventArgs a)
|
||||
@@ -65,33 +68,58 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return;
|
||||
|
||||
grabImageCommandSent = false;
|
||||
transferringGrabbedImage = false;
|
||||
if (File.Exists(imgFileNames[0])) File.Delete(imgFileNames[0]);
|
||||
|
||||
if ((imgFileNames != null) && (imgFileNames.Length > 0) && File.Exists(imgFileNames[0]))
|
||||
{
|
||||
///
|
||||
/// An image specified, (1) delete previous image, (2) check if this is a simulation
|
||||
///
|
||||
File.Delete(imgFileNames[0]);
|
||||
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate || camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.DetectedOff)
|
||||
{
|
||||
///
|
||||
/// Camera is in simulation mode => create a simulated image
|
||||
///
|
||||
File.Copy(string.Format("{0}\\Pictures\\sample.jpg", Program.ExecutableDir), imgFileNames[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Event Run()
|
||||
{
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return Event.None;
|
||||
|
||||
if (imgFileNames.Length < 1 || imgFileNames[0] == null)
|
||||
if ((imgFileNames == null) || (imgFileNames.Length < 1) || (imgFileNames[0] == null))
|
||||
{
|
||||
return Event.GrabPassed;
|
||||
///
|
||||
/// No images to be grabbed => Done
|
||||
///
|
||||
return Event.GrabPassed;
|
||||
}
|
||||
else if (!grabImageCommandSent)
|
||||
else if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate ||
|
||||
camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.DetectedOff)
|
||||
{
|
||||
///
|
||||
/// Camera is in simulation mode => create a simulated image and complete
|
||||
///
|
||||
return Event.GrabPassed;
|
||||
}
|
||||
else if (!grabImageCommandSent)
|
||||
{
|
||||
///
|
||||
/// Normal operation, no command sent yet => (1) wait until telnet state = Inactive, (2) send a command
|
||||
///
|
||||
if (camera.Running && (telnet.State == TelnetClient.TelnetState.Inactive))
|
||||
{
|
||||
//
|
||||
// State variables
|
||||
//
|
||||
///
|
||||
/// State variables
|
||||
///
|
||||
response = null;
|
||||
|
||||
//
|
||||
// Prepare command
|
||||
//
|
||||
///
|
||||
/// Prepare a command
|
||||
///
|
||||
int rotation = 0;
|
||||
if (imageRotation == ImageRotation.Deg90)
|
||||
rotation = 90;
|
||||
@@ -119,7 +147,10 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
}
|
||||
else if (grabPassed)
|
||||
{
|
||||
if (transferringGrabbedImage)
|
||||
///
|
||||
/// Normal operation, grab passed => transfer/transferring the image
|
||||
///
|
||||
if (transferringGrabbedImage)
|
||||
{
|
||||
/// Grab passed and image transfer is in progress
|
||||
return Event.GrabPassed;
|
||||
@@ -138,12 +169,17 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
}
|
||||
else if (grabFailed)
|
||||
{
|
||||
/// Grab failed, there in no image to transfer
|
||||
///
|
||||
/// Normal operation, grab failed => there in no image to transfer
|
||||
///
|
||||
return Event.GrabFailed;
|
||||
}
|
||||
else if (response != null)
|
||||
{
|
||||
if (response.Contains("completed"))
|
||||
///
|
||||
/// Normal operation
|
||||
///
|
||||
if (response.Contains("completed"))
|
||||
{
|
||||
grabPassed = true;
|
||||
|
||||
|
||||
@@ -127,17 +127,11 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
|
||||
public IOperation GrabImageOp(string imageFileName)
|
||||
{
|
||||
if (NetCamera != null)
|
||||
{
|
||||
/// TODO: Implement support for sharing one camera by multiple ROI-s
|
||||
return NetCamera.GrabImagesOp(new string[] { imageFileName }, roiCfg.BlackAndWhite, roiCfg.LowResolution, roiCfg.ImageRotation);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
return GrabImageOp(imageFileName, roiCfg.BlackAndWhite, roiCfg.LowResolution, roiCfg.ImageRotation);
|
||||
}
|
||||
|
||||
public IOperation GrabImageOp(string imageFileName, bool blackAndWhite,
|
||||
bool lowResolution, Config.Entities.ImageRotation imageRotation)
|
||||
public IOperation GrabImageOp(string imageFileName,
|
||||
bool blackAndWhite, bool lowResolution, Config.Entities.ImageRotation imageRotation)
|
||||
{
|
||||
if (NetCamera != null)
|
||||
{
|
||||
|
||||
@@ -149,7 +149,11 @@ namespace TBF.BenchControl.Network.Comet.Ambient
|
||||
state = State.Idle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpdateProcessData(temperature, pressure, humidity);
|
||||
|
||||
log.InfoFormat("Ambient: temperature = {0:F1} C, humidity = {1:F1} %, pressure = {2:F0} mbar", temperature, humidity, 1000 * pressure);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugLevel = DebugMode.FailureDuringOperation;
|
||||
@@ -220,6 +224,13 @@ namespace TBF.BenchControl.Network.Comet.Ambient
|
||||
|
||||
public void StopDevice2() { }
|
||||
|
||||
void UpdateProcessData(float temperature, float pressure, float humidity)
|
||||
{
|
||||
TBF.BenchControl.Sequences.ProcessData.AmbTemp.Val = temperature;
|
||||
TBF.BenchControl.Sequences.ProcessData.AmbPress.Val = pressure;
|
||||
TBF.BenchControl.Sequences.ProcessData.AmbHumi.Val = humidity;
|
||||
}
|
||||
|
||||
///
|
||||
/// Boxes for the operation result
|
||||
///
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// <param name="wmTypeId">Water meter type Id</param>
|
||||
/// <param name="wmTypeRevision">Water meter type revision</param>
|
||||
/// <returns>SensusTestInfos array</returns>
|
||||
IList<SensusTestInfo> GetOracleTestInfo(OracleConnection conn, int wmTypeId, out int wmTypeRevision)
|
||||
public static IList<SensusTestInfo> GetOracleTestInfo(OracleConnection conn, int wmTypeId, out int wmTypeRevision, out string wzTyp, out string metrolKlasse, out string zulasszeichen, out string materialNr, out double q3, out DateTime timeStamp, out string remark)
|
||||
{
|
||||
///
|
||||
/// Read 'incomplete' TestInfo from Oracle database containing only flowId-s ad qBezeichnung-s
|
||||
@@ -147,7 +147,15 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// For a given 'wmTypeId' find the most recent active 'wmTypeRevision'
|
||||
///
|
||||
wmTypeRevision = -1;
|
||||
OracleCommand cmd = new OracleCommand("select REV_WZTYP from VT_WZTYP_SD where ANBID=4 and ID_WZTyp=:1 and AKTIV=:2", conn);
|
||||
wzTyp = string.Empty;
|
||||
metrolKlasse = string.Empty;
|
||||
zulasszeichen = string.Empty;
|
||||
materialNr = string.Empty;
|
||||
q3 = 0;
|
||||
timeStamp = DateTime.MinValue;
|
||||
remark = string.Empty;
|
||||
|
||||
OracleCommand cmd = new OracleCommand("select REV_WZTYP, WZTYP, METROLKLASSE, ZULASSZEICHEN, MATERIALNR, QMAX, AENDERUNGSDATUM, BEMERKUNG from VT_WZTYP_SD where ANBID=4 and ID_WZTyp=:1 and AKTIV=:2", conn);
|
||||
cmd.Parameters.Add(new OracleParameter { OracleDbType = OracleDbType.Int32, Value = wmTypeId }); ///:1
|
||||
cmd.Parameters.Add(new OracleParameter { OracleDbType = OracleDbType.Int32, Value = 1 }); ///:2
|
||||
///
|
||||
@@ -155,12 +163,19 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
while (dr.Read())
|
||||
{
|
||||
wmTypeRevision = dr.GetInt32(0);
|
||||
wzTyp = dr.GetString(1);
|
||||
metrolKlasse = dr.GetString(2);
|
||||
zulasszeichen = dr.GetString(3);
|
||||
materialNr = dr.GetString(4);
|
||||
q3 = dr.GetDouble(5);
|
||||
timeStamp = dr.GetDateTime(6);
|
||||
remark = dr.GetString(7);
|
||||
}
|
||||
dr.Close();
|
||||
|
||||
if (wmTypeRevision == -1) return null; /// No 'wmTypeRevision' found
|
||||
|
||||
cmd = new OracleCommand("select PruefungsNr, PosFehlerKalt, QBezeichnung from VT_PRUEFPUNKT_SOLL_SD where ANBID=4 and ID_WZTyp=:1 and Rev_WZTyp=:2", conn);
|
||||
cmd = new OracleCommand("select PRUEFUNGSNR, Q_SOLL, PRUEFZEIT, POSFEHLERKALT, NEGFEHLERKALT, PRUEFBEREICHMIN, PRUEFBEREICHMAX, QBEZEICHNUNG from VT_PRUEFPUNKT_SOLL_SD where ANBID=4 and ID_WZTyp=:1 and Rev_WZTyp=:2", conn);
|
||||
cmd.Parameters.Add(new OracleParameter { OracleDbType = OracleDbType.Int32, Value = wmTypeId }); ///:1
|
||||
cmd.Parameters.Add(new OracleParameter { OracleDbType = OracleDbType.Int32, Value = wmTypeRevision }); ///:2
|
||||
///
|
||||
@@ -168,9 +183,19 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
while (dr.Read())
|
||||
{
|
||||
int pruefungsNr = dr.GetInt32(0);
|
||||
double errLimHi = dr.GetDouble(1);
|
||||
string qBezeichnung = dr.GetString(2);
|
||||
oraDbTinfos.Add(new SensusTestInfo(null, pruefungsNr, qBezeichnung, 0, null, 0, null, Range.Undefined));
|
||||
double flow = Config.Units.ConvertFrom(Unit.lph, dr.GetDouble(1));
|
||||
int testTime = dr.GetInt32(2);
|
||||
double errLimHi = dr.GetDouble(3);
|
||||
double errLimLo = dr.GetDouble(4);
|
||||
int flowRangeMin = dr.GetInt32(5);
|
||||
int flowRangeMax = dr.GetInt32(6);
|
||||
string qBezeichnung = dr.GetString(7);
|
||||
|
||||
Range rng = (flowRangeMin == 90 && flowRangeMax == 100) ? Range.R90_100 :
|
||||
((flowRangeMin == 95 && flowRangeMax == 105) ? Range.R95_105 :
|
||||
((flowRangeMin == 100 && flowRangeMax == 110) ? Range.R100_110 : Range.Undefined));
|
||||
|
||||
oraDbTinfos.Add(new SensusTestInfo(pruefungsNr, qBezeichnung, flow, testTime, errLimLo, errLimHi, rng));
|
||||
}
|
||||
dr.Close();
|
||||
|
||||
@@ -356,7 +381,14 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// Currnet test info. is not walid => Get a new one from Oracle and SensusTestInfo table
|
||||
///
|
||||
int wmTR;
|
||||
IList<SensusTestInfo> rti = GetOracleTestInfo(conn, wm.WaterMeterData.WMTypeId, out wmTR);
|
||||
string wzTypStr;
|
||||
string metroKlasse;
|
||||
string zulasszeichen;
|
||||
string materialNr;
|
||||
double q3 = 0;
|
||||
DateTime timeStamp;
|
||||
string remark;
|
||||
IList<SensusTestInfo> rti = GetOracleTestInfo(conn, wm.WaterMeterData.WMTypeId, out wmTR, out wzTypStr, out metroKlasse, out zulasszeichen, out materialNr, out q3, out timeStamp, out remark);
|
||||
|
||||
if (rti != null)
|
||||
{
|
||||
@@ -721,7 +753,14 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
if ((oracleTestInfo == null) || (wmTypeId != b.WaterMeters[0].WaterMeterData.WMTypeId) || (wmTypeRevision == 0) || (procedureSignature != procedureSignatureSB.ToString()))
|
||||
{
|
||||
int wmTR = 0;
|
||||
IList<SensusTestInfo> ti = GetOracleTestInfo(conn, b.WaterMeters[0].WaterMeterData.WMTypeId, out wmTR);
|
||||
string wzTypStr;
|
||||
string metroKlasse;
|
||||
string zulasszeichen;
|
||||
string materialNr;
|
||||
double q3 = 0;
|
||||
DateTime timeStamp;
|
||||
string remark;
|
||||
IList<SensusTestInfo> ti = GetOracleTestInfo(conn, b.WaterMeters[0].WaterMeterData.WMTypeId, out wmTR, out wzTypStr, out metroKlasse, out zulasszeichen, out materialNr, out q3, out timeStamp, out remark);
|
||||
|
||||
if (ti != null)
|
||||
{
|
||||
|
||||
@@ -296,12 +296,15 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
|
||||
wrtr.Write(leftColumn[i]);
|
||||
|
||||
#if BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT
|
||||
wrtr.Write(new string(' ', maxLen - leftColumn[i].Length + 3));
|
||||
#else
|
||||
if (!writerCfg.EliminateSpaces)
|
||||
{
|
||||
wrtr.Write(new string(' ', maxLen - leftColumn[i].Length + 3));
|
||||
}
|
||||
wrtr.Write(separatorStr);
|
||||
|
||||
#endif
|
||||
wrtr.WriteLine(rightColumn[i]);
|
||||
}
|
||||
|
||||
@@ -386,7 +389,9 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
|
||||
string horizontalLine = new String('-', totalWidth);
|
||||
|
||||
#if !BADGER_MALA_TRAT && !BADGER_STREDNA_TRAT && !BADGER_VELKA_TRAT
|
||||
if (!writerCfg.EliminateSpaces)
|
||||
#endif
|
||||
{
|
||||
wr.WriteLine(horizontalLine); /// Horizontal line above the header
|
||||
}
|
||||
@@ -413,7 +418,9 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
}
|
||||
}
|
||||
|
||||
#if !BADGER_MALA_TRAT && !BADGER_STREDNA_TRAT && !BADGER_VELKA_TRAT
|
||||
if (!writerCfg.EliminateSpaces)
|
||||
#endif
|
||||
{
|
||||
wr.WriteLine(horizontalLine); /// Horizontal line between the header and the body
|
||||
}
|
||||
@@ -459,7 +466,9 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
||||
}
|
||||
}
|
||||
|
||||
#if !BADGER_MALA_TRAT && !BADGER_STREDNA_TRAT && !BADGER_VELKA_TRAT
|
||||
if (!writerCfg.EliminateSpaces)
|
||||
#endif
|
||||
{
|
||||
wr.WriteLine(horizontalLine); /// Horizontal line below the body
|
||||
}
|
||||
|
||||
@@ -49,6 +49,13 @@ namespace TBF.BenchControl.Output
|
||||
public string QBezeichnungLog; /// Flow name in Oracle database
|
||||
public Range Range; /// Range.R90_100 or Range.R100_110 (flow range in % of a target flow)
|
||||
|
||||
public double Flow;
|
||||
public int TestTime;
|
||||
public double ErrLimLoFromDB;
|
||||
public double ErrLimHiFromDB;
|
||||
public double Uncertainty;
|
||||
public string TestMethod;
|
||||
|
||||
public SensusTestInfo(string tstName, int pnDB, string qbDB, int pnOpto, string qbOpto, int pnLog, string qbLog, Range range)
|
||||
{
|
||||
TestName = tstName;
|
||||
@@ -59,6 +66,30 @@ namespace TBF.BenchControl.Output
|
||||
PruefungsNrLog = pnLog;
|
||||
QBezeichnungLog = qbLog;
|
||||
Range = range;
|
||||
Flow = 0;
|
||||
TestTime = 0;
|
||||
ErrLimLoFromDB = 0;
|
||||
ErrLimHiFromDB = 0;
|
||||
Uncertainty = 0;
|
||||
TestMethod = string.Empty;
|
||||
}
|
||||
|
||||
public SensusTestInfo(int pnDB, string qbDB, double flow, int testTime, double errLimLo, double errLimHi, Range range)
|
||||
{
|
||||
TestName = null;
|
||||
PruefungsNrDB = pnDB;
|
||||
QBezeichnungDB = qbDB;
|
||||
PruefungsNrOpto = 0;
|
||||
QBezeichnungOpto = null;
|
||||
PruefungsNrLog = 0;
|
||||
QBezeichnungLog = null;
|
||||
Range = range;
|
||||
Flow = flow;
|
||||
TestTime = testTime;
|
||||
ErrLimLoFromDB = errLimLo;
|
||||
ErrLimHiFromDB = errLimHi;
|
||||
Uncertainty = 0;
|
||||
TestMethod = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -488,7 +488,10 @@ namespace TBF.BenchControl.Sequences
|
||||
Debug.WriteLine(string.Format("Procedure {0}", NHibernateUtil.IsInitialized(StateMachine.Procedure) ? "initialized" : "NOT initialized"));
|
||||
Debug.WriteLine(string.Format("Procedure.MoreParams {0}", NHibernateUtil.IsInitialized(StateMachine.Procedure.MoreParams) ? "initialized" : "NOT initialized"));
|
||||
Debug.WriteLine(string.Format("Procedure.Tests {0}", NHibernateUtil.IsInitialized(StateMachine.Procedure.Tests) ? "initialized" : "NOT initialized"));
|
||||
Debug.WriteLine(string.Format("Procedure.Tests[0].MoreParams {0}", NHibernateUtil.IsInitialized(StateMachine.Procedure.Tests[0].MoreParams) ? "initialized" : "NOT initialized"));
|
||||
if (StateMachine.Procedure.Tests.Count > 0)
|
||||
{
|
||||
Debug.WriteLine(string.Format("Procedure.Tests[0].MoreParams {0}", NHibernateUtil.IsInitialized(StateMachine.Procedure.Tests[0].MoreParams) ? "initialized" : "NOT initialized"));
|
||||
}
|
||||
|
||||
UiBridge.Bridge.OnError(this, string.Empty); /// Clear an error message (if any)
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new TestMethods.CombinedWithDetection.TestMethodFactory());
|
||||
Factories.Add(new TestMethods.Counter.Factory());
|
||||
Factories.Add(new TestMethods.DiverterTest.Factory());
|
||||
Factories.Add(new TestMethods.Dummy.Factory());
|
||||
Factories.Add(new TestMethods.Endurance.Factory());
|
||||
Factories.Add(new TestMethods.FixedStart.Single.Factory());
|
||||
Factories.Add(new TestMethods.FixedStart.Compound.Factory());
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.UiBridge;
|
||||
|
||||
namespace TBF.BenchControl.TestMethods.Dummy
|
||||
{
|
||||
public class DummySeq : Sequences.SequenceBase
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(DummySeq));
|
||||
|
||||
/// <summary>
|
||||
/// Adjustment method sequence
|
||||
/// </summary>
|
||||
/// <param name="test">Test entity</param>
|
||||
/// <returns>
|
||||
/// Event.Done . . . . . . . OK
|
||||
/// Event.UiCmdStop . . . . Stopped by the user using the on-screen button STOP
|
||||
/// Event.OpArgumentError . Target flow is out of range
|
||||
/// Event.Error . . . . . . Unspecified error
|
||||
/// </returns>
|
||||
public IList<Event> Execute(Test test, int repetitionNr, bool isLastRepetition, DebugMode mode)
|
||||
{
|
||||
IList<Event> e = new List<Event>(); /// Events from currently running operations
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, 0));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
TestStartTime = DateTime.Now;
|
||||
|
||||
///
|
||||
/// Show a dialog with OK button and an appropriate message
|
||||
///
|
||||
Bridge.OnAdjustmentInProgress(this, new AdjustmentInProgressEventArgs(testName));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
Bridge.OnActivity(this, test.Method);
|
||||
State.Create(string.Format("{0}({1}) : Dummy", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(StateMachine.BenchWaitingOp)
|
||||
.AddOperation(new Operations.MessageBoxOp(string.Format("Dummy test {0}", test.Name)))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test));
|
||||
|
||||
if (e.Contains(Event.Error)) goto stopTest;
|
||||
if (TestAndLogUiCmdStop(test, e)) goto stopTest;
|
||||
}
|
||||
while (!e.Contains(Event.OK));
|
||||
|
||||
return new List<Event> { Event.Done };
|
||||
|
||||
stopTest:
|
||||
return new List<Event> { Event.UiCmdStop };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.Configs.NameOnly;
|
||||
|
||||
namespace TBF.BenchControl.TestMethods.Dummy
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||
|
||||
public void ResetStaticProperties() { TestMethod.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new TestMethod(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new TestMethod(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig()
|
||||
{
|
||||
return new TestMethodCfg(this.GetType().Namespace.Substring(29), this);
|
||||
}
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
|
||||
namespace TBF.BenchControl.TestMethods.Dummy
|
||||
{
|
||||
public class TestMethod : ComponentBase, GenericDevices.ITestMethod
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
|
||||
public override string ToString() { return string.Format("TestMethods.ChangeFlowDirection({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool CanTest(MetersKind meters) { return true; }
|
||||
public bool DoTransitions() { return true; }
|
||||
|
||||
public TestMethod()
|
||||
{
|
||||
}
|
||||
|
||||
public TestMethod(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
return (new DummySeq()).Execute(test, repetNr, isLastRepetition, DebugLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 900 KiB |
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Sensus")]
|
||||
[assembly: AssemblyProduct("TestBenchFramework")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2019 Sensus Slovensko, a.s.")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2022 Sensus Slovensko, a.s.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.18.1314.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1314.0")]
|
||||
[assembly: AssemblyVersion("2.18.1950.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1950.0")]
|
||||
|
||||
Generated
+18
@@ -1338,6 +1338,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do you want to update 'Use wizard' tests ?.
|
||||
/// </summary>
|
||||
internal static string Do_you_want_to_update_tests_QM {
|
||||
get {
|
||||
return ResourceManager.GetString("Do_you_want_to_update_tests_QM", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Down.
|
||||
/// </summary>
|
||||
@@ -5553,6 +5562,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Update.
|
||||
/// </summary>
|
||||
internal static string Update {
|
||||
get {
|
||||
return ResourceManager.GetString("Update", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use {0}.
|
||||
/// </summary>
|
||||
|
||||
@@ -1488,4 +1488,10 @@
|
||||
<data name="Program_must_be_closed" xml:space="preserve">
|
||||
<value>Program musí být uzavřen.</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_update_tests_QM" xml:space="preserve">
|
||||
<value>Chcete modifikovat 'Use wizard' testy ?</value>
|
||||
</data>
|
||||
<data name="Update" xml:space="preserve">
|
||||
<value>Modifikovat</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -2062,4 +2062,10 @@
|
||||
<data name="No_info_available" xml:space="preserve">
|
||||
<value>No info available</value>
|
||||
</data>
|
||||
<data name="Do_you_want_to_update_tests_QM" xml:space="preserve">
|
||||
<value>Do you want to update 'Use wizard' tests ?</value>
|
||||
</data>
|
||||
<data name="Update" xml:space="preserve">
|
||||
<value>Update</value>
|
||||
</data>
|
||||
</root>
|
||||
+53
-14
@@ -39,7 +39,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;BADGER_STREDNA_TRAT;LANG_CS</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;BADGER_STREDNA_TRAT;LANG_CS</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;BADGER_STREDNA_TRAT;LANG_CS</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;BADGER_STREDNA_TRAT;LANG_CS</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\Badger-stredna-trat\ControlComponent3U.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
@@ -1120,6 +1121,9 @@
|
||||
<Compile Include="BenchControl\TestMethods\DiverterTest\TestMethodCfgCtrl.designer.cs">
|
||||
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\TestMethods\Dummy\DummySeq.cs" />
|
||||
<Compile Include="BenchControl\TestMethods\Dummy\Factory.cs" />
|
||||
<Compile Include="BenchControl\TestMethods\Dummy\TestMethod.cs" />
|
||||
<Compile Include="BenchControl\TestMethods\Endurance\Component.cs" />
|
||||
<Compile Include="BenchControl\TestMethods\Endurance\CycleStep.cs" />
|
||||
<Compile Include="BenchControl\TestMethods\Endurance\EnduranceSeq.cs" />
|
||||
@@ -2164,36 +2168,64 @@
|
||||
<Compile Include="UI\Procedures\TestParamsCtrl.designer.cs">
|
||||
<DependentUpon>TestParamsCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\FlowSelection.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\ConfirmUpdatingTests.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\ConfirmUpdatingTests.Designer.cs">
|
||||
<DependentUpon>ConfirmUpdatingTests.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\FlowSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\FlowSelection.designer.cs">
|
||||
<DependentUpon>FlowSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\HeatMetersSelection.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\HeatMetersSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\HeatMetersSelection.designer.cs">
|
||||
<DependentUpon>HeatMetersSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\MethodSelection.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\MethodSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\MethodSelection.designer.cs">
|
||||
<DependentUpon>MethodSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\PressureSelection.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\OracleWZTypSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\OracleWZTypSelection.designer.cs">
|
||||
<DependentUpon>OracleWZTypSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\PressureSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\PressureSelection.designer.cs">
|
||||
<DependentUpon>PressureSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi1.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi1.designer.cs">
|
||||
<DependentUpon>Roi1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi2.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi2.designer.cs">
|
||||
<DependentUpon>Roi2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi3.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi3.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi3.designer.cs">
|
||||
<DependentUpon>Roi3.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\RoiData.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\VolumeAndErrorSelection.cs" />
|
||||
<Compile Include="UI\Procedures\TestWizard\VolumeAndErrorSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\VolumeAndErrorSelection.designer.cs">
|
||||
<DependentUpon>VolumeAndErrorSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
@@ -3087,6 +3119,9 @@
|
||||
<EmbeddedResource Include="UI\Procedures\TestParamsCtrl.resx">
|
||||
<DependentUpon>TestParamsCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Procedures\TestWizard\ConfirmUpdatingTests.resx">
|
||||
<DependentUpon>ConfirmUpdatingTests.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Procedures\TestWizard\FlowSelection.resx">
|
||||
<DependentUpon>FlowSelection.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -3096,6 +3131,9 @@
|
||||
<EmbeddedResource Include="UI\Procedures\TestWizard\MethodSelection.resx">
|
||||
<DependentUpon>MethodSelection.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Procedures\TestWizard\OracleWZTypSelection.resx">
|
||||
<DependentUpon>OracleWZTypSelection.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Procedures\TestWizard\PressureSelection.resx">
|
||||
<DependentUpon>PressureSelection.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -3280,6 +3318,7 @@
|
||||
<Content Include="Pictures\reversed_dir_right.jpg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Pictures\sample.bmp" />
|
||||
<Content Include="Resources\empty.png" />
|
||||
<Content Include="Resources\switch-off.png" />
|
||||
<Content Include="Resources\switch-on.png" />
|
||||
|
||||
Generated
+1
-1
@@ -54,7 +54,7 @@ namespace TBF.UI
|
||||
this.horizontalSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.mainTabControl = new System.Windows.Forms.TabControl();
|
||||
this.homeTabPage = new System.Windows.Forms.TabPage();
|
||||
this.ctrlBrdComponent = new ControlComponent3Munich.UserControl1();
|
||||
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
|
||||
this.processTabPage = new System.Windows.Forms.TabPage();
|
||||
this.processTabPageCtrl = new TBF.UI.Process.ProcessTabPageCtrl6();
|
||||
this.insertTabPage = new System.Windows.Forms.TabPage();
|
||||
|
||||
@@ -13,6 +13,8 @@ using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
using TBF.UI.Shared;
|
||||
using TBF.BenchControl.Output;
|
||||
using TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead;
|
||||
|
||||
namespace TBF.UI.Procedures
|
||||
{
|
||||
@@ -63,15 +65,23 @@ namespace TBF.UI.Procedures
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
#if KEMPNO_50
|
||||
/// SharedDlgButtons configuration
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.WaterMeterAuthority };
|
||||
#else
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists };
|
||||
#endif
|
||||
|
||||
#if TURA_SPECIAL || TURA_IPERL || TURA_IPERL_NEW
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down;
|
||||
sharedButtons.Unlocked += Unlocked;
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |SharedButtons.Buttons.Custom1;
|
||||
sharedButtons.Custom1Caption = string.Format("Načítaj testy{0}iPerl z Oracle", Environment.NewLine);
|
||||
sharedButtons.Custom1Clicked += iPerlWizardButton_Click;
|
||||
#else
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down;
|
||||
#endif
|
||||
sharedButtons.Unlocked += Unlocked;
|
||||
sharedButtons.OKClicked += okButton_Click;
|
||||
sharedButtons.CancelClicked += cancelButton_Click;
|
||||
sharedButtons.AddClicked += addButton_Click;
|
||||
@@ -108,17 +118,19 @@ namespace TBF.UI.Procedures
|
||||
this.usedNames = usedNames;
|
||||
this.openUnlocked = openUnlocked;
|
||||
|
||||
#if KEMPNO_50
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new Users.Grp.GID[] { Users.Grp.GID.WaterMeterAuthority }
|
||||
: new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.WaterMeterAuthority };
|
||||
#else
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new Users.Grp.GID[] { Users.Grp.GID.Metrologists }
|
||||
: new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists };
|
||||
#endif
|
||||
/// Prepare a list of components and a list of all valves in the test bench
|
||||
using (NHibernate.ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config))
|
||||
{
|
||||
TbfComponents = BenchControl.TbfComponents.LoadComponentsFromDB(session);
|
||||
///
|
||||
/// Prepare a list of components and a list of all valves in the test bench
|
||||
///
|
||||
TbfComponents = BenchControl.TbfComponents.LoadComponentsFromDB(session);
|
||||
Valves = BenchControl.GenericDevices.ValveBase.MasterValves(TbfComponents);
|
||||
RegulValves = new List<IRegulValve>();
|
||||
TestMethods = new List<ITestMethod>();
|
||||
@@ -129,6 +141,7 @@ namespace TBF.UI.Procedures
|
||||
fileWriter2ComboBox.Items.Add("---");
|
||||
fileWriter3ComboBox.Items.Add("---");
|
||||
fileWriter4ComboBox.Items.Add("---");
|
||||
|
||||
foreach (var cmpnt in TbfComponents)
|
||||
{
|
||||
if (cmpnt is IRegulValve) RegulValves.Add(cmpnt as IRegulValve);
|
||||
@@ -147,12 +160,11 @@ namespace TBF.UI.Procedures
|
||||
fileWriter4ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Loads paths, this must be done before PrepareMetrology12AndProcessTabs() call
|
||||
using (NHibernate.ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config))
|
||||
{
|
||||
feedingPaths = session.QueryOver<FeedingPath>().List();
|
||||
///
|
||||
/// Loads paths, this must be done before PrepareMetrology12AndProcessTabs() call
|
||||
///
|
||||
feedingPaths = session.QueryOver<FeedingPath>().List();
|
||||
benchPaths = session.QueryOver<BenchPath>().List();
|
||||
outputPaths = session.QueryOver<OutputPath>().List();
|
||||
metersPaths = session.QueryOver<MetersPath>().List();
|
||||
@@ -316,11 +328,11 @@ namespace TBF.UI.Procedures
|
||||
LoadUISettings();
|
||||
|
||||
/// Enable/disable/show/hide controls in General tab
|
||||
#if IPERL
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
altProcNameLabel.Visible = true;
|
||||
altProcNameTextBox.Visible = true;
|
||||
altProcPeriodLabel.Visible = true;
|
||||
altProcPeriodTextBox.Visible = true;
|
||||
//altProcPeriodLabel.Visible = true;
|
||||
//altProcPeriodTextBox.Visible = true;
|
||||
#endif
|
||||
procNameTextBox.Enabled = false;
|
||||
descriptionTextBox.Enabled = false;
|
||||
@@ -404,6 +416,7 @@ namespace TBF.UI.Procedures
|
||||
label15.Text = Strings.Date;
|
||||
label18.Text = Strings.Notes;
|
||||
watermetersLabel.Text = Strings.Meter_types_tested;
|
||||
altProcNameLabel.Text = Strings.Conditions;
|
||||
protectedCheckBox.Text = Strings.Protected_procedure;
|
||||
mustBeCompleteCheckBox.Text = Strings.All_tests_must_be_completed;
|
||||
manualControlDisabledCheckBox.Text = Strings.Manual_control_disabled;
|
||||
@@ -1951,15 +1964,13 @@ namespace TBF.UI.Procedures
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ListViewEx listViewEx;
|
||||
|
||||
switch (selectedTab)
|
||||
{
|
||||
case ProcedureTabs.Metrology1: listViewEx = metrology1ListViewEx; break;
|
||||
case ProcedureTabs.Metrology2: listViewEx = metrology2ListViewEx; break;
|
||||
case ProcedureTabs.Process: listViewEx = processListViewEx; break;
|
||||
case ProcedureTabs.Parameters: listViewEx = parametersListViewEx; break;
|
||||
|
||||
default: return;
|
||||
default: return;
|
||||
}
|
||||
|
||||
/// Find an unused test name
|
||||
@@ -2115,10 +2126,13 @@ namespace TBF.UI.Procedures
|
||||
AddToParametersTab(test);
|
||||
foreach (var ctrl in testParamsCtrls) ctrl.AddOne(test);
|
||||
|
||||
listViewEx.Focus();
|
||||
listViewEx.SelectedItems.Clear();
|
||||
listViewEx.Items[listViewEx.Items.Count - 1].Selected = true;
|
||||
listViewEx.Items[listViewEx.Items.Count - 1].EnsureVisible();
|
||||
if (listViewEx != null)
|
||||
{
|
||||
listViewEx.Focus();
|
||||
listViewEx.SelectedItems.Clear();
|
||||
listViewEx.Items[listViewEx.Items.Count - 1].Selected = true;
|
||||
listViewEx.Items[listViewEx.Items.Count - 1].EnsureVisible();
|
||||
}
|
||||
}
|
||||
|
||||
private void removeButton_Click(object sender, EventArgs e)
|
||||
@@ -2380,5 +2394,196 @@ namespace TBF.UI.Procedures
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Queries an Oracle database and loads ... array/list
|
||||
/// </summary>
|
||||
private void iPerlWizardButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ListViewEx listViewEx = null;
|
||||
switch (selectedTab)
|
||||
{
|
||||
case ProcedureTabs.General:
|
||||
UpdateFromGeneralTab();
|
||||
break;
|
||||
|
||||
case ProcedureTabs.History:
|
||||
UpdateFromHistoryTab();
|
||||
break;
|
||||
|
||||
case ProcedureTabs.Metrology1:
|
||||
listViewEx = metrology1ListViewEx;
|
||||
UpdateFromMetrology1Tab();
|
||||
break;
|
||||
|
||||
case ProcedureTabs.Metrology2:
|
||||
listViewEx = metrology2ListViewEx;
|
||||
UpdateFromMetrology2Tab();
|
||||
break;
|
||||
|
||||
case ProcedureTabs.Process:
|
||||
listViewEx = processListViewEx;
|
||||
UpdateFromProcessTab();
|
||||
break;
|
||||
|
||||
case ProcedureTabs.Parameters:
|
||||
listViewEx = parametersListViewEx;
|
||||
UpdateFromParametersTab();
|
||||
break;
|
||||
|
||||
default:
|
||||
foreach (var ctrl in testParamsCtrls) if (!ctrl.UpdateAll()) MessageBox.Show(string.Format(Strings.Error_saving_parameters_of_0, ctrl.Name));
|
||||
foreach (var ctrl in procedureParamsCtrls) if (!ctrl.UpdateAll()) MessageBox.Show(string.Format(Strings.Error_saving_parameters_of_0, ctrl.Name));
|
||||
break;
|
||||
}
|
||||
|
||||
using (NHibernate.ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config))
|
||||
{
|
||||
IList<Test> testsToBeUpdated = new List<Test>();
|
||||
|
||||
foreach (var test in LoadedProcedure.Tests)
|
||||
{
|
||||
foreach (var tetsMethod in TestMethods)
|
||||
{
|
||||
if (tetsMethod.Name == test.Method && tetsMethod.ClassName == "TestMethods.Dummy")
|
||||
{
|
||||
testsToBeUpdated.Add(test);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (testsToBeUpdated.Count == 0)
|
||||
{
|
||||
MessageBox.Show("There are no tests to be updated");
|
||||
return;
|
||||
}
|
||||
|
||||
/// Run a wizard
|
||||
TestWizard.OracleWZTypSelection oracleDlg = new TestWizard.OracleWZTypSelection(LoadedProcedure, TestMethods);
|
||||
TestWizard.ConfirmUpdatingTests confirmationDlg = new TestWizard.ConfirmUpdatingTests(LoadedProcedure, TestMethods);
|
||||
Form[] forms = new Form[] { oracleDlg, confirmationDlg };
|
||||
|
||||
int step = 0; /// 1st step
|
||||
while ((step >= 0) && (step < forms.Length))
|
||||
{
|
||||
switch (forms[step].ShowDialog())
|
||||
{
|
||||
case DialogResult.OK:
|
||||
/// Next
|
||||
step++;
|
||||
break;
|
||||
|
||||
case DialogResult.Retry:
|
||||
/// Back
|
||||
step--;
|
||||
break;
|
||||
|
||||
case DialogResult.Cancel:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (step == forms.Length)
|
||||
{
|
||||
///
|
||||
/// Update tests
|
||||
///
|
||||
foreach (var ti in oracleDlg.SelectedTestInfos)
|
||||
{
|
||||
foreach (var test in testsToBeUpdated)
|
||||
{
|
||||
if (ti.TestName == test.Name)
|
||||
{
|
||||
///
|
||||
/// Update this test with information obtained from Oracle
|
||||
///
|
||||
double qfrom, qto;
|
||||
switch (ti.Range)
|
||||
{
|
||||
case Range.R90_100:
|
||||
qfrom = 0.9 * ti.Flow;
|
||||
qto = ti.Flow;
|
||||
break;
|
||||
|
||||
case Range.R95_105:
|
||||
qfrom = 0.95 * ti.Flow;
|
||||
qto = 1.05 * ti.Flow;
|
||||
break;
|
||||
|
||||
case Range.R100_110:
|
||||
qfrom = ti.Flow;
|
||||
qto = 1.1 * ti.Flow;
|
||||
break;
|
||||
|
||||
default:
|
||||
qfrom = qto = ti.Flow;
|
||||
break;
|
||||
}
|
||||
|
||||
double volume = ti.TestTime * (qfrom + qto) / 7.2;
|
||||
|
||||
test.Qfrom = (float)qfrom;
|
||||
test.Qto = (float)qto;
|
||||
test.TstTime = (float)ti.TestTime;
|
||||
test.Volume = (float)volume;
|
||||
test.ErrLimLo = (float)(ti.ErrLimLoFromDB - ti.Uncertainty);
|
||||
test.ErrLimHi = (float)(ti.ErrLimHiFromDB + ti.Uncertainty);
|
||||
test.Uncertainty = (float)ti.Uncertainty;
|
||||
test.Method = ti.TestMethod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Update iPerls and water meters
|
||||
///
|
||||
foreach (var ppCtrl in procedureParamsCtrls)
|
||||
{
|
||||
foreach (var pp in ppCtrl.CmpntsParams)
|
||||
{
|
||||
var ihpp = pp as TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead.ProcParams;
|
||||
if (ihpp != null)
|
||||
{
|
||||
ihpp.WMType_ID = oracleDlg.WMTypeId;
|
||||
ihpp.MeterType = oracleDlg.MeterType;
|
||||
}
|
||||
|
||||
var wmpp = pp as TBF.BenchControl.WaterMeters.WaterMeter.ProcParams;
|
||||
if (wmpp != null)
|
||||
{
|
||||
wmpp.MetrologicalClass = oracleDlg.MetrolKlasse;
|
||||
wmpp.ApprovalInfo = oracleDlg.Zulasszeichen;
|
||||
wmpp.Qn = (float)oracleDlg.Q3;
|
||||
|
||||
switch (oracleDlg.MeterType)
|
||||
{
|
||||
case MeterType.DN15: wmpp.DN = 15.0F; break;
|
||||
case MeterType.DN20: wmpp.DN = 20.0F; break;
|
||||
case MeterType.DN25: wmpp.DN = 25.0F; break;
|
||||
case MeterType.DN26: wmpp.DN = 25.0F; break;
|
||||
case MeterType.DN32: wmpp.DN = 32.0F; break;
|
||||
case MeterType.DN40: wmpp.DN = 40.0F; break;
|
||||
default:
|
||||
case MeterType.AutoDetect: wmpp.DN = 0; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RefreshMetrology12AndProcessTabs();
|
||||
RefreshOtherTabs();
|
||||
|
||||
if (listViewEx != null)
|
||||
{
|
||||
listViewEx.Focus();
|
||||
listViewEx.SelectedItems.Clear();
|
||||
listViewEx.Items[listViewEx.Items.Count - 1].Selected = true;
|
||||
listViewEx.Items[listViewEx.Items.Count - 1].EnsureVisible();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace TBF.UI.Procedures
|
||||
bool showSensorsColumn;
|
||||
int nrFixedColumns;
|
||||
IList<IComponent> selectedCmpnts;
|
||||
IList<IParamsProvider> cmpntsParams;
|
||||
|
||||
public IList<IParamsProvider> CmpntsParams;
|
||||
|
||||
int paramsCount;
|
||||
Control[] editors;
|
||||
@@ -35,7 +36,7 @@ namespace TBF.UI.Procedures
|
||||
public ProcedureParamsCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
cmpntsParams = new List<IParamsProvider>();
|
||||
CmpntsParams = new List<IParamsProvider>();
|
||||
}
|
||||
|
||||
public ProcedureParamsCtrl(ProcedureDlg parent, IList<IComponent> selectedCmpnts, bool showSensorsColumn)
|
||||
@@ -81,7 +82,7 @@ namespace TBF.UI.Procedures
|
||||
}
|
||||
}
|
||||
|
||||
cmpntsParams.Add(procedureParams);
|
||||
CmpntsParams.Add(procedureParams);
|
||||
}
|
||||
|
||||
if (sampleToCreateHeader != null)
|
||||
@@ -176,7 +177,7 @@ namespace TBF.UI.Procedures
|
||||
public void RedrawAll()
|
||||
{
|
||||
listViewEx.Items.Clear();
|
||||
foreach (var item in cmpntsParams) DrawOne(item);
|
||||
foreach (var item in CmpntsParams) DrawOne(item);
|
||||
}
|
||||
|
||||
void DrawOne(IParamsProvider item)
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
namespace TBF.UI.Procedures.TestWizard
|
||||
{
|
||||
partial class ConfirmUpdatingTests
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.nextButton = new System.Windows.Forms.Button();
|
||||
this.backButton = new System.Windows.Forms.Button();
|
||||
this.messageLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(185, 77);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.cancelButton.TabIndex = 30;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// nextButton
|
||||
//
|
||||
this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.nextButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.nextButton.Location = new System.Drawing.Point(104, 77);
|
||||
this.nextButton.Name = "nextButton";
|
||||
this.nextButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.nextButton.TabIndex = 29;
|
||||
this.nextButton.Text = "&Next >";
|
||||
this.nextButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// backButton
|
||||
//
|
||||
this.backButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.backButton.DialogResult = System.Windows.Forms.DialogResult.Retry;
|
||||
this.backButton.Location = new System.Drawing.Point(23, 77);
|
||||
this.backButton.Name = "backButton";
|
||||
this.backButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.backButton.TabIndex = 28;
|
||||
this.backButton.Text = "< &Back";
|
||||
this.backButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// messageLabel
|
||||
//
|
||||
this.messageLabel.AutoSize = true;
|
||||
this.messageLabel.Location = new System.Drawing.Point(20, 33);
|
||||
this.messageLabel.Name = "messageLabel";
|
||||
this.messageLabel.Size = new System.Drawing.Size(208, 13);
|
||||
this.messageLabel.TabIndex = 31;
|
||||
this.messageLabel.Text = "Do you want to update \'Use wizard\' tests ?";
|
||||
//
|
||||
// ConfirmUpdatingTests
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 136);
|
||||
this.Controls.Add(this.messageLabel);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.nextButton);
|
||||
this.Controls.Add(this.backButton);
|
||||
this.Name = "ConfirmUpdatingTests";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Confirmation";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button nextButton;
|
||||
private System.Windows.Forms.Button backButton;
|
||||
private System.Windows.Forms.Label messageLabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.UI.Procedures.TestWizard
|
||||
{
|
||||
public partial class ConfirmUpdatingTests : Form
|
||||
{
|
||||
Procedure loadedProcedure;
|
||||
IList<ITestMethod> testMethods;
|
||||
|
||||
public ConfirmUpdatingTests(Procedure loadedProcedure, IList<ITestMethod> testMethods)
|
||||
{
|
||||
this.loadedProcedure = loadedProcedure;
|
||||
this.testMethods = testMethods;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
Text = Strings.Confirmation;
|
||||
messageLabel.Text = Strings.Do_you_want_to_update_tests_QM;
|
||||
backButton.Text = Strings.BackBtnText;
|
||||
nextButton.Text = Strings.Update;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,433 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.UI.Procedures.TestWizard
|
||||
{
|
||||
partial class OracleWZTypSelection
|
||||
{
|
||||
/// <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.horizSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.horizSplitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.meterTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.dnLabel = new System.Windows.Forms.Label();
|
||||
this.q3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.q3Label = new System.Windows.Forms.Label();
|
||||
this.approvalTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvalLabel = new System.Windows.Forms.Label();
|
||||
this.metroClassTextBox = new System.Windows.Forms.TextBox();
|
||||
this.metroClassLabel = new System.Windows.Forms.Label();
|
||||
this.testInfoNameLabel = new System.Windows.Forms.Label();
|
||||
this.timeStampTextBox = new System.Windows.Forms.TextBox();
|
||||
this.timeStampLabel = new System.Windows.Forms.Label();
|
||||
this.remarkTextBox = new System.Windows.Forms.TextBox();
|
||||
this.remarkLabel = new System.Windows.Forms.Label();
|
||||
this.wzTypTextBox = new System.Windows.Forms.TextBox();
|
||||
this.wzTypLabel = new System.Windows.Forms.Label();
|
||||
this.revWZTypLabel = new System.Windows.Forms.Label();
|
||||
this.revWZTypTextBox = new System.Windows.Forms.TextBox();
|
||||
this.searchButton = new System.Windows.Forms.Button();
|
||||
this.materialCodeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.idWZTypTextBox = new System.Windows.Forms.TextBox();
|
||||
this.materialCodeRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.idWZTypRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.listViewEx = new TracingDB.Forms.ListViewEx();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.nextButton = new System.Windows.Forms.Button();
|
||||
this.backButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).BeginInit();
|
||||
this.horizSplitContainer.Panel1.SuspendLayout();
|
||||
this.horizSplitContainer.Panel2.SuspendLayout();
|
||||
this.horizSplitContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer2)).BeginInit();
|
||||
this.horizSplitContainer2.Panel1.SuspendLayout();
|
||||
this.horizSplitContainer2.Panel2.SuspendLayout();
|
||||
this.horizSplitContainer2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// horizSplitContainer
|
||||
//
|
||||
this.horizSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.horizSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.horizSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.horizSplitContainer.Name = "horizSplitContainer";
|
||||
this.horizSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// horizSplitContainer.Panel1
|
||||
//
|
||||
this.horizSplitContainer.Panel1.Controls.Add(this.horizSplitContainer2);
|
||||
//
|
||||
// horizSplitContainer.Panel2
|
||||
//
|
||||
this.horizSplitContainer.Panel2.Controls.Add(this.cancelButton);
|
||||
this.horizSplitContainer.Panel2.Controls.Add(this.nextButton);
|
||||
this.horizSplitContainer.Panel2.Controls.Add(this.backButton);
|
||||
this.horizSplitContainer.Size = new System.Drawing.Size(820, 363);
|
||||
this.horizSplitContainer.SplitterDistance = 283;
|
||||
this.horizSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// horizSplitContainer2
|
||||
//
|
||||
this.horizSplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.horizSplitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.horizSplitContainer2.IsSplitterFixed = true;
|
||||
this.horizSplitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.horizSplitContainer2.Name = "horizSplitContainer2";
|
||||
this.horizSplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// horizSplitContainer2.Panel1
|
||||
//
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.meterTypeComboBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.dnLabel);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.q3TextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.q3Label);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.approvalTextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.approvalLabel);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.metroClassTextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.metroClassLabel);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.testInfoNameLabel);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.timeStampTextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.timeStampLabel);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.remarkTextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.remarkLabel);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.wzTypTextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.wzTypLabel);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.revWZTypLabel);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.revWZTypTextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.searchButton);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.materialCodeTextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.idWZTypTextBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.materialCodeRadioButton);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.idWZTypRadioButton);
|
||||
//
|
||||
// horizSplitContainer2.Panel2
|
||||
//
|
||||
this.horizSplitContainer2.Panel2.Controls.Add(this.listViewEx);
|
||||
this.horizSplitContainer2.Size = new System.Drawing.Size(820, 283);
|
||||
this.horizSplitContainer2.SplitterDistance = 115;
|
||||
this.horizSplitContainer2.TabIndex = 0;
|
||||
//
|
||||
// meterTypeComboBox
|
||||
//
|
||||
this.meterTypeComboBox.FormattingEnabled = true;
|
||||
this.meterTypeComboBox.Location = new System.Drawing.Point(73, 85);
|
||||
this.meterTypeComboBox.Name = "meterTypeComboBox";
|
||||
this.meterTypeComboBox.Size = new System.Drawing.Size(65, 21);
|
||||
this.meterTypeComboBox.TabIndex = 17;
|
||||
//
|
||||
// dnLabel
|
||||
//
|
||||
this.dnLabel.AutoSize = true;
|
||||
this.dnLabel.Location = new System.Drawing.Point(31, 88);
|
||||
this.dnLabel.Name = "dnLabel";
|
||||
this.dnLabel.Size = new System.Drawing.Size(23, 13);
|
||||
this.dnLabel.TabIndex = 16;
|
||||
this.dnLabel.Text = "DN";
|
||||
//
|
||||
// q3TextBox
|
||||
//
|
||||
this.q3TextBox.Location = new System.Drawing.Point(103, 61);
|
||||
this.q3TextBox.Name = "q3TextBox";
|
||||
this.q3TextBox.Size = new System.Drawing.Size(35, 20);
|
||||
this.q3TextBox.TabIndex = 11;
|
||||
this.q3TextBox.TextChanged += new System.EventHandler(this.q3TextBox_TextChanged);
|
||||
//
|
||||
// q3Label
|
||||
//
|
||||
this.q3Label.AutoSize = true;
|
||||
this.q3Label.Location = new System.Drawing.Point(31, 64);
|
||||
this.q3Label.Name = "q3Label";
|
||||
this.q3Label.Size = new System.Drawing.Size(46, 13);
|
||||
this.q3Label.TabIndex = 10;
|
||||
this.q3Label.Text = "Q3 / Qn";
|
||||
//
|
||||
// approvalTextBox
|
||||
//
|
||||
this.approvalTextBox.Location = new System.Drawing.Point(220, 61);
|
||||
this.approvalTextBox.Name = "approvalTextBox";
|
||||
this.approvalTextBox.Size = new System.Drawing.Size(275, 20);
|
||||
this.approvalTextBox.TabIndex = 13;
|
||||
this.approvalTextBox.TextChanged += new System.EventHandler(this.approvalTextBox_TextChanged);
|
||||
//
|
||||
// approvalLabel
|
||||
//
|
||||
this.approvalLabel.AutoSize = true;
|
||||
this.approvalLabel.Location = new System.Drawing.Point(150, 64);
|
||||
this.approvalLabel.Name = "approvalLabel";
|
||||
this.approvalLabel.Size = new System.Drawing.Size(49, 13);
|
||||
this.approvalLabel.TabIndex = 12;
|
||||
this.approvalLabel.Text = "Approval";
|
||||
//
|
||||
// metroClassTextBox
|
||||
//
|
||||
this.metroClassTextBox.Location = new System.Drawing.Point(596, 37);
|
||||
this.metroClassTextBox.Name = "metroClassTextBox";
|
||||
this.metroClassTextBox.Size = new System.Drawing.Size(104, 20);
|
||||
this.metroClassTextBox.TabIndex = 9;
|
||||
this.metroClassTextBox.TextChanged += new System.EventHandler(this.metroClassTextBox_TextChanged);
|
||||
//
|
||||
// metroClassLabel
|
||||
//
|
||||
this.metroClassLabel.AutoSize = true;
|
||||
this.metroClassLabel.Location = new System.Drawing.Point(517, 40);
|
||||
this.metroClassLabel.Name = "metroClassLabel";
|
||||
this.metroClassLabel.Size = new System.Drawing.Size(78, 13);
|
||||
this.metroClassLabel.TabIndex = 8;
|
||||
this.metroClassLabel.Text = "Metrolog. class";
|
||||
//
|
||||
// testInfoNameLabel
|
||||
//
|
||||
this.testInfoNameLabel.AutoSize = true;
|
||||
this.testInfoNameLabel.Location = new System.Drawing.Point(595, 88);
|
||||
this.testInfoNameLabel.Name = "testInfoNameLabel";
|
||||
this.testInfoNameLabel.Size = new System.Drawing.Size(0, 13);
|
||||
this.testInfoNameLabel.TabIndex = 20;
|
||||
//
|
||||
// timeStampTextBox
|
||||
//
|
||||
this.timeStampTextBox.Enabled = false;
|
||||
this.timeStampTextBox.Location = new System.Drawing.Point(596, 61);
|
||||
this.timeStampTextBox.Name = "timeStampTextBox";
|
||||
this.timeStampTextBox.Size = new System.Drawing.Size(104, 20);
|
||||
this.timeStampTextBox.TabIndex = 15;
|
||||
//
|
||||
// timeStampLabel
|
||||
//
|
||||
this.timeStampLabel.AutoSize = true;
|
||||
this.timeStampLabel.Location = new System.Drawing.Point(517, 64);
|
||||
this.timeStampLabel.Name = "timeStampLabel";
|
||||
this.timeStampLabel.Size = new System.Drawing.Size(73, 13);
|
||||
this.timeStampLabel.TabIndex = 14;
|
||||
this.timeStampLabel.Text = "Date and time";
|
||||
//
|
||||
// remarkTextBox
|
||||
//
|
||||
this.remarkTextBox.Enabled = false;
|
||||
this.remarkTextBox.Location = new System.Drawing.Point(220, 85);
|
||||
this.remarkTextBox.Name = "remarkTextBox";
|
||||
this.remarkTextBox.Size = new System.Drawing.Size(346, 20);
|
||||
this.remarkTextBox.TabIndex = 19;
|
||||
//
|
||||
// remarkLabel
|
||||
//
|
||||
this.remarkLabel.AutoSize = true;
|
||||
this.remarkLabel.Location = new System.Drawing.Point(150, 88);
|
||||
this.remarkLabel.Name = "remarkLabel";
|
||||
this.remarkLabel.Size = new System.Drawing.Size(44, 13);
|
||||
this.remarkLabel.TabIndex = 18;
|
||||
this.remarkLabel.Text = "Remark";
|
||||
//
|
||||
// wzTypTextBox
|
||||
//
|
||||
this.wzTypTextBox.Enabled = false;
|
||||
this.wzTypTextBox.Location = new System.Drawing.Point(220, 37);
|
||||
this.wzTypTextBox.Name = "wzTypTextBox";
|
||||
this.wzTypTextBox.Size = new System.Drawing.Size(275, 20);
|
||||
this.wzTypTextBox.TabIndex = 7;
|
||||
//
|
||||
// wzTypLabel
|
||||
//
|
||||
this.wzTypLabel.AutoSize = true;
|
||||
this.wzTypLabel.Location = new System.Drawing.Point(150, 40);
|
||||
this.wzTypLabel.Name = "wzTypLabel";
|
||||
this.wzTypLabel.Size = new System.Drawing.Size(65, 13);
|
||||
this.wzTypLabel.TabIndex = 6;
|
||||
this.wzTypLabel.Text = "Water meter";
|
||||
//
|
||||
// revWZTypLabel
|
||||
//
|
||||
this.revWZTypLabel.AutoSize = true;
|
||||
this.revWZTypLabel.Location = new System.Drawing.Point(31, 40);
|
||||
this.revWZTypLabel.Name = "revWZTypLabel";
|
||||
this.revWZTypLabel.Size = new System.Drawing.Size(66, 13);
|
||||
this.revWZTypLabel.TabIndex = 4;
|
||||
this.revWZTypLabel.Text = "Rev WZTyp";
|
||||
//
|
||||
// revWZTypTextBox
|
||||
//
|
||||
this.revWZTypTextBox.Enabled = false;
|
||||
this.revWZTypTextBox.Location = new System.Drawing.Point(103, 37);
|
||||
this.revWZTypTextBox.Name = "revWZTypTextBox";
|
||||
this.revWZTypTextBox.Size = new System.Drawing.Size(35, 20);
|
||||
this.revWZTypTextBox.TabIndex = 5;
|
||||
//
|
||||
// searchButton
|
||||
//
|
||||
this.searchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.searchButton.Location = new System.Drawing.Point(722, 17);
|
||||
this.searchButton.Name = "searchButton";
|
||||
this.searchButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.searchButton.TabIndex = 21;
|
||||
this.searchButton.Text = "Search";
|
||||
this.searchButton.UseVisualStyleBackColor = true;
|
||||
this.searchButton.Click += new System.EventHandler(this.searchButton_Click);
|
||||
//
|
||||
// materialCodeTextBox
|
||||
//
|
||||
this.materialCodeTextBox.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.materialCodeTextBox.Location = new System.Drawing.Point(220, 13);
|
||||
this.materialCodeTextBox.Name = "materialCodeTextBox";
|
||||
this.materialCodeTextBox.Size = new System.Drawing.Size(480, 20);
|
||||
this.materialCodeTextBox.TabIndex = 3;
|
||||
this.materialCodeTextBox.TextChanged += new System.EventHandler(this.productCodeTextBox_TextChanged);
|
||||
//
|
||||
// idWZTypTextBox
|
||||
//
|
||||
this.idWZTypTextBox.Location = new System.Drawing.Point(103, 13);
|
||||
this.idWZTypTextBox.Name = "idWZTypTextBox";
|
||||
this.idWZTypTextBox.Size = new System.Drawing.Size(35, 20);
|
||||
this.idWZTypTextBox.TabIndex = 1;
|
||||
this.idWZTypTextBox.TextChanged += new System.EventHandler(this.wzTypTextBox_TextChanged);
|
||||
//
|
||||
// materialCodeRadioButton
|
||||
//
|
||||
this.materialCodeRadioButton.AutoSize = true;
|
||||
this.materialCodeRadioButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.materialCodeRadioButton.Location = new System.Drawing.Point(153, 14);
|
||||
this.materialCodeRadioButton.Name = "materialCodeRadioButton";
|
||||
this.materialCodeRadioButton.Size = new System.Drawing.Size(62, 17);
|
||||
this.materialCodeRadioButton.TabIndex = 2;
|
||||
this.materialCodeRadioButton.TabStop = true;
|
||||
this.materialCodeRadioButton.Text = "Material";
|
||||
this.materialCodeRadioButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// idWZTypRadioButton
|
||||
//
|
||||
this.idWZTypRadioButton.AutoSize = true;
|
||||
this.idWZTypRadioButton.Location = new System.Drawing.Point(15, 14);
|
||||
this.idWZTypRadioButton.Name = "idWZTypRadioButton";
|
||||
this.idWZTypRadioButton.Size = new System.Drawing.Size(75, 17);
|
||||
this.idWZTypRadioButton.TabIndex = 0;
|
||||
this.idWZTypRadioButton.TabStop = true;
|
||||
this.idWZTypRadioButton.Text = "ID WZTyp";
|
||||
this.idWZTypRadioButton.UseVisualStyleBackColor = true;
|
||||
this.idWZTypRadioButton.CheckedChanged += new System.EventHandler(this.idWZTypRadioButton_CheckedChanged);
|
||||
//
|
||||
// listViewEx
|
||||
//
|
||||
this.listViewEx.AllowColumnReorder = true;
|
||||
this.listViewEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewEx.DoubleClickActivation = false;
|
||||
this.listViewEx.FullRowSelect = true;
|
||||
this.listViewEx.GridLines = true;
|
||||
this.listViewEx.Location = new System.Drawing.Point(0, 0);
|
||||
this.listViewEx.Name = "listViewEx";
|
||||
this.listViewEx.Size = new System.Drawing.Size(820, 164);
|
||||
this.listViewEx.TabIndex = 0;
|
||||
this.listViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SubItemClicked += new TracingDB.Forms.SubItemEventHandler(this.listViewEx_SubItemClicked);
|
||||
this.listViewEx.SubItemEndEditing += new TracingDB.Forms.SubItemEndEditingEventHandler(this.listViewEx_SubItemEndEditing);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(722, 17);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.cancelButton.TabIndex = 27;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// nextButton
|
||||
//
|
||||
this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.nextButton.Location = new System.Drawing.Point(641, 17);
|
||||
this.nextButton.Name = "nextButton";
|
||||
this.nextButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.nextButton.TabIndex = 26;
|
||||
this.nextButton.Text = "&Next >";
|
||||
this.nextButton.UseVisualStyleBackColor = true;
|
||||
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
|
||||
//
|
||||
// backButton
|
||||
//
|
||||
this.backButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.backButton.Location = new System.Drawing.Point(560, 17);
|
||||
this.backButton.Name = "backButton";
|
||||
this.backButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.backButton.TabIndex = 25;
|
||||
this.backButton.Text = "< &Back";
|
||||
this.backButton.UseVisualStyleBackColor = true;
|
||||
this.backButton.Click += new System.EventHandler(this.backButton_Click);
|
||||
//
|
||||
// OracleWZTypSelection
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(820, 363);
|
||||
this.Controls.Add(this.horizSplitContainer);
|
||||
this.Name = "OracleWZTypSelection";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Výber typu vodomera (WZTyp alebo 25-miestny kód)";
|
||||
this.Load += new System.EventHandler(this.OracleWZTypSelection_Load);
|
||||
this.horizSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.horizSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).EndInit();
|
||||
this.horizSplitContainer.ResumeLayout(false);
|
||||
this.horizSplitContainer2.Panel1.ResumeLayout(false);
|
||||
this.horizSplitContainer2.Panel1.PerformLayout();
|
||||
this.horizSplitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer2)).EndInit();
|
||||
this.horizSplitContainer2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer horizSplitContainer;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button nextButton;
|
||||
private System.Windows.Forms.Button backButton;
|
||||
private System.Windows.Forms.SplitContainer horizSplitContainer2;
|
||||
private System.Windows.Forms.TextBox materialCodeTextBox;
|
||||
private System.Windows.Forms.TextBox idWZTypTextBox;
|
||||
private System.Windows.Forms.RadioButton materialCodeRadioButton;
|
||||
private System.Windows.Forms.RadioButton idWZTypRadioButton;
|
||||
private System.Windows.Forms.Button searchButton;
|
||||
private TracingDB.Forms.ListViewEx listViewEx;
|
||||
private System.Windows.Forms.Label remarkLabel;
|
||||
private System.Windows.Forms.TextBox wzTypTextBox;
|
||||
private System.Windows.Forms.Label wzTypLabel;
|
||||
private System.Windows.Forms.Label revWZTypLabel;
|
||||
private System.Windows.Forms.TextBox revWZTypTextBox;
|
||||
private System.Windows.Forms.TextBox remarkTextBox;
|
||||
private System.Windows.Forms.TextBox timeStampTextBox;
|
||||
private System.Windows.Forms.Label timeStampLabel;
|
||||
private System.Windows.Forms.Label testInfoNameLabel;
|
||||
private System.Windows.Forms.TextBox metroClassTextBox;
|
||||
private System.Windows.Forms.Label metroClassLabel;
|
||||
private System.Windows.Forms.TextBox q3TextBox;
|
||||
private System.Windows.Forms.Label q3Label;
|
||||
private System.Windows.Forms.TextBox approvalTextBox;
|
||||
private System.Windows.Forms.Label approvalLabel;
|
||||
private System.Windows.Forms.ComboBox meterTypeComboBox;
|
||||
private System.Windows.Forms.Label dnLabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,362 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Oracle.DataAccess.Client;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.BenchControl.Output;
|
||||
using TBF.BenchControl.Output.DB.SensusOracle;
|
||||
using TBF.Resources;
|
||||
using TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead;
|
||||
|
||||
namespace TBF.UI.Procedures.TestWizard
|
||||
{
|
||||
public partial class OracleWZTypSelection : Form
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(OracleWZTypSelection));
|
||||
|
||||
public IList<SensusTestInfo> SelectedTestInfos;
|
||||
public int WMTypeId;
|
||||
public string MetrolKlasse;
|
||||
public string Zulasszeichen;
|
||||
public double Q3;
|
||||
public MeterType MeterType;
|
||||
|
||||
|
||||
Procedure loadedProcedure;
|
||||
IList<ITestMethod> testMethods;
|
||||
|
||||
TextBox uncertaintyTB;
|
||||
ComboBox testMethodCB;
|
||||
|
||||
public OracleWZTypSelection(Procedure loadedProcedure, IList<ITestMethod> testMethods)
|
||||
{
|
||||
this.loadedProcedure = loadedProcedure;
|
||||
this.testMethods = testMethods;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
Text = Strings.Method_selection;
|
||||
backButton.Text = Strings.BackBtnText;
|
||||
nextButton.Text = Strings.NextBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
|
||||
for (MeterType mt = 0; mt < MeterType.Count; mt++)
|
||||
{
|
||||
meterTypeComboBox.Items.Add(mt.ToString());
|
||||
}
|
||||
meterTypeComboBox.Text = MeterType.AutoDetect.ToString();
|
||||
|
||||
listViewEx.Columns.Add("ID", 30);
|
||||
listViewEx.Columns.Add("Test name", 70);
|
||||
listViewEx.Columns.Add("QBezeichnung", 85);
|
||||
listViewEx.Columns.Add(Strings.Q_from_m3h, 80);
|
||||
listViewEx.Columns.Add(Strings.Q_to_m3h, 70);
|
||||
listViewEx.Columns.Add(Strings.Test_time_s_chdr, 70);
|
||||
listViewEx.Columns.Add(string.Format("{0} [l]", Strings.Volume, 60));
|
||||
listViewEx.Columns.Add(Strings.Err_limit_neg_pct_chdr, 80);
|
||||
listViewEx.Columns.Add(Strings.Err_limit_pos_pct_chdr, 80);
|
||||
listViewEx.Columns.Add(Strings.Uncertainty_pct_chdr, 85);
|
||||
listViewEx.Columns.Add(Strings.Test_method, 200);
|
||||
|
||||
uncertaintyTB = new TextBox();
|
||||
Controls.Add(uncertaintyTB);
|
||||
|
||||
testMethodCB = new ComboBox();
|
||||
if (testMethods != null)
|
||||
{
|
||||
foreach (var tm in testMethods) testMethodCB.Items.Add(tm.Name);
|
||||
}
|
||||
Controls.Add(testMethodCB);
|
||||
|
||||
backButton.Visible = false;
|
||||
nextButton.Enabled = false;
|
||||
|
||||
SelectedTestInfos = null;
|
||||
}
|
||||
|
||||
private void OracleWZTypSelection_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
bool IsFormValidForSearch()
|
||||
{
|
||||
if (idWZTypRadioButton.Checked)
|
||||
{
|
||||
int idummy;
|
||||
return (int.TryParse(idWZTypTextBox.Text, out idummy) && (idummy > 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (materialCodeTextBox.Text.Length == 25);
|
||||
}
|
||||
}
|
||||
|
||||
bool IsFormValid()
|
||||
{
|
||||
double dummy;
|
||||
|
||||
return IsFormValidForSearch() &&
|
||||
(listViewEx.Items.Count > 0) &&
|
||||
Utils.TryParseUDouble(q3TextBox.Text, out dummy) &&
|
||||
!string.IsNullOrEmpty(metroClassTextBox.Text) &&
|
||||
!string.IsNullOrEmpty(approvalTextBox.Text) &&
|
||||
meterTypeComboBox.Items.Contains(meterTypeComboBox.Text);
|
||||
}
|
||||
|
||||
private void idWZTypRadioButton_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (idWZTypRadioButton.Checked)
|
||||
{
|
||||
idWZTypTextBox.Enabled = true;
|
||||
materialCodeTextBox.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
idWZTypTextBox.Enabled = false;
|
||||
materialCodeTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
searchButton.Enabled = IsFormValidForSearch();
|
||||
nextButton.Enabled = false;
|
||||
}
|
||||
|
||||
private void wzTypTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
searchButton.Enabled = IsFormValidForSearch();
|
||||
nextButton.Enabled = false;
|
||||
}
|
||||
|
||||
private void productCodeTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
searchButton.Enabled = IsFormValidForSearch();
|
||||
nextButton.Enabled = false;
|
||||
}
|
||||
|
||||
private void backButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Retry;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void nextButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
MetrolKlasse = metroClassTextBox.Text;
|
||||
Zulasszeichen = approvalTextBox.Text;
|
||||
Q3 = Utils.ParseUDouble(q3TextBox.Text);
|
||||
for (MeterType mt = 0; mt < MeterType.Count; mt++)
|
||||
{
|
||||
if (meterTypeComboBox.Text == mt.ToString())
|
||||
{
|
||||
MeterType = mt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void searchButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsFormValidForSearch())
|
||||
{
|
||||
MessageBox.Show("Invalid data");
|
||||
nextButton.Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
bool found = ReadTestInfosFromOracle();
|
||||
if (!found)
|
||||
{
|
||||
MessageBox.Show("No water meter specification found in Oracle");
|
||||
}
|
||||
|
||||
nextButton.Enabled = IsFormValid();
|
||||
}
|
||||
|
||||
bool ReadTestInfosFromOracle()
|
||||
{
|
||||
IList<string> wmTestNames = new List<string>();
|
||||
StringBuilder procedureSignatureSB = new StringBuilder();
|
||||
|
||||
foreach (var t in loadedProcedure.Tests)
|
||||
{
|
||||
if (t.Publish != (byte)Config.Entities.Publish.Never)
|
||||
{
|
||||
wmTestNames.Add(global::Results.Utils.GetTestName(t.Name, 1, 1));
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
WMTypeId = int.Parse(idWZTypTextBox.Text);
|
||||
|
||||
int wmTypeRevision;
|
||||
string wzTypStr;
|
||||
string materialNr;
|
||||
DateTime timeStamp;
|
||||
string remark;
|
||||
string testInfoName;
|
||||
|
||||
OracleConnection conn = new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;");
|
||||
conn.Open();
|
||||
SelectedTestInfos = Database.GetOracleTestInfo(conn, WMTypeId, out wmTypeRevision, out wzTypStr, out MetrolKlasse, out Zulasszeichen, out materialNr, out Q3, out timeStamp, out remark);
|
||||
conn.Close();
|
||||
|
||||
SensusTestInfo[] completeTestInfos = SensusTestInfo.GetBestMatch(SelectedTestInfos, wmTestNames, out testInfoName);
|
||||
foreach (var sti in SelectedTestInfos)
|
||||
{
|
||||
foreach (var cti in completeTestInfos) if (cti.PruefungsNrDB == sti.PruefungsNrDB) sti.TestName = cti.TestName;
|
||||
}
|
||||
|
||||
materialCodeTextBox.Text = materialNr;
|
||||
revWZTypTextBox.Text = wmTypeRevision.ToString();
|
||||
wzTypTextBox.Text = wzTypStr;
|
||||
metroClassTextBox.Text = MetrolKlasse;
|
||||
approvalTextBox.Text = Zulasszeichen;
|
||||
q3TextBox.Text = Q3.ToString();
|
||||
remarkTextBox.Text = remark;
|
||||
timeStampTextBox.Text = timeStamp.ToString("dd.MM.yyyy HH:mm");
|
||||
testInfoNameLabel.Text = testInfoName;
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
foreach (var ti in SelectedTestInfos)
|
||||
{
|
||||
double Qfrom, Qto;
|
||||
switch (ti.Range)
|
||||
{
|
||||
case Range.R90_100:
|
||||
Qfrom = 0.9 * ti.Flow;
|
||||
Qto = ti.Flow;
|
||||
break;
|
||||
|
||||
case Range.R95_105:
|
||||
Qfrom = 0.95 * ti.Flow;
|
||||
Qto = 1.05 * ti.Flow;
|
||||
break;
|
||||
|
||||
case Range.R100_110:
|
||||
Qfrom = ti.Flow;
|
||||
Qto = 1.1 * ti.Flow;
|
||||
break;
|
||||
|
||||
default:
|
||||
Qfrom = Qto = ti.Flow;
|
||||
break;
|
||||
}
|
||||
|
||||
double volumeLtr = ti.TestTime * (Qfrom + Qto) / 7.2;
|
||||
|
||||
ListViewItem lvi = new ListViewItem(new string[] { ti.PruefungsNrDB.ToString(),
|
||||
(string.IsNullOrEmpty(ti.TestName) ? string.Empty : ti.TestName),
|
||||
ti.QBezeichnungDB,
|
||||
Qfrom.ToString(),
|
||||
Qto.ToString(),
|
||||
ti.TestTime.ToString(),
|
||||
volumeLtr.ToString(Config.Utils.SignificantDigitsToFmt(volumeLtr, 4)),
|
||||
(ti.ErrLimLoFromDB - ti.Uncertainty).ToString(),
|
||||
(ti.ErrLimHiFromDB + ti.Uncertainty).ToString(),
|
||||
ti.Uncertainty.ToString(),
|
||||
ti.TestMethod,
|
||||
});
|
||||
lvi.Tag = ti;
|
||||
listViewEx.Items.Add(lvi);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
revWZTypTextBox.Text = string.Empty;
|
||||
wzTypTextBox.Text = "No info found";
|
||||
metroClassTextBox.Text = string.Empty;
|
||||
approvalTextBox.Text = string.Empty;
|
||||
q3TextBox.Text = string.Empty;
|
||||
remarkTextBox.Text = string.Empty;
|
||||
timeStampTextBox.Text = string.Empty;
|
||||
testInfoNameLabel.Text = string.Empty;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void listViewEx_SubItemClicked(object sender, TracingDB.Forms.SubItemEventArgs e)
|
||||
{
|
||||
if (e.SubItem == listViewEx.Columns.Count - 2)
|
||||
{
|
||||
/// Uncertainty column clicked (column before the last one)
|
||||
listViewEx.StartEditing(uncertaintyTB, e.Item, e.SubItem);
|
||||
}
|
||||
else if (e.SubItem == listViewEx.Columns.Count - 1)
|
||||
{
|
||||
/// Test method column clicked (the last column)
|
||||
listViewEx.StartEditing(testMethodCB, e.Item, e.SubItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void listViewEx_SubItemEndEditing(object sender, TracingDB.Forms.SubItemEndEditingEventArgs e)
|
||||
{
|
||||
if (e.SubItem == listViewEx.Columns.Count - 2)
|
||||
{
|
||||
double uncertainty;
|
||||
if (Utils.TryParseUDouble(e.DisplayText, out uncertainty))
|
||||
{
|
||||
/// Uncertainty OK
|
||||
SensusTestInfo ti = e.Item.Tag as SensusTestInfo;
|
||||
if (ti != null) ti.Uncertainty = uncertainty;
|
||||
e.Item.SubItems[listViewEx.Columns.Count - 4].Text = (ti.ErrLimLoFromDB - ti.Uncertainty).ToString();
|
||||
e.Item.SubItems[listViewEx.Columns.Count - 3].Text = (ti.ErrLimHiFromDB + ti.Uncertainty).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Uncertainty NOK -> revert changes
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (e.SubItem == listViewEx.Columns.Count - 1)
|
||||
{
|
||||
if (testMethodCB.Items.Contains(e.DisplayText))
|
||||
{
|
||||
/// TestMethod OK
|
||||
SensusTestInfo ti = e.Item.Tag as SensusTestInfo;
|
||||
if (ti != null) ti.TestMethod = e.DisplayText;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// TestMethod NOK -> revert changes
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void q3TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
nextButton.Enabled = IsFormValid();
|
||||
}
|
||||
|
||||
private void metroClassTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
nextButton.Enabled = IsFormValid();
|
||||
}
|
||||
|
||||
private void approvalTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
nextButton.Enabled = IsFormValid();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -4,11 +4,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Results.Entities;
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
using Oracle.DataAccess.Client;
|
||||
using Results;
|
||||
using Results.Entities;
|
||||
using TBF.Resources;
|
||||
using TBF.BenchControl.Output.DB.SensusOracle;
|
||||
|
||||
namespace TBF.UI.Results
|
||||
{
|
||||
|
||||
Generated
+43
-1
@@ -47,6 +47,9 @@ namespace TBF.UI.Shared
|
||||
this.exportButton = new System.Windows.Forms.Button();
|
||||
this.importButton = new System.Windows.Forms.Button();
|
||||
this.compareButton = new System.Windows.Forms.Button();
|
||||
this.customButton1 = new System.Windows.Forms.Button();
|
||||
this.customButton2 = new System.Windows.Forms.Button();
|
||||
this.customButton3 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// removeButton
|
||||
@@ -225,10 +228,46 @@ namespace TBF.UI.Shared
|
||||
this.compareButton.UseVisualStyleBackColor = true;
|
||||
this.compareButton.Click += new System.EventHandler(this.compareButton_Click);
|
||||
//
|
||||
// customButton1
|
||||
//
|
||||
this.customButton1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.customButton1.Location = new System.Drawing.Point(10, 755);
|
||||
this.customButton1.Name = "customButton1";
|
||||
this.customButton1.Size = new System.Drawing.Size(80, 40);
|
||||
this.customButton1.TabIndex = 16;
|
||||
this.customButton1.Text = "Custom 1";
|
||||
this.customButton1.UseVisualStyleBackColor = true;
|
||||
this.customButton1.Click += new System.EventHandler(this.customButton1_Click);
|
||||
//
|
||||
// customButton2
|
||||
//
|
||||
this.customButton2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.customButton2.Location = new System.Drawing.Point(10, 798);
|
||||
this.customButton2.Name = "customButton2";
|
||||
this.customButton2.Size = new System.Drawing.Size(80, 40);
|
||||
this.customButton2.TabIndex = 17;
|
||||
this.customButton2.Text = "Custom 2";
|
||||
this.customButton2.UseVisualStyleBackColor = true;
|
||||
this.customButton2.Click += new System.EventHandler(this.customButton2_Click);
|
||||
//
|
||||
// customButton3
|
||||
//
|
||||
this.customButton3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.customButton3.Location = new System.Drawing.Point(10, 841);
|
||||
this.customButton3.Name = "customButton3";
|
||||
this.customButton3.Size = new System.Drawing.Size(80, 40);
|
||||
this.customButton3.TabIndex = 18;
|
||||
this.customButton3.Text = "Custom 3";
|
||||
this.customButton3.UseVisualStyleBackColor = true;
|
||||
this.customButton3.Click += new System.EventHandler(this.customButton3_Click);
|
||||
//
|
||||
// SharedButtons
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.customButton3);
|
||||
this.Controls.Add(this.customButton2);
|
||||
this.Controls.Add(this.customButton1);
|
||||
this.Controls.Add(this.compareButton);
|
||||
this.Controls.Add(this.importButton);
|
||||
this.Controls.Add(this.exportButton);
|
||||
@@ -246,7 +285,7 @@ namespace TBF.UI.Shared
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Name = "SharedButtons";
|
||||
this.Size = new System.Drawing.Size(100, 805);
|
||||
this.Size = new System.Drawing.Size(100, 908);
|
||||
this.Load += new System.EventHandler(this.SharedDlgButtons_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -270,5 +309,8 @@ namespace TBF.UI.Shared
|
||||
private System.Windows.Forms.Button exportButton;
|
||||
private System.Windows.Forms.Button importButton;
|
||||
private System.Windows.Forms.Button compareButton;
|
||||
private System.Windows.Forms.Button customButton1;
|
||||
private System.Windows.Forms.Button customButton2;
|
||||
private System.Windows.Forms.Button customButton3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@ namespace TBF.UI.Shared
|
||||
RenameTab = (1 << 10), /// optional
|
||||
RemoveTab = (1 << 11), /// optional
|
||||
More = (1 << 12), /// optional
|
||||
Custom1 = (1 << 13), /// optional
|
||||
Custom2 = (1 << 14), /// optional
|
||||
Custom3 = (1 << 15), /// optional
|
||||
}
|
||||
|
||||
readonly System.Windows.Forms.Button[] buttonCtrls;
|
||||
@@ -40,6 +43,10 @@ namespace TBF.UI.Shared
|
||||
/// </summary>
|
||||
public Buttons OptionalButtons;
|
||||
|
||||
public string Custom1Caption { set { customButton1.Text = value; } }
|
||||
public string Custom2Caption { set { customButton2.Text = value; } }
|
||||
public string Custom3Caption { set { customButton3.Text = value; } }
|
||||
|
||||
public enum LockState
|
||||
{
|
||||
Locked, /// 'Unlock', 'Close' (=OK) are shown, all the othere are hidden
|
||||
@@ -84,6 +91,7 @@ namespace TBF.UI.Shared
|
||||
addButton, removeButton, upButton, downButton, editButton, copyButton,
|
||||
exportButton, importButton, compareButton,
|
||||
newTabButton, renameTabButton, removeTabButton, moreButton,
|
||||
customButton1, customButton2, customButton3,
|
||||
};
|
||||
OptionalButtons = Buttons.None;
|
||||
buttonsRepositionsed = false;
|
||||
@@ -208,10 +216,13 @@ namespace TBF.UI.Shared
|
||||
public event EventHandler NewTabClicked;
|
||||
public event EventHandler RenameTabClicked;
|
||||
public event EventHandler RemoveTabClicked;
|
||||
public event EventHandler MoreClicked;
|
||||
public event EventHandler ExportClicked;
|
||||
public event EventHandler ImportClicked;
|
||||
public event EventHandler CompareClicked;
|
||||
public event EventHandler MoreClicked;
|
||||
public event EventHandler Custom1Clicked;
|
||||
public event EventHandler Custom2Clicked;
|
||||
public event EventHandler Custom3Clicked;
|
||||
|
||||
/// <summary>
|
||||
/// 'Unlock' button handler
|
||||
@@ -288,5 +299,8 @@ namespace TBF.UI.Shared
|
||||
private void newTabButton_Click(object s, EventArgs e) { if (NewTabClicked != null) NewTabClicked(s, e); }
|
||||
private void renameTabButton_Click(object s, EventArgs e) { if (RenameTabClicked != null) RenameTabClicked(s, e); }
|
||||
private void removeTabButton_Click(object s, EventArgs e) { if (RemoveTabClicked != null) RemoveTabClicked(s, e); }
|
||||
private void customButton1_Click(object s, EventArgs e) { if (Custom1Clicked != null) Custom1Clicked(s, e); }
|
||||
private void customButton2_Click(object s, EventArgs e) { if (Custom2Clicked != null) Custom2Clicked(s, e); }
|
||||
private void customButton3_Click(object s, EventArgs e) { if (Custom3Clicked != null) Custom3Clicked(s, e); }
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user