Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0468b5a1f5 | ||
|
|
fd6f305f95 |
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -87,6 +87,7 @@
|
||||
<Compile Include="Entities\Test.cs" />
|
||||
<Compile Include="Entities\TransitionSequence.cs" />
|
||||
<Compile Include="Entities\TransitionStep.cs" />
|
||||
<Compile Include="Entities\Uncertainty.cs" />
|
||||
<Compile Include="Entities\User.cs" />
|
||||
<Compile Include="Entities\VirtualBenchSequence.cs" />
|
||||
<Compile Include="Entities\VirtualBenchStep.cs" />
|
||||
@@ -108,6 +109,7 @@
|
||||
<Compile Include="Mappings\TestMap.cs" />
|
||||
<Compile Include="Mappings\TransitionSequenceMap.cs" />
|
||||
<Compile Include="Mappings\TransitionStepMap.cs" />
|
||||
<Compile Include="Mappings\UncertaintyMap.cs" />
|
||||
<Compile Include="Mappings\UserMap.cs" />
|
||||
<Compile Include="Mappings\VirtualBenchSequenceMap.cs" />
|
||||
<Compile Include="Mappings\VirtualBenchStepMap.cs" />
|
||||
|
||||
+1
-7
@@ -14,18 +14,12 @@ namespace Config
|
||||
public const int CompoundWMsCount = 3;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif DN100 || BADGER_VELKA_TRAT || CEVAK_200
|
||||
#elif DN100 || BADGER_STREDNA_TRAT || 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;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
namespace Config.Entities
|
||||
@@ -19,6 +18,7 @@ namespace Config.Entities
|
||||
public virtual LogLevel Logging { get; set; }
|
||||
public virtual string Parameters { get; set; }
|
||||
public virtual IList<MeasurementCorrection> Corrections { get; set; }
|
||||
public virtual IList<Uncertainty> Uncertainties { get; set; }
|
||||
|
||||
/// ------------- Additional stuff not mapped into the database -------------
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace Config.Entities
|
||||
Name = string.Empty;
|
||||
ClassName = string.Empty;
|
||||
Corrections = new List<MeasurementCorrection>();
|
||||
Uncertainties = new List<Uncertainty>();
|
||||
}
|
||||
|
||||
public static Component CreateFromCfg(string name, string className, string parentName, int itemNr,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace Config.Entities
|
||||
{
|
||||
public class Uncertainty
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual float Measurement { get; set; }
|
||||
public virtual float MainUncertainty { get; set; }
|
||||
public virtual float Resolution { get; set; }
|
||||
public virtual float DriftPerYr { get; set; }
|
||||
public virtual float Conditions { get; set; }
|
||||
public virtual float UncertaintyOfCorrection { get; set; }
|
||||
|
||||
public Uncertainty() { }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Config.Entities;
|
||||
@@ -23,6 +23,9 @@ namespace Config.Mappings
|
||||
HasMany(x => x.Corrections)
|
||||
.OrderBy("Measurement")
|
||||
.Cascade.All();
|
||||
}
|
||||
HasMany(x => x.Uncertainties)
|
||||
.OrderBy("Measurement")
|
||||
.Cascade.All();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Config.Entities;
|
||||
|
||||
namespace Config.Mappings
|
||||
{
|
||||
class UncertaintyMap : ClassMap<Uncertainty>
|
||||
{
|
||||
public UncertaintyMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.Measurement);
|
||||
Map(x => x.MainUncertainty);
|
||||
Map(x => x.Resolution);
|
||||
Map(x => x.DriftPerYr);
|
||||
Map(x => x.Conditions);
|
||||
Map(x => x.UncertaintyOfCorrection);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,8 @@ namespace Config.Mappings
|
||||
Map(x => x.Tag);
|
||||
#endif
|
||||
Map(x => x.Password);
|
||||
Map(x => x.Password2);
|
||||
Map(x => x.Password3);
|
||||
Map(x => x.FullName).Column("Description");
|
||||
Map(x => x.LastPwChange);
|
||||
HasMany(x => x.Groups)
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1273.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1273.0")]
|
||||
[assembly: AssemblyVersion("2.24.1315.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1315.0")]
|
||||
|
||||
+5
-11
@@ -130,19 +130,13 @@ namespace Results
|
||||
|
||||
public static BatchResults FromBatch(Batch batch)
|
||||
{
|
||||
if (batch.WaterMeters == null || batch.WaterMeters.Count == 0) return null;
|
||||
int wmCount = batch.WaterMeters.Count;
|
||||
if (wmCount == 0) return null;
|
||||
|
||||
int wmPosMax = 0;
|
||||
foreach (var wm in batch.WaterMeters) if (wm.WMPosition > wmPosMax) wmPosMax = wm.WMPosition;
|
||||
|
||||
BatchResults batchResults = new BatchResults(wmPosMax);
|
||||
BatchResults batchResults = new BatchResults(wmCount);
|
||||
batchResults.Batch = batch;
|
||||
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;
|
||||
}
|
||||
batchResults.WaterMeters = new WaterMeter[wmCount];
|
||||
for (int i = 0; i < wmCount; i++) batchResults.WaterMeters[i] = batch.WaterMeters[i];
|
||||
|
||||
return batchResults;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,6 @@ 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,9 +126,12 @@ namespace Results.Forms
|
||||
int displayedControlsCount = 0;
|
||||
for (int i = 0; i < results.WaterMeters.Length; i++)
|
||||
{
|
||||
if (((results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled) || ShowDisabledPositions)
|
||||
if (results.WaterMeters[i] != null)
|
||||
{
|
||||
displayedControlsCount++;
|
||||
if (ShowDisabledPositions || !results.WaterMeters[i].Disabled)
|
||||
{
|
||||
displayedControlsCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,23 +170,16 @@ namespace Results.Forms
|
||||
firstEnabledControl = null;
|
||||
for (int i = 0; i < results.WaterMeters.Length; i++)
|
||||
{
|
||||
if (((results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled) || ShowDisabledPositions)
|
||||
if (results.WaterMeters[i] != null)
|
||||
{
|
||||
/// 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)
|
||||
if (!results.WaterMeters[i].Disabled || ShowDisabledPositions)
|
||||
{
|
||||
if ((firstEnabledControl == null) && (results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled)
|
||||
{
|
||||
firstEnabledControl = wmRsltsCtrl[ix];
|
||||
}
|
||||
|
||||
//wmRsltsCtrl[ix].Update(results.WaterMeters[i].WMPosition);
|
||||
/// 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;
|
||||
wmRsltsCtrl[ix].Update(Items);
|
||||
wmRsltsCtrl[ix].WMResultsClickedHandler += delegate(object s, Results.Forms.WaterMeterEventArgs args)
|
||||
{
|
||||
@@ -196,10 +192,11 @@ namespace Results.Forms
|
||||
OnDoubleClick(s, args);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
flowLayoutPanel.Controls.Add(wmRsltsCtrl[ix] as UserControl);
|
||||
ix++;
|
||||
flowLayoutPanel.Controls.Add(wmRsltsCtrl[ix] as UserControl);
|
||||
if ((firstEnabledControl == null) && !results.WaterMeters[i].Disabled) firstEnabledControl = wmRsltsCtrl[ix];
|
||||
ix++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,16 +206,16 @@ namespace Results.Forms
|
||||
}
|
||||
|
||||
|
||||
void UpdateResults(Results.BatchResults results)
|
||||
void UpdateResults(Results.BatchResults batchResults)
|
||||
{
|
||||
if ((results != null) && (results.WaterMeters != null))
|
||||
if ((batchResults != null) && (batchResults.WaterMeters != null))
|
||||
{
|
||||
int ctrlIx = 0;
|
||||
for (int i = 0; i < results.WaterMeters.Length; i++)
|
||||
for (int i = 0; i < batchResults.WaterMeters.Length; i++)
|
||||
{
|
||||
if (((results.WaterMeters[i] != null) && !results.WaterMeters[i].Disabled) || ShowDisabledPositions)
|
||||
if (!batchResults.WaterMeters[i].Disabled || ShowDisabledPositions)
|
||||
{
|
||||
if (ctrlIx < wmRsltsCtrl.Length) wmRsltsCtrl[ctrlIx++].Update(results.WaterMeters[i]);
|
||||
if (ctrlIx < wmRsltsCtrl.Length) wmRsltsCtrl[ctrlIx++].Update(batchResults.WaterMeters[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,11 +90,11 @@ namespace Results.Forms
|
||||
#endif
|
||||
|
||||
/// Header
|
||||
lView.Columns.Add(wmPosition.ToString(), (columnWidths != null && columnWidths.Length > 0) ? columnWidths[0] : 40);
|
||||
lView.Columns.Add(wmPosition.ToString(), (columnWidths.Length > 0) ? columnWidths[0] : 40);
|
||||
int col = 1;
|
||||
foreach (var str in wMtr.GetAllDecoratedTestNames())
|
||||
{
|
||||
lView.Columns.Add(str, (columnWidths != null && columnWidths.Length > col) ? columnWidths[col] : 70);
|
||||
lView.Columns.Add(str, (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 != null && columnWidths.Length > 0) ? columnWidths[0] : 40);
|
||||
lView.Columns.Add(wmPosition.ToString(), (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 != null && columnWidths.Length > col) ? columnWidths[col] : 70);
|
||||
lView.Columns.Add(item.Caption, (columnWidths.Length > col) ? columnWidths[col] : 70);
|
||||
col++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,19 +318,6 @@ 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,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
@@ -26,6 +26,16 @@ namespace Results.Mappings
|
||||
.Column("Custom1"); ;
|
||||
Map(x => x.Custom2);
|
||||
Map(x => x.Custom3);
|
||||
Map(x => x.Counter1);
|
||||
Map(x => x.Counter2);
|
||||
Map(x => x.Counter3);
|
||||
Map(x => x.Counter4);
|
||||
Map(x => x.Counter5);
|
||||
Map(x => x.Counter6);
|
||||
Map(x => x.Counter7);
|
||||
Map(x => x.Counter8);
|
||||
Map(x => x.Counter9);
|
||||
Map(x => x.Counter10);
|
||||
Map(x => x.StartTime);
|
||||
Map(x => x.EndTime);
|
||||
Map(x => x.Dirty);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
@@ -12,6 +12,7 @@ namespace Results.Mappings
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.CompoundMeterId);
|
||||
Map(x => x.RegReaderType);
|
||||
Map(x => x.PulsesMeter);
|
||||
Map(x => x.PulsesMaster);
|
||||
Map(x => x.PulsesPerLiter);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
@@ -16,6 +16,7 @@ namespace Results.Mappings
|
||||
References<Components>(x => x.Components);
|
||||
Map(x => x.Part);
|
||||
Map(x => x.RepetitionNr);
|
||||
Map(x => x.MethodClass);
|
||||
|
||||
Map(x => x.TestDone);
|
||||
Map(x => x.Remark)
|
||||
@@ -24,9 +25,13 @@ namespace Results.Mappings
|
||||
Map(x => x.StartTime);
|
||||
Map(x => x.EndTime);
|
||||
Map(x => x.FlowSetTime);
|
||||
Map(x => x.TimeBtwnMassMsrmnts);
|
||||
Map(x => x.TestTime);
|
||||
Map(x => x.TestTimeCorrection);
|
||||
Map(x => x.PulsesMaster);
|
||||
Map(x => x.ConstMaster);
|
||||
Map(x => x.ConstMasterRaw);
|
||||
Map(x => x.ConstMasterCorr);
|
||||
Map(x => x.ConstMaster);
|
||||
Map(x => x.MassStartRaw);
|
||||
Map(x => x.MassStart);
|
||||
Map(x => x.MassEndRaw);
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace Results.Mappings
|
||||
Map(x => x.MetrologicalClassAux);
|
||||
Map(x => x.ApprovalInfoAux);
|
||||
|
||||
Map(x => x.Medium);
|
||||
|
||||
Map(x => x.Text1);
|
||||
Map(x => x.Text2);
|
||||
Map(x => x.Text3);
|
||||
|
||||
@@ -13,25 +13,17 @@ namespace Results.Output
|
||||
{
|
||||
public static Chart GetChart(WaterMeter wm, bool isPrinter)
|
||||
{
|
||||
return GetChart(wm, isPrinter, Config.Unit.lph);
|
||||
return GetChart(wm, isPrinter, Config.Unit.lph, false);
|
||||
}
|
||||
|
||||
public static Chart GetChart(WaterMeter wm, bool isPrinter, Config.Unit flowUnit)
|
||||
public static Chart GetChart(WaterMeter wm, bool isPrinter, Config.Unit flowUnit, bool isQ4)
|
||||
{
|
||||
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_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
|
||||
|
||||
double flow = Config.Units.ConvertTo(flowUnit, 3.6 * mtr.TestRslt.VolumeCTV / mtr.TestRslt.TestTime);
|
||||
if (flow > 0)
|
||||
{
|
||||
unsortedPoints.Add(new PointF((float)flow, (float)mtr.Error));
|
||||
@@ -40,8 +32,6 @@ 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",
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1290.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1290.0")]
|
||||
[assembly: AssemblyVersion("2.24.1315.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1315.0")]
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -325,7 +325,6 @@ 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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -29,7 +29,6 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
public string Address4 { get { return myCfg.Address4; } }
|
||||
public string Address5 { get { return myCfg.Address5; } }
|
||||
public RemoteDBUse RemoteDBUse { get { return myCfg.RemoteDBUse; } }
|
||||
public int FlowAdjustmentTimeout { get { return myCfg.FlowAdjustmentTimeout; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -33,7 +33,6 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
public string ApprovalDate;
|
||||
public string ApprovedBy;
|
||||
public RemoteDBUse RemoteDBUse;
|
||||
public int FlowAdjustmentTimeout;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
@@ -65,7 +64,6 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
ApprovedBy = string.Empty;
|
||||
|
||||
RemoteDBUse = RemoteDBUse.LocalDBOnly;
|
||||
FlowAdjustmentTimeout = 300; /// timeout = 5 minutes
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
@@ -81,7 +79,6 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
"Approval date",
|
||||
"Approved by",
|
||||
"Remote DB use",
|
||||
"Flow adjustment timeout [s] (0=off)",
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
@@ -120,7 +117,6 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
case 8: return ApprovalDate;
|
||||
case 9: return ApprovedBy;
|
||||
case 10: return RemoteDBUse.ToDescription();
|
||||
case 11: return FlowAdjustmentTimeout.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -158,7 +154,6 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
|
||||
case 11: FlowAdjustmentTimeout = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
@@ -181,7 +176,6 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
case 9:
|
||||
return true;
|
||||
case 1:
|
||||
case 11:
|
||||
if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
|
||||
break;
|
||||
case 10:
|
||||
@@ -212,7 +206,6 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
prms.ApprovalDate = this.ApprovalDate;
|
||||
prms.ApprovedBy = this.ApprovedBy;
|
||||
prms.RemoteDBUse = this.RemoteDBUse;
|
||||
prms.FlowAdjustmentTimeout = this.FlowAdjustmentTimeout;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -32,7 +32,6 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
#if ORACLE_DB
|
||||
public int MaxTestIndex { get { return 0; } }
|
||||
#endif
|
||||
public int FlowAdjustmentTimeout { get { return 300; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -31,7 +31,6 @@ namespace TBF.BenchControl.BenchInfo.iPerl
|
||||
public RemoteDBUse RemoteDBUse { get { return myCfg.RemoteDBUse; } }
|
||||
public Side Side { get { return myCfg.Side; } }
|
||||
public int MaxTestIndex { get { return myCfg.MaxTestIndex; } } /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
public int FlowAdjustmentTimeout { get { return myCfg.FlowAdjustmentTimeout; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -36,7 +36,6 @@ namespace TBF.BenchControl.BenchInfo.iPerl
|
||||
public RemoteDBUse RemoteDBUse;
|
||||
public Side Side;
|
||||
public int MaxTestIndex; /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
public int FlowAdjustmentTimeout;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
@@ -70,7 +69,6 @@ namespace TBF.BenchControl.BenchInfo.iPerl
|
||||
RemoteDBUse = RemoteDBUse.LocalDBOnly;
|
||||
Side = Side.Left;
|
||||
MaxTestIndex = 4;
|
||||
FlowAdjustmentTimeout = 300; /// timeout = 5 minutes
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
@@ -88,7 +86,6 @@ namespace TBF.BenchControl.BenchInfo.iPerl
|
||||
"Remote DB use",
|
||||
Strings.Side,
|
||||
"Max.test index",
|
||||
"Flow adjustment timeout [s] (0=off)",
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
@@ -135,7 +132,6 @@ namespace TBF.BenchControl.BenchInfo.iPerl
|
||||
case 10: return RemoteDBUse.ToDescription();
|
||||
case 11: return Side.ToDescription();
|
||||
case 12: return MaxTestIndex.ToString();
|
||||
case 13: return FlowAdjustmentTimeout.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -192,7 +188,6 @@ namespace TBF.BenchControl.BenchInfo.iPerl
|
||||
return CfgUpdateFlags.Error;
|
||||
|
||||
case 12: MaxTestIndex = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||
case 13: FlowAdjustmentTimeout = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
@@ -216,7 +211,6 @@ namespace TBF.BenchControl.BenchInfo.iPerl
|
||||
return true;
|
||||
case 1:
|
||||
case 12:
|
||||
case 13:
|
||||
if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
|
||||
break;
|
||||
case 10:
|
||||
@@ -255,7 +249,6 @@ namespace TBF.BenchControl.BenchInfo.iPerl
|
||||
prms.RemoteDBUse = this.RemoteDBUse;
|
||||
prms.Side = this.Side;
|
||||
prms.MaxTestIndex = this.MaxTestIndex;
|
||||
prms.FlowAdjustmentTimeout = this.FlowAdjustmentTimeout;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
|
||||
@@ -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;
|
||||
@@ -20,12 +20,19 @@ namespace TBF.BenchControl
|
||||
public int ItemNr { get { return cfg.ItemNr; } }
|
||||
public DebugMode DebugLevel { get { return cfg.DebugLevel; } set { cfg.DebugLevel = value; } }
|
||||
public LogLevel LogLevel { get { return cfg.LogLevel; } }
|
||||
|
||||
public IList<MeasurementCorrection> Corrections
|
||||
{
|
||||
get { return cfg.Corrections; }
|
||||
set { cfg.Corrections = value; }
|
||||
}
|
||||
|
||||
public IList<Uncertainty> Uncertainties
|
||||
{
|
||||
get { return cfg.Uncertainties; }
|
||||
set { cfg.Uncertainties = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Constructor, components created in this way is used by
|
||||
/// IComponentFactory.DummyComponent() function. Such dummy component should be used
|
||||
|
||||
@@ -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;
|
||||
@@ -68,6 +68,15 @@ namespace TBF.BenchControl
|
||||
}
|
||||
IList<MeasurementCorrection> corrections;
|
||||
|
||||
[XmlIgnore]
|
||||
public IList<Uncertainty> Uncertainties
|
||||
{
|
||||
get { return uncertainties; }
|
||||
set { uncertainties = value; }
|
||||
}
|
||||
IList<Uncertainty> uncertainties;
|
||||
|
||||
|
||||
protected ComponentCfgBase()
|
||||
{
|
||||
itemNr = 0;
|
||||
@@ -118,7 +127,8 @@ namespace TBF.BenchControl
|
||||
config.DebugLevel = cmpntEntity.Mode;
|
||||
config.LogLevel = cmpntEntity.Logging;
|
||||
config.Corrections = cmpntEntity.Corrections;
|
||||
config.Factory = factory;
|
||||
config.Uncertainties = cmpntEntity.Uncertainties;
|
||||
config.Factory = factory;
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -62,14 +62,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.remarkComboBox3 = new System.Windows.Forms.ComboBox();
|
||||
this.remarkComboBox4 = new System.Windows.Forms.ComboBox();
|
||||
this.remarkComboBox5 = new System.Windows.Forms.ComboBox();
|
||||
this.remarkComboBox7 = new System.Windows.Forms.ComboBox();
|
||||
this.remarkComboBox8 = new System.Windows.Forms.ComboBox();
|
||||
this.comboBox8 = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.comboBox7 = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox7 = new System.Windows.Forms.CheckBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
@@ -260,71 +252,11 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.remarkComboBox5.FormattingEnabled = true;
|
||||
this.remarkComboBox5.Name = "remarkComboBox5";
|
||||
//
|
||||
// remarkComboBox7
|
||||
//
|
||||
resources.ApplyResources(this.remarkComboBox7, "remarkComboBox7");
|
||||
this.remarkComboBox7.FormattingEnabled = true;
|
||||
this.remarkComboBox7.Name = "remarkComboBox7";
|
||||
//
|
||||
// remarkComboBox8
|
||||
//
|
||||
resources.ApplyResources(this.remarkComboBox8, "remarkComboBox8");
|
||||
this.remarkComboBox8.FormattingEnabled = true;
|
||||
this.remarkComboBox8.Name = "remarkComboBox8";
|
||||
//
|
||||
// comboBox8
|
||||
//
|
||||
resources.ApplyResources(this.comboBox8, "comboBox8");
|
||||
this.comboBox8.FormattingEnabled = true;
|
||||
this.comboBox8.Name = "comboBox8";
|
||||
this.comboBox8.SelectedIndexChanged += new System.EventHandler(this.comboBox8_SelectedIndexChanged);
|
||||
this.comboBox8.TextChanged += new System.EventHandler(this.comboBox8_TextChanged);
|
||||
this.comboBox8.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox8_KeyPress);
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
resources.ApplyResources(this.checkBox8, "checkBox8");
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
resources.ApplyResources(this.label8, "label8");
|
||||
this.label8.Name = "label8";
|
||||
//
|
||||
// comboBox7
|
||||
//
|
||||
resources.ApplyResources(this.comboBox7, "comboBox7");
|
||||
this.comboBox7.FormattingEnabled = true;
|
||||
this.comboBox7.Name = "comboBox7";
|
||||
this.comboBox7.SelectedIndexChanged += new System.EventHandler(this.comboBox7_SelectedIndexChanged);
|
||||
this.comboBox7.TextChanged += new System.EventHandler(this.comboBox7_TextChanged);
|
||||
this.comboBox7.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox7_KeyPress);
|
||||
//
|
||||
// checkBox7
|
||||
//
|
||||
resources.ApplyResources(this.checkBox7, "checkBox7");
|
||||
this.checkBox7.Name = "checkBox7";
|
||||
this.checkBox7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
resources.ApplyResources(this.label7, "label7");
|
||||
this.label7.Name = "label7";
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.Controls.Add(this.remarkComboBox7);
|
||||
this.Controls.Add(this.remarkComboBox8);
|
||||
this.Controls.Add(this.comboBox8);
|
||||
this.Controls.Add(this.checkBox8);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.comboBox7);
|
||||
this.Controls.Add(this.checkBox7);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.remarkComboBox5);
|
||||
this.Controls.Add(this.remarkComboBox4);
|
||||
this.Controls.Add(this.remarkComboBox3);
|
||||
@@ -397,13 +329,5 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
private System.Windows.Forms.ComboBox remarkComboBox3;
|
||||
private System.Windows.Forms.ComboBox remarkComboBox4;
|
||||
private System.Windows.Forms.ComboBox remarkComboBox5;
|
||||
private System.Windows.Forms.ComboBox remarkComboBox7;
|
||||
private System.Windows.Forms.ComboBox remarkComboBox8;
|
||||
private System.Windows.Forms.ComboBox comboBox8;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.ComboBox comboBox7;
|
||||
private System.Windows.Forms.CheckBox checkBox7;
|
||||
private System.Windows.Forms.Label label7;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -42,10 +42,9 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
comboBoxes = new ComboBox[] { comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6, comboBox7, comboBox8 };
|
||||
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6, checkBox7, checkBox8 };
|
||||
remarkBoxes = new ComboBox[] { remarkComboBox1, remarkComboBox2, remarkComboBox3, remarkComboBox4,
|
||||
remarkComboBox5, remarkComboBox6, remarkComboBox7, remarkComboBox8 };
|
||||
comboBoxes = new ComboBox[] { comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6 };
|
||||
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6 };
|
||||
remarkBoxes = new ComboBox[] { remarkComboBox1, remarkComboBox2, remarkComboBox3, remarkComboBox4, remarkComboBox5, remarkComboBox6 };
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.RemarksEnabled = remarksEnabled;
|
||||
@@ -78,15 +77,13 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (WaterMetersCount > 0) comboBox1.Items.Add((Program.LocalSettings.LastSNTexts[0] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[0]);
|
||||
if (WaterMetersCount > 1) comboBox2.Items.Add((Program.LocalSettings.LastSNTexts[1] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[1]);
|
||||
if (WaterMetersCount > 2) comboBox3.Items.Add((Program.LocalSettings.LastSNTexts[2] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[2]);
|
||||
if (WaterMetersCount > 3) comboBox4.Items.Add((Program.LocalSettings.LastSNTexts[3] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[3]);
|
||||
if (WaterMetersCount > 4) comboBox5.Items.Add((Program.LocalSettings.LastSNTexts[4] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[4]);
|
||||
if (WaterMetersCount > 5) comboBox6.Items.Add((Program.LocalSettings.LastSNTexts[5] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[5]);
|
||||
if (WaterMetersCount > 6) comboBox5.Items.Add((Program.LocalSettings.LastSNTexts[6] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[6]);
|
||||
if (WaterMetersCount > 7) comboBox6.Items.Add((Program.LocalSettings.LastSNTexts[7] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[7]);
|
||||
}
|
||||
if (WaterMetersCount >= 1) comboBox1.Items.Add((Program.LocalSettings.LastSNTexts[0] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[0]);
|
||||
if (WaterMetersCount >= 2) comboBox2.Items.Add((Program.LocalSettings.LastSNTexts[1] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[1]);
|
||||
if (WaterMetersCount >= 3) comboBox3.Items.Add((Program.LocalSettings.LastSNTexts[2] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[2]);
|
||||
if (WaterMetersCount >= 4) comboBox4.Items.Add((Program.LocalSettings.LastSNTexts[3] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[3]);
|
||||
if (WaterMetersCount >= 5) comboBox5.Items.Add((Program.LocalSettings.LastSNTexts[4] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[4]);
|
||||
if (WaterMetersCount >= 6) comboBox6.Items.Add((Program.LocalSettings.LastSNTexts[5] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[5]);
|
||||
}
|
||||
|
||||
if (WaterMetersCount >= 1) { enabledComboBoxes.Add(comboBox1); } else { comboBox1.Visible = false; label1.Visible = false; checkBox1.Visible = false; }
|
||||
if (WaterMetersCount >= 2) { enabledComboBoxes.Add(comboBox2); } else { comboBox2.Visible = false; label2.Visible = false; checkBox2.Visible = false; }
|
||||
@@ -94,8 +91,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (WaterMetersCount >= 4) { enabledComboBoxes.Add(comboBox4); } else { comboBox4.Visible = false; label4.Visible = false; checkBox4.Visible = false; }
|
||||
if (WaterMetersCount >= 5) { enabledComboBoxes.Add(comboBox5); } else { comboBox5.Visible = false; label5.Visible = false; checkBox5.Visible = false; }
|
||||
if (WaterMetersCount >= 6) { enabledComboBoxes.Add(comboBox6); } else { comboBox6.Visible = false; label6.Visible = false; checkBox6.Visible = false; }
|
||||
if (WaterMetersCount >= 7) { enabledComboBoxes.Add(comboBox7); } else { comboBox7.Visible = false; label7.Visible = false; checkBox7.Visible = false; }
|
||||
if (WaterMetersCount >= 8) { enabledComboBoxes.Add(comboBox8); } else { comboBox8.Visible = false; label8.Visible = false; checkBox8.Visible = false; }
|
||||
|
||||
if (RemarksEnabled)
|
||||
{
|
||||
@@ -105,8 +100,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (WaterMetersCount >= 4) { remarkComboBox4.Visible = true; }
|
||||
if (WaterMetersCount >= 5) { remarkComboBox5.Visible = true; }
|
||||
if (WaterMetersCount >= 6) { remarkComboBox6.Visible = true; }
|
||||
if (WaterMetersCount >= 7) { remarkComboBox7.Visible = true; }
|
||||
if (WaterMetersCount >= 8) { remarkComboBox8.Visible = true; }
|
||||
}
|
||||
|
||||
Height = 177 + WaterMetersCount * 46;
|
||||
@@ -129,9 +122,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
label4.Text = Strings.Water_Meter + " 4";
|
||||
label5.Text = Strings.Water_Meter + " 5";
|
||||
label6.Text = Strings.Water_Meter + " 6";
|
||||
label7.Text = Strings.Water_Meter + " 7";
|
||||
label8.Text = Strings.Water_Meter + " 8";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
@@ -174,8 +165,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
private void comboBox4_TextChanged(object sender, EventArgs e) { checkBox4.Checked = true; }
|
||||
private void comboBox5_TextChanged(object sender, EventArgs e) { checkBox5.Checked = true; }
|
||||
private void comboBox6_TextChanged(object sender, EventArgs e) { checkBox6.Checked = true; }
|
||||
private void comboBox7_TextChanged(object sender, EventArgs e) { checkBox7.Checked = true; }
|
||||
private void comboBox8_TextChanged(object sender, EventArgs e) { checkBox8.Checked = true; }
|
||||
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -225,22 +214,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
private void comboBox7_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox7.Text.Equals(Program.LocalSettings.LastSNTexts[6]))
|
||||
UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
private void comboBox8_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox8.Text.Equals(Program.LocalSettings.LastSNTexts[7]))
|
||||
UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
@@ -311,7 +284,5 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
private void comboBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox4); }
|
||||
private void comboBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox5); }
|
||||
private void comboBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox6); }
|
||||
private void comboBox7_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox7); }
|
||||
private void comboBox8_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox8); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>37</value>
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="comboBox1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -172,7 +172,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox1.ZOrder" xml:space="preserve">
|
||||
<value>33</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="checkBox1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -199,7 +199,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBox1.ZOrder" xml:space="preserve">
|
||||
<value>35</value>
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -211,7 +211,7 @@
|
||||
<value>27, 146</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 23</value>
|
||||
<value>147, 23</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -229,7 +229,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>36</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="clearButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -262,7 +262,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>clearButton.ZOrder" xml:space="preserve">
|
||||
<value>34</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="comboBox2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -286,7 +286,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox2.ZOrder" xml:space="preserve">
|
||||
<value>30</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="checkBox2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -316,7 +316,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBox2.ZOrder" xml:space="preserve">
|
||||
<value>31</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -331,7 +331,7 @@
|
||||
<value>27, 192</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 23</value>
|
||||
<value>147, 23</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
@@ -349,7 +349,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>32</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="comboBox3.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -373,7 +373,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox3.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="checkBox3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -403,7 +403,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBox3.ZOrder" xml:space="preserve">
|
||||
<value>28</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -418,7 +418,7 @@
|
||||
<value>27, 238</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 23</value>
|
||||
<value>147, 23</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
@@ -436,7 +436,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>29</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="comboBox4.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -460,7 +460,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox4.ZOrder" xml:space="preserve">
|
||||
<value>24</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="checkBox4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -490,7 +490,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBox4.ZOrder" xml:space="preserve">
|
||||
<value>25</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -505,7 +505,7 @@
|
||||
<value>27, 284</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 23</value>
|
||||
<value>147, 23</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
@@ -523,7 +523,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>26</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="comboBox5.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -547,7 +547,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox5.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="checkBox5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -577,7 +577,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBox5.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -592,7 +592,7 @@
|
||||
<value>27, 330</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 23</value>
|
||||
<value>147, 23</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
@@ -610,7 +610,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>23</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="comboBox6.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -634,7 +634,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox6.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="checkBox6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -664,7 +664,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBox6.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -679,7 +679,7 @@
|
||||
<value>27, 376</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 23</value>
|
||||
<value>147, 23</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
@@ -697,7 +697,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -721,7 +721,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="orderLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -754,7 +754,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>orderLabel.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="snLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -787,7 +787,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>snLabel.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="remarkLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -823,7 +823,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkLabel.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="remarkComboBox6.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -850,7 +850,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox6.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="remarkComboBox1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -877,7 +877,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox1.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="remarkComboBox2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -904,7 +904,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox2.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="remarkComboBox3.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -931,7 +931,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox3.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="remarkComboBox4.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -958,7 +958,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox4.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="remarkComboBox5.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
@@ -985,236 +985,8 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox5.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="remarkComboBox7.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="remarkComboBox7.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>453, 419</value>
|
||||
</data>
|
||||
<data name="remarkComboBox7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>421, 31</value>
|
||||
</data>
|
||||
<data name="remarkComboBox7.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>46</value>
|
||||
</data>
|
||||
<data name="remarkComboBox7.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox7.Name" xml:space="preserve">
|
||||
<value>remarkComboBox7</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox7.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox7.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox7.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="remarkComboBox8.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="remarkComboBox8.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>453, 465</value>
|
||||
</data>
|
||||
<data name="remarkComboBox8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>421, 31</value>
|
||||
</data>
|
||||
<data name="remarkComboBox8.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>45</value>
|
||||
</data>
|
||||
<data name="remarkComboBox8.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox8.Name" xml:space="preserve">
|
||||
<value>remarkComboBox8</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox8.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox8.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>remarkComboBox8.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="comboBox8.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox8.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>196, 465</value>
|
||||
</data>
|
||||
<data name="comboBox8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
</data>
|
||||
<data name="comboBox8.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>44</value>
|
||||
</data>
|
||||
<data name=">>comboBox8.Name" xml:space="preserve">
|
||||
<value>comboBox8</value>
|
||||
</data>
|
||||
<data name=">>comboBox8.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBox8.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox8.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="checkBox8.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="checkBox8.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 27.75pt</value>
|
||||
</data>
|
||||
<data name="checkBox8.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="checkBox8.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>400, 471</value>
|
||||
</data>
|
||||
<data name="checkBox8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>15, 14</value>
|
||||
</data>
|
||||
<data name="checkBox8.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>43</value>
|
||||
</data>
|
||||
<data name=">>checkBox8.Name" xml:space="preserve">
|
||||
<value>checkBox8</value>
|
||||
</data>
|
||||
<data name=">>checkBox8.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>checkBox8.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBox8.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label8.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label8.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="label8.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>27, 468</value>
|
||||
</data>
|
||||
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 23</value>
|
||||
</data>
|
||||
<data name="label8.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>42</value>
|
||||
</data>
|
||||
<data name="label8.Text" xml:space="preserve">
|
||||
<value>Water meter 8</value>
|
||||
</data>
|
||||
<data name=">>label8.Name" xml:space="preserve">
|
||||
<value>label8</value>
|
||||
</data>
|
||||
<data name=">>label8.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label8.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label8.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="comboBox7.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox7.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>196, 419</value>
|
||||
</data>
|
||||
<data name="comboBox7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
</data>
|
||||
<data name="comboBox7.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>41</value>
|
||||
</data>
|
||||
<data name=">>comboBox7.Name" xml:space="preserve">
|
||||
<value>comboBox7</value>
|
||||
</data>
|
||||
<data name=">>comboBox7.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBox7.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox7.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="checkBox7.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="checkBox7.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 27.75pt</value>
|
||||
</data>
|
||||
<data name="checkBox7.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="checkBox7.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>400, 426</value>
|
||||
</data>
|
||||
<data name="checkBox7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>15, 14</value>
|
||||
</data>
|
||||
<data name="checkBox7.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>40</value>
|
||||
</data>
|
||||
<data name=">>checkBox7.Name" xml:space="preserve">
|
||||
<value>checkBox7</value>
|
||||
</data>
|
||||
<data name=">>checkBox7.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>checkBox7.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkBox7.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label7.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="label7.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>27, 422</value>
|
||||
</data>
|
||||
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 23</value>
|
||||
</data>
|
||||
<data name="label7.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>39</value>
|
||||
</data>
|
||||
<data name="label7.Text" xml:space="preserve">
|
||||
<value>Water meter 7</value>
|
||||
</data>
|
||||
<data name=">>label7.Name" xml:space="preserve">
|
||||
<value>label7</value>
|
||||
</data>
|
||||
<data name=">>label7.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label7.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label7.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -1225,7 +997,7 @@
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1039, 521</value>
|
||||
<value>1039, 429</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Batch data</value>
|
||||
|
||||
+8
-78
@@ -53,12 +53,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.remarkTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.remarkTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.batchRemarkButton = new System.Windows.Forms.Button();
|
||||
this.remarkTextBox8 = new System.Windows.Forms.TextBox();
|
||||
this.remarkTextBox7 = new System.Windows.Forms.TextBox();
|
||||
this.textBox8 = new System.Windows.Forms.TextBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.textBox7 = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox2
|
||||
@@ -75,7 +69,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.label2.Location = new System.Drawing.Point(26, 110);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(146, 23);
|
||||
this.label2.Size = new System.Drawing.Size(147, 23);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Water meter 2";
|
||||
//
|
||||
@@ -93,7 +87,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.label1.Location = new System.Drawing.Point(26, 64);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(146, 23);
|
||||
this.label1.Size = new System.Drawing.Size(147, 23);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Water meter 1";
|
||||
//
|
||||
@@ -125,7 +119,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.label3.Location = new System.Drawing.Point(26, 156);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(146, 23);
|
||||
this.label3.Size = new System.Drawing.Size(147, 23);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Water meter 3";
|
||||
//
|
||||
@@ -143,7 +137,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.label4.Location = new System.Drawing.Point(26, 202);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(146, 23);
|
||||
this.label4.Size = new System.Drawing.Size(147, 23);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "Water meter 4";
|
||||
//
|
||||
@@ -161,7 +155,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.label5.Location = new System.Drawing.Point(26, 248);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(146, 23);
|
||||
this.label5.Size = new System.Drawing.Size(147, 23);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "Water meter 5";
|
||||
//
|
||||
@@ -179,7 +173,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.label6.Location = new System.Drawing.Point(26, 294);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(146, 23);
|
||||
this.label6.Size = new System.Drawing.Size(147, 23);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Water meter 6";
|
||||
//
|
||||
@@ -205,7 +199,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.remarkLabel.AutoSize = true;
|
||||
this.remarkLabel.Location = new System.Drawing.Point(396, 24);
|
||||
this.remarkLabel.Name = "remarkLabel";
|
||||
this.remarkLabel.Size = new System.Drawing.Size(210, 23);
|
||||
this.remarkLabel.Size = new System.Drawing.Size(211, 23);
|
||||
this.remarkLabel.TabIndex = 10;
|
||||
this.remarkLabel.Text = "Water meter remark:";
|
||||
//
|
||||
@@ -263,70 +257,12 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.batchRemarkButton.UseVisualStyleBackColor = true;
|
||||
this.batchRemarkButton.Click += new System.EventHandler(this.batchRemarkButton_Click);
|
||||
//
|
||||
// remarkTextBox8
|
||||
//
|
||||
this.remarkTextBox8.Location = new System.Drawing.Point(400, 383);
|
||||
this.remarkTextBox8.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.remarkTextBox8.Name = "remarkTextBox8";
|
||||
this.remarkTextBox8.Size = new System.Drawing.Size(421, 31);
|
||||
this.remarkTextBox8.TabIndex = 22;
|
||||
//
|
||||
// remarkTextBox7
|
||||
//
|
||||
this.remarkTextBox7.Location = new System.Drawing.Point(400, 337);
|
||||
this.remarkTextBox7.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.remarkTextBox7.Name = "remarkTextBox7";
|
||||
this.remarkTextBox7.Size = new System.Drawing.Size(421, 31);
|
||||
this.remarkTextBox7.TabIndex = 21;
|
||||
//
|
||||
// textBox8
|
||||
//
|
||||
this.textBox8.Location = new System.Drawing.Point(200, 383);
|
||||
this.textBox8.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.textBox8.Name = "textBox8";
|
||||
this.textBox8.Size = new System.Drawing.Size(159, 31);
|
||||
this.textBox8.TabIndex = 19;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(26, 386);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(146, 23);
|
||||
this.label8.TabIndex = 17;
|
||||
this.label8.Text = "Water meter 6";
|
||||
//
|
||||
// textBox7
|
||||
//
|
||||
this.textBox7.Location = new System.Drawing.Point(200, 337);
|
||||
this.textBox7.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.textBox7.Name = "textBox7";
|
||||
this.textBox7.Size = new System.Drawing.Size(159, 31);
|
||||
this.textBox7.TabIndex = 20;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(26, 340);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(146, 23);
|
||||
this.label7.TabIndex = 18;
|
||||
this.label7.Text = "Water meter 5";
|
||||
//
|
||||
// CycleEndForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 23F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.ClientSize = new System.Drawing.Size(1001, 441);
|
||||
this.Controls.Add(this.remarkTextBox8);
|
||||
this.Controls.Add(this.remarkTextBox7);
|
||||
this.Controls.Add(this.textBox8);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.textBox7);
|
||||
this.Controls.Add(this.label7);
|
||||
this.ClientSize = new System.Drawing.Size(1001, 349);
|
||||
this.Controls.Add(this.batchRemarkButton);
|
||||
this.Controls.Add(this.remarkTextBox6);
|
||||
this.Controls.Add(this.remarkTextBox5);
|
||||
@@ -386,12 +322,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
private System.Windows.Forms.TextBox remarkTextBox5;
|
||||
private System.Windows.Forms.TextBox remarkTextBox6;
|
||||
private System.Windows.Forms.Button batchRemarkButton;
|
||||
private System.Windows.Forms.TextBox remarkTextBox8;
|
||||
private System.Windows.Forms.TextBox remarkTextBox7;
|
||||
private System.Windows.Forms.TextBox textBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.TextBox textBox7;
|
||||
private System.Windows.Forms.Label label7;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2017 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
@@ -40,11 +40,10 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
labels = new Label[] { label1, label2, label3, label4, label5, label6, label7, label8 };
|
||||
stateBoxes = new TextBox[] { textBox1, textBox2, textBox3, textBox4,
|
||||
textBox5, textBox6, textBox7, textBox8 };
|
||||
remarkBoxes = new TextBox[] { remarkTextBox1, remarkTextBox2, remarkTextBox3, remarkTextBox4,
|
||||
remarkTextBox5, remarkTextBox6, remarkTextBox7, remarkTextBox8 };
|
||||
labels = new Label[] { label1, label2, label3, label4, label5, label6 };
|
||||
stateBoxes = new TextBox[] { textBox1, textBox2, textBox3, textBox4, textBox5, textBox6 };
|
||||
remarkBoxes = new TextBox[] { remarkTextBox1, remarkTextBox2, remarkTextBox3,
|
||||
remarkTextBox4, remarkTextBox5, remarkTextBox6 };
|
||||
textBoxesCount = stateBoxes.Length;
|
||||
this.WaterMetersCount = textBoxesCount;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
@@ -103,8 +103,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (WaterMetersCount < 4) groupBox4.Visible = false;
|
||||
if (WaterMetersCount < 5) groupBox5.Visible = false;
|
||||
if (WaterMetersCount < 6) groupBox6.Visible = false;
|
||||
if (WaterMetersCount < 7) groupBox7.Visible = false;
|
||||
if (WaterMetersCount < 8) groupBox8.Visible = false;
|
||||
|
||||
if (endStates)
|
||||
{
|
||||
@@ -114,8 +112,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (WaterMetersCount >= 4) wmStartStateTextBox4.Text = WMStartStateStr[3];
|
||||
if (WaterMetersCount >= 5) wmStartStateTextBox5.Text = WMStartStateStr[4];
|
||||
if (WaterMetersCount >= 6) wmStartStateTextBox6.Text = WMStartStateStr[5];
|
||||
if (WaterMetersCount >= 7) wmStartStateTextBox7.Text = WMStartStateStr[6];
|
||||
if (WaterMetersCount >= 8) wmStartStateTextBox8.Text = WMStartStateStr[7];
|
||||
|
||||
wmEndStateTextBox1.Enabled = (disabled.Length >= 1 && !disabled[0]);
|
||||
wmEndStateTextBox2.Enabled = (disabled.Length >= 2 && !disabled[1]);
|
||||
@@ -123,9 +119,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
wmEndStateTextBox4.Enabled = (disabled.Length >= 4 && !disabled[3]);
|
||||
wmEndStateTextBox5.Enabled = (disabled.Length >= 5 && !disabled[4]);
|
||||
wmEndStateTextBox6.Enabled = (disabled.Length >= 6 && !disabled[5]);
|
||||
wmEndStateTextBox7.Enabled = (disabled.Length >= 7 && !disabled[6]);
|
||||
wmEndStateTextBox8.Enabled = (disabled.Length >= 8 && !disabled[7]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wmStartStateTextBox1.Enabled = (disabled.Length >= 1 && !disabled[0]);
|
||||
@@ -134,9 +128,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
wmStartStateTextBox4.Enabled = (disabled.Length >= 4 && !disabled[3]);
|
||||
wmStartStateTextBox5.Enabled = (disabled.Length >= 5 && !disabled[4]);
|
||||
wmStartStateTextBox6.Enabled = (disabled.Length >= 6 && !disabled[5]);
|
||||
wmStartStateTextBox7.Enabled = (disabled.Length >= 7 && !disabled[6]);
|
||||
wmStartStateTextBox8.Enabled = (disabled.Length >= 8 && !disabled[7]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
@@ -149,8 +141,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
groupBox4.Text = Strings.Water_Meter + " 4";
|
||||
groupBox5.Text = Strings.Water_Meter + " 5";
|
||||
groupBox6.Text = Strings.Water_Meter + " 6";
|
||||
groupBox7.Text = Strings.Water_Meter + " 7";
|
||||
groupBox8.Text = Strings.Water_Meter + " 8";
|
||||
|
||||
wmStateLabel1.Text = Strings.WMState;
|
||||
wmStateLabel2.Text = Strings.WMState;
|
||||
@@ -158,8 +148,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
wmStateLabel4.Text = Strings.WMState;
|
||||
wmStateLabel5.Text = Strings.WMState;
|
||||
wmStateLabel6.Text = Strings.WMState;
|
||||
wmStateLabel7.Text = Strings.WMState;
|
||||
wmStateLabel8.Text = Strings.WMState;
|
||||
|
||||
startLabel.Text = Strings.Start;
|
||||
endLabel.Text = Strings.End;
|
||||
@@ -180,9 +168,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (wmEndStateTextBox4.Enabled && WaterMetersCount >= 4) WMEndState[3] = Utils.ParseUDouble(wmEndStateTextBox4.Text);
|
||||
if (wmEndStateTextBox5.Enabled && WaterMetersCount >= 5) WMEndState[4] = Utils.ParseUDouble(wmEndStateTextBox5.Text);
|
||||
if (wmEndStateTextBox6.Enabled && WaterMetersCount >= 6) WMEndState[5] = Utils.ParseUDouble(wmEndStateTextBox6.Text);
|
||||
if (wmEndStateTextBox7.Enabled && WaterMetersCount >= 7) WMEndState[6] = Utils.ParseUDouble(wmEndStateTextBox7.Text);
|
||||
if (wmEndStateTextBox8.Enabled && WaterMetersCount >= 8) WMEndState[7] = Utils.ParseUDouble(wmEndStateTextBox8.Text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wmStartStateTextBox1.Enabled && WaterMetersCount >= 1) { WMStartStateStr[0] = wmStartStateTextBox1.Text; WMStartState[0] = Utils.ParseUDouble(wmStartStateTextBox1.Text); }
|
||||
@@ -191,9 +177,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (wmStartStateTextBox4.Enabled && WaterMetersCount >= 4) { WMStartStateStr[3] = wmStartStateTextBox4.Text; WMStartState[3] = Utils.ParseUDouble(wmStartStateTextBox4.Text); }
|
||||
if (wmStartStateTextBox5.Enabled && WaterMetersCount >= 5) { WMStartStateStr[4] = wmStartStateTextBox5.Text; WMStartState[4] = Utils.ParseUDouble(wmStartStateTextBox5.Text); }
|
||||
if (wmStartStateTextBox6.Enabled && WaterMetersCount >= 6) { WMStartStateStr[5] = wmStartStateTextBox6.Text; WMStartState[5] = Utils.ParseUDouble(wmStartStateTextBox6.Text); }
|
||||
if (wmStartStateTextBox7.Enabled && WaterMetersCount >= 7) { WMStartStateStr[6] = wmStartStateTextBox5.Text; WMStartState[6] = Utils.ParseUDouble(wmStartStateTextBox7.Text); }
|
||||
if (wmStartStateTextBox8.Enabled && WaterMetersCount >= 8) { WMStartStateStr[7] = wmStartStateTextBox6.Text; WMStartState[7] = Utils.ParseUDouble(wmStartStateTextBox8.Text); }
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -308,153 +292,83 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
exclamation6.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(wmEndStateTextBox7.Text);
|
||||
double startState = Utils.ParseUDouble(wmStartStateTextBox7.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
private void wmStartStateTextBox1_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
exclamation7.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void wmStartStateTextBox2_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(wmEndStateTextBox8.Text);
|
||||
double startState = Utils.ParseUDouble(wmStartStateTextBox8.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
private void wmStartStateTextBox3_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
exclamation8.Visible = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
}
|
||||
private void wmStartStateTextBox4_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox1_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox7.Enabled) wmStartStateTextBox7.Focus();
|
||||
else if (wmStartStateTextBox8.Enabled) wmStartStateTextBox8.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
private void wmStartStateTextBox5_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox2_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox7.Enabled) wmStartStateTextBox7.Focus();
|
||||
else if (wmStartStateTextBox8.Enabled) wmStartStateTextBox8.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox3_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox7.Enabled) wmStartStateTextBox7.Focus();
|
||||
else if (wmStartStateTextBox8.Enabled) wmStartStateTextBox8.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox4_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox7.Enabled) wmStartStateTextBox7.Focus();
|
||||
else if (wmStartStateTextBox8.Enabled) wmStartStateTextBox8.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox5_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox7.Enabled) wmStartStateTextBox7.Focus();
|
||||
else if (wmStartStateTextBox8.Enabled) wmStartStateTextBox8.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox6_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox7.Enabled) wmStartStateTextBox7.Focus();
|
||||
else if (wmStartStateTextBox8.Enabled) wmStartStateTextBox8.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox7_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox8.Enabled) wmStartStateTextBox8.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox8_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox7.Enabled) wmStartStateTextBox7.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
private void wmStartStateTextBox6_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox1_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
@@ -465,9 +379,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox7.Enabled) wmEndStateTextBox7.Focus();
|
||||
else if (wmEndStateTextBox8.Enabled) wmEndStateTextBox8.Focus();
|
||||
}
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
@@ -479,9 +391,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox7.Enabled) wmEndStateTextBox7.Focus();
|
||||
else if (wmEndStateTextBox8.Enabled) wmEndStateTextBox8.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
@@ -493,9 +403,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox7.Enabled) wmEndStateTextBox7.Focus();
|
||||
else if (wmEndStateTextBox8.Enabled) wmEndStateTextBox8.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
@@ -507,9 +415,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
{
|
||||
if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox7.Enabled) wmEndStateTextBox7.Focus();
|
||||
else if (wmEndStateTextBox8.Enabled) wmEndStateTextBox8.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
}
|
||||
@@ -521,9 +427,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox7.Enabled) wmEndStateTextBox7.Focus();
|
||||
else if (wmEndStateTextBox8.Enabled) wmEndStateTextBox8.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
@@ -535,45 +439,13 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox7.Enabled) wmEndStateTextBox7.Focus();
|
||||
else if (wmEndStateTextBox8.Enabled) wmEndStateTextBox8.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox7_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox8.Enabled) wmEndStateTextBox8.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox8_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox7.Enabled) wmEndStateTextBox7.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+438
-576
File diff suppressed because it is too large
Load Diff
@@ -471,20 +471,17 @@ namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
///
|
||||
void UpdateExclamation(int uiCtrlPos) /// uiCtrlPos = 0 .. TextBoxesCount-1
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Text;
|
||||
@@ -43,9 +43,7 @@ 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 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 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-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -28,8 +28,6 @@ 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,13 +50,6 @@ 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,6 +22,8 @@ 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,66 +28,22 @@ namespace TBF.BenchControl.Elde.FlowMeterDewa
|
||||
public double NominalFlow { get { return nominalFlow; } }
|
||||
public double LtrPerPulse { get { return ltrPerPulse; } }
|
||||
|
||||
double[] refFreq; /// 0..sum, 1..I11, 2..I12, 3..I13
|
||||
int[] refPulses;
|
||||
double[] refFreq;
|
||||
|
||||
public double LtrPerPulseCorrected(double flow, int rangeIx)
|
||||
{
|
||||
log.DebugFormat("LtrPerPulseCorrected({0}, {1}) started", flow, rangeIx);
|
||||
if (flow < 0.1 * NominalFlow) return LtrPerPulse; /// No correction for small flow
|
||||
|
||||
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];
|
||||
|
||||
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;
|
||||
}
|
||||
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];
|
||||
}
|
||||
|
||||
|
||||
@@ -100,9 +56,7 @@ 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)
|
||||
@@ -126,7 +80,6 @@ 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,6 +22,8 @@ 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-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using Dirichlet.Numerics;
|
||||
@@ -11,9 +11,7 @@ namespace TBF.BenchControl.Elde
|
||||
StatusP StatusP { get; }
|
||||
int EtPulses(int wmNr1);
|
||||
int EtPulsesK { get; }
|
||||
int EtPulses2 { get; }
|
||||
int EtPulses3 { get; }
|
||||
UInt16 WMeterPulses(int wmNr1);
|
||||
UInt16 WMeterPulses(int wmNr1);
|
||||
int WMeterReference(int wmNr0);
|
||||
uint RegulValveDAC(int rvNr0);
|
||||
float Pressure(int prsNr0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace TBF.BenchControl.Generic
|
||||
|
||||
IList<Config.Entities.MeasurementCorrection> Corrections { get; set; }
|
||||
|
||||
IList<Config.Entities.Uncertainty> Uncertainties { get; set; }
|
||||
|
||||
void StartChangeHandler();
|
||||
|
||||
void StopChangeHandler();
|
||||
|
||||
@@ -43,6 +43,11 @@ namespace TBF.BenchControl.Generic
|
||||
/// </summary>
|
||||
IList<Config.Entities.MeasurementCorrection> Corrections { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Measurement correction values
|
||||
/// </summary>
|
||||
IList<Config.Entities.Uncertainty> Uncertainties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new database entity 'Component' from the parameters
|
||||
/// </summary>
|
||||
|
||||
@@ -19,6 +19,5 @@ namespace TBF.BenchControl.GenericDevices
|
||||
string Address4 { get; }
|
||||
string Address5 { get; }
|
||||
RemoteDBUse RemoteDBUse { get; }
|
||||
int FlowAdjustmentTimeout { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
this.GetType().Namespace.Substring(17),
|
||||
CameraCfg.Name,
|
||||
CameraCfg.HardwareAddress,
|
||||
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));
|
||||
ipAddress == null ? "not detected" : ipAddress.ToString(),
|
||||
string.IsNullOrEmpty(cpuSerialNr) ? "not detected" : cpuSerialNr,
|
||||
string.IsNullOrEmpty(sdCardVer) ? "not detected" : sdCardVer);
|
||||
}
|
||||
|
||||
|
||||
@@ -161,16 +161,13 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
{
|
||||
cameraIdx = GetCameraIdx();
|
||||
|
||||
if (CameraCfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
UiBridge.Bridge.OnCameraInfo(this.cameraIdx, string.Format("{0} s/n {1} si simulated", Name, CameraCfg.HardwareAddress));
|
||||
return;
|
||||
}
|
||||
if (CameraCfg.DebugLevel == DebugMode.Simulate) 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;
|
||||
@@ -222,55 +219,46 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
|
||||
public void StopDevice()
|
||||
{
|
||||
if ((CameraCfg.DebugLevel != DebugMode.Simulate) && (CameraCfg.DebugLevel != DebugMode.DetectedOff))
|
||||
{
|
||||
running = false;
|
||||
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 ((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 (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 ((CameraCfg.DebugLevel != DebugMode.Simulate) && (CameraCfg.DebugLevel != DebugMode.DetectedOff))
|
||||
{
|
||||
if (sha1sumResponse != null && !sha1sumResponseProcessed)
|
||||
{
|
||||
scpThread = new Thread(new ThreadStart(ScpWorker));
|
||||
scpThread.Start();
|
||||
|
||||
sha1sumResponseProcessed = true;
|
||||
}
|
||||
if (sha1sumResponse != null && !sha1sumResponseProcessed)
|
||||
{
|
||||
scpThread = new Thread(new ThreadStart(ScpWorker));
|
||||
scpThread.Start();
|
||||
|
||||
sha1sumResponseProcessed = true;
|
||||
}
|
||||
}
|
||||
public void RunDeviceAfter() { }
|
||||
|
||||
@@ -50,13 +50,10 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
grabImageCommandSent = false;
|
||||
transferringGrabbedImage = false;
|
||||
|
||||
if (camera.DebugLevel == DebugMode.Normal || camera.DebugLevel == DebugMode.DetectedOn)
|
||||
{
|
||||
telnet.promptReceivedHandler += delegate(object sndr, PromptReceivedEventArgs a)
|
||||
{
|
||||
OnPromptReceived(sndr, a);
|
||||
};
|
||||
}
|
||||
telnet.promptReceivedHandler += delegate(object sndr, PromptReceivedEventArgs a)
|
||||
{
|
||||
OnPromptReceived(sndr, a);
|
||||
};
|
||||
}
|
||||
|
||||
void OnPromptReceived(object sndr, PromptReceivedEventArgs a)
|
||||
@@ -68,58 +65,33 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return;
|
||||
|
||||
grabImageCommandSent = false;
|
||||
transferringGrabbedImage = false;
|
||||
|
||||
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]);
|
||||
}
|
||||
}
|
||||
if (File.Exists(imgFileNames[0])) File.Delete(imgFileNames[0]);
|
||||
}
|
||||
|
||||
public Event Run()
|
||||
{
|
||||
if ((imgFileNames == null) || (imgFileNames.Length < 1) || (imgFileNames[0] == null))
|
||||
if (camera.CameraCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return Event.None;
|
||||
|
||||
if (imgFileNames.Length < 1 || imgFileNames[0] == null)
|
||||
{
|
||||
///
|
||||
/// No images to be grabbed => Done
|
||||
///
|
||||
return Event.GrabPassed;
|
||||
return Event.GrabPassed;
|
||||
}
|
||||
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)
|
||||
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 a command
|
||||
///
|
||||
//
|
||||
// Prepare command
|
||||
//
|
||||
int rotation = 0;
|
||||
if (imageRotation == ImageRotation.Deg90)
|
||||
rotation = 90;
|
||||
@@ -147,10 +119,7 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
}
|
||||
else if (grabPassed)
|
||||
{
|
||||
///
|
||||
/// Normal operation, grab passed => transfer/transferring the image
|
||||
///
|
||||
if (transferringGrabbedImage)
|
||||
if (transferringGrabbedImage)
|
||||
{
|
||||
/// Grab passed and image transfer is in progress
|
||||
return Event.GrabPassed;
|
||||
@@ -169,17 +138,12 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
}
|
||||
else if (grabFailed)
|
||||
{
|
||||
///
|
||||
/// Normal operation, grab failed => there in no image to transfer
|
||||
///
|
||||
/// Grab failed, there in no image to transfer
|
||||
return Event.GrabFailed;
|
||||
}
|
||||
else if (response != null)
|
||||
{
|
||||
///
|
||||
/// Normal operation
|
||||
///
|
||||
if (response.Contains("completed"))
|
||||
if (response.Contains("completed"))
|
||||
{
|
||||
grabPassed = true;
|
||||
|
||||
|
||||
@@ -127,11 +127,17 @@ namespace TBF.BenchControl.Network.Camera.RoiForFixedStart
|
||||
|
||||
public IOperation GrabImageOp(string imageFileName)
|
||||
{
|
||||
return GrabImageOp(imageFileName, roiCfg.BlackAndWhite, roiCfg.LowResolution, roiCfg.ImageRotation);
|
||||
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;
|
||||
}
|
||||
|
||||
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,11 +149,7 @@ 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;
|
||||
@@ -224,13 +220,6 @@ 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>
|
||||
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)
|
||||
IList<SensusTestInfo> GetOracleTestInfo(OracleConnection conn, int wmTypeId, out int wmTypeRevision)
|
||||
{
|
||||
///
|
||||
/// Read 'incomplete' TestInfo from Oracle database containing only flowId-s ad qBezeichnung-s
|
||||
@@ -147,15 +147,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// For a given 'wmTypeId' find the most recent active 'wmTypeRevision'
|
||||
///
|
||||
wmTypeRevision = -1;
|
||||
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);
|
||||
OracleCommand cmd = new OracleCommand("select REV_WZTYP 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
|
||||
///
|
||||
@@ -163,19 +155,12 @@ 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, 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 = new OracleCommand("select PruefungsNr, PosFehlerKalt, 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
|
||||
///
|
||||
@@ -183,19 +168,9 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
while (dr.Read())
|
||||
{
|
||||
int pruefungsNr = dr.GetInt32(0);
|
||||
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));
|
||||
double errLimHi = dr.GetDouble(1);
|
||||
string qBezeichnung = dr.GetString(2);
|
||||
oraDbTinfos.Add(new SensusTestInfo(null, pruefungsNr, qBezeichnung, 0, null, 0, null, Range.Undefined));
|
||||
}
|
||||
dr.Close();
|
||||
|
||||
@@ -381,14 +356,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// Currnet test info. is not walid => Get a new one from Oracle and SensusTestInfo table
|
||||
///
|
||||
int 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);
|
||||
IList<SensusTestInfo> rti = GetOracleTestInfo(conn, wm.WaterMeterData.WMTypeId, out wmTR);
|
||||
|
||||
if (rti != null)
|
||||
{
|
||||
@@ -753,14 +721,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
if ((oracleTestInfo == null) || (wmTypeId != b.WaterMeters[0].WaterMeterData.WMTypeId) || (wmTypeRevision == 0) || (procedureSignature != procedureSignatureSB.ToString()))
|
||||
{
|
||||
int wmTR = 0;
|
||||
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);
|
||||
IList<SensusTestInfo> ti = GetOracleTestInfo(conn, b.WaterMeters[0].WaterMeterData.WMTypeId, out wmTR);
|
||||
|
||||
if (ti != null)
|
||||
{
|
||||
|
||||
@@ -296,15 +296,12 @@ 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]);
|
||||
}
|
||||
|
||||
@@ -389,9 +386,7 @@ 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
|
||||
}
|
||||
@@ -418,9 +413,7 @@ 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
|
||||
}
|
||||
@@ -466,9 +459,7 @@ 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,13 +49,6 @@ 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;
|
||||
@@ -66,30 +59,6 @@ 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,10 +488,7 @@ 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"));
|
||||
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"));
|
||||
}
|
||||
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)
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Boxes;
|
||||
@@ -10,22 +7,13 @@ namespace TBF.BenchControl.Sequences
|
||||
{
|
||||
public class ProcessData
|
||||
{
|
||||
///
|
||||
/// References to components initialized on StateMachine start-up
|
||||
///
|
||||
public static IBackupAndSecurity BackupAndSecurity;
|
||||
public static IBenchInfo BenchInfo;
|
||||
public static IErrorFlags ErrorFlagsComp;
|
||||
public static Output.DB.SensusOracle.Database OracleDB;
|
||||
|
||||
public static IList<Output.SensusTestInfo> RawTestInfos; /// Incomplete raw test infos from Oracle DB
|
||||
public static Output.SensusTestInfo[] CompleteTestInfos; /// Complete TBF test infos obtained as a best mathch
|
||||
|
||||
///
|
||||
/// Safe wrappers
|
||||
///
|
||||
public int FlowAdjustmentTimeout { get { return BenchInfo != null ? BenchInfo.FlowAdjustmentTimeout : 300; } }
|
||||
|
||||
public static FloatBox AmbTemp = new FloatBox() { Name = "Ambient Temperature", Format = "F1" }; /// [Celsius]
|
||||
public static FloatBox AmbPress = new FloatBox() { Name = "Ambient Pressure", Format = "F0", Factor = 1000 }; /// [bar], printed by ToString() in [mbar]
|
||||
public static FloatBox AmbHumi = new FloatBox() { Name = "Ambient Humidity", Format = "F1" }; /// [%]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -28,6 +28,7 @@ namespace TBF.BenchControl.Sequences
|
||||
protected static readonly ILog summaryResults = LogManager.GetLogger("SummaryResults");
|
||||
|
||||
|
||||
public const int FlowSettingTimeoutSec = 300; /// Flow setting timeout = 5 min.
|
||||
public const int StableMassMsrmntTimeoutSec = 300; /// Stable mass measurement timeout = 5 min.
|
||||
public const int CountWhenSendingRdDivCmd = 1; /// Passed to cBrd.ReadDiverterTransitionOp()
|
||||
public const int CountWhenReadingDiv = 3; /// Passed to cBrd.ReadDiverterTransitionOp()
|
||||
|
||||
@@ -56,7 +56,6 @@ 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());
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -244,7 +244,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(outPath.RegulValve.SetFlowAndMeasureOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout, (float)test.TolerRed))
|
||||
.AddOperation(outPath.RegulValve.SetFlowAndMeasureOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -449,7 +449,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -471,7 +471,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, qfrom_detected, qto_detected, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, qfrom_detected, qto_detected, RefFlow, FlowSettingTimeoutSec))
|
||||
//.AddOp(pOut.RegulValve.SetPositionOp(35.0f, 38.0f, uint.MaxValue))
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
|
||||
//------------------------------------------------
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperations(readTempPressOps)
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
///
|
||||
/// 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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
///
|
||||
/// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
///
|
||||
/// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
State.Create("FixedStartAdvanced : Setting the flow")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
+1
-1
@@ -350,7 +350,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
+1
-1
@@ -332,7 +332,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
+1
-1
@@ -270,7 +270,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
+1
-1
@@ -299,7 +299,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
+1
-1
@@ -312,7 +312,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.EnterState();
|
||||
do {
|
||||
|
||||
+1
-1
@@ -300,7 +300,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
//------------------------------------------------
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.EnterState();
|
||||
|
||||
+1
-1
@@ -292,7 +292,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
//------------------------------------------------
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.EnterState();
|
||||
|
||||
+1
-1
@@ -231,7 +231,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection
|
||||
State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout))
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(outPath.RegulValve.SetFlowAndMeasureOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowAdjustmentTimeout, (float)test.TolerRed))
|
||||
.AddOperation(outPath.RegulValve.SetFlowAndMeasureOp(outPath.FlowMeter, test.Qfrom, test.Qto, RefFlow, FlowSettingTimeoutSec, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
+19
-5
@@ -107,11 +107,6 @@ namespace TBF
|
||||
public int PathsDlgWidth;
|
||||
public int PathsDlgHeight;
|
||||
|
||||
/// iPerlCommunicationsForm
|
||||
public int iPerlCommunicationsFormLeft;
|
||||
public int iPerlCommunicationsFormTop;
|
||||
public long iPerlCommunicationsFormCheckboxes;
|
||||
|
||||
[XmlArrayAttribute("FeedingColumnWidths")]
|
||||
public int[] FeedingColumnWidths;
|
||||
[XmlIgnore]
|
||||
@@ -156,6 +151,20 @@ namespace TBF
|
||||
public int MetrologyDlgWidth;
|
||||
public int MetrologyDlgHeight;
|
||||
|
||||
/// Conditions
|
||||
public bool ConditionsDlgMaximized;
|
||||
public int ConditionsDlgLeft;
|
||||
public int ConditionsDlgTop;
|
||||
public int ConditionsDlgWidth;
|
||||
public int ConditionsDlgHeight;
|
||||
|
||||
/// Uncertainty
|
||||
public bool UncertaintyDlgMaximized;
|
||||
public int UncertaintyDlgLeft;
|
||||
public int UncertaintyDlgTop;
|
||||
public int UncertaintyDlgWidth;
|
||||
public int UncertaintyDlgHeight;
|
||||
|
||||
|
||||
/// Procedures
|
||||
public bool ProceduresDlgMaximized;
|
||||
@@ -190,6 +199,11 @@ namespace TBF
|
||||
public int EnduranceDlgWidth;
|
||||
public int EnduranceDlgHeight;
|
||||
|
||||
/// iPerlCommunicationsForm
|
||||
public int iPerlCommunicationsFormLeft;
|
||||
public int iPerlCommunicationsFormTop;
|
||||
public long iPerlCommunicationsFormCheckboxes;
|
||||
|
||||
/// Serial numbers
|
||||
public string[] LastSNTexts;
|
||||
[XmlIgnore]
|
||||
|
||||
Binary file not shown.
|
Before 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 - 2022 Sensus Slovensko, a.s.")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2019 Sensus Slovensko, a.s.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.18.1989.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1989.0")]
|
||||
[assembly: AssemblyVersion("2.24.1315.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1315.0")]
|
||||
|
||||
Generated
-18
@@ -1338,15 +1338,6 @@ 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>
|
||||
@@ -5562,15 +5553,6 @@ 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,10 +1488,4 @@
|
||||
<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,10 +2062,4 @@
|
||||
<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>
|
||||
+24
-29
@@ -39,7 +39,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;MUNICH;CAMERA</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</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;BADGER_STREDNA_TRAT;LANG_CS</DefineConstants>
|
||||
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -97,9 +97,8 @@
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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 Include="ControlComponent3Munich">
|
||||
<HintPath>..\packages\ControlBoard\Munich\ControlComponent3Munich.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
@@ -1121,9 +1120,6 @@
|
||||
<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" />
|
||||
@@ -1991,6 +1987,12 @@
|
||||
<Compile Include="UI\Bench\Components\SelectComponentClassDlg.designer.cs">
|
||||
<DependentUpon>SelectComponentClassDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Bench\Conditions\ConditionsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Bench\Conditions\ConditionsDlg.designer.cs">
|
||||
<DependentUpon>ConditionsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Bench\Metrology\IMetrologyDlgTab.cs" />
|
||||
<Compile Include="UI\Bench\Metrology\MetrologyDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -2085,6 +2087,12 @@
|
||||
<Compile Include="UI\Bench\Transitions\VirtualBenchStepsCtrl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Bench\Uncertainties\UncertaintiesDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Bench\Uncertainties\UncertaintiesDlg.designer.cs">
|
||||
<DependentUpon>UncertaintiesDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Camera\CameraPictureCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@@ -2168,12 +2176,6 @@
|
||||
<Compile Include="UI\Procedures\TestParamsCtrl.designer.cs">
|
||||
<DependentUpon>TestParamsCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<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>
|
||||
@@ -2192,12 +2194,6 @@
|
||||
<Compile Include="UI\Procedures\TestWizard\MethodSelection.designer.cs">
|
||||
<DependentUpon>MethodSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<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>
|
||||
@@ -3026,6 +3022,9 @@
|
||||
<EmbeddedResource Include="UI\Bench\Components\SelectComponentClassDlg.resx">
|
||||
<DependentUpon>SelectComponentClassDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Bench\Conditions\ConditionsDlg.resx">
|
||||
<DependentUpon>ConditionsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Bench\Metrology\MetrologyDlg.resx">
|
||||
<DependentUpon>MetrologyDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -3062,6 +3061,9 @@
|
||||
<EmbeddedResource Include="UI\Bench\Transitions\TransitionsDlg.resx">
|
||||
<DependentUpon>TransitionsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Bench\Uncertainties\UncertaintiesDlg.resx">
|
||||
<DependentUpon>UncertaintiesDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Camera\CameraPictureCtrl.resx">
|
||||
<DependentUpon>CameraPictureCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -3119,9 +3121,6 @@
|
||||
<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>
|
||||
@@ -3131,9 +3130,6 @@
|
||||
<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>
|
||||
@@ -3318,7 +3314,6 @@
|
||||
<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" />
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.UI.Bench.Conditions
|
||||
{
|
||||
partial class ConditionsDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConditionsDlg));
|
||||
this.mainSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.tabControl = new System.Windows.Forms.TabControl();
|
||||
this.sharedButtons = new TBF.UI.Shared.SharedButtons();
|
||||
((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).BeginInit();
|
||||
this.mainSplitContainer.Panel1.SuspendLayout();
|
||||
this.mainSplitContainer.Panel2.SuspendLayout();
|
||||
this.mainSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// mainSplitContainer
|
||||
//
|
||||
resources.ApplyResources(this.mainSplitContainer, "mainSplitContainer");
|
||||
this.mainSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.mainSplitContainer.Name = "mainSplitContainer";
|
||||
//
|
||||
// mainSplitContainer.Panel1
|
||||
//
|
||||
this.mainSplitContainer.Panel1.Controls.Add(this.tabControl);
|
||||
//
|
||||
// mainSplitContainer.Panel2
|
||||
//
|
||||
this.mainSplitContainer.Panel2.Controls.Add(this.sharedButtons);
|
||||
//
|
||||
// tabControl
|
||||
//
|
||||
resources.ApplyResources(this.tabControl, "tabControl");
|
||||
this.tabControl.Name = "tabControl";
|
||||
this.tabControl.SelectedIndex = 0;
|
||||
this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged);
|
||||
//
|
||||
// sharedButtons
|
||||
//
|
||||
resources.ApplyResources(this.sharedButtons, "sharedButtons");
|
||||
this.sharedButtons.Name = "sharedButtons";
|
||||
//
|
||||
// ConditionsDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.mainSplitContainer);
|
||||
this.Name = "ConditionsDlg";
|
||||
this.Load += new System.EventHandler(this.TransitionsDlg_Load);
|
||||
this.mainSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.mainSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).EndInit();
|
||||
this.mainSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer mainSplitContainer;
|
||||
private System.Windows.Forms.TabControl tabControl;
|
||||
private TBF.UI.Shared.SharedButtons sharedButtons;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,707 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Config.Entities;
|
||||
using Results.Forms;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
using TBF.UI.Shared;
|
||||
using TBF.UI.Bench.Transitions; /// TODO: Remove
|
||||
|
||||
namespace TBF.UI.Bench.Conditions
|
||||
{
|
||||
public partial class ConditionsDlg : Form, IParentOfListViewEx
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(ConditionsDlg));
|
||||
|
||||
/// Used when re-scaling the dialog: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi
|
||||
public readonly int Dpi;
|
||||
public const int Dpi100pct = 96;
|
||||
|
||||
/// <summary>
|
||||
/// Fluent-NHibernate database session
|
||||
/// </summary>
|
||||
public ISession Session;
|
||||
|
||||
IList<Procedure> procedures;
|
||||
IList<Test> tests;
|
||||
|
||||
Dictionary<string, string> renameInfo; /// Pairs original name / new name
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Transition sequences to be updated by this dialog.
|
||||
/// Set by the constructor or updated by the parent after creation and before loading.
|
||||
/// </summary>
|
||||
public IList<TransitionSequence> TransitionSequences;
|
||||
public IList<TransitionSequence> RemovedTransitionSequences;
|
||||
|
||||
/// <summary>
|
||||
/// Virtual bench sequences to be updated by this dialog.
|
||||
/// Set by the constructor or updated by the parent after creation and before loading.
|
||||
/// </summary>
|
||||
public IList<VirtualBenchSequence> VirtualBenchSequences;
|
||||
public IList<VirtualBenchSequence> RemovedVirtualBenchSequences;
|
||||
|
||||
|
||||
/// Auxiliary public lists used also by user controls in tab pages
|
||||
public IList<BenchControl.Generic.IComponent> TbfComponents;
|
||||
public IList<IValve> Valves;
|
||||
public IList<IRegulValve> RegulValves;
|
||||
|
||||
|
||||
IList<ITabWithListViewEx> seqStepsCtrls;
|
||||
|
||||
|
||||
public ConditionsDlg()
|
||||
{
|
||||
/// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi.
|
||||
Dpi = (int)this.CreateGraphics().DpiX;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.Metrologists };
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
|
||||
SharedButtons.Buttons.Export | SharedButtons.Buttons.Import |
|
||||
SharedButtons.Buttons.Compare | SharedButtons.Buttons.NewTab |
|
||||
SharedButtons.Buttons.RenameTab | SharedButtons.Buttons.RemoveTab;
|
||||
sharedButtons.Unlocked += Unlocked;
|
||||
sharedButtons.OKClicked += okButton_Click;
|
||||
sharedButtons.CancelClicked += cancelButton_Click;
|
||||
sharedButtons.AddClicked += addButton_Click;
|
||||
sharedButtons.RemoveClicked += removeButton_Click;
|
||||
sharedButtons.UpClicked += upButton_Click;
|
||||
sharedButtons.DownClicked += downButton_Click;
|
||||
sharedButtons.ExportClicked += exportButton_Click;
|
||||
sharedButtons.ImportClicked += importButton_Click;
|
||||
sharedButtons.CompareClicked += compareButton_Click;
|
||||
sharedButtons.NewTabClicked += newTabButton_Click;
|
||||
sharedButtons.RenameTabClicked += renameTabButton_Click;
|
||||
sharedButtons.RemoveTabClicked += removeTabButton_Click;
|
||||
|
||||
seqStepsCtrls = new List<ITabWithListViewEx>();
|
||||
|
||||
/// Open the database
|
||||
Session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
|
||||
/// 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>();
|
||||
foreach (var cmpnt in TbfComponents)
|
||||
{
|
||||
if ((cmpnt is IRegulValve) && !(cmpnt is BenchControl.Elde.RegulValveTandem.RegulValveTandem))
|
||||
{
|
||||
RegulValves.Add(cmpnt as IRegulValve);
|
||||
}
|
||||
}
|
||||
|
||||
/// Load the sequences
|
||||
/// Note: Each sequence (in both sequences together) has a unique ItemNr (0 .. N-1)
|
||||
TransitionSequences = Session.QueryOver<TransitionSequence>().OrderBy(x => x.ItemNr).Asc.List();
|
||||
VirtualBenchSequences = Session.QueryOver<VirtualBenchSequence>().OrderBy(x => x.ItemNr).Asc.List();
|
||||
procedures = Session.QueryOver<Procedure>().List();
|
||||
tests = Session.QueryOver<Test>().List();
|
||||
|
||||
RemovedTransitionSequences = new List<TransitionSequence>();
|
||||
RemovedVirtualBenchSequences = new List<VirtualBenchSequence>();
|
||||
|
||||
/// Create a tab with sequence steps for each sequence ordered by ItemNr.
|
||||
foreach (var transSeq in TransitionSequences)
|
||||
{
|
||||
transSeq.OriName = transSeq.Name;
|
||||
AddTransitionSeqTab(transSeq);
|
||||
}
|
||||
|
||||
foreach (var vBenchSeq in VirtualBenchSequences)
|
||||
{
|
||||
vBenchSeq.OriName = vBenchSeq.Name;
|
||||
AddVirtualBenchSeqTab(vBenchSeq);
|
||||
}
|
||||
}
|
||||
|
||||
void AddTransitionSeqTab(TransitionSequence sequence)
|
||||
{
|
||||
//TabPage nwTab = new TabPage(sequence.Name);
|
||||
//nwTab.Tag = sequence;
|
||||
//TransitionStepsCtrl newCtrl = new TransitionStepsCtrl();
|
||||
//seqStepsCtrls.Add(newCtrl);
|
||||
//nwTab.Controls.Add(newCtrl);
|
||||
//tabControl.TabPages.Add(nwTab);
|
||||
//newCtrl.Initialize(sequence, this, tabControl.TabPages[tabControl.TabPages.Count - 1]);
|
||||
//newCtrl.SelectedIndexChanged += new System.EventHandler(SelectedIndexChanged);
|
||||
}
|
||||
|
||||
void AddVirtualBenchSeqTab(VirtualBenchSequence sequence)
|
||||
{
|
||||
//TabPage nwTab = new TabPage(sequence.Name);
|
||||
//nwTab.Tag = sequence;
|
||||
//VirtualBenchStepsCtrl newCtrl = new VirtualBenchStepsCtrl();
|
||||
//seqStepsCtrls.Add(newCtrl);
|
||||
//nwTab.Controls.Add(newCtrl);
|
||||
//tabControl.TabPages.Add(nwTab);
|
||||
//newCtrl.Initialize(sequence, this, tabControl.TabPages[tabControl.TabPages.Count - 1]);
|
||||
//newCtrl.SelectedIndexChanged += new System.EventHandler(SelectedIndexChanged);
|
||||
}
|
||||
|
||||
private void TransitionsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
LoadUISettings();
|
||||
|
||||
/// Now refresh the content of the dialog
|
||||
RefreshAllTabs();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Conditions;
|
||||
}
|
||||
|
||||
void RefreshAllTabs()
|
||||
{
|
||||
foreach (var ctrl in seqStepsCtrls) (ctrl as ListViewEx).Refresh();
|
||||
}
|
||||
|
||||
private void Unlocked(object sender, EventArgs e)
|
||||
{
|
||||
foreach (var ctrl in seqStepsCtrls) ctrl.Unlock();
|
||||
}
|
||||
|
||||
|
||||
private void newTabButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TabNameDlg dlg;
|
||||
bool nameUsed;
|
||||
int tabId = TransitionSequences.Count + VirtualBenchSequences.Count;
|
||||
|
||||
do
|
||||
{
|
||||
/// Find an unused procedure name
|
||||
string newName;
|
||||
for (int nameId = 1; true; nameId++)
|
||||
{
|
||||
newName = "Tr" + nameId.ToString();
|
||||
nameUsed = false;
|
||||
foreach (var seq in TransitionSequences) if (seq.Name.Equals(newName)) nameUsed = true;
|
||||
if (!nameUsed) break;
|
||||
}
|
||||
|
||||
dlg = new TabNameDlg();
|
||||
dlg.TabNameLabel = Strings.New_transition_name;
|
||||
dlg.TabName = newName;
|
||||
|
||||
if (DialogResult.OK != dlg.ShowDialog()) return;
|
||||
|
||||
foreach (var seq in TransitionSequences) if (seq.Name.Equals(dlg.TabName)) nameUsed = true;
|
||||
if (nameUsed) MessageBox.Show(Strings.Please_choose_another_transition_sequence_name,
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
while (nameUsed);
|
||||
|
||||
if (dlg.IsVirtualBenchSeq)
|
||||
{
|
||||
VirtualBenchSequence sequence = new VirtualBenchSequence(dlg.TabName, tabId);
|
||||
VirtualBenchSequences.Add(sequence);
|
||||
AddVirtualBenchSeqTab(sequence);
|
||||
seqStepsCtrls[tabId].Unlock();
|
||||
}
|
||||
else
|
||||
{
|
||||
TransitionSequence sequence = new TransitionSequence(dlg.TabName, tabId);
|
||||
TransitionSequences.Add(sequence);
|
||||
AddTransitionSeqTab(sequence);
|
||||
seqStepsCtrls[tabId].Unlock();
|
||||
}
|
||||
tabControl.SelectTab(tabId);
|
||||
}
|
||||
|
||||
private void renameTabButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TabPage tabPage = tabControl.SelectedTab;
|
||||
TransitionSequence transitionSeq = tabPage.Tag as TransitionSequence;
|
||||
VirtualBenchSequence virtualBenchSeq = tabPage.Tag as VirtualBenchSequence;
|
||||
|
||||
TabNameDlg dlg = new TabNameDlg(true);
|
||||
dlg.TabNameLabel = Strings.New_transition_name;
|
||||
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
bool nameUsed = false;
|
||||
foreach (var seq in TransitionSequences) if (seq != transitionSeq && seq.Name == dlg.TabName) nameUsed = true;
|
||||
foreach (var seq in VirtualBenchSequences) if (seq != virtualBenchSeq && seq.Name == dlg.TabName) nameUsed = true;
|
||||
|
||||
if (nameUsed)
|
||||
{
|
||||
MessageBox.Show(Strings.Please_choose_another_transition_sequence_name,
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (transitionSeq != null)
|
||||
{
|
||||
transitionSeq.Name = dlg.TabName;
|
||||
tabPage.Text = dlg.TabName;
|
||||
}
|
||||
else if (virtualBenchSeq != null)
|
||||
{
|
||||
virtualBenchSeq.Name = dlg.TabName;
|
||||
tabPage.Text = dlg.TabName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void removeTabButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TabPage tabPage = tabControl.SelectedTab;
|
||||
TransitionSequence transitionSeq = tabPage.Tag as TransitionSequence;
|
||||
VirtualBenchSequence virtualBenchSeq = tabPage.Tag as VirtualBenchSequence;
|
||||
|
||||
if (DialogResult.Yes == MessageBox.Show(string.Format(Strings.Do_you_really_want_to_delete_sequence_0, tabPage.Text),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Question))
|
||||
{
|
||||
if (transitionSeq != null)
|
||||
{
|
||||
RemovedTransitionSequences.Add(transitionSeq);
|
||||
TransitionSequences.Remove(transitionSeq);
|
||||
tabControl.TabPages.Remove(tabPage);
|
||||
}
|
||||
else if (virtualBenchSeq != null)
|
||||
{
|
||||
RemovedVirtualBenchSequences.Add(virtualBenchSeq);
|
||||
VirtualBenchSequences.Remove(virtualBenchSeq);
|
||||
tabControl.TabPages.Remove(tabPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RetrieveData()
|
||||
{
|
||||
if (seqStepsCtrls.Count > slctdTab) seqStepsCtrls[slctdTab].OkBtnClicked();
|
||||
}
|
||||
|
||||
string GetWarningsBeforeSaving(ref Dictionary<string, string> renmInfo)
|
||||
{
|
||||
string warnings = string.Empty;
|
||||
renmInfo = new Dictionary<string, string>();
|
||||
|
||||
foreach (var seq in RemovedTransitionSequences)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(seq.OriName))
|
||||
{
|
||||
int occurances = 0;
|
||||
foreach (var test in tests)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(test.RelTransBefore) && test.RelTransBefore == seq.OriName) occurances++;
|
||||
if (!string.IsNullOrEmpty(test.TransitionAfter) && test.TransitionAfter == seq.OriName) occurances++;
|
||||
}
|
||||
foreach (var proc in procedures)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(proc.TransitionStart) && proc.TransitionStart == seq.OriName) occurances++;
|
||||
if (!string.IsNullOrEmpty(proc.TransitionEnd) && proc.TransitionEnd == seq.OriName) occurances++;
|
||||
}
|
||||
if (occurances > 0)
|
||||
{
|
||||
warnings += string.Format("Deleting transition sequence {0} used in {1} tests and procedures{2}", seq.OriName, occurances, Environment.NewLine);
|
||||
renmInfo.Add(seq.OriName, string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var seq in RemovedVirtualBenchSequences)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(seq.OriName))
|
||||
{
|
||||
int occurances = 0;
|
||||
foreach (var test in tests)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(test.RelTransBefore) && test.RelTransBefore == seq.OriName) occurances++;
|
||||
if (!string.IsNullOrEmpty(test.TransitionAfter) && test.TransitionAfter == seq.OriName) occurances++;
|
||||
}
|
||||
foreach (var proc in procedures)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(proc.TransitionStart) && proc.TransitionStart == seq.OriName) occurances++;
|
||||
if (!string.IsNullOrEmpty(proc.TransitionEnd) && proc.TransitionEnd == seq.OriName) occurances++;
|
||||
}
|
||||
if (occurances > 0)
|
||||
{
|
||||
warnings += string.Format("Deleting virtual bench sequence {0} used in {1} tests and procedures{2}", seq.OriName, occurances, Environment.NewLine);
|
||||
renmInfo.Add(seq.OriName, string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var seq in TransitionSequences)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(seq.OriName) && seq.OriName != seq.Name)
|
||||
{
|
||||
int occurances = 0;
|
||||
foreach (var test in tests)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(test.RelTransBefore) && test.RelTransBefore == seq.OriName) occurances++;
|
||||
if (!string.IsNullOrEmpty(test.TransitionAfter) && test.TransitionAfter == seq.OriName) occurances++;
|
||||
}
|
||||
foreach (var proc in procedures)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(proc.TransitionStart) && proc.TransitionStart == seq.OriName) occurances++;
|
||||
if (!string.IsNullOrEmpty(proc.TransitionEnd) && proc.TransitionEnd == seq.OriName) occurances++;
|
||||
}
|
||||
if (occurances > 0)
|
||||
{
|
||||
warnings += string.Format("Renaming transition sequence {0} used in {1} tests and procedures{2}", seq.OriName, occurances, Environment.NewLine);
|
||||
renmInfo.Add(seq.OriName, seq.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var seq in VirtualBenchSequences)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(seq.OriName) && seq.OriName != seq.Name)
|
||||
{
|
||||
int occurances = 0;
|
||||
foreach (var test in tests)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(test.RelTransBefore) && test.RelTransBefore == seq.OriName) occurances++;
|
||||
if (!string.IsNullOrEmpty(test.TransitionAfter) && test.TransitionAfter == seq.OriName) occurances++;
|
||||
}
|
||||
foreach (var proc in procedures)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(proc.TransitionStart) && proc.TransitionStart == seq.OriName) occurances++;
|
||||
if (!string.IsNullOrEmpty(proc.TransitionEnd) && proc.TransitionEnd == seq.OriName) occurances++;
|
||||
}
|
||||
if (occurances > 0)
|
||||
{
|
||||
warnings += string.Format("Renaming virtual bench sequence {0} used in {1} tests and procedures{2}", seq.OriName, occurances, Environment.NewLine);
|
||||
renmInfo.Add(seq.OriName, seq.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return warnings;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
RetrieveData();
|
||||
|
||||
string warnings = GetWarningsBeforeSaving(ref renameInfo);
|
||||
|
||||
bool updateRelatedItems = false;
|
||||
if (!string.IsNullOrEmpty(warnings))
|
||||
{
|
||||
string message = string.Format("{0}{1}{2}", warnings, Environment.NewLine,
|
||||
Strings.Do_you_want_to_update_related_tests_and_procedures);
|
||||
DialogResult dr = MessageBox.Show(message, Strings.Warning, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
|
||||
if (dr == DialogResult.Cancel)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
return;
|
||||
}
|
||||
else if (dr == DialogResult.Yes)
|
||||
{
|
||||
updateRelatedItems = true;
|
||||
}
|
||||
}
|
||||
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
|
||||
using (var transaction = Session.BeginTransaction())
|
||||
{
|
||||
try
|
||||
{
|
||||
if (updateRelatedItems)
|
||||
{
|
||||
foreach (var ri in renameInfo)
|
||||
{
|
||||
var tests = Session.QueryOver<Config.Entities.Test>()
|
||||
.Where(x => (x.RelTransBefore == ri.Key))
|
||||
.List();
|
||||
foreach (var t in tests)
|
||||
{
|
||||
t.RelTransBefore = ri.Value;
|
||||
Session.Update(t);
|
||||
}
|
||||
|
||||
tests = Session.QueryOver<Config.Entities.Test>()
|
||||
.Where(x => (x.TransitionAfter == ri.Key))
|
||||
.List();
|
||||
foreach (var t in tests)
|
||||
{
|
||||
t.TransitionAfter = ri.Value;
|
||||
Session.Update(t);
|
||||
}
|
||||
|
||||
var procedures = Session.QueryOver<Config.Entities.Procedure>()
|
||||
.Where(x => (x.TransitionStart == ri.Key))
|
||||
.List();
|
||||
foreach (var p in procedures)
|
||||
{
|
||||
p.TransitionStart = ri.Value;
|
||||
Session.Update(p);
|
||||
}
|
||||
|
||||
procedures = Session.QueryOver<Config.Entities.Procedure>()
|
||||
.Where(x => (x.TransitionEnd == ri.Key))
|
||||
.List();
|
||||
foreach (var p in procedures)
|
||||
{
|
||||
p.TransitionEnd = ri.Value;
|
||||
Session.Update(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var transSeq in RemovedTransitionSequences)
|
||||
{
|
||||
foreach (var step in transSeq.TransitionSteps) Session.Delete(step);
|
||||
Session.Delete(transSeq);
|
||||
}
|
||||
foreach (var vBnchSeq in RemovedVirtualBenchSequences)
|
||||
{
|
||||
foreach (var step in vBnchSeq.VirtualBenchSteps) Session.Delete(step);
|
||||
Session.Delete(vBnchSeq);
|
||||
}
|
||||
|
||||
int itemNr = 0;
|
||||
foreach (var transSeq in TransitionSequences)
|
||||
{
|
||||
transSeq.ItemNr = itemNr++;
|
||||
Session.SaveOrUpdate(transSeq);
|
||||
}
|
||||
itemNr = 0;
|
||||
foreach (var vBnchSeq in VirtualBenchSequences)
|
||||
{
|
||||
vBnchSeq.ItemNr = itemNr++;
|
||||
Session.SaveOrUpdate(vBnchSeq);
|
||||
}
|
||||
|
||||
transaction.Commit();
|
||||
}
|
||||
catch (Exception e2)
|
||||
{
|
||||
transaction.Rollback();
|
||||
Cursor.Current = Cursors.Default;
|
||||
|
||||
MessageBox.Show(Strings.Cannot_save_changes, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
log.ErrorFormat("Update of sequences in the database failed: {0}", e2.Message);
|
||||
}
|
||||
}
|
||||
|
||||
Cursor.Current = Cursors.Default;
|
||||
|
||||
SaveUISettings();
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveUISettings();
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
private void SaveUISettings()
|
||||
{
|
||||
/// Obtain ConditionsDlg dimensions, etc.
|
||||
bool isMaximized = (WindowState == FormWindowState.Maximized);
|
||||
int left = (WindowState == FormWindowState.Normal) ? Location.X : RestoreBounds.Left;
|
||||
int top = (WindowState == FormWindowState.Normal) ? Location.Y : RestoreBounds.Top;
|
||||
int width = (WindowState == FormWindowState.Normal) ? Size.Width : RestoreBounds.Width;
|
||||
int height = (WindowState == FormWindowState.Normal) ? Size.Height : RestoreBounds.Height;
|
||||
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
|
||||
if (ls != null && (ls.ConditionsDlgMaximized != isMaximized ||
|
||||
ls.ConditionsDlgLeft != left ||
|
||||
ls.ConditionsDlgTop != top ||
|
||||
ls.ConditionsDlgWidth != width ||
|
||||
ls.ConditionsDlgHeight != height))
|
||||
{
|
||||
/// At least one ConditionsDlg dimension differs => Update local settings and save them
|
||||
ls.ConditionsDlgMaximized = isMaximized;
|
||||
ls.ConditionsDlgLeft = left;
|
||||
ls.ConditionsDlgTop = top;
|
||||
ls.ConditionsDlgWidth = width;
|
||||
ls.ConditionsDlgHeight = height;
|
||||
ls.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadUISettings()
|
||||
{
|
||||
TBF.LocalSettings ls = Program.LocalSettings;
|
||||
WindowState = (ls.ConditionsDlgMaximized ? FormWindowState.Maximized : FormWindowState.Normal);
|
||||
Width = (ls.ConditionsDlgWidth > 0) ? ls.ConditionsDlgWidth : 1050;
|
||||
Height = (ls.ConditionsDlgHeight > 0) ? ls.ConditionsDlgHeight : 650;
|
||||
Left = (ls.ConditionsDlgLeft != 0) ? ls.ConditionsDlgLeft : 100;
|
||||
Top = (ls.ConditionsDlgTop != 0) ? ls.ConditionsDlgTop : 100;
|
||||
}
|
||||
|
||||
|
||||
int slctdTab;
|
||||
|
||||
private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (seqStepsCtrls.Count > slctdTab)
|
||||
{
|
||||
seqStepsCtrls[slctdTab].OkBtnClicked();
|
||||
}
|
||||
slctdTab = tabControl.SelectedIndex;
|
||||
sharedButtons.EnableButtons(SharedButtons.Buttons.Add);
|
||||
sharedButtons.DisableButtons(SharedButtons.Buttons.Remove);
|
||||
RefreshAllTabs();
|
||||
}
|
||||
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (seqStepsCtrls.Count > slctdTab) seqStepsCtrls[slctdTab].AddOne();
|
||||
}
|
||||
|
||||
private void removeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (seqStepsCtrls.Count > slctdTab) seqStepsCtrls[slctdTab].RemoveSelected();
|
||||
}
|
||||
|
||||
private void upButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (seqStepsCtrls.Count > slctdTab) seqStepsCtrls[slctdTab].MoveUpSelected();
|
||||
}
|
||||
|
||||
private void downButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (seqStepsCtrls.Count > slctdTab) seqStepsCtrls[slctdTab].MoveDownSelected();
|
||||
}
|
||||
|
||||
public void UpdateButtonStates(SharedButtons.SelectedItemPos selectedItemPos)
|
||||
{
|
||||
if (selectedItemPos == SharedButtons.SelectedItemPos.None)
|
||||
{
|
||||
sharedButtons.DisableButtons(SharedButtons.Buttons.Remove | SharedButtons.Buttons.Up | SharedButtons.Buttons.Down);
|
||||
}
|
||||
else if (selectedItemPos == SharedButtons.SelectedItemPos.First)
|
||||
{
|
||||
sharedButtons.EnableButtons(SharedButtons.Buttons.Remove | SharedButtons.Buttons.Down);
|
||||
sharedButtons.DisableButtons(SharedButtons.Buttons.Up);
|
||||
}
|
||||
else if (selectedItemPos == SharedButtons.SelectedItemPos.Last)
|
||||
{
|
||||
sharedButtons.EnableButtons(SharedButtons.Buttons.Remove | SharedButtons.Buttons.Up);
|
||||
sharedButtons.DisableButtons(SharedButtons.Buttons.Down);
|
||||
}
|
||||
else if (selectedItemPos == SharedButtons.SelectedItemPos.FirstAndLast)
|
||||
{
|
||||
sharedButtons.EnableButtons(SharedButtons.Buttons.Remove);
|
||||
sharedButtons.DisableButtons(SharedButtons.Buttons.Up | SharedButtons.Buttons.Down);
|
||||
}
|
||||
else
|
||||
{
|
||||
sharedButtons.EnableButtons(SharedButtons.Buttons.Remove | SharedButtons.Buttons.Up | SharedButtons.Buttons.Down);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Common part for three xxxListViewEx_SelectedIndexChanged event handlers
|
||||
/// </summary>
|
||||
/// <param name="listViewEx"></param>
|
||||
void SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ListViewEx listViewEx = sender as ListViewEx;
|
||||
if (listViewEx.SelectedItems.Count != 1)
|
||||
{
|
||||
UpdateButtonStates(SharedButtons.SelectedItemPos.None);
|
||||
}
|
||||
else if (listViewEx.Items.Count == 1)
|
||||
{
|
||||
UpdateButtonStates(SharedButtons.SelectedItemPos.FirstAndLast);
|
||||
}
|
||||
else if (listViewEx.SelectedIndices[0] == 0)
|
||||
{
|
||||
UpdateButtonStates(SharedButtons.SelectedItemPos.First);
|
||||
}
|
||||
else if (listViewEx.SelectedIndices[0] == (listViewEx.Items.Count - 1))
|
||||
{
|
||||
UpdateButtonStates(SharedButtons.SelectedItemPos.Last);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateButtonStates(SharedButtons.SelectedItemPos.Middle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void exportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TabPage tabPage = tabControl.SelectedTab;
|
||||
TransitionSequence transitionSeq = tabPage.Tag as TransitionSequence;
|
||||
VirtualBenchSequence virtualBenchSeq = tabPage.Tag as VirtualBenchSequence;
|
||||
|
||||
SaveFileDialog dlg = new SaveFileDialog();
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (transitionSeq != null)
|
||||
{
|
||||
/// export transition sequence
|
||||
transitionSeq.Export(new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8));
|
||||
}
|
||||
else if (virtualBenchSeq != null)
|
||||
{
|
||||
/// export virtual sequence
|
||||
virtualBenchSeq.Export(new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void importButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
|
||||
if (dlg.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
/// Import a procedure from a file
|
||||
int tabId = TransitionSequences.Count + VirtualBenchSequences.Count;
|
||||
TransitionSequence newSequence = TransitionSequence.Import(new StreamReader(dlg.FileName, System.Text.Encoding.UTF8));
|
||||
newSequence.ItemNr = tabId;
|
||||
|
||||
/// Find an unused procedure name
|
||||
string newName;
|
||||
bool nameUsed;
|
||||
for (int nameId = 1; true; nameId++)
|
||||
{
|
||||
newName = string.Format("{0} imported{1}", newSequence.Name, (nameId == 1) ? string.Empty : string.Format("({0})", nameId));
|
||||
nameUsed = false;
|
||||
foreach (var seq in TransitionSequences) if (seq.Name.Equals(newName)) nameUsed = true;
|
||||
if (!nameUsed) break;
|
||||
}
|
||||
newSequence.Name = newName;
|
||||
|
||||
TransitionSequences.Add(newSequence);
|
||||
AddTransitionSeqTab(newSequence);
|
||||
seqStepsCtrls[tabId].Unlock();
|
||||
tabControl.SelectTab(tabId);
|
||||
}
|
||||
|
||||
private void compareButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("Comparing sequences in not implemented yet");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="mainSplitContainer.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="mainSplitContainer.IsSplitterFixed" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="mainSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tabControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tabControl.ItemSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 30</value>
|
||||
</data>
|
||||
<data name="tabControl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>760, 366</value>
|
||||
</data>
|
||||
<data name="tabControl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>tabControl.Name" xml:space="preserve">
|
||||
<value>tabControl</value>
|
||||
</data>
|
||||
<data name=">>tabControl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tabControl.Parent" xml:space="preserve">
|
||||
<value>mainSplitContainer.Panel1</value>
|
||||
</data>
|
||||
<data name=">>tabControl.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Panel1.Name" xml:space="preserve">
|
||||
<value>mainSplitContainer.Panel1</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Panel1.Parent" xml:space="preserve">
|
||||
<value>mainSplitContainer</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Panel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="sharedButtons.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>-1, 0</value>
|
||||
</data>
|
||||
<data name="sharedButtons.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 636</value>
|
||||
</data>
|
||||
<data name="sharedButtons.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Name" xml:space="preserve">
|
||||
<value>sharedButtons</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Type" xml:space="preserve">
|
||||
<value>TBF.UiControls.SharedButtons, TBF, Version=2.18.1313.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Parent" xml:space="preserve">
|
||||
<value>mainSplitContainer.Panel2</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Panel2.Name" xml:space="preserve">
|
||||
<value>mainSplitContainer.Panel2</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Panel2.Parent" xml:space="preserve">
|
||||
<value>mainSplitContainer</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>863, 366</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>760</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Name" xml:space="preserve">
|
||||
<value>mainSplitContainer</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>mainSplitContainer.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>863, 366</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Conditions</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>ConditionsDlg</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,320 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.Resources;
|
||||
using TBF.UI.Shared;
|
||||
using TBF.UI.Bench.Metrology; /// TODO: Remove
|
||||
|
||||
namespace TBF.UI.Bench.Uncertainties
|
||||
{
|
||||
public partial class UncertaintiesDlg : Form, IParentOfListViewEx
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(UncertaintiesDlg));
|
||||
|
||||
public IList<Component> cmpntEntities;
|
||||
|
||||
ISession session;
|
||||
|
||||
public UncertaintiesDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
#if KEMPNO_50
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.MetrologicalAuthority };
|
||||
#else
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.Metrologists };
|
||||
#endif
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove;
|
||||
sharedButtons.Unlocked += unlockButton_Click;
|
||||
sharedButtons.OKClicked += okButton_Click;
|
||||
sharedButtons.CancelClicked += cancelButton_Click;
|
||||
sharedButtons.AddClicked += addButton_Click;
|
||||
sharedButtons.RemoveClicked += removeButton_Click;
|
||||
}
|
||||
|
||||
private void MetrologyDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadUISettings();
|
||||
|
||||
Text = Strings.Uncertainty;
|
||||
|
||||
int fixedCount = 0;
|
||||
int balancesCount = 0;
|
||||
int levelMetersCount = 0;
|
||||
int divertersCount = 0;
|
||||
int flowMetersCount = 0;
|
||||
int pressMetersCount = 0;
|
||||
int tempMetersCount = 0;
|
||||
int platinumTempMetersCount = 0;
|
||||
int evaporationsCount = 0;
|
||||
|
||||
session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
cmpntEntities = session.QueryOver<Component>()
|
||||
.OrderBy(x => x. ItemNr).Asc
|
||||
.List();
|
||||
|
||||
// Density tab-page
|
||||
fixedCount++;
|
||||
TabPage dstyTabPage = new TabPage(" " + Strings.Density + " ");
|
||||
MetrologyDlgDensityTab uiCtl = new MetrologyDlgDensityTab();
|
||||
uiCtl.Dock = DockStyle.Fill;
|
||||
dstyTabPage.Tag = uiCtl;
|
||||
dstyTabPage.Controls.Add(uiCtl);
|
||||
metrologyTabControl.TabPages.Add(dstyTabPage);
|
||||
|
||||
foreach (var cmpnt in cmpntEntities)
|
||||
{
|
||||
BenchControl.Generic.IComponentFactory factory = TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName);
|
||||
|
||||
/// Tab-pages for scales
|
||||
if (factory is BenchControl.MettlerToledo.Standard.BalanceFactory ||
|
||||
factory is BenchControl.MettlerToledo.Standard.BalanceOldFactory ||
|
||||
factory is BenchControl.MettlerToledo.Standard.BalanceNewFactory ||
|
||||
factory is BenchControl.MettlerToledo.Multi.BalanceFactory)
|
||||
{
|
||||
balancesCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgBalanceTab uiControl = new MetrologyDlgBalanceTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.BalanceCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.IScaleCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
|
||||
/// Tab-pages for flowmeters
|
||||
if (factory is BenchControl.Elde.FlowMeter.FlowMeterFactory)
|
||||
{
|
||||
BenchControl.Elde.FlowMeter.FlowMeterCfg flowMeterCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.Elde.FlowMeter.FlowMeterCfg;
|
||||
|
||||
for (int r = 0; r <= 5; r++)
|
||||
{
|
||||
if (flowMeterCfg.RangeEnabled(r))
|
||||
{
|
||||
flowMetersCount++;
|
||||
TabPage tabPage = new TabPage(string.Format(((r == 0) ? " {0} " : " {0} r{1} "), cmpnt.Name, r));
|
||||
MetrologyDlgFlowMeterTab uiControl = new MetrologyDlgFlowMeterTab(r);
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibRangesCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Tab-pages for pressure meters
|
||||
if (factory is BenchControl.Elde.PressureMeter.PressureMeterFactory ||
|
||||
factory is BenchControl.Elde.PressureMeterInternal.PressureMeterFactory ||
|
||||
factory is BenchControl.Modbus.PressureMeter.Meret.Factory)
|
||||
{
|
||||
pressMetersCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgPressMeterTab uiControl = new MetrologyDlgPressMeterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
|
||||
/// Tab-pages for temperature meters
|
||||
if (factory is BenchControl.Elde.TempMeter.TempMeterFactory ||
|
||||
factory is BenchControl.Elde.TempMeterInternal.TempMeterFactory)
|
||||
{
|
||||
tempMetersCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgTempMeterTab uiControl = new MetrologyDlgTempMeterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
|
||||
/// Tab-pages for platinum resistance temperature meters
|
||||
if (factory is BenchControl.Keithley.TempMeter.Factory)
|
||||
{
|
||||
platinumTempMetersCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgPlatinumResistanceTMeterTab uiControl = new MetrologyDlgPlatinumResistanceTMeterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.TempMeterCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.Keithley.TempMeter.TempMeterCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
|
||||
/// Tab-pages for diverters
|
||||
if (factory is BenchControl.Elde.Diverter.DiverterFactory)
|
||||
{
|
||||
divertersCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgDiverterTab uiControl = new MetrologyDlgDiverterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibInfoCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
|
||||
/// Tab-pages for level meters inside water tanks
|
||||
if (factory is BenchControl.Hart.Nivotrack.Factory)
|
||||
{
|
||||
levelMetersCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgLevelMeterTab uiControl = new MetrologyDlgLevelMeterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibInfoCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
|
||||
/// Tab-pages for water tank evaporation rates
|
||||
if (factory is BenchControl.Various.Evaporation.Factory)
|
||||
{
|
||||
evaporationsCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgEvaporationTab uiControl = new MetrologyDlgEvaporationTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibInfoCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void unlockButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (TabPage tabPage in metrologyTabControl.TabPages)
|
||||
{
|
||||
(tabPage.Tag as IMetrologyDlgTab).Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ITransaction transaction = session.BeginTransaction())
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (TabPage tabPage in metrologyTabControl.TabPages)
|
||||
{
|
||||
IMetrologyDlgTab tab = tabPage.Tag as IMetrologyDlgTab;
|
||||
tab.OkBtnClicked();
|
||||
|
||||
if (!(tabPage.Tag is MetrologyDlgDensityTab))
|
||||
{
|
||||
session.SaveOrUpdate(tab.MeterEntity);
|
||||
foreach (var entity in tab.ToBeRemoved) session.Delete(entity);
|
||||
}
|
||||
}
|
||||
transaction.Commit();
|
||||
session.Flush();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
transaction.Rollback();
|
||||
log.ErrorFormat("Cannot save changes to DB: {0}", exc.Message);
|
||||
MessageBox.Show(Strings.Cannot_save_changes, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
|
||||
SaveUISettings();
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (TabPage tabPage in metrologyTabControl.TabPages)
|
||||
{
|
||||
(tabPage.Tag as IMetrologyDlgTab).CancelBtnClicked();
|
||||
}
|
||||
|
||||
SaveUISettings();
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void SaveUISettings()
|
||||
{
|
||||
/// Obtain UncertaintyDlg dimensions, etc.
|
||||
bool isMaximized = (WindowState == FormWindowState.Maximized);
|
||||
int left = (WindowState == FormWindowState.Normal) ? Location.X : RestoreBounds.Left;
|
||||
int top = (WindowState == FormWindowState.Normal) ? Location.Y : RestoreBounds.Top;
|
||||
int width = (WindowState == FormWindowState.Normal) ? Size.Width : RestoreBounds.Width;
|
||||
int height = (WindowState == FormWindowState.Normal) ? Size.Height : RestoreBounds.Height;
|
||||
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
|
||||
if (ls != null && (ls.UncertaintyDlgMaximized != isMaximized ||
|
||||
ls.UncertaintyDlgLeft != left ||
|
||||
ls.UncertaintyDlgTop != top ||
|
||||
ls.UncertaintyDlgWidth != width ||
|
||||
ls.UncertaintyDlgHeight != height))
|
||||
{
|
||||
/// At least one UncertaintyDlg dimension differs => Update local settings and save them
|
||||
ls.UncertaintyDlgMaximized = isMaximized;
|
||||
ls.UncertaintyDlgLeft = left;
|
||||
ls.UncertaintyDlgTop = top;
|
||||
ls.UncertaintyDlgWidth = width;
|
||||
ls.UncertaintyDlgHeight = height;
|
||||
ls.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadUISettings()
|
||||
{
|
||||
TBF.LocalSettings ls = Program.LocalSettings;
|
||||
WindowState = (ls.UncertaintyDlgMaximized ? FormWindowState.Maximized : FormWindowState.Normal);
|
||||
Width = (ls.UncertaintyDlgWidth > 0) ? ls.UncertaintyDlgWidth : 900;
|
||||
Height = (ls.UncertaintyDlgHeight > 0) ? ls.UncertaintyDlgHeight : 500;
|
||||
Left = (ls.UncertaintyDlgLeft != 0) ? ls.UncertaintyDlgLeft : 200;
|
||||
Top = (ls.UncertaintyDlgTop != 0) ? ls.UncertaintyDlgTop : 100;
|
||||
}
|
||||
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
(metrologyTabControl.SelectedTab.Tag as IMetrologyDlgTab).AddOne();
|
||||
}
|
||||
|
||||
private void removeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
(metrologyTabControl.SelectedTab.Tag as IMetrologyDlgTab).RemoveSelected();
|
||||
}
|
||||
|
||||
public void UpdateButtonStates(SharedButtons.SelectedItemPos selectedItemPos)
|
||||
{
|
||||
if (selectedItemPos == SharedButtons.SelectedItemPos.None)
|
||||
{
|
||||
sharedButtons.DisableButtons(SharedButtons.Buttons.Remove);
|
||||
}
|
||||
else
|
||||
{
|
||||
sharedButtons.EnableButtons(SharedButtons.Buttons.Remove);
|
||||
}
|
||||
}
|
||||
|
||||
private void metrologyTabControl_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
sharedButtons.DisableButtons(SharedButtons.Buttons.Remove);
|
||||
}
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.UI.Bench.Uncertainties
|
||||
{
|
||||
partial class UncertaintiesDlg
|
||||
{
|
||||
/// <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.splitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.metrologyTabControl = new System.Windows.Forms.TabControl();
|
||||
this.sharedButtons = new TBF.UI.Shared.SharedButtons();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||
this.splitContainer.Panel1.SuspendLayout();
|
||||
this.splitContainer.Panel2.SuspendLayout();
|
||||
this.splitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer.Name = "splitContainer";
|
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
this.splitContainer.Panel1.Controls.Add(this.metrologyTabControl);
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
this.splitContainer.Panel2.Controls.Add(this.sharedButtons);
|
||||
this.splitContainer.Size = new System.Drawing.Size(965, 344);
|
||||
this.splitContainer.SplitterDistance = 863;
|
||||
this.splitContainer.TabIndex = 0;
|
||||
//
|
||||
// metrologyTabControl
|
||||
//
|
||||
this.metrologyTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.metrologyTabControl.ItemSize = new System.Drawing.Size(60, 30);
|
||||
this.metrologyTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.metrologyTabControl.Name = "metrologyTabControl";
|
||||
this.metrologyTabControl.SelectedIndex = 0;
|
||||
this.metrologyTabControl.Size = new System.Drawing.Size(863, 344);
|
||||
this.metrologyTabControl.TabIndex = 0;
|
||||
this.metrologyTabControl.SelectedIndexChanged += new System.EventHandler(this.metrologyTabControl_SelectedIndexChanged);
|
||||
//
|
||||
// sharedButtons
|
||||
//
|
||||
this.sharedButtons.Location = new System.Drawing.Point(-2, 0);
|
||||
this.sharedButtons.Name = "sharedButtons";
|
||||
this.sharedButtons.Size = new System.Drawing.Size(100, 400);
|
||||
this.sharedButtons.TabIndex = 0;
|
||||
//
|
||||
// UncertaintyDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(965, 344);
|
||||
this.Controls.Add(this.splitContainer);
|
||||
this.Name = "UncertaintyDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Uncertainty";
|
||||
this.Load += new System.EventHandler(this.MetrologyDlg_Load);
|
||||
this.splitContainer.Panel1.ResumeLayout(false);
|
||||
this.splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
||||
this.splitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer;
|
||||
private System.Windows.Forms.TabControl metrologyTabControl;
|
||||
private TBF.UI.Shared.SharedButtons sharedButtons;
|
||||
}
|
||||
}
|
||||
Generated
+24
-9
@@ -54,9 +54,9 @@ 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 ControlComponent_Torino2015.UserControl1();
|
||||
this.ctrlBrdComponent = new ControlComponent3Munich.UserControl1();
|
||||
this.processTabPage = new System.Windows.Forms.TabPage();
|
||||
this.processTabPageCtrl = new TBF.UI.Process.ProcessTabPageCtrl24();
|
||||
this.processTabPageCtrl = new TBF.UI.Process.ProcessTabPageCtrl6();
|
||||
this.insertTabPage = new System.Windows.Forms.TabPage();
|
||||
this.resultsTabPage = new System.Windows.Forms.TabPage();
|
||||
this.resultsTabPageCtrl = new TBF.UI.Results.ResultsTabPageCtrl();
|
||||
@@ -79,6 +79,8 @@ namespace TBF.UI
|
||||
this.benchPathsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.benchTransitionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.benchMetrologyTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.benchConditionsTSMItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.benchUncertaintyTSMItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.homeTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -136,6 +138,7 @@ namespace TBF.UI
|
||||
((System.ComponentModel.ISupportInitialize)(this.rightHorizSplitContainer)).BeginInit();
|
||||
this.rightHorizSplitContainer.Panel1.SuspendLayout();
|
||||
this.rightHorizSplitContainer.SuspendLayout();
|
||||
this.measurementTabPage.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.mainMenuStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@@ -382,11 +385,6 @@ namespace TBF.UI
|
||||
this.progressFlowLayoutPanel.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.progressFlowLayoutPanel.Name = "progressFlowLayoutPanel";
|
||||
//
|
||||
// measurementTabPage
|
||||
//
|
||||
resources.ApplyResources(this.measurementTabPage, "measurementTabPage");
|
||||
this.measurementTabPage.Name = "measurementTabPage";
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@@ -425,6 +423,8 @@ namespace TBF.UI
|
||||
this.benchPathsTSMenuItem,
|
||||
this.benchTransitionsToolStripMenuItem,
|
||||
this.benchMetrologyTSMenuItem,
|
||||
this.benchConditionsTSMItem,
|
||||
this.benchUncertaintyTSMItem,
|
||||
this.toolStripSeparator1,
|
||||
this.exitToolStripMenuItem});
|
||||
this.benchTSMenuItem.Name = "benchTSMenuItem";
|
||||
@@ -454,6 +454,18 @@ namespace TBF.UI
|
||||
resources.ApplyResources(this.benchMetrologyTSMenuItem, "benchMetrologyTSMenuItem");
|
||||
this.benchMetrologyTSMenuItem.Click += new System.EventHandler(this.benchMetrologyTSMItem_Click);
|
||||
//
|
||||
// benchConditionsTSMItem
|
||||
//
|
||||
this.benchConditionsTSMItem.Name = "benchConditionsTSMItem";
|
||||
resources.ApplyResources(this.benchConditionsTSMItem, "benchConditionsTSMItem");
|
||||
this.benchConditionsTSMItem.Click += new System.EventHandler(this.benchConditionsTSMItem_Click);
|
||||
//
|
||||
// benchUncertaintyTSMItem
|
||||
//
|
||||
this.benchUncertaintyTSMItem.Name = "benchUncertaintyTSMItem";
|
||||
resources.ApplyResources(this.benchUncertaintyTSMItem, "benchUncertaintyTSMItem");
|
||||
this.benchUncertaintyTSMItem.Click += new System.EventHandler(this.benchUncertaintyTSMItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
@@ -660,6 +672,7 @@ namespace TBF.UI
|
||||
this.rightHorizSplitContainer.Panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.rightHorizSplitContainer)).EndInit();
|
||||
this.rightHorizSplitContainer.ResumeLayout(false);
|
||||
this.measurementTabPage.ResumeLayout(false);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.mainMenuStrip.ResumeLayout(false);
|
||||
@@ -697,10 +710,10 @@ namespace TBF.UI
|
||||
#elif IZRAEL_200 || PUCHONG_200 || GENESIS || BERLIN || SLM_150 || PETERSBURG_200
|
||||
private ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent;
|
||||
private Process.ProcessTabPageCtrl6 processTabPageCtrl;
|
||||
#elif BADGER_MALA_TRAT || BADGER_VELKA_TRAT || SLM_END || WARSAW_END || RUM_MOB || SENTEC || CEVAK_200 || DEWA_300
|
||||
#elif BADGER_MALA_TRAT || BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || SLM_END || WARSAW_END || RUM_MOB || SENTEC || CEVAK_200 || DEWA_300
|
||||
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
||||
private Process.ProcessTabPageCtrl6 processTabPageCtrl;
|
||||
#elif BADGER_STREDNA_TRAT || TORINO_50 || TORUN_50 || CEVAK_40 || MURES_40 || FUZHOU_50 || MALTA_WSD25 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || KRAKOW_50 || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || FILIPINY_50 || FUZHOU_100
|
||||
#elif TORINO_50 || TORUN_50 || CEVAK_40 || MURES_40 || FUZHOU_50 || MALTA_WSD25 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || KRAKOW_50 || JUZNA_AFRIKA_50 || IZRAEL_25 || ZAMBIA || ZODINO || FEWA_50 || FILIPINY_50 || FUZHOU_100
|
||||
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
||||
private Process.ProcessTabPageCtrl24 processTabPageCtrl;
|
||||
#elif TURA_SPECIAL || SLM_50
|
||||
@@ -760,6 +773,8 @@ namespace TBF.UI
|
||||
private System.Windows.Forms.ToolStripMenuItem backUpTSMItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem backUpConfigTSMItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem backUpResultsTSMItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem benchConditionsTSMItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem benchUncertaintyTSMItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -474,6 +474,8 @@ namespace TBF.UI
|
||||
private void benchPathsTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new TBF.UI.Bench.Paths.PathsDlg().ShowDialog(); Cursor = Cursors.Default; }
|
||||
private void benchTransitionsTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new TBF.UI.Bench.Transitions.TransitionsDlg().ShowDialog(); Cursor = Cursors.Default; }
|
||||
private void benchMetrologyTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new TBF.UI.Bench.Metrology.MetrologyDlg().ShowDialog(); Cursor = Cursors.Default; }
|
||||
private void benchConditionsTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new TBF.UI.Bench.Conditions.ConditionsDlg().ShowDialog(); Cursor = Cursors.Default; }
|
||||
private void benchUncertaintyTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new TBF.UI.Bench.Uncertainties.UncertaintiesDlg().ShowDialog(); Cursor = Cursors.Default; }
|
||||
private void proceduresTSMItem_Click(object s, EventArgs e) { Cursor = Cursors.WaitCursor; new TBF.UI.Procedures.ProceduresDlg().ShowDialog(); Cursor = Cursors.Default; }
|
||||
|
||||
private void usersTSMItem_Click(object s, EventArgs e)
|
||||
|
||||
+674
-389
File diff suppressed because it is too large
Load Diff
@@ -13,8 +13,6 @@ 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
|
||||
{
|
||||
@@ -65,23 +63,15 @@ namespace TBF.UI.Procedures
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
/// SharedDlgButtons configuration
|
||||
#if KEMPNO_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.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.Buttons.Up | SharedButtons.Buttons.Down;
|
||||
sharedButtons.Unlocked += Unlocked;
|
||||
sharedButtons.OKClicked += okButton_Click;
|
||||
sharedButtons.CancelClicked += cancelButton_Click;
|
||||
sharedButtons.AddClicked += addButton_Click;
|
||||
@@ -118,19 +108,17 @@ namespace TBF.UI.Procedures
|
||||
this.usedNames = usedNames;
|
||||
this.openUnlocked = openUnlocked;
|
||||
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
#if KEMPNO_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))
|
||||
{
|
||||
///
|
||||
/// Prepare a list of components and a list of all valves in the test bench
|
||||
///
|
||||
TbfComponents = BenchControl.TbfComponents.LoadComponentsFromDB(session);
|
||||
TbfComponents = BenchControl.TbfComponents.LoadComponentsFromDB(session);
|
||||
Valves = BenchControl.GenericDevices.ValveBase.MasterValves(TbfComponents);
|
||||
RegulValves = new List<IRegulValve>();
|
||||
TestMethods = new List<ITestMethod>();
|
||||
@@ -141,7 +129,6 @@ 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);
|
||||
@@ -160,11 +147,12 @@ namespace TBF.UI.Procedures
|
||||
fileWriter4ComboBox.Items.Add(cmpnt.Cfg.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Loads paths, this must be done before PrepareMetrology12AndProcessTabs() call
|
||||
///
|
||||
feedingPaths = session.QueryOver<FeedingPath>().List();
|
||||
/// 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();
|
||||
benchPaths = session.QueryOver<BenchPath>().List();
|
||||
outputPaths = session.QueryOver<OutputPath>().List();
|
||||
metersPaths = session.QueryOver<MetersPath>().List();
|
||||
@@ -328,11 +316,11 @@ namespace TBF.UI.Procedures
|
||||
LoadUISettings();
|
||||
|
||||
/// Enable/disable/show/hide controls in General tab
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
#if IPERL
|
||||
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;
|
||||
@@ -416,7 +404,6 @@ 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;
|
||||
@@ -1964,13 +1951,15 @@ 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
|
||||
@@ -2126,13 +2115,10 @@ namespace TBF.UI.Procedures
|
||||
AddToParametersTab(test);
|
||||
foreach (var ctrl in testParamsCtrls) ctrl.AddOne(test);
|
||||
|
||||
if (listViewEx != null)
|
||||
{
|
||||
listViewEx.Focus();
|
||||
listViewEx.SelectedItems.Clear();
|
||||
listViewEx.Items[listViewEx.Items.Count - 1].Selected = true;
|
||||
listViewEx.Items[listViewEx.Items.Count - 1].EnsureVisible();
|
||||
}
|
||||
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)
|
||||
@@ -2394,196 +2380,5 @@ 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,8 +25,7 @@ namespace TBF.UI.Procedures
|
||||
bool showSensorsColumn;
|
||||
int nrFixedColumns;
|
||||
IList<IComponent> selectedCmpnts;
|
||||
|
||||
public IList<IParamsProvider> CmpntsParams;
|
||||
IList<IParamsProvider> cmpntsParams;
|
||||
|
||||
int paramsCount;
|
||||
Control[] editors;
|
||||
@@ -36,7 +35,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)
|
||||
@@ -82,7 +81,7 @@ namespace TBF.UI.Procedures
|
||||
}
|
||||
}
|
||||
|
||||
CmpntsParams.Add(procedureParams);
|
||||
cmpntsParams.Add(procedureParams);
|
||||
}
|
||||
|
||||
if (sampleToCreateHeader != null)
|
||||
@@ -177,7 +176,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)
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user