Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62f62b2d2e | ||
|
|
5b5a8f3f64 | ||
|
|
3cab98915f | ||
|
|
e1a16528bb | ||
|
|
c53fcc3bb0 | ||
|
|
9ce5882d1c | ||
|
|
227d6201c9 | ||
|
|
dccaf31a5b | ||
|
|
a714879deb | ||
|
|
7e4a2d45da | ||
|
|
94601ced13 | ||
|
|
bdba2114b3 | ||
|
|
cc9f67c1ad |
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ROMA_200;LANG_IT;TEST_PROFILES</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -28,7 +28,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;ROMA_200;LANG_IT;TEST_PROFILES</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -86,8 +86,8 @@ namespace Config.Entities
|
||||
public enum ProfileType
|
||||
{
|
||||
Q3R,
|
||||
QnClassLT15,
|
||||
QnClassGT15,
|
||||
QnClassColdWater,
|
||||
QnClassHotWater,
|
||||
QpQi,
|
||||
Manual,
|
||||
Count,
|
||||
@@ -327,6 +327,14 @@ namespace Config.Entities
|
||||
Count
|
||||
}
|
||||
|
||||
public enum TestProfile
|
||||
{
|
||||
UserDefined,
|
||||
UserDefinedHeatMeter,
|
||||
Protected, /// The first protected one
|
||||
ProtectedHeatMeter,
|
||||
}
|
||||
|
||||
public enum Progress
|
||||
{
|
||||
JustStarted,
|
||||
@@ -580,9 +588,41 @@ namespace Config.Entities
|
||||
E29,
|
||||
E30,
|
||||
E31,
|
||||
E32,
|
||||
E33,
|
||||
E34,
|
||||
E35,
|
||||
E36,
|
||||
E37,
|
||||
E38,
|
||||
E39,
|
||||
E40,
|
||||
E41,
|
||||
E42,
|
||||
E43,
|
||||
E44,
|
||||
E45,
|
||||
E46,
|
||||
E47,
|
||||
E48,
|
||||
E49,
|
||||
E50,
|
||||
E51,
|
||||
E52,
|
||||
E53,
|
||||
E54,
|
||||
E55,
|
||||
E56,
|
||||
E57,
|
||||
E58,
|
||||
E59,
|
||||
E60,
|
||||
E61,
|
||||
E62,
|
||||
E63,
|
||||
}
|
||||
|
||||
public enum ErrorFlagMask
|
||||
public enum ErrorFlagMask : long
|
||||
{
|
||||
E1 = (1 << (int)ErrorFlagShift.E1),
|
||||
E2 = (1 << (int)ErrorFlagShift.E2),
|
||||
@@ -615,5 +655,37 @@ namespace Config.Entities
|
||||
E29 = (1 << (int)ErrorFlagShift.E29),
|
||||
E30 = (1 << (int)ErrorFlagShift.E30),
|
||||
E31 = (1 << (int)ErrorFlagShift.E31),
|
||||
E32 = (1 << (int)ErrorFlagShift.E32),
|
||||
E33 = (1 << (int)ErrorFlagShift.E33),
|
||||
E34 = (1 << (int)ErrorFlagShift.E34),
|
||||
E35 = (1 << (int)ErrorFlagShift.E35),
|
||||
E36 = (1 << (int)ErrorFlagShift.E36),
|
||||
E37 = (1 << (int)ErrorFlagShift.E37),
|
||||
E38 = (1 << (int)ErrorFlagShift.E38),
|
||||
E39 = (1 << (int)ErrorFlagShift.E39),
|
||||
E40 = (1 << (int)ErrorFlagShift.E40),
|
||||
E41 = (1 << (int)ErrorFlagShift.E41),
|
||||
E42 = (1 << (int)ErrorFlagShift.E42),
|
||||
E43 = (1 << (int)ErrorFlagShift.E43),
|
||||
E44 = (1 << (int)ErrorFlagShift.E44),
|
||||
E45 = (1 << (int)ErrorFlagShift.E45),
|
||||
E46 = (1 << (int)ErrorFlagShift.E46),
|
||||
E47 = (1 << (int)ErrorFlagShift.E47),
|
||||
E48 = (1 << (int)ErrorFlagShift.E48),
|
||||
E49 = (1 << (int)ErrorFlagShift.E49),
|
||||
E50 = (1 << (int)ErrorFlagShift.E50),
|
||||
E51 = (1 << (int)ErrorFlagShift.E51),
|
||||
E52 = (1 << (int)ErrorFlagShift.E52),
|
||||
E53 = (1 << (int)ErrorFlagShift.E53),
|
||||
E54 = (1 << (int)ErrorFlagShift.E54),
|
||||
E55 = (1 << (int)ErrorFlagShift.E55),
|
||||
E56 = (1 << (int)ErrorFlagShift.E56),
|
||||
E57 = (1 << (int)ErrorFlagShift.E57),
|
||||
E58 = (1 << (int)ErrorFlagShift.E58),
|
||||
E59 = (1 << (int)ErrorFlagShift.E59),
|
||||
E60 = (1 << (int)ErrorFlagShift.E60),
|
||||
E61 = (1 << (int)ErrorFlagShift.E61),
|
||||
E62 = (1 << (int)ErrorFlagShift.E62),
|
||||
E63 = (1 << (int)ErrorFlagShift.E63),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
@@ -8,17 +8,15 @@ namespace Config.Entities
|
||||
public class Group
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual int Gid { get; set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual Users.Entities.GID GID { get; set; }
|
||||
|
||||
public Group()
|
||||
{
|
||||
}
|
||||
|
||||
public Group(int gid, string name)
|
||||
public Group(Users.Entities.GID gid)
|
||||
{
|
||||
Gid = gid;
|
||||
Name = name;
|
||||
GID = gid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+88
-83
@@ -15,47 +15,48 @@ namespace Config.Entities
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual int ItemNr { get; set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual float CoefQfrom { get; set; } /// Water flow low limit in [m3/h]
|
||||
public virtual float CoefQto { get; set; } /// Water flow high limit in [m3/h]
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] usually < 0, in case of heat meters: 1=class1, 2=class2, 3=class3
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] usually > 0, in case of heat meters: -Qn in m3/h
|
||||
public virtual float TempLimLo { get; set; } /// Lower limit for the controlled temperature
|
||||
public virtual float TempLimHi { get; set; } /// Upper limit for the controlled temperature
|
||||
public virtual float PressLimLo { get; set; } /// [bar] min. water pressure
|
||||
public virtual float PressLimHi { get; set; } /// [bar] max. water pressure
|
||||
public virtual int Part { get; set; } /// Part=0 ... test of all WM-s /// Part>0 ... part of a set of tests with the same Name: subset of WM-s is given by MetersPath
|
||||
public virtual double CoefQfrom { get; set; } /// Water flow low limit in [m3/h]
|
||||
public virtual double CoefQto { get; set; } /// Water flow high limit in [m3/h]
|
||||
public virtual double ErrLimLo { get; set; } /// in [%] usually < 0, in case of heat meters: 1=class1, 2=class2, 3=class3
|
||||
public virtual double ErrLimHi { get; set; } /// in [%] usually > 0, in case of heat meters: -Qn in m3/h
|
||||
public virtual double TempLimLo { get; set; } /// Lower limit for the controlled temperature
|
||||
public virtual double TempLimHi { get; set; } /// Upper limit for the controlled temperature
|
||||
public virtual double PressLimLo { get; set; } /// [bar] min. water pressure
|
||||
public virtual double PressLimHi { get; set; } /// [bar] max. water pressure
|
||||
|
||||
public virtual sbyte E1 { get; set; } /// 0=off, 1=info, 2=evaluate
|
||||
public virtual sbyte E2 { get; set; }
|
||||
public virtual sbyte E3 { get; set; }
|
||||
public virtual sbyte E4 { get; set; }
|
||||
public virtual sbyte E5 { get; set; }
|
||||
public virtual sbyte E6 { get; set; }
|
||||
public virtual sbyte E7 { get; set; }
|
||||
public virtual sbyte E8 { get; set; }
|
||||
public virtual sbyte E9 { get; set; }
|
||||
public virtual sbyte E10 { get; set; }
|
||||
public virtual sbyte E11 { get; set; }
|
||||
public virtual sbyte E12 { get; set; }
|
||||
public virtual sbyte E13 { get; set; }
|
||||
public virtual sbyte E14 { get; set; }
|
||||
public virtual sbyte E15 { get; set; }
|
||||
public virtual sbyte E16 { get; set; }
|
||||
public virtual sbyte E21 { get; set; }
|
||||
public virtual sbyte E1 { get; set; } ///
|
||||
public virtual sbyte E2 { get; set; } ///
|
||||
public virtual sbyte E3 { get; set; } ///
|
||||
public virtual sbyte E4 { get; set; } ///
|
||||
public virtual sbyte E5 { get; set; } ///
|
||||
public virtual sbyte E6 { get; set; } ///
|
||||
public virtual sbyte E7 { get; set; } ///
|
||||
public virtual sbyte E8 { get; set; } ///
|
||||
public virtual sbyte E9 { get; set; } /// 0=off, 1=info, 2=evaluate
|
||||
public virtual sbyte E10 { get; set; } ///
|
||||
public virtual sbyte E11 { get; set; } ///
|
||||
public virtual sbyte E12 { get; set; } ///
|
||||
public virtual sbyte E13 { get; set; } ///
|
||||
public virtual sbyte E14 { get; set; } ///
|
||||
public virtual sbyte E15 { get; set; } ///
|
||||
public virtual sbyte E16 { get; set; } ///
|
||||
public virtual sbyte E21 { get; set; } ///
|
||||
|
||||
public virtual float Delta_Q_pct { get; set; } /// [%] max deviation from the mean flow
|
||||
public virtual float Delta_T { get; set; } /// [°C] max. T_up or T_down deviation from the mean temperature
|
||||
public virtual float Delta_Tup_Tdn { get; set; } /// [°C] max. difference abs(T_up - T_down)
|
||||
public virtual float TestTime_min { get; set; } /// [s]
|
||||
public virtual float TestTime_max { get; set; } /// [s]
|
||||
public virtual float AmbTemp_min { get; set; } /// [°C] min. ambient temperature
|
||||
public virtual float AmbTemp_max { get; set; } /// [°C] max. ambient temperature
|
||||
public virtual double Delta_Q_pct { get; set; } /// [%] max deviation from the mean flow
|
||||
public virtual double Delta_T { get; set; } /// [°C] max. T_up or T_down deviation from the mean temperature
|
||||
public virtual double Delta_Tup_Tdn { get; set; } /// [°C] max. difference abs(T_up - T_down)
|
||||
public virtual double TestTime_min { get; set; } /// [s]
|
||||
public virtual double TestTime_max { get; set; } /// [s]
|
||||
public virtual double AmbTemp_min { get; set; } /// [°C] min. ambient temperature
|
||||
public virtual double AmbTemp_max { get; set; } /// [°C] max. ambient temperature
|
||||
|
||||
public virtual float Coef_E9 { get; set; } /// Coefficient used in E9, default 0.025
|
||||
public virtual float Coef_E10 { get; set; } /// Coefficient used in E10, default 0.04
|
||||
public virtual float Coef_E11 { get; set; } /// Coefficient used in E11, default 0.1
|
||||
public virtual float Coef_E12 { get; set; } /// Coefficient used in E12, default 1
|
||||
public virtual float Offset_E9 { get; set; } /// [s] default 0 (no offset)
|
||||
public virtual float Offset_E12 { get; set; } /// [s] default 0 (no offset)
|
||||
public virtual double Coef_E9 { get; set; } /// Coefficient used in E9, default 0.025
|
||||
public virtual double Coef_E10 { get; set; } /// Coefficient used in E10, default 0.04
|
||||
public virtual double Coef_E11 { get; set; } /// Coefficient used in E11, default 0.1
|
||||
public virtual double Coef_E12 { get; set; } /// Coefficient used in E12, default 1
|
||||
public virtual double Offset_E9 { get; set; } /// [s] default 0 (no offset)
|
||||
public virtual double Offset_E12 { get; set; } /// [s] default 0 (no offset)
|
||||
|
||||
public virtual Profile Profile { get; set; }
|
||||
|
||||
@@ -66,14 +67,15 @@ namespace Config.Entities
|
||||
///
|
||||
/// Default values
|
||||
///
|
||||
CoefQfrom = 0.9f;
|
||||
CoefQto = 1.0f;
|
||||
ErrLimLo = -2.0f; /// [%] lower error limit
|
||||
ErrLimHi = 2.0f; /// [%] upper error limit
|
||||
TempLimLo = 15.0f;
|
||||
TempLimHi = 25.0f;
|
||||
PressLimLo = 0;
|
||||
PressLimHi = 16.0f;
|
||||
Part = 0;
|
||||
CoefQfrom = 1.0;
|
||||
CoefQto = 1.1;
|
||||
ErrLimLo = -2.0; /// [%]
|
||||
ErrLimHi = 2.0; /// [%]
|
||||
TempLimLo = 15.0; /// [°C]
|
||||
TempLimHi = 25.0; /// [°C]
|
||||
PressLimLo = 0; /// [bar]
|
||||
PressLimHi = 16.0; /// [bar]
|
||||
|
||||
E1 = 1;
|
||||
E2 = 1;
|
||||
@@ -93,21 +95,21 @@ namespace Config.Entities
|
||||
E16 = 1;
|
||||
E21 = 1;
|
||||
|
||||
Delta_Q_pct = 0;
|
||||
Delta_T = 0;
|
||||
Delta_Tup_Tdn = 0;
|
||||
TestTime_min = 0;
|
||||
TestTime_max = 0;
|
||||
AmbTemp_min = 0;
|
||||
AmbTemp_max = 0;
|
||||
|
||||
Coef_E9 = 0;
|
||||
Coef_E10 = 0;
|
||||
Coef_E11 = 0;
|
||||
Coef_E12 = 0;
|
||||
Offset_E9 = 0;
|
||||
Offset_E12 = 0;
|
||||
}
|
||||
Delta_Q_pct = 5.0; /// [%]
|
||||
Delta_T = 10.0; /// [°C]
|
||||
Delta_Tup_Tdn = 10.0; /// [°C]
|
||||
TestTime_min = 0; /// [s]
|
||||
TestTime_max = 99999; /// [s]
|
||||
AmbTemp_min = 5.0; /// [°C]
|
||||
AmbTemp_max = 95.0; /// [°C]
|
||||
|
||||
Coef_E9 = 0.025;
|
||||
Coef_E10 = 0.04;
|
||||
Coef_E11 = 0.1;
|
||||
Coef_E12 = 1.0;
|
||||
Offset_E9 = 0; /// [s]
|
||||
Offset_E12 = 0; /// [s]
|
||||
}
|
||||
|
||||
public PTest(string name, int itemNr, Profile profile)
|
||||
: this()
|
||||
@@ -122,6 +124,7 @@ namespace Config.Entities
|
||||
{
|
||||
PTest result = new PTest(Name, ItemNr, Profile);
|
||||
|
||||
result.Part = Part;
|
||||
result.CoefQfrom = CoefQfrom;
|
||||
result.CoefQto = CoefQto;
|
||||
result.ErrLimLo = ErrLimLo;
|
||||
@@ -172,6 +175,7 @@ namespace Config.Entities
|
||||
CultureInfo ci = CultureInfo.InvariantCulture;
|
||||
|
||||
output.WriteLine(Name);
|
||||
output.WriteLine(Part);
|
||||
output.WriteLine(CoefQfrom.ToString(ci));
|
||||
output.WriteLine(CoefQto.ToString(ci));
|
||||
output.WriteLine(ErrLimLo.ToString(ci));
|
||||
@@ -227,29 +231,30 @@ namespace Config.Entities
|
||||
PTest tst = new PTest();
|
||||
|
||||
tst.Name = firstLine;
|
||||
tst.CoefQfrom = float.Parse(input.ReadLine(), ci);
|
||||
tst.CoefQto = float.Parse(input.ReadLine(), ci);
|
||||
tst.ErrLimLo = float.Parse(input.ReadLine(), ci);
|
||||
tst.ErrLimHi = float.Parse(input.ReadLine(), ci);
|
||||
tst.TempLimLo = float.Parse(input.ReadLine(), ci);
|
||||
tst.TempLimHi = float.Parse(input.ReadLine(), ci);
|
||||
tst.Part = int.Parse(input.ReadLine());
|
||||
tst.CoefQfrom = double.Parse(input.ReadLine(), ci);
|
||||
tst.CoefQto = double.Parse(input.ReadLine(), ci);
|
||||
tst.ErrLimLo = double.Parse(input.ReadLine(), ci);
|
||||
tst.ErrLimHi = double.Parse(input.ReadLine(), ci);
|
||||
tst.TempLimLo = double.Parse(input.ReadLine(), ci);
|
||||
tst.TempLimHi = double.Parse(input.ReadLine(), ci);
|
||||
|
||||
/// TODO (E1 .. E21)
|
||||
|
||||
tst.Delta_Q_pct = float.Parse(input.ReadLine(), ci);
|
||||
tst.Delta_T = float.Parse(input.ReadLine(), ci);
|
||||
tst.Delta_Tup_Tdn = float.Parse(input.ReadLine(), ci);
|
||||
tst.TestTime_min = float.Parse(input.ReadLine(), ci);
|
||||
tst.TestTime_max = float.Parse(input.ReadLine(), ci);
|
||||
tst.AmbTemp_min = float.Parse(input.ReadLine(), ci);
|
||||
tst.AmbTemp_max = float.Parse(input.ReadLine(), ci);
|
||||
tst.Delta_Q_pct = double.Parse(input.ReadLine(), ci);
|
||||
tst.Delta_T = double.Parse(input.ReadLine(), ci);
|
||||
tst.Delta_Tup_Tdn = double.Parse(input.ReadLine(), ci);
|
||||
tst.TestTime_min = double.Parse(input.ReadLine(), ci);
|
||||
tst.TestTime_max = double.Parse(input.ReadLine(), ci);
|
||||
tst.AmbTemp_min = double.Parse(input.ReadLine(), ci);
|
||||
tst.AmbTemp_max = double.Parse(input.ReadLine(), ci);
|
||||
|
||||
tst.Coef_E9 = float.Parse(input.ReadLine(), ci);
|
||||
tst.Coef_E10 = float.Parse(input.ReadLine(), ci);
|
||||
tst.Coef_E11 = float.Parse(input.ReadLine(), ci);
|
||||
tst.Coef_E12 = float.Parse(input.ReadLine(), ci);
|
||||
tst.Offset_E9 = float.Parse(input.ReadLine(), ci);
|
||||
tst.Offset_E12 = float.Parse(input.ReadLine(), ci);
|
||||
tst.Coef_E9 = double.Parse(input.ReadLine(), ci);
|
||||
tst.Coef_E10 = double.Parse(input.ReadLine(), ci);
|
||||
tst.Coef_E11 = double.Parse(input.ReadLine(), ci);
|
||||
tst.Coef_E12 = double.Parse(input.ReadLine(), ci);
|
||||
tst.Offset_E9 = double.Parse(input.ReadLine(), ci);
|
||||
tst.Offset_E12 = double.Parse(input.ReadLine(), ci);
|
||||
|
||||
tst.Profile = newProfile;
|
||||
return tst;
|
||||
@@ -264,16 +269,16 @@ namespace Config.Entities
|
||||
|
||||
string firstLine = inp.ReadLine();
|
||||
if (string.IsNullOrEmpty(firstLine)) return string.Format("Test {0} is missing in the file\r\n", Name);
|
||||
|
||||
if (Name != firstLine) { diff.AppendFormat(fmt, "Name", Name, firstLine); };
|
||||
ln = inp.ReadLine(); if (ln != Part.ToString()) { diff.AppendFormat(fmt, "Part", Part.ToString(), ln); };
|
||||
ln = inp.ReadLine(); if (ln != CoefQfrom.ToString(ci)) { diff.AppendFormat(fmt, "CoefQfrom", CoefQfrom.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != CoefQto.ToString(ci)) { diff.AppendFormat(fmt, "CoefQto", CoefQto.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != ErrLimLo.ToString(ci)) { diff.AppendFormat(fmt, "ErrLimLo", ErrLimLo.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != ErrLimHi.ToString(ci)) { diff.AppendFormat(fmt, "ErrLimHi", ErrLimHi.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != TempLimLo.ToString(ci)) { diff.AppendFormat(fmt, "TempLimLo", TempLimLo.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != TempLimHi.ToString(ci)) { diff.AppendFormat(fmt, "TempLimHi", TempLimHi.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != PressLimLo.ToString(ci)) { diff.AppendFormat(fmt, "Pressure_min", TempLimLo.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != PressLimHi.ToString(ci)) { diff.AppendFormat(fmt, "Pressure_max", TempLimHi.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != PressLimLo.ToString(ci)) { diff.AppendFormat(fmt, "Pressure_min", TempLimLo.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != PressLimHi.ToString(ci)) { diff.AppendFormat(fmt, "Pressure_max", TempLimHi.ToString(ci), ln); };
|
||||
|
||||
ln = inp.ReadLine(); if (ln != E1.ToString()) { diff.AppendFormat(fmt, "E1", E1.ToString(), ln); };
|
||||
ln = inp.ReadLine(); if (ln != E2.ToString()) { diff.AppendFormat(fmt, "E2", E2.ToString(), ln); };
|
||||
|
||||
@@ -86,12 +86,10 @@ namespace Config.Entities
|
||||
result.LastChgUser = LastChgUser;
|
||||
result.LastChgTime = LastChgTime;
|
||||
result.LongDescription = LongDescription;
|
||||
|
||||
result.ProcedureState = ProcedureState;
|
||||
result.Revision = Revision;
|
||||
result.PredecessorId = Id;
|
||||
result.ObtainedByCopy = ObtainedByCopy;
|
||||
|
||||
result.MetersKind = MetersKind;
|
||||
result.Watermeters = Watermeters;
|
||||
result.Protected = Protected;
|
||||
@@ -102,6 +100,8 @@ namespace Config.Entities
|
||||
result.ResultsWriter = ResultsWriter;
|
||||
result.TransitionStart = TransitionStart;
|
||||
result.TransitionEnd = TransitionEnd;
|
||||
result.AltProcName = AltProcName;
|
||||
result.AltProcPeriod = AltProcPeriod;
|
||||
|
||||
foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone(result)); }
|
||||
foreach (var test in Tests) { result.Tests.Add(test.Clone()); }
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace Config.Entities
|
||||
result.LastChgUser = LastChgUser;
|
||||
result.LastChgTime = LastChgTime;
|
||||
result.ProfileType = ProfileType;
|
||||
result.ErrorLimitType = ErrorLimitType;
|
||||
|
||||
foreach (var test in Tests) { result.Tests.Add(test.Clone()); }
|
||||
|
||||
|
||||
+15
-11
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -18,7 +18,8 @@ namespace Config.Entities
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int Part { get; set; } /// Part=0 ... test of all WM-s
|
||||
/// Part>0 ... part of a set of tests with the same Name: subset of WM-s is given by MetersPath
|
||||
public virtual sbyte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
public virtual TestProfile Profile { get; set; } /// UserDefined, Protected, UserDefinedHeatMeter, ProtectedHeatMeter
|
||||
public virtual sbyte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
public virtual bool DoEvaluate { get; set; }
|
||||
public virtual float Qtg { get; set; } /// Target water flow [m3/h]
|
||||
public virtual float Qfrom { get; set; } /// Water flow low limit in [m3/h]
|
||||
@@ -54,7 +55,6 @@ namespace Config.Entities
|
||||
#endif
|
||||
public virtual string RelTransBefore { get; set; }
|
||||
public virtual string RelTransBetween { get; set; }
|
||||
public virtual string RelTransAfter { get; set; }
|
||||
public virtual string TransitionAfter { get; set; }
|
||||
|
||||
public virtual bool IsOuterLoopStart { get; set; } /// Not mapped to database
|
||||
@@ -73,7 +73,9 @@ namespace Config.Entities
|
||||
///
|
||||
/// Default values
|
||||
///
|
||||
Publish = (sbyte)Config.Entities.Publish.Always;
|
||||
Part = 0;
|
||||
Profile = TestProfile.UserDefined;
|
||||
Publish = (sbyte)Config.Entities.Publish.Always;
|
||||
DoEvaluate = true;
|
||||
Repeats = 1;
|
||||
DoDraining = false;
|
||||
@@ -95,7 +97,6 @@ namespace Config.Entities
|
||||
TolerRed = 0; /// = Filter parameter
|
||||
RelTransBefore = string.Empty;
|
||||
RelTransBetween = string.Empty;
|
||||
RelTransAfter = string.Empty;
|
||||
TransitionAfter = string.Empty;
|
||||
}
|
||||
|
||||
@@ -113,7 +114,8 @@ namespace Config.Entities
|
||||
Test result = new Test(Name, ItemNr, Procedure);
|
||||
|
||||
result.Part = Part;
|
||||
result.Publish = Publish;
|
||||
result.Profile = Profile;
|
||||
result.Publish = Publish;
|
||||
result.DoEvaluate = DoEvaluate;
|
||||
result.Qtg = Qtg;
|
||||
result.Qfrom = Qfrom;
|
||||
@@ -149,7 +151,6 @@ namespace Config.Entities
|
||||
#endif
|
||||
result.RelTransBefore = RelTransBefore;
|
||||
result.RelTransBetween = RelTransBetween;
|
||||
result.RelTransAfter = RelTransAfter;
|
||||
result.TransitionAfter = TransitionAfter;
|
||||
foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone()); }
|
||||
|
||||
@@ -193,7 +194,7 @@ namespace Config.Entities
|
||||
output.WriteLine(MetersPath);
|
||||
output.WriteLine(RelTransBefore);
|
||||
output.WriteLine(RelTransBetween);
|
||||
output.WriteLine(RelTransAfter);
|
||||
output.WriteLine(Profile);
|
||||
output.WriteLine(TransitionAfter);
|
||||
|
||||
foreach (var prms in MoreParams) { prms.Export(output); }
|
||||
@@ -244,7 +245,10 @@ namespace Config.Entities
|
||||
tst.MetersPath = input.ReadLine();
|
||||
tst.RelTransBefore = input.ReadLine();
|
||||
tst.RelTransBetween = input.ReadLine();
|
||||
tst.RelTransAfter = input.ReadLine();
|
||||
string line = input.ReadLine();
|
||||
tst.Profile = line.Equals(TestProfile.ProtectedHeatMeter.ToString()) ? TestProfile.ProtectedHeatMeter
|
||||
: line.Equals(TestProfile.UserDefinedHeatMeter.ToString()) ? TestProfile.UserDefinedHeatMeter
|
||||
: line.Equals(TestProfile.Protected.ToString()) ? TestProfile.Protected : TestProfile.UserDefined; /// UserDefined is the default
|
||||
tst.TransitionAfter = input.ReadLine();
|
||||
|
||||
while (true)
|
||||
@@ -285,7 +289,7 @@ namespace Config.Entities
|
||||
ln = inp.ReadLine(); if (ln != Uncertainty.ToString(ci)) { diff.AppendFormat(fmt, "Uncertainty", Uncertainty.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != Repeats.ToString(ci)) { diff.AppendFormat(fmt, "Repeats", Repeats.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoDraining.ToString(ci)) { diff.AppendFormat(fmt, "Draining", DoDraining.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoDrainingAfter.ToString(ci)) { diff.AppendFormat(fmt, "Zeroing", DoDrainingAfter.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoDrainingAfter.ToString(ci)) { diff.AppendFormat(fmt, "Zeroing", DoDrainingAfter.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoControlWaterTemp.ToString()) { diff.AppendFormat(fmt, "DoControlWaterTemp", DoControlWaterTemp.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != TempLimLo.ToString(ci)) { diff.AppendFormat(fmt, "TempLimLo", TempLimLo.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != TempLimHi.ToString(ci)) { diff.AppendFormat(fmt, "TempLimHi", TempLimHi.ToString(ci), ln); };
|
||||
@@ -303,7 +307,7 @@ namespace Config.Entities
|
||||
ln = inp.ReadLine(); if (ln != MetersPath) { diff.AppendFormat(fmt, "MetersPath", MetersPath, ln); };
|
||||
ln = inp.ReadLine(); if (ln != RelTransBefore) { diff.AppendFormat(fmt, "RelTransBefore", RelTransBefore, ln); };
|
||||
ln = inp.ReadLine(); if (ln != RelTransBetween) { diff.AppendFormat(fmt, "RelTransBetween", RelTransBetween, ln); };
|
||||
ln = inp.ReadLine(); if (ln != RelTransAfter) { diff.AppendFormat(fmt, "RelTransAfter", RelTransAfter, ln); };
|
||||
ln = inp.ReadLine(); if (ln != Profile.ToString()) { diff.AppendFormat(fmt, "RelTransAfter", Profile, ln); };
|
||||
ln = inp.ReadLine(); if (ln != TransitionAfter) { diff.AppendFormat(fmt, "TransitionAfter", TransitionAfter, ln); };
|
||||
|
||||
return diff.ToString();
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace Config.Entities
|
||||
public virtual string Password { get; set; }
|
||||
public virtual string Password2 { get; set; }
|
||||
public virtual string Password3 { get; set; }
|
||||
public virtual string Password4 { get; set; }
|
||||
public virtual DateTime LastPwChange { get; set; }
|
||||
public virtual IList<Group> Groups { get; set; } //User can be a member of a list of groups
|
||||
|
||||
|
||||
@@ -147,13 +147,13 @@ namespace Config
|
||||
///
|
||||
/// Prepare all groups
|
||||
///
|
||||
var testers = new Config.Entities.Group((int)Users.Grp.GID.Testers, Strings.Tester);
|
||||
var testingSpecialists = new Config.Entities.Group((int)Users.Grp.GID.TestingSpecialists, Strings.Testing_Specialist);
|
||||
var headOfLab = new Config.Entities.Group((int)Users.Grp.GID.HeadOfLab, Strings.Head_of_Lab);
|
||||
var maintenanceSpecialists = new Config.Entities.Group((int)Users.Grp.GID.MaintenanceSpecialists, Strings.Maintenance_Specialist);
|
||||
var metrologists = new Config.Entities.Group((int)Users.Grp.GID.Metrologists, Strings.Metrologist);
|
||||
var calibrationSpecialists = new Config.Entities.Group((int)Users.Grp.GID.CalibrationSpecialists, Strings.Calibration_Specialist);
|
||||
var administrators = new Config.Entities.Group((int)Users.Grp.GID.Administrators, Strings.Administrator);
|
||||
var testers = new Config.Entities.Group(Users.Entities.GID.Testers);
|
||||
var testingSpecialists = new Config.Entities.Group(Users.Entities.GID.TestingSpecialists);
|
||||
var headOfLab = new Config.Entities.Group(Users.Entities.GID.HeadOfLab);
|
||||
var maintenanceSpecialists = new Config.Entities.Group(Users.Entities.GID.MaintenanceSpecialists);
|
||||
var metrologists = new Config.Entities.Group(Users.Entities.GID.Metrologists);
|
||||
var calibrationSpecialists = new Config.Entities.Group(Users.Entities.GID.CalibrationSpecialists);
|
||||
var administrators = new Config.Entities.Group(Users.Entities.GID.Administrators);
|
||||
|
||||
/// Create the user 'admin' add his groups
|
||||
var admin = new Config.Entities.User
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
|
||||
@@ -10,8 +10,7 @@ namespace Config.Mappings
|
||||
public GroupMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.Gid);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.GID).Column("Name"); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Config.Mappings
|
||||
Id(x => x.Id);
|
||||
Map(x => x.ItemNr);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Part);
|
||||
Map(x => x.CoefQfrom);
|
||||
Map(x => x.CoefQto);
|
||||
Map(x => x.ErrLimLo);
|
||||
|
||||
@@ -14,7 +14,8 @@ namespace Config.Mappings
|
||||
Map(x => x.ItemNr);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Part);
|
||||
Map(x => x.Publish);
|
||||
Map(x => x.Profile);
|
||||
Map(x => x.Publish);
|
||||
Map(x => x.DoEvaluate)
|
||||
.Column("Evaluate");
|
||||
#if TEST_PROFILES
|
||||
@@ -56,11 +57,14 @@ namespace Config.Mappings
|
||||
#if HEAT_METERS
|
||||
Map(x => x.HeatMetersPath);
|
||||
#endif
|
||||
Map(x => x.RelTransBefore);
|
||||
Map(x => x.RelTransBetween);
|
||||
Map(x => x.RelTransAfter);
|
||||
Map(x => x.TransitionAfter);
|
||||
HasMany(x => x.MoreParams)
|
||||
Map(x => x.RelTransBefore)
|
||||
.Column("RelTransBefore");
|
||||
Map(x => x.RelTransBetween)
|
||||
.Column("RelTransBetween");
|
||||
Map(x => x.TransitionAfter)
|
||||
.Column("TransitionAfter");
|
||||
|
||||
HasMany(x => x.MoreParams)
|
||||
.Cascade.All();
|
||||
References(x => x.Procedure);
|
||||
}
|
||||
|
||||
@@ -12,12 +12,11 @@ namespace Config.Mappings
|
||||
Id(x => x.Id);
|
||||
Map(x => x.UserName).Column("Name");
|
||||
Map(x => x.Number);
|
||||
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
|
||||
Map(x => x.Tag);
|
||||
#endif
|
||||
Map(x => x.Password);
|
||||
Map(x => x.Password2);
|
||||
Map(x => x.Password3);
|
||||
Map(x => x.Password4);
|
||||
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.24.1368.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1368.0")]
|
||||
[assembly: AssemblyVersion("2.24.1372.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1372.0")]
|
||||
|
||||
@@ -117,27 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Administrator" xml:space="preserve">
|
||||
<value>Administrator</value>
|
||||
</data>
|
||||
<data name="Calibration_Specialist" xml:space="preserve">
|
||||
<value>Kalibriertechniker</value>
|
||||
</data>
|
||||
<data name="Head_of_Lab" xml:space="preserve">
|
||||
<value>Laborleiter</value>
|
||||
</data>
|
||||
<data name="Maintenance_Specialist" xml:space="preserve">
|
||||
<value>Wartungstechniker</value>
|
||||
</data>
|
||||
<data name="Metrologist" xml:space="preserve">
|
||||
<value>Messtechniker</value>
|
||||
</data>
|
||||
<data name="Tester" xml:space="preserve">
|
||||
<value>Prüfer</value>
|
||||
</data>
|
||||
<data name="Testing_Specialist" xml:space="preserve">
|
||||
<value>Prüftechniker</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>NiO</value>
|
||||
</data>
|
||||
|
||||
@@ -117,27 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Administrator" xml:space="preserve">
|
||||
<value>Administrateur</value>
|
||||
</data>
|
||||
<data name="Calibration_Specialist" xml:space="preserve">
|
||||
<value>Spécialiste en calibration</value>
|
||||
</data>
|
||||
<data name="Head_of_Lab" xml:space="preserve">
|
||||
<value>Chef de laboratoire</value>
|
||||
</data>
|
||||
<data name="Maintenance_Specialist" xml:space="preserve">
|
||||
<value>Spécialiste en maintenance</value>
|
||||
</data>
|
||||
<data name="Metrologist" xml:space="preserve">
|
||||
<value>Métrologue</value>
|
||||
</data>
|
||||
<data name="Tester" xml:space="preserve">
|
||||
<value>Testeur</value>
|
||||
</data>
|
||||
<data name="Testing_Specialist" xml:space="preserve">
|
||||
<value>Spécialiste d'essais</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>Échoué</value>
|
||||
</data>
|
||||
|
||||
@@ -117,27 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Administrator" xml:space="preserve">
|
||||
<value>Amministratore</value>
|
||||
</data>
|
||||
<data name="Calibration_Specialist" xml:space="preserve">
|
||||
<value>esperto in calibrazione</value>
|
||||
</data>
|
||||
<data name="Head_of_Lab" xml:space="preserve">
|
||||
<value>capo di laboratorio</value>
|
||||
</data>
|
||||
<data name="Maintenance_Specialist" xml:space="preserve">
|
||||
<value>esperto di manutenzione</value>
|
||||
</data>
|
||||
<data name="Metrologist" xml:space="preserve">
|
||||
<value>metrologo</value>
|
||||
</data>
|
||||
<data name="Tester" xml:space="preserve">
|
||||
<value>tester</value>
|
||||
</data>
|
||||
<data name="Testing_Specialist" xml:space="preserve">
|
||||
<value>esperto di prove </value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>NOK</value>
|
||||
</data>
|
||||
|
||||
@@ -117,27 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Administrator" xml:space="preserve">
|
||||
<value>Administrator</value>
|
||||
</data>
|
||||
<data name="Calibration_Specialist" xml:space="preserve">
|
||||
<value>Specjalista ds. kalibracji</value>
|
||||
</data>
|
||||
<data name="Head_of_Lab" xml:space="preserve">
|
||||
<value>Kierownik Laboratorium</value>
|
||||
</data>
|
||||
<data name="Maintenance_Specialist" xml:space="preserve">
|
||||
<value>Konserwator</value>
|
||||
</data>
|
||||
<data name="Metrologist" xml:space="preserve">
|
||||
<value>Metrolog</value>
|
||||
</data>
|
||||
<data name="Tester" xml:space="preserve">
|
||||
<value>Pracownik przeprowadzający testy</value>
|
||||
</data>
|
||||
<data name="Testing_Specialist" xml:space="preserve">
|
||||
<value>Specjalista ds. testów</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>Niepowodzenie</value>
|
||||
</data>
|
||||
|
||||
@@ -117,27 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Administrator" xml:space="preserve">
|
||||
<value>Администратор</value>
|
||||
</data>
|
||||
<data name="Calibration_Specialist" xml:space="preserve">
|
||||
<value>Специалист по калибровке</value>
|
||||
</data>
|
||||
<data name="Head_of_Lab" xml:space="preserve">
|
||||
<value>Руководитель лаборатории</value>
|
||||
</data>
|
||||
<data name="Maintenance_Specialist" xml:space="preserve">
|
||||
<value>Специалист по техобслуживанию</value>
|
||||
</data>
|
||||
<data name="Metrologist" xml:space="preserve">
|
||||
<value>Метролог</value>
|
||||
</data>
|
||||
<data name="Tester" xml:space="preserve">
|
||||
<value>Контролер</value>
|
||||
</data>
|
||||
<data name="Testing_Specialist" xml:space="preserve">
|
||||
<value>Специалист по тестированию</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>NOK</value>
|
||||
</data>
|
||||
|
||||
+125
-124
@@ -1,128 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
<!--
|
||||
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.
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Administrator" xml:space="preserve">
|
||||
<value>管理员</value>
|
||||
</data>
|
||||
<data name="Calibration_Specialist" xml:space="preserve">
|
||||
<value>校准专员</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>NOK</value>
|
||||
</data>
|
||||
<data name="Head_of_Lab" xml:space="preserve">
|
||||
<value>实验室负责人</value>
|
||||
</data>
|
||||
<data name="Maintenance_Specialist" xml:space="preserve">
|
||||
<value>维护专员</value>
|
||||
</data>
|
||||
<data name="Metrologist" xml:space="preserve">
|
||||
<value>计量者</value>
|
||||
</data>
|
||||
<data name="Passed" xml:space="preserve">
|
||||
<value>好</value>
|
||||
</data>
|
||||
<data name="Tester" xml:space="preserve">
|
||||
<value>测试仪</value>
|
||||
</data>
|
||||
<data name="Testing_Specialist" xml:space="preserve">
|
||||
<value>测试专员</value>
|
||||
</data>
|
||||
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>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>错误 Error</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>NOK</value>
|
||||
</data>
|
||||
<data name="Passed" xml:space="preserve">
|
||||
<value>好</value>
|
||||
</data>
|
||||
</root>
|
||||
+114
@@ -138,5 +138,119 @@ namespace Config
|
||||
/// pattern NOT found
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get either Q1 or Qmin flow for a given Qn and metrological class
|
||||
/// </summary>
|
||||
/// <param name="Qn">Nominal flow in m3/h</param>
|
||||
/// <param name="metroClass">Metrological class ("A" ,"B", "C" or "R#")</param>
|
||||
/// <param name="medium">NotSpecified, ColdWater or HotWater</param>
|
||||
/// <param name="Qdflt">Default flow when metrologic does not match pattern</param>
|
||||
/// <returns>Q1 or Qmin flow in m3/h</returns>
|
||||
public static double GetQ1Qmin(double Qn, string metroClass, Entities.Medium medium = Entities.Medium.ColdWater, double Qdflt = 0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(metroClass)) return Qdflt;
|
||||
|
||||
int metroClassRatio;
|
||||
if ((metroClass[0] == 'R') && int.TryParse(metroClass.Substring(1), out metroClassRatio) && (metroClassRatio > 0))
|
||||
{
|
||||
return Qn / (double)metroClassRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (medium == Entities.Medium.HotWater)
|
||||
{
|
||||
switch (metroClass)
|
||||
{
|
||||
case "A": return (Qn < 15) ? (0.04 * Qn) : (0.08 * Qn);
|
||||
case "B": return (Qn < 15) ? (0.02 * Qn) : (0.04 * Qn);
|
||||
case "C": return (Qn < 15) ? (0.01 * Qn) : (0.02 * Qn);
|
||||
case "D": return (Qn < 15) ? (0.01 * Qn) : Qdflt;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (metroClass)
|
||||
{
|
||||
case "A": return (Qn < 15) ? (0.04 * Qn) : (0.08 * Qn);
|
||||
case "B": return (Qn < 15) ? (0.02 * Qn) : (0.03 * Qn);
|
||||
case "C": return (Qn < 15) ? (0.01 * Qn) : (0.006 * Qn);
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Qdflt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get either Q2 or Qt flow for a given Qn and metrological class
|
||||
/// </summary>
|
||||
/// <param name="Qn">Nominal flow in m3/h</param>
|
||||
/// <param name="metroClass">Metrological class ("A" ,"B", "C" or "R#")</param>
|
||||
/// <param name="medium">NotSpecified, ColdWater or HotWater</param>
|
||||
/// <param name="Qdflt">Default flow when metrologic does not match pattern</param>
|
||||
/// <returns>Q2 or Qt flow in m3/h</returns>
|
||||
public static double GetQ2Qt(double Qn, string metroClass, Entities.Medium medium = Entities.Medium.ColdWater, double Qdflt = 0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(metroClass)) return Qdflt;
|
||||
|
||||
int metroClassRatio;
|
||||
if ((metroClass[0] == 'R') && int.TryParse(metroClass.Substring(1), out metroClassRatio) && (metroClassRatio > 0))
|
||||
{
|
||||
return 1.6 * Qn / (double)metroClassRatio;
|
||||
}
|
||||
|
||||
if (medium == Entities.Medium.HotWater)
|
||||
{
|
||||
switch (metroClass)
|
||||
{
|
||||
case "A": return (Qn < 15) ? (0.1 * Qn) : (0.2 * Qn);
|
||||
case "B": return (Qn < 15) ? (0.08 * Qn) : (0.15 * Qn);
|
||||
case "C": return (Qn < 15) ? (0.06 * Qn) : (0.1 * Qn);
|
||||
case "D": return (Qn < 15) ? (0.015 * Qn) : Qdflt;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (metroClass)
|
||||
{
|
||||
case "A": return (Qn < 15) ? (0.1 * Qn) : (0.3 * Qn);
|
||||
case "B": return (Qn < 15) ? (0.08 * Qn) : (0.2 * Qn);
|
||||
case "C": return (Qn < 15) ? (0.015 * Qn) : (0.015 * Qn);
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
return Qdflt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get either Q4 or Qmax flow for a given Qn and metrological class
|
||||
/// </summary>
|
||||
/// <param name="Qn">Nominal flow in m3/h</param>
|
||||
/// <param name="metroClass">Metrological class ("A" ,"B", "C" or "R#")</param>
|
||||
/// <param name="medium">NotSpecified, ColdWater or HotWater</param>
|
||||
/// <param name="Qdflt">Default flow when metrologic does not match pattern</param>
|
||||
/// <returns>Q4 or Qmax flow in m3/h</returns>
|
||||
public static double GetQ4Qmax(double Qn, string metroClass, Entities.Medium medium = Entities.Medium.ColdWater, double Qdflt = 0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(metroClass)) return Qdflt;
|
||||
|
||||
switch (metroClass[0])
|
||||
{
|
||||
case 'A':
|
||||
case 'B':
|
||||
case 'C':
|
||||
case 'D':
|
||||
return 2 * Qn;
|
||||
case 'R':
|
||||
return 1.25 * Qn;
|
||||
default:
|
||||
return Qdflt;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace Results.Entities
|
||||
|
||||
/// Main result
|
||||
public virtual double Error { get; set; } /// [%]
|
||||
public virtual int ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28
|
||||
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags)
|
||||
public virtual long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
|
||||
public virtual double KorrErrQ { get; set; } /// [%] not mapped to results DB, saved to Oracle DB
|
||||
public virtual bool TestDone { get; set; } /// true = test was completed
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
|
||||
@@ -56,9 +56,9 @@ namespace Results.Entities
|
||||
public virtual float DivEnd90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
|
||||
public virtual float DivEnd50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
|
||||
public virtual float DivEnd10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
|
||||
|
||||
public virtual int ErrorFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
|
||||
public virtual sbyte ErrorFlagsMd { get; set; } /// 0=off, 1=info, 2=on (evaluated in MeterTestRslt.Passed)
|
||||
|
||||
public virtual long ErrorFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
|
||||
public virtual long InfoFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
|
||||
|
||||
/// Main results of heat meters
|
||||
public virtual double RefEnergy { get; set; } /// [J] Joul
|
||||
@@ -270,7 +270,7 @@ namespace Results.Entities
|
||||
DivEnd50 = src.DivEnd50;
|
||||
DivEnd90 = src.DivEnd90;
|
||||
ErrorFlags = src.ErrorFlags;
|
||||
ErrorFlagsMd = src.ErrorFlagsMd;
|
||||
InfoFlags = src.InfoFlags;
|
||||
RefEnergy = src.RefEnergy;
|
||||
AmbTempMean = src.AmbTempMean;
|
||||
AmbTempStart = src.AmbTempStart;
|
||||
@@ -334,12 +334,6 @@ namespace Results.Entities
|
||||
Custom10 = src.Custom10;
|
||||
}
|
||||
|
||||
/// <summary> Wrapper </summary>
|
||||
public virtual Config.Entities.ErrorFlagsMode ErrorFlagsMode()
|
||||
{
|
||||
return (Config.Entities.ErrorFlagsMode)ErrorFlagsMd;
|
||||
}
|
||||
|
||||
/// <summary> Wrapper </summary>
|
||||
public virtual string ErrorFlagsStr()
|
||||
{
|
||||
@@ -370,11 +364,11 @@ namespace Results.Entities
|
||||
|
||||
public virtual string ToString(int i)
|
||||
{
|
||||
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} Buoyancy={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} ErrorFlagsMd={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
|
||||
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} Buoyancy={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
|
||||
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime,
|
||||
PulsesMaster, ConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd,
|
||||
DensityIn, DensityLine, DensityDiv, Buoyancy, FlowMass, FlowVolume,
|
||||
VolumeCTV, VolumeMaster, ErrorMaster, ErrorFlags, ErrorFlagsMd,
|
||||
VolumeCTV, VolumeMaster, ErrorMaster, ErrorFlags, InfoFlags,
|
||||
AmbTempMean, AmbTempStart, AmbTempEnd, AmbTempMin, AmbTempMax,
|
||||
AmbPressMean, AmbPressStart, AmbPressEnd, AmbPressMin, AmbPressMax,
|
||||
AmbHumiMean, AmbHumiStart, AmbHumiEnd, AmbHumiMin, AmbHumiMax,
|
||||
|
||||
@@ -51,7 +51,8 @@ namespace Results.Entities
|
||||
public virtual string EndStateAux { get; set; } /// End state of the auxiliary water meter
|
||||
public virtual double QRise { get; set; } /// [m3/h] detected Q_rise of a composed meter or 'sensitivity' of a single meter
|
||||
public virtual double QFall { get; set; } /// [m3/h] detected Q_fall of a composed meter
|
||||
public virtual int ErrorFlags { get; set; } /// bitfield : bit14=E15, bit15=E16
|
||||
public virtual long ErrorFlags { get; set; } /// bitfield : bit14=E15, bit15=E16
|
||||
public virtual long InfoFlags { get; set; } /// bitfield : bit14=E15, bit15=E16
|
||||
public virtual bool Passed { get; set; }
|
||||
public virtual int ResultCode { get; set; }
|
||||
public virtual string ArchivePath { get; set; }
|
||||
@@ -135,23 +136,19 @@ namespace Results.Entities
|
||||
public virtual MeterTestRslt LastMeterTestRslts() { return lastMeterTestRslts; }
|
||||
|
||||
|
||||
public virtual int ErrorFlagsFromTests(out ErrorFlagsMode errorFlagsMode)
|
||||
public virtual long ErrorFlagsFromTests()
|
||||
{
|
||||
int errorFlags = 0;
|
||||
ErrorFlagsMode eFlagsMode = 0; /// = ErrorFlagsMode.Off;
|
||||
long errorFlags = 0;
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if (mtr.Evaluate() && mtr.TestDone) errorFlags |= mtr.TestRslt.ErrorFlags;
|
||||
if ((int)mtr.TestRslt.ErrorFlagsMode() > (int)eFlagsMode) eFlagsMode = mtr.TestRslt.ErrorFlagsMode();
|
||||
}
|
||||
errorFlagsMode = eFlagsMode; /// Maximum from all tests (=ErrorFlagsMode.On if at least one test is ErrorFlagsMode.On)
|
||||
return errorFlags;
|
||||
}
|
||||
|
||||
public virtual int ErrorFlagsFromTestsAndWM(out ErrorFlagsMode errorFlagsMode)
|
||||
public virtual long ErrorFlagsFromTestsAndWM()
|
||||
{
|
||||
int eFlagsFromTests = ErrorFlagsFromTests(out errorFlagsMode) | ErrorFlags;
|
||||
return (errorFlagsMode != ErrorFlagsMode.Off) ? (eFlagsFromTests | ErrorFlags) : 0;
|
||||
return ErrorFlagsFromTests() | ErrorFlags;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -160,8 +157,7 @@ namespace Results.Entities
|
||||
/// <returns>ErrorFlags string</returns>
|
||||
public virtual string ErrorFlagsStr()
|
||||
{
|
||||
ErrorFlagsMode errorFlagsMode;
|
||||
string eFlags = Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM(out errorFlagsMode));
|
||||
string eFlags = Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM());
|
||||
#if LANG_PL
|
||||
return string.IsNullOrEmpty(eFlags) ? "brak" : eFlags;
|
||||
#else
|
||||
@@ -171,8 +167,7 @@ namespace Results.Entities
|
||||
|
||||
public virtual string PassedOrErrorFlagsStr()
|
||||
{
|
||||
ErrorFlagsMode errorFlagsMode;
|
||||
string eFlags = Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM(out errorFlagsMode));
|
||||
string eFlags = Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM());
|
||||
return string.IsNullOrEmpty(eFlags) ? (WaterMeterData.Text4 + PassedColorStr(null)) : eFlags;
|
||||
}
|
||||
|
||||
@@ -192,19 +187,14 @@ namespace Results.Entities
|
||||
}
|
||||
}
|
||||
|
||||
ErrorFlagsMode errorFlagsMode;
|
||||
errFlgsStr.Append(Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM(out errorFlagsMode)));
|
||||
errFlgsStr.Append(Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM()));
|
||||
|
||||
return errFlgsStr.ToString();
|
||||
}
|
||||
|
||||
public virtual bool PassedFromTests()
|
||||
{
|
||||
ErrorFlagsMode eFlagsMode;
|
||||
int eFlags = ErrorFlagsFromTestsAndWM(out eFlagsMode);
|
||||
|
||||
bool passed = true;
|
||||
if (eFlagsMode == ErrorFlagsMode.On && eFlags != 0) passed = false;
|
||||
bool passed = (ErrorFlagsFromTestsAndWM() == 0);
|
||||
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Results.Mappings
|
||||
Map(x => x.DiverterStart);
|
||||
Map(x => x.DiverterEnd);
|
||||
Map(x => x.ErrorFlags);
|
||||
Map(x => x.ErrorFlagsMd);
|
||||
Map(x => x.InfoFlags);
|
||||
#if HEAT_METERS
|
||||
Map(x => x.RefEnergy);
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace Results.Mappings
|
||||
Map(x => x.QRise);
|
||||
Map(x => x.QFall);
|
||||
Map(x => x.ErrorFlags);
|
||||
Map(x => x.Passed);
|
||||
Map(x => x.InfoFlags);
|
||||
Map(x => x.Passed);
|
||||
Map(x => x.ResultCode);
|
||||
Map(x => x.ArchivePath);
|
||||
Map(x => x.Remark)
|
||||
|
||||
@@ -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.24.1368.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1368.0")]
|
||||
[assembly: AssemblyVersion("2.24.1369.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1369.0")]
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ROMA_200;LANG_IT;TEST_PROFILES</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -27,7 +27,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;ROMA_200;LANG_IT;TEST_PROFILES</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
+3
-3
@@ -61,12 +61,12 @@ namespace Results
|
||||
/// </summary>
|
||||
/// <param name="errorFlags">Input</param>
|
||||
/// <returns>Output string</returns>
|
||||
public static string ErrorFlagsStr(int errorFlags)
|
||||
public static string ErrorFlagsStr(long errorFlags)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < 31; i++)
|
||||
for (int i = 0; i < 63; i++)
|
||||
{
|
||||
if ((errorFlags & (1 << i)) != 0)
|
||||
if ((errorFlags & (1L << i)) != 0)
|
||||
{
|
||||
sb.Append("E");
|
||||
sb.Append(i + 1);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ROMA_200;LANG_IT</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -31,7 +31,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;ROMA_200;LANG_IT</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace TBF.BenchControl
|
||||
Flags = CfgUpdateFlags.None;
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { global::Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { global::Users.Entities.GID.Metrologists };
|
||||
sharedButtons.MoreButtonTop = ComponentCfgCtrlHeight - 45;
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.None;
|
||||
sharedButtons.Unlocked += Unlock;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace TBF.BenchControl.Elde.CoverTest
|
||||
readonly ulong mask; /// derived from bitPosition in the constructor
|
||||
readonly ulong target;
|
||||
readonly string message;
|
||||
readonly Users.Grp.GID[] bypassLevel;
|
||||
readonly Users.Entities.GID[] bypassLevel;
|
||||
|
||||
public CoverTest()
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace TBF.BenchControl.Elde.CoverTest
|
||||
public int BitPosition;
|
||||
public bool Invert;
|
||||
public string Message;
|
||||
public Users.Grp.GID[] BypassLevel;
|
||||
public Users.Entities.GID[] BypassLevel;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
CoverTestCfg()
|
||||
@@ -35,7 +35,7 @@ namespace TBF.BenchControl.Elde.CoverTest
|
||||
Invert = false;
|
||||
Message = Strings.Close_the_cover;
|
||||
|
||||
BypassLevel = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists };
|
||||
BypassLevel = new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists };
|
||||
}
|
||||
|
||||
public CoverTestCfg(IComponentFactory factory)
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace TBF.BenchControl.Elde.CoverTest
|
||||
}
|
||||
}
|
||||
|
||||
for (Users.Grp.GID gid = 0; gid < Users.Grp.GID.NrOfGroups; gid++)
|
||||
for (Users.Entities.GID gid = 0; gid < Users.Entities.GID.NrOfGroups; gid++)
|
||||
{
|
||||
bypassLevelComboBox.Items.Add(gid.ToString());
|
||||
}
|
||||
@@ -94,11 +94,11 @@ namespace TBF.BenchControl.Elde.CoverTest
|
||||
config.Message = messageTextBox.Text;
|
||||
|
||||
config.BypassLevel = null;
|
||||
for (Users.Grp.GID gid = 0; gid < Users.Grp.GID.NrOfGroups; gid++)
|
||||
for (Users.Entities.GID gid = 0; gid < Users.Entities.GID.NrOfGroups; gid++)
|
||||
{
|
||||
if (bypassLevelComboBox.Text == gid.ToString())
|
||||
{
|
||||
config.BypassLevel = new Users.Grp.GID[] { gid };
|
||||
config.BypassLevel = new Users.Entities.GID[] { gid };
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace TBF.BenchControl.Elde.CoverTest
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
Users.Grp.GID[] bypassLevel;
|
||||
Users.Entities.GID[] bypassLevel;
|
||||
|
||||
public CoverTestForm(string message, Users.Grp.GID[] bypassLevel, ILog bypassLog)
|
||||
public CoverTestForm(string message, Users.Entities.GID[] bypassLevel, ILog bypassLog)
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.GenericDevices
|
||||
{
|
||||
public interface IErrorFlags : IComponent
|
||||
{
|
||||
Config.Entities.ErrorFlagsMode Mode { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Ger error flags for a test
|
||||
/// </summary>
|
||||
@@ -20,14 +18,16 @@ namespace TBF.BenchControl.GenericDevices
|
||||
/// <param name="startStopValve">true = start/stop valve was used (times apply)</param>
|
||||
/// <param name="switchTimeStart">Diverter or valve switch time in s on test start</param>
|
||||
/// <param name="switchTimeEnd">Diverter or valve switch time in s on test end</param>
|
||||
/// <param name="infoFlags">Similar to error flags, contains only warnings</param>
|
||||
/// <returns>Error flags</returns>
|
||||
int GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd);
|
||||
long GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd, out long infoFlags);
|
||||
|
||||
/// <summary>
|
||||
/// Get water meter error flags (evaluated from all meter test results)
|
||||
/// </summary>
|
||||
/// <param name="meterTestRslts">Meter test results</param>
|
||||
/// <param name="infoFlags">Similar to error flags, contains only warnings</param>
|
||||
/// <returns>Error flags</returns>
|
||||
int GetWMtrErrorFlags(IList<MeterTestRslt> meterTestRslts);
|
||||
long GetWMtrErrorFlags(IList<MeterTestRslt> meterTestRslts, out long infoFlags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -978,14 +978,22 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
|
||||
StateMachine.LoadTestParams(test);
|
||||
ProcessData.RegisterReaders = sensPath.RegisterReaders;
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
if ((rr is TestMethods.iPerlCommunication.iPerlHead.IperlHead) && (BenchInfo != null))
|
||||
{
|
||||
(rr as TestMethods.iPerlCommunication.iPerlHead.IperlHead).BenchName = BenchInfo.TestBenchName;
|
||||
}
|
||||
}
|
||||
|
||||
if ((sensPath != null) && (sensPath.RegisterReaders != null))
|
||||
{
|
||||
ProcessData.RegisterReaders = sensPath.RegisterReaders;
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
if ((rr is TestMethods.iPerlCommunication.iPerlHead.IperlHead) && (BenchInfo != null))
|
||||
{
|
||||
(rr as TestMethods.iPerlCommunication.iPerlHead.IperlHead).BenchName = BenchInfo.TestBenchName;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessData.RegisterReaders = null;
|
||||
}
|
||||
|
||||
///
|
||||
/// Execute one test (single repetition of a repeated test)
|
||||
@@ -1136,15 +1144,22 @@ namespace TBF.BenchControl.Sequences
|
||||
if (testMethod != null && testMethod.CanTest(StateMachine.Procedure.MetersKind))
|
||||
{
|
||||
StateMachine.LoadTestParams(dfrrdData.Test);
|
||||
ProcessData.RegisterReaders = sensPath.RegisterReaders;
|
||||
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
if ((rr is TestMethods.iPerlCommunication.iPerlHead.IperlHead) && (BenchInfo != null))
|
||||
{
|
||||
(rr as TestMethods.iPerlCommunication.iPerlHead.IperlHead).BenchName = BenchInfo.TestBenchName;
|
||||
}
|
||||
}
|
||||
if ((sensPath != null) && (sensPath.RegisterReaders != null))
|
||||
{
|
||||
ProcessData.RegisterReaders = sensPath.RegisterReaders;
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
if ((rr is TestMethods.iPerlCommunication.iPerlHead.IperlHead) && (BenchInfo != null))
|
||||
{
|
||||
(rr as TestMethods.iPerlCommunication.iPerlHead.IperlHead).BenchName = BenchInfo.TestBenchName;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessData.RegisterReaders = null;
|
||||
}
|
||||
|
||||
e = testMethod.Execute2ndPass(dfrrdData.Test, dfrrdData.RepetNr, dfrrdData.IntermediateData);
|
||||
|
||||
@@ -1195,15 +1210,22 @@ namespace TBF.BenchControl.Sequences
|
||||
if (testMethod != null && testMethod.CanTest(StateMachine.Procedure.MetersKind))
|
||||
{
|
||||
StateMachine.LoadTestParams(test);
|
||||
ProcessData.RegisterReaders = sensPath.RegisterReaders;
|
||||
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
if ((rr is TestMethods.iPerlCommunication.iPerlHead.IperlHead) && (BenchInfo != null))
|
||||
{
|
||||
(rr as TestMethods.iPerlCommunication.iPerlHead.IperlHead).BenchName = BenchInfo.TestBenchName;
|
||||
}
|
||||
}
|
||||
if ((sensPath != null) && (sensPath.RegisterReaders != null))
|
||||
{
|
||||
ProcessData.RegisterReaders = sensPath.RegisterReaders;
|
||||
foreach (var rr in sensPath.RegisterReaders)
|
||||
{
|
||||
if ((rr is TestMethods.iPerlCommunication.iPerlHead.IperlHead) && (BenchInfo != null))
|
||||
{
|
||||
(rr as TestMethods.iPerlCommunication.iPerlHead.IperlHead).BenchName = BenchInfo.TestBenchName;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessData.RegisterReaders = null;
|
||||
}
|
||||
|
||||
Event rsltTransBefore = Event.Done;
|
||||
Event rsltTransAfter = Event.Done;
|
||||
|
||||
@@ -1172,8 +1172,8 @@ namespace TBF.BenchControl.Sequences
|
||||
sb.Append(";"); sb.Append(tstRslt.TargetVolume()); /// G
|
||||
sb.Append(";"); sb.Append(tstRslt.Qfrom()); /// H
|
||||
sb.Append(";"); sb.Append(tstRslt.Qto()); /// I
|
||||
sb.Append(";"); sb.Append(tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()); /// J
|
||||
sb.Append(";"); sb.Append(tstRslt.ErrLimHi() - tstRslt.ErrLimMargin()); /// K
|
||||
sb.Append(";"); sb.Append(tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()); /// J
|
||||
sb.Append(";"); sb.Append(tstRslt.ErrLimHi() - tstRslt.ErrLimMargin()); /// K
|
||||
sb.Append(";"); sb.AppendFormat("{0:F1}", tstRslt.TempLimLo()); /// L
|
||||
sb.Append(";"); sb.AppendFormat("{0:F1}", tstRslt.TempLimHi()); /// M
|
||||
sb.Append(";"); sb.Append("0"); /// N
|
||||
@@ -1229,8 +1229,8 @@ namespace TBF.BenchControl.Sequences
|
||||
sb.Append(";"); sb.Append(" "); /// BB d_air: Hustota vzduchu: Sheet1 - K9
|
||||
sb.Append(";"); sb.Append(tstRslt.Buoyancy); /// BC Buoyancy: Sheet1 - X9
|
||||
|
||||
sb.Append(";"); sb.Append(Config.Formulas.RealDensity()); /// BD
|
||||
sb.Append(";"); sb.Append(Config.Formulas.AtTemperature()); /// BE
|
||||
sb.Append(";"); sb.Append(Config.Formulas.RealDensity()); /// BD
|
||||
sb.Append(";"); sb.Append(Config.Formulas.AtTemperature()); /// BE
|
||||
sb.Append(";"); sb.Append(tstRslt.FlowMax); /// BF pipe expansion: teraz vynechat
|
||||
sb.Append(";"); sb.Append(tstRslt.FlowMin); /// BG [kg/h] Qm
|
||||
sb.Append(";"); sb.Append(tstRslt.FlowVolume); /// BH [l/h] Qv
|
||||
@@ -1259,7 +1259,9 @@ namespace TBF.BenchControl.Sequences
|
||||
sb.Append(";"); sb.AppendFormat("{0:F1}", Units.ConvertTo(Unit.RPct, tstRslt.AmbHumiEnd)); /// CB [R%]
|
||||
|
||||
sb.Append(";"); sb.Append(tstRslt.PulsesMaster); /// CC Celkovy pocet et. pulzov skusky (Prolonged : do vahy)
|
||||
sb.Append(";"); sb.Append((tstRslt.TotalPulsesMstr != 0) ? tstRslt.TotalPulsesMstr.ToString() : " "); /// CD - '' - pre druhy (Prolonged : celkovy pocet)
|
||||
//sb.Append(";"); sb.Append((tstRslt.TotalPulsesMstr != 0) ? tstRslt.TotalPulsesMstr.ToString() : " "); /// CD - '' - pre druhy (Prolonged : celkovy pocet)
|
||||
sb.Append(";"); sb.Append(1000 * tstRslt.TestTimeCorrection); /// CD [ms] Diverter test time correction
|
||||
|
||||
for (int i = 0; i < ProcessData.BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
if (ProcessData.BatchRslts.WaterMeters[i] != null)
|
||||
|
||||
@@ -85,7 +85,6 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||
{
|
||||
@@ -115,7 +114,11 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
int flowSetTime = 0;
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
|
||||
/// Read pressure and temperature once before calling Bridge.OnTestSelected(...)
|
||||
State.Create(string.Format("{0}({1}) : Measuring process data", test.Method, test.Name))
|
||||
@@ -129,13 +132,9 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
}
|
||||
while (e.Contains(Event.Busy));
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
TestStartTime = DateTime.Now;
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
TestStartTime = DateTime.Now;
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Starting_the_pump);
|
||||
@@ -241,7 +240,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
flow_set:
|
||||
|
||||
int flowSetTime = StateMachine.Time - flowSetTime0;
|
||||
flowSetTime = StateMachine.Time - flowSetTime0;
|
||||
|
||||
if (test.DoControlWaterTemp && benchPath.TempMtrUp != null && benchPath.TempMtrDown != null)
|
||||
{
|
||||
@@ -424,8 +423,9 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
tstRslt.DiverterStart = 0;
|
||||
tstRslt.DiverterEnd = 0;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
@@ -470,7 +470,9 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -485,7 +487,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
/// Update modeless dialog error information
|
||||
Bridge.OnAdjustmentInProgress(this, new AdjustmentInProgressEventArgs(testName));
|
||||
|
||||
/// Test 'Quit'
|
||||
/// Close the modeless form
|
||||
if ((modelessDlg is GenericDevices.IHasCompleted) && !(modelessDlg as GenericDevices.IHasCompleted).Completed)
|
||||
{
|
||||
goto loop; /// Modeless dilaog not closed, keep looping
|
||||
@@ -497,6 +499,13 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
stopTest:
|
||||
|
||||
/// Close the modeless form
|
||||
if ((modelessDlg is GenericDevices.IHasCompleted) && !(modelessDlg as GenericDevices.IHasCompleted).Completed)
|
||||
{
|
||||
goto loop; /// Modeless dilaog not closed, keep looping
|
||||
}
|
||||
modelessDlg = null; /// Modeless dialog is closed now
|
||||
|
||||
///
|
||||
/// Quit this sequence
|
||||
///
|
||||
@@ -514,8 +523,6 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
}
|
||||
|
||||
stopTestWOStoppingDivGateEtc:
|
||||
|
||||
return new List<Event> { retVal };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
completed = false;
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.AdjustmentInProgressHandler += delegate(object sender, UiBridge.AdjustmentInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@@ -72,6 +72,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
completed = false;
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.AdjustmentInProgressHandler += delegate(object sender, UiBridge.AdjustmentInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@@ -76,6 +76,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
completed = false;
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.AdjustmentInProgressHandler += delegate(object sender, UiBridge.AdjustmentInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@@ -705,8 +705,9 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart;
|
||||
tstRslt.DiverterEnd = switchTimeEnd;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, switchTimeStart, switchTimeEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
@@ -755,7 +756,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
@@ -782,7 +783,9 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -732,9 +732,9 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
|
||||
log.DebugFormat("Diverter switch time [s]: Start: {0}ms ({1} {2} {3}) End: {4}ms ({5} {6} {7})",
|
||||
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
|
||||
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
///
|
||||
/// Single meters
|
||||
@@ -830,7 +830,7 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
|
||||
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -852,7 +852,9 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long _infoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out _infoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = infoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.Metrologists };
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add |
|
||||
SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up |
|
||||
|
||||
@@ -383,8 +383,9 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
|
||||
tstRslt.DiverterStart = 0;
|
||||
tstRslt.DiverterEnd = 0;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
///
|
||||
/// Single meters
|
||||
@@ -432,8 +433,8 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
|
||||
if (iPerl != null)
|
||||
@@ -467,7 +468,9 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -830,8 +830,9 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart;
|
||||
tstRslt.DiverterEnd = switchTimeEnd;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
if (compound)
|
||||
{
|
||||
@@ -876,8 +877,8 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -929,7 +930,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
volumeRslt.Passed = !heatMetersTestParams.EvaluateVolume ||
|
||||
((volumeRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty) &&
|
||||
(volumeRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty) &&
|
||||
(tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On));
|
||||
(tstRslt.ErrorFlags == 0));
|
||||
volumeRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -947,8 +948,8 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
|
||||
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
energyRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
energyRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -979,8 +980,8 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1003,7 +1004,9 @@ namespace TBF.BenchControl.TestMethods.FixedStart
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -601,8 +601,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart;
|
||||
tstRslt.DiverterEnd = switchTimeEnd;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
@@ -625,8 +626,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -648,7 +649,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -781,8 +781,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart;
|
||||
tstRslt.DiverterEnd = switchTimeEnd;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
tstRslt.Components = Results.Entities.Components
|
||||
.UpdateList(BatchRslts.ComponentsList,
|
||||
@@ -919,8 +920,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -952,8 +953,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
tstRslt.TestDone = true;
|
||||
@@ -966,8 +967,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEval
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
}
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-8
@@ -962,8 +962,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart;
|
||||
tstRslt.DiverterEnd = switchTimeEnd;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
tstRslt.Components = Results.Entities.Components
|
||||
.UpdateList(BatchRslts.ComponentsList,
|
||||
@@ -1100,8 +1101,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1133,8 +1134,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
tstRslt.TestDone = true;
|
||||
@@ -1147,8 +1148,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollDeferredEval
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
}
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-10
@@ -1009,8 +1009,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart;
|
||||
tstRslt.DiverterEnd = switchTimeEnd;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
if (compound)
|
||||
{
|
||||
@@ -1055,8 +1056,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -1108,7 +1109,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
volumeRslt.Passed = !heatMetersTestParams.EvaluateVolume ||
|
||||
((volumeRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty) &&
|
||||
(volumeRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty) &&
|
||||
(tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On));
|
||||
(tstRslt.ErrorFlags == 0));
|
||||
volumeRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -1126,8 +1127,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
|
||||
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
energyRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
energyRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1158,8 +1159,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1182,7 +1183,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-7
@@ -740,8 +740,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart;
|
||||
tstRslt.DiverterEnd = switchTimeEnd;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, true, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
if (compoundTestParams != null)
|
||||
{
|
||||
@@ -786,8 +787,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -819,8 +820,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -843,7 +844,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,8 +493,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
|
||||
tstRslt.DiverterStart = 0;
|
||||
tstRslt.DiverterEnd = 0;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
if (compoundTestParams != null)
|
||||
{
|
||||
@@ -549,7 +550,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
volumeRslt.Passed = !heatMetersTestParams.EvaluateVolume ||
|
||||
((volumeRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty) &&
|
||||
(volumeRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty) &&
|
||||
(tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On));
|
||||
(tstRslt.ErrorFlags == 0));
|
||||
volumeRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -568,8 +569,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
|
||||
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
energyRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
energyRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -665,7 +666,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
}
|
||||
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
|
||||
#if TEST_MODE
|
||||
if (!BatchRslts.IsProduction() &&
|
||||
((test.Name.ToLower().Contains("q2") && Math.Abs(meterRslt.Error) > 2.0 && Math.Abs(meterRslt.Error) <= 4.0) ||
|
||||
@@ -690,11 +690,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
meterRslt.KorrErrQ = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -717,7 +716,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+18
-15
@@ -783,10 +783,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
log.DebugFormat("Diverter switch time [s]: Start: {0}ms ({1} {2} {3}) End: {4}ms ({5} {6} {7})",
|
||||
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
|
||||
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd) : 0;
|
||||
}
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
}
|
||||
else
|
||||
{
|
||||
Results.Entities.TestRslt tstResRepet1 = BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, test.Repeats, 1), test.Part);
|
||||
@@ -812,9 +812,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
tstRslt.DivEnd50 = 0;
|
||||
tstRslt.DivEnd10 = 0;
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0) : 0;
|
||||
} /// [kg/h]
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
} /// [kg/h]
|
||||
|
||||
tstRslt.FlowMean = (float)RefFlowStat.Average;
|
||||
tstRslt.FlowStart = (float)RefFlowStat.First;
|
||||
@@ -875,8 +876,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -928,7 +929,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
volumeRslt.Passed = !heatMetersTestParams.EvaluateVolume ||
|
||||
((volumeRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty) &&
|
||||
(volumeRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty) &&
|
||||
(tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On));
|
||||
(tstRslt.ErrorFlags == 0));
|
||||
volumeRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -947,8 +948,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
|
||||
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
energyRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
energyRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1024,8 +1025,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
meterRslt.Error = Config.Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1048,7 +1049,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-10
@@ -903,9 +903,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
log.DebugFormat("Diverter switch time [s]: Start: {0}ms ({1} {2} {3}) End: {4}ms ({5} {6} {7})",
|
||||
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
|
||||
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
if (compoundTestParams != null)
|
||||
{
|
||||
@@ -959,8 +959,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -1012,7 +1012,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
volumeRslt.Passed = !heatMetersTestParams.EvaluateVolume ||
|
||||
((volumeRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty) &&
|
||||
(volumeRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty) &&
|
||||
(tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On));
|
||||
(tstRslt.ErrorFlags == 0));
|
||||
volumeRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -1031,7 +1031,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
|
||||
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
energyRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -1158,8 +1158,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1181,7 +1181,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-10
@@ -785,9 +785,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
log.DebugFormat("Diverter switch time [s]: Start: {0}ms ({1} {2} {3}) End: {4}ms ({5} {6} {7})",
|
||||
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
|
||||
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
if (compoundTestParams != null)
|
||||
{
|
||||
@@ -841,8 +841,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
compoundMeterRslt.Error = Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -894,7 +894,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
volumeRslt.Passed = !heatMetersTestParams.EvaluateVolume ||
|
||||
((volumeRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty) &&
|
||||
(volumeRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty) &&
|
||||
(tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On));
|
||||
(tstRslt.ErrorFlags == 0));
|
||||
volumeRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -913,7 +913,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
energyRslt.Error = Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
|
||||
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
energyRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -991,8 +991,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
meterRslt.Error = Formulas.ErrorFromVolumes(meterRslt.VolumeMeter, meterRslt.VolumeRef);
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1014,7 +1014,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-10
@@ -773,9 +773,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
log.DebugFormat("Diverter switch time [s]: Start: {0}ms ({1} {2} {3}) End: {4}ms ({5} {6} {7})",
|
||||
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
|
||||
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
if (compoundTestParams != null)
|
||||
{
|
||||
@@ -829,8 +829,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -882,7 +882,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
volumeRslt.Passed = !heatMetersTestParams.EvaluateVolume ||
|
||||
((volumeRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty) &&
|
||||
(volumeRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty) &&
|
||||
(tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On));
|
||||
(tstRslt.ErrorFlags == 0));
|
||||
volumeRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -901,7 +901,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
energyRslt.Passed = (energyRslt.Error >= heatMetersTestParams.ErrorLimitLo)
|
||||
&& (energyRslt.Error <= heatMetersTestParams.ErrorLimitHi)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
energyRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -1028,8 +1028,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -1051,7 +1051,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-8
@@ -533,9 +533,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
||||
log.DebugFormat("Diverter switch time [s]: Start: {0}ms ({1} {2} {3}) End: {4}ms ({5} {6} {7})",
|
||||
(tstRslt.DiverterStart * 1000).ToString("F0"), tstRslt.DivStart10, tstRslt.DivStart50, tstRslt.DivStart90,
|
||||
(tstRslt.DiverterEnd * 1000).ToString("F0"), tstRslt.DivEnd90, tstRslt.DivEnd50, tstRslt.DivEnd10);
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, tstRslt.DiverterStart, tstRslt.DiverterEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
if (compoundTestParams != null)
|
||||
{
|
||||
@@ -589,8 +589,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
||||
compoundMeterRslt.Error = Config.Formulas.ErrorFromVolumes(compoundMeterRslt.VolumeMeter, compoundMeterRslt.VolumeRef);
|
||||
compoundMeterRslt.Passed = (compoundMeterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (compoundMeterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
mainMeterRslt.Passed = auxMeterRslt.Passed = compoundMeterRslt.Passed;
|
||||
mainMeterRslt.TestDone = auxMeterRslt.TestDone = compoundMeterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
@@ -717,8 +717,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
||||
|
||||
meterRslt.Passed = (meterRslt.Error >= test.GetErrLimLo(tstRslt.VolumeCTV, tstRslt.TestTime) + test.Uncertainty)
|
||||
&& (meterRslt.Error <= test.GetErrLimHi(tstRslt.VolumeCTV, tstRslt.TestTime) - test.Uncertainty)
|
||||
&& (tstRslt.ErrorFlags == 0 || tstRslt.ErrorFlagsMode() != Config.Entities.ErrorFlagsMode.On);
|
||||
meterRslt.TestDone = true;
|
||||
&& (tstRslt.ErrorFlags == 0);
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
@@ -740,7 +740,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,9 +378,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
tstRslt.ConstMasterRaw = 0; /// Convert the flow to [m3/h]
|
||||
tstRslt.ConstMaster = 0; /// Convert the flow to [m3/h]
|
||||
tstRslt.ErrorMaster = 0;
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = 0;
|
||||
tstRslt.InfoFlags = 0;
|
||||
|
||||
|
||||
bool pressureDropPassed = (testParams.MaxPressureDrop == 0) ? true : ((testParams.MaxPressureDrop > 0) ? (PressDownStat.First - PressDownStat.Last < testParams.MaxPressureDrop)
|
||||
|
||||
@@ -213,9 +213,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
tstRslt.ConstMasterRaw = 0; /// Convert the flow to [m3/h]
|
||||
tstRslt.ConstMaster = 0; /// Convert the flow to [m3/h]
|
||||
tstRslt.ErrorMaster = 0;
|
||||
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = 0;
|
||||
tstRslt.InfoFlags = 0;
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
|
||||
@@ -115,6 +115,10 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
|
||||
/// Read pressure and temperature once before calling Bridge.OnTestSelected(...)
|
||||
State.Create(string.Format("{0}({1}) : Measuring process data", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
@@ -127,13 +131,9 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
}
|
||||
while (e.Contains(Event.Busy));
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
TestStartTime = DateTime.Now;
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
TestStartTime = DateTime.Now;
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Starting_the_pump);
|
||||
@@ -420,8 +420,9 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
|
||||
tstRslt.DiverterStart = 0;
|
||||
tstRslt.DiverterEnd = 0;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
@@ -465,7 +466,9 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -480,7 +483,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
/// Update modeless dialog error information
|
||||
Bridge.OnPulsesTestInProgress(this, new PulsesTestInProgressEventArgs(testName, (double)testParams.MinPulsesCount));
|
||||
|
||||
/// Test 'Quit'
|
||||
/// Close the modeless form
|
||||
if ((modelessDlg is GenericDevices.IHasCompleted) && !(modelessDlg as GenericDevices.IHasCompleted).Completed)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null); /// Close the modeless dialog
|
||||
@@ -494,6 +497,13 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
|
||||
stopTest:
|
||||
|
||||
/// Close the modeless form
|
||||
if ((modelessDlg is GenericDevices.IHasCompleted) && !(modelessDlg as GenericDevices.IHasCompleted).Completed)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null); /// Close the modeless dialog
|
||||
}
|
||||
modelessDlg = null; /// Modeless dialog is closed now
|
||||
|
||||
///
|
||||
/// Quit this sequence
|
||||
///
|
||||
@@ -511,8 +521,6 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
}
|
||||
|
||||
stopTestWOStoppingDivGateEtc:
|
||||
|
||||
return new List<Event> { retVal };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
completed = false;
|
||||
minPulsesCount = 1; /// Must be >0 so that initially the indication is RED
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.PulsesTestInProgressHandler += delegate(object sender, UiBridge.PulsesTestInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@@ -72,6 +72,8 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
completed = false;
|
||||
minPulsesCount = 1; /// Must be >0 so that initially the indication is RED
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.PulsesTestInProgressHandler += delegate(object sender, UiBridge.PulsesTestInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@@ -78,6 +78,8 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
completed = false;
|
||||
minPulsesCount = 1; /// Must be >0 so that initially the indication is RED
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.PulsesTestInProgressHandler += delegate(object sender, UiBridge.PulsesTestInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@@ -422,8 +422,9 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
|
||||
|
||||
tstRslt.DiverterStart = 0;
|
||||
tstRslt.DiverterEnd = 0;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, false, false, 0, 0, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
@@ -467,7 +468,9 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,8 +491,9 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart;
|
||||
tstRslt.DiverterEnd = switchTimeEnd;
|
||||
tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, switchTimeStart, switchTimeEnd) : 0;
|
||||
long infoFlags = 0;
|
||||
tstRslt.ErrorFlags = (ErrorFlagsComp != null) ? ErrorFlagsComp.GetErrorFlags(tstRslt, true, false, switchTimeStart, switchTimeEnd, out infoFlags) : 0;
|
||||
tstRslt.InfoFlags = infoFlags;
|
||||
|
||||
for (int i = 0; i < BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
@@ -528,7 +529,9 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
{
|
||||
if (BatchRslts.WaterMeters[i] != null)
|
||||
{
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts);
|
||||
long wmInfoFlags;
|
||||
BatchRslts.WaterMeters[i].ErrorFlags = ErrorFlagsComp.GetWMtrErrorFlags(BatchRslts.WaterMeters[i].MeterTestRslts, out wmInfoFlags);
|
||||
BatchRslts.WaterMeters[i].InfoFlags = wmInfoFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
/// Cfg
|
||||
///
|
||||
readonly ErrorsCfg errorsCfg;
|
||||
public Config.Entities.ErrorFlagsMode Mode { get { return errorsCfg.TestParams.Mode; } }
|
||||
|
||||
/// <summary>
|
||||
/// Ger error flags for a test
|
||||
@@ -33,13 +32,8 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
/// <param name="switchTimeStart">Diverter or valve switch time in s on test start</param>
|
||||
/// <param name="switchTimeEnd">Diverter or valve switch time in s on test end</param>
|
||||
/// <returns>Error flags</returns>
|
||||
public int GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd)
|
||||
public long GetErrorFlags(TestRslt testRslt, bool diverter, bool startStopValve, float switchTimeStart, float switchTimeEnd, out long infoFlags)
|
||||
{
|
||||
if (Mode == Config.Entities.ErrorFlagsMode.Off)
|
||||
{
|
||||
return 0; /// return 0 when Mode == ErrorFlagsMode.Off
|
||||
}
|
||||
|
||||
/// Any E# is 'true' on error, 'false' when OK
|
||||
|
||||
/// Average flow
|
||||
@@ -63,7 +57,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
|| ProcessData.TempDownStat.Max > ProcessData.TempDownStat.Average + errorsCfg.TestParams.Delta_T;
|
||||
|
||||
/// Max. absolute value of up and down water temperature difference
|
||||
bool E5 = ProcessData.TempDiffStat.Max > errorsCfg.TestParams.Delta_Tup_Tdn;
|
||||
bool E5 = Math.Abs(ProcessData.TempUpStat.Average - ProcessData.TempDownStat.Average) > errorsCfg.TestParams.Delta_Tup_Tdn;
|
||||
|
||||
bool E6 = false;
|
||||
|
||||
@@ -103,29 +97,46 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
bool E21 = ProcessData.RefFlowStat.Min < testRslt.Qfrom()
|
||||
|| ProcessData.RefFlowStat.Max > testRslt.Qto();
|
||||
|
||||
int ErrorFlags = 0;
|
||||
if (errorsCfg.TestParams.E1 && E1) ErrorFlags |= (int)ErrorFlagMask.E1;
|
||||
if (errorsCfg.TestParams.E2 && E2) ErrorFlags |= (int)ErrorFlagMask.E2;
|
||||
if (errorsCfg.TestParams.E3 && E3) ErrorFlags |= (int)ErrorFlagMask.E3;
|
||||
if (errorsCfg.TestParams.E4 && E4) ErrorFlags |= (int)ErrorFlagMask.E4;
|
||||
if (errorsCfg.TestParams.E5 && E5) ErrorFlags |= (int)ErrorFlagMask.E5;
|
||||
if (errorsCfg.TestParams.E6 && E6) ErrorFlags |= (int)ErrorFlagMask.E6;
|
||||
if (errorsCfg.TestParams.E7 && E7) ErrorFlags |= (int)ErrorFlagMask.E7;
|
||||
if (errorsCfg.TestParams.E8 && E8) ErrorFlags |= (int)ErrorFlagMask.E8;
|
||||
if (errorsCfg.TestParams.E9 && E9) ErrorFlags |= (int)ErrorFlagMask.E9;
|
||||
if (errorsCfg.TestParams.E10 && E10) ErrorFlags |= (int)ErrorFlagMask.E10;
|
||||
if (errorsCfg.TestParams.E11 && E11) ErrorFlags |= (int)ErrorFlagMask.E11;
|
||||
if (errorsCfg.TestParams.E12 && E12) ErrorFlags |= (int)ErrorFlagMask.E12;
|
||||
if (errorsCfg.TestParams.E13 && E13) ErrorFlags |= (int)ErrorFlagMask.E13;
|
||||
if (errorsCfg.TestParams.E14 && E14) ErrorFlags |= (int)ErrorFlagMask.E14;
|
||||
//E15
|
||||
//E16
|
||||
//E17
|
||||
//E18
|
||||
//E19
|
||||
//E20
|
||||
if (errorsCfg.TestParams.E21 && E21) ErrorFlags |= (int)ErrorFlagMask.E21;
|
||||
return ErrorFlags;
|
||||
long errorFlags = 0;
|
||||
sbyte on = (sbyte)ErrorFlagsMode.On;
|
||||
if (E1 && (errorsCfg.TestParams.E1 == on)) errorFlags |= (int)ErrorFlagMask.E1;
|
||||
if (E2 && (errorsCfg.TestParams.E2 == on)) errorFlags |= (int)ErrorFlagMask.E2;
|
||||
if (E3 && (errorsCfg.TestParams.E3 == on)) errorFlags |= (int)ErrorFlagMask.E3;
|
||||
if (E4 && (errorsCfg.TestParams.E4 == on)) errorFlags |= (int)ErrorFlagMask.E4;
|
||||
if (E5 && (errorsCfg.TestParams.E5 == on)) errorFlags |= (int)ErrorFlagMask.E5;
|
||||
if (E6 && (errorsCfg.TestParams.E6 == on)) errorFlags |= (int)ErrorFlagMask.E6;
|
||||
if (E7 && (errorsCfg.TestParams.E7 == on)) errorFlags |= (int)ErrorFlagMask.E7;
|
||||
if (E8 && (errorsCfg.TestParams.E8 == on)) errorFlags |= (int)ErrorFlagMask.E8;
|
||||
if (E9 && (errorsCfg.TestParams.E9 == on)) errorFlags |= (int)ErrorFlagMask.E9;
|
||||
if (E10 && (errorsCfg.TestParams.E10 == on)) errorFlags |= (int)ErrorFlagMask.E10;
|
||||
if (E11 && (errorsCfg.TestParams.E11 == on)) errorFlags |= (int)ErrorFlagMask.E11;
|
||||
if (E12 && (errorsCfg.TestParams.E12 == on)) errorFlags |= (int)ErrorFlagMask.E12;
|
||||
if (E13 && (errorsCfg.TestParams.E13 == on)) errorFlags |= (int)ErrorFlagMask.E13;
|
||||
if (E14 && (errorsCfg.TestParams.E14 == on)) errorFlags |= (int)ErrorFlagMask.E14;
|
||||
/// E15, E16, E17, E18, E19, E20 skipped
|
||||
if (E21 && (errorsCfg.TestParams.E21 == on)) errorFlags |= (int)ErrorFlagMask.E21;
|
||||
|
||||
long _infoFlags = 0;
|
||||
sbyte info = (sbyte)ErrorFlagsMode.Info;
|
||||
if (E1 && (errorsCfg.TestParams.E1 == info)) _infoFlags |= (int)ErrorFlagMask.E1;
|
||||
if (E2 && (errorsCfg.TestParams.E2 == info)) _infoFlags |= (int)ErrorFlagMask.E2;
|
||||
if (E3 && (errorsCfg.TestParams.E3 == info)) _infoFlags |= (int)ErrorFlagMask.E3;
|
||||
if (E4 && (errorsCfg.TestParams.E4 == info)) _infoFlags |= (int)ErrorFlagMask.E4;
|
||||
if (E5 && (errorsCfg.TestParams.E5 == info)) _infoFlags |= (int)ErrorFlagMask.E5;
|
||||
if (E6 && (errorsCfg.TestParams.E6 == info)) _infoFlags |= (int)ErrorFlagMask.E6;
|
||||
if (E7 && (errorsCfg.TestParams.E7 == info)) _infoFlags |= (int)ErrorFlagMask.E7;
|
||||
if (E8 && (errorsCfg.TestParams.E8 == info)) _infoFlags |= (int)ErrorFlagMask.E8;
|
||||
if (E9 && (errorsCfg.TestParams.E9 == info)) _infoFlags |= (int)ErrorFlagMask.E9;
|
||||
if (E10 && (errorsCfg.TestParams.E10 == info)) _infoFlags |= (int)ErrorFlagMask.E10;
|
||||
if (E11 && (errorsCfg.TestParams.E11 == info)) _infoFlags |= (int)ErrorFlagMask.E11;
|
||||
if (E12 && (errorsCfg.TestParams.E12 == info)) _infoFlags |= (int)ErrorFlagMask.E12;
|
||||
if (E13 && (errorsCfg.TestParams.E13 == info)) _infoFlags |= (int)ErrorFlagMask.E13;
|
||||
if (E14 && (errorsCfg.TestParams.E14 == info)) _infoFlags |= (int)ErrorFlagMask.E14;
|
||||
/// E15, E16, E17, E18, E19, E20 skipped
|
||||
if (E21 && (errorsCfg.TestParams.E21 == info)) _infoFlags |= (int)ErrorFlagMask.E21;
|
||||
|
||||
infoFlags = _infoFlags;
|
||||
return errorFlags;
|
||||
}
|
||||
|
||||
|
||||
@@ -148,9 +159,10 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
/// </summary>
|
||||
/// <param name="meterTestRslts">Meter test results</param>
|
||||
/// <returns>Error flags</returns>
|
||||
public int GetWMtrErrorFlags(IList<MeterTestRslt> meterTestRslts)
|
||||
public long GetWMtrErrorFlags(IList<MeterTestRslt> meterTestRslts, out long infoIndicators)
|
||||
{
|
||||
int errorIndicators = 0;
|
||||
long _infoIndicators = 0;
|
||||
long errorIndicators = 0;
|
||||
|
||||
MeterTestRslt mtrQ3 = GetMtrTstRsltFromNames(meterTestRslts, errorsCfg.Q3Names);
|
||||
MeterTestRslt mtrQ2 = GetMtrTstRsltFromNames(meterTestRslts, errorsCfg.Q2Names);
|
||||
@@ -160,17 +172,11 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
{
|
||||
/// No error indicator;
|
||||
}
|
||||
else if ((mtrQ3.Error > mtrQ3.ErrLimHi() / 2) &&
|
||||
(mtrQ2.Error > mtrQ2.ErrLimHi() / 2) &&
|
||||
(mtrQ1.Error > mtrQ1.ErrLimHi() / 2))
|
||||
else if (((mtrQ3.Error > mtrQ3.ErrLimHi() / 2) && (mtrQ2.Error > mtrQ2.ErrLimHi() / 2) && (mtrQ1.Error > mtrQ1.ErrLimHi() / 2)) ||
|
||||
((mtrQ3.Error < mtrQ3.ErrLimLo() / 2) && (mtrQ2.Error < mtrQ2.ErrLimLo() / 2) && (mtrQ1.Error < mtrQ1.ErrLimLo() / 2)))
|
||||
{
|
||||
errorIndicators |= (int)ErrorFlagMask.E15; /// Set E15
|
||||
}
|
||||
else if ((mtrQ3.Error < mtrQ3.ErrLimLo() / 2) &&
|
||||
(mtrQ2.Error < mtrQ2.ErrLimLo() / 2) &&
|
||||
(mtrQ1.Error < mtrQ1.ErrLimLo() / 2))
|
||||
{
|
||||
errorIndicators |= (int)ErrorFlagMask.E15; /// Set E15
|
||||
if (errorsCfg.TestParams.E15 == (sbyte)ErrorFlagsMode.Info) _infoIndicators |= (long)ErrorFlagMask.E15; /// Set E15
|
||||
if (errorsCfg.TestParams.E15 == (sbyte)ErrorFlagsMode.On) errorIndicators |= (long)ErrorFlagMask.E15; /// Set E15
|
||||
}
|
||||
|
||||
foreach (var mtr in meterTestRslts)
|
||||
@@ -178,6 +184,7 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
errorIndicators |= mtr.ErrorIndicators; /// Set any error flag from mtr.ErrorIndicators (iPerl)
|
||||
}
|
||||
|
||||
infoIndicators = _infoIndicators;
|
||||
return errorIndicators;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,41 +14,40 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestParams) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public ErrorFlagsMode Mode; /// 0 = Off, 1 = Info (show only), 2 = On (show and evaluate)
|
||||
public bool E1;
|
||||
public bool E2;
|
||||
public bool E3;
|
||||
public bool E4;
|
||||
public bool E5;
|
||||
public bool E6;
|
||||
public bool E7;
|
||||
public bool E8;
|
||||
public bool E9;
|
||||
public bool E10;
|
||||
public bool E11;
|
||||
public bool E12;
|
||||
public bool E13;
|
||||
public bool E14;
|
||||
public bool E15;
|
||||
public bool E16;
|
||||
public bool E21;
|
||||
public sbyte E1; ///
|
||||
public sbyte E2; ///
|
||||
public sbyte E3; ///
|
||||
public sbyte E4; ///
|
||||
public sbyte E5; ///
|
||||
public sbyte E6; ///
|
||||
public sbyte E7; ///
|
||||
public sbyte E8; ///
|
||||
public sbyte E9; /// 0=off, 1=info, 2=evaluate
|
||||
public sbyte E10; ///
|
||||
public sbyte E11; ///
|
||||
public sbyte E12; ///
|
||||
public sbyte E13; ///
|
||||
public sbyte E14; ///
|
||||
public sbyte E15; ///
|
||||
public sbyte E16; ///
|
||||
public sbyte E21; ///
|
||||
|
||||
public float Delta_Q_pct; /// [%] max deviation from the mean flow
|
||||
public float Delta_T; /// [°C] max. T_up or T_down deviation from the mean temperature
|
||||
public float Delta_Tup_Tdn; /// [°C] max. difference abs(T_up - T_down)
|
||||
public float TestTime_min; /// [s]
|
||||
public float TestTime_max; /// [s]
|
||||
public float AmbTemp_min; /// [°C] min. ambient temperature
|
||||
public float AmbTemp_max; /// [°C] max. ambient temperature
|
||||
public float Pressure_min; /// [bar] min. water pressure
|
||||
public float Pressure_max; /// [bar] max. water pressure
|
||||
|
||||
public float Coef_E9; /// Coefficient used in E9, default 0.025
|
||||
public float Coef_E10; /// Coefficient used in E10, default 0.04
|
||||
public float Coef_E11; /// Coefficient used in E11, default 0.1
|
||||
public float Coef_E12; /// Coefficient used in E12, default 1
|
||||
public float Offset_E9; /// [s] default 0 (no offset)
|
||||
public float Offset_E12; /// [s] default 0 (no offset)
|
||||
public double Delta_Q_pct; /// [%] max deviation from the mean flow
|
||||
public double Delta_T; /// [°C] max. T_up or T_down deviation from the mean temperature
|
||||
public double Delta_Tup_Tdn; /// [°C] max. difference abs(T_up - T_down)
|
||||
public double TestTime_min; /// [s]
|
||||
public double TestTime_max; /// [s]
|
||||
public double AmbTemp_min; /// [°C] min. ambient temperature
|
||||
public double AmbTemp_max; /// [°C] max. ambient temperature
|
||||
public double Pressure_min; /// [bar] min. water pressure
|
||||
public double Pressure_max; /// [bar] max. water pressure
|
||||
|
||||
public double Coef_E9; /// Coefficient used in E9, default 0.025
|
||||
public double Coef_E10; /// Coefficient used in E10, default 0.04
|
||||
public double Coef_E11; /// Coefficient used in E11, default 0.1
|
||||
public double Coef_E12; /// Coefficient used in E12, default 1
|
||||
public double Offset_E9; /// [s] default 0 (no offset)
|
||||
public double Offset_E12; /// [s] default 0 (no offset)
|
||||
|
||||
#if IPERL
|
||||
public bool E25; /// MaxProefindex verification
|
||||
@@ -59,70 +58,68 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
|
||||
public override void InitializeAll()
|
||||
{
|
||||
Mode = ErrorFlagsMode.Info;
|
||||
#if IPERL
|
||||
E1 = true;
|
||||
E2 = false;
|
||||
E3 = true;
|
||||
E4 = false;
|
||||
E5 = false;
|
||||
E6 = false;
|
||||
E7 = false;
|
||||
E8 = false;
|
||||
E9 = false;
|
||||
E10 = false;
|
||||
E11 = false;
|
||||
E12 = false;
|
||||
E13 = false;
|
||||
E14 = false;
|
||||
E15 = false;
|
||||
E16 = false;
|
||||
E21 = true;
|
||||
E1 = (sbyte)ErrorFlagsMode.Info;
|
||||
E2 = (sbyte)ErrorFlagsMode.Off;
|
||||
E3 = (sbyte)ErrorFlagsMode.Info;
|
||||
E4 = (sbyte)ErrorFlagsMode.Off;
|
||||
E5 = (sbyte)ErrorFlagsMode.Off;
|
||||
E6 = (sbyte)ErrorFlagsMode.Off;
|
||||
E7 = (sbyte)ErrorFlagsMode.Off;
|
||||
E8 = (sbyte)ErrorFlagsMode.Off;
|
||||
E9 = (sbyte)ErrorFlagsMode.Off;
|
||||
E10 = (sbyte)ErrorFlagsMode.Off;
|
||||
E11 = (sbyte)ErrorFlagsMode.Off;
|
||||
E12 = (sbyte)ErrorFlagsMode.Off;
|
||||
E13 = (sbyte)ErrorFlagsMode.Off;
|
||||
E14 = (sbyte)ErrorFlagsMode.Off;
|
||||
E15 = (sbyte)ErrorFlagsMode.Off;
|
||||
E16 = (sbyte)ErrorFlagsMode.Off;
|
||||
E21 = (sbyte)ErrorFlagsMode.Info;
|
||||
|
||||
E25 = true; /// MaxPruefindex verification
|
||||
E26 = false; /// Q2 factors verification (saved from production == current)
|
||||
E27 = false; /// Direction verification
|
||||
E28 = true; /// Previous workflow step verification
|
||||
E25 = (sbyte)ErrorFlagsMode.Info; /// MaxPruefindex verification
|
||||
E26 = (sbyte)ErrorFlagsMode.Off; /// Q2 factors verification (saved from production == current)
|
||||
E27 = (sbyte)ErrorFlagsMode.Off; /// Direction verification
|
||||
E28 = (sbyte)ErrorFlagsMode.Info; /// Previous workflow step verification
|
||||
#else
|
||||
E1 = true;
|
||||
E2 = true;
|
||||
E3 = true;
|
||||
E4 = true;
|
||||
E5 = true;
|
||||
E6 = true;
|
||||
E7 = true;
|
||||
E8 = true;
|
||||
E9 = true;
|
||||
E10 = true;
|
||||
E11 = true;
|
||||
E12 = true;
|
||||
E13 = true;
|
||||
E14 = true;
|
||||
E15 = true;
|
||||
E16 = true;
|
||||
E21 = true;
|
||||
E1 = (sbyte)ErrorFlagsMode.Info;
|
||||
E2 = (sbyte)ErrorFlagsMode.Info;
|
||||
E3 = (sbyte)ErrorFlagsMode.Info;
|
||||
E4 = (sbyte)ErrorFlagsMode.Info;
|
||||
E5 = (sbyte)ErrorFlagsMode.Info;
|
||||
E6 = (sbyte)ErrorFlagsMode.Info;
|
||||
E7 = (sbyte)ErrorFlagsMode.Info;
|
||||
E8 = (sbyte)ErrorFlagsMode.Info;
|
||||
E9 = (sbyte)ErrorFlagsMode.Info;
|
||||
E10 = (sbyte)ErrorFlagsMode.Info;
|
||||
E11 = (sbyte)ErrorFlagsMode.Info;
|
||||
E12 = (sbyte)ErrorFlagsMode.Info;
|
||||
E13 = (sbyte)ErrorFlagsMode.Info;
|
||||
E14 = (sbyte)ErrorFlagsMode.Info;
|
||||
E15 = (sbyte)ErrorFlagsMode.Info;
|
||||
E16 = (sbyte)ErrorFlagsMode.Info;
|
||||
E21 = (sbyte)ErrorFlagsMode.Info;
|
||||
#endif
|
||||
Delta_Q_pct = 5.0f; /// [%]
|
||||
Delta_T = 10.0f; /// [°C]
|
||||
Delta_Tup_Tdn = 10.0f; /// [°C]
|
||||
Delta_Q_pct = 5.0; /// [%]
|
||||
Delta_T = 10.0; /// [°C]
|
||||
Delta_Tup_Tdn = 10.0; /// [°C]
|
||||
TestTime_min = 0; /// [s]
|
||||
TestTime_max = 99999; /// [s]
|
||||
AmbTemp_min = 5.0f; /// [°C]
|
||||
AmbTemp_max = 95.0f; /// [°C]
|
||||
AmbTemp_min = 5.0; /// [°C]
|
||||
AmbTemp_max = 95.0; /// [°C]
|
||||
Pressure_min = 0; /// [bar]
|
||||
Pressure_max = 16.0f; /// [bar]
|
||||
Pressure_max = 16.0; /// [bar]
|
||||
|
||||
Coef_E9 = 0.025f;
|
||||
Coef_E10 = 0.04f;
|
||||
Coef_E11 = 0.1f;
|
||||
Coef_E12 = 1.0f;
|
||||
Coef_E9 = 0.025;
|
||||
Coef_E10 = 0.04;
|
||||
Coef_E11 = 0.1;
|
||||
Coef_E12 = 1.0;
|
||||
Offset_E9 = 0; /// [s]
|
||||
Offset_E12 = 0; /// [s]
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
Strings.Mode,
|
||||
"E1",
|
||||
"E2",
|
||||
"E3",
|
||||
@@ -171,106 +168,104 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: return Mode.ToDescription();
|
||||
case 1: return (E1 ? Strings.yes : Strings.no);
|
||||
case 2: return (E2 ? Strings.yes : Strings.no);
|
||||
case 3: return (E3 ? Strings.yes : Strings.no);
|
||||
case 4: return (E4 ? Strings.yes : Strings.no);
|
||||
case 5: return (E5 ? Strings.yes : Strings.no);
|
||||
case 6: return (E6 ? Strings.yes : Strings.no);
|
||||
case 7: return (E7 ? Strings.yes : Strings.no);
|
||||
case 8: return (E8 ? Strings.yes : Strings.no);
|
||||
case 9: return (E9 ? Strings.yes : Strings.no);
|
||||
case 10: return (E10 ? Strings.yes : Strings.no);
|
||||
case 11: return (E11 ? Strings.yes : Strings.no);
|
||||
case 12: return (E12 ? Strings.yes : Strings.no);
|
||||
case 13: return (E13 ? Strings.yes : Strings.no);
|
||||
case 14: return (E14 ? Strings.yes : Strings.no);
|
||||
case 15: return (E15 ? Strings.yes : Strings.no);
|
||||
case 16: return (E16 ? Strings.yes : Strings.no);
|
||||
case 17: return (E21 ? Strings.yes : Strings.no);
|
||||
case 0: return ((ErrorFlagsMode)E1).ToDescription();
|
||||
case 1: return ((ErrorFlagsMode)E2).ToDescription();
|
||||
case 2: return ((ErrorFlagsMode)E3).ToDescription();
|
||||
case 3: return ((ErrorFlagsMode)E4).ToDescription();
|
||||
case 4: return ((ErrorFlagsMode)E5).ToDescription();
|
||||
case 5: return ((ErrorFlagsMode)E6).ToDescription();
|
||||
case 6: return ((ErrorFlagsMode)E7).ToDescription();
|
||||
case 7: return ((ErrorFlagsMode)E8).ToDescription();
|
||||
case 8: return ((ErrorFlagsMode)E9).ToDescription();
|
||||
case 9: return ((ErrorFlagsMode)E10).ToDescription();
|
||||
case 10: return ((ErrorFlagsMode)E11).ToDescription();
|
||||
case 11: return ((ErrorFlagsMode)E12).ToDescription();
|
||||
case 12: return ((ErrorFlagsMode)E13).ToDescription();
|
||||
case 13: return ((ErrorFlagsMode)E14).ToDescription();
|
||||
case 14: return ((ErrorFlagsMode)E15).ToDescription();
|
||||
case 15: return ((ErrorFlagsMode)E16).ToDescription();
|
||||
case 16: return ((ErrorFlagsMode)E21).ToDescription();
|
||||
|
||||
case 18: return Delta_Q_pct.ToString();
|
||||
case 19: return Delta_T.ToString();
|
||||
case 20: return Delta_Tup_Tdn.ToString();
|
||||
case 21: return TestTime_min.ToString();
|
||||
case 22: return TestTime_max.ToString();
|
||||
case 23: return AmbTemp_min.ToString();
|
||||
case 24: return AmbTemp_max.ToString();
|
||||
case 25: return Pressure_min.ToString();
|
||||
case 26: return Pressure_max.ToString();
|
||||
case 27: return Coef_E9.ToString();
|
||||
case 28: return Coef_E10.ToString();
|
||||
case 29: return Coef_E11.ToString();
|
||||
case 30: return Coef_E12.ToString();
|
||||
case 31: return Offset_E9.ToString();
|
||||
case 32: return Offset_E12.ToString();
|
||||
case 17: return Delta_Q_pct.ToString();
|
||||
case 18: return Delta_T.ToString();
|
||||
case 19: return Delta_Tup_Tdn.ToString();
|
||||
case 20: return TestTime_min.ToString();
|
||||
case 21: return TestTime_max.ToString();
|
||||
case 22: return AmbTemp_min.ToString();
|
||||
case 23: return AmbTemp_max.ToString();
|
||||
case 24: return Pressure_min.ToString();
|
||||
case 25: return Pressure_max.ToString();
|
||||
case 26: return Coef_E9.ToString();
|
||||
case 27: return Coef_E10.ToString();
|
||||
case 28: return Coef_E11.ToString();
|
||||
case 29: return Coef_E12.ToString();
|
||||
case 30: return Offset_E9.ToString();
|
||||
case 31: return Offset_E12.ToString();
|
||||
#if IPERL
|
||||
case 33: return (E25 ? Strings.yes : Strings.no);
|
||||
case 34: return (E26 ? Strings.yes : Strings.no);
|
||||
case 35: return (E27 ? Strings.yes : Strings.no);
|
||||
case 36: return (E28 ? Strings.yes : Strings.no);
|
||||
case 32: return (E25 ? Strings.yes : Strings.no);
|
||||
case 33: return (E26 ? Strings.yes : Strings.no);
|
||||
case 34: return (E27 ? Strings.yes : Strings.no);
|
||||
case 35: return (E28 ? Strings.yes : Strings.no);
|
||||
#endif
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieves parameters from UI controls
|
||||
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||
public CfgUpdateFlags UpdateParam(int i, string sVal)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++)
|
||||
{
|
||||
if (m.ToDescription() == strValue)
|
||||
{
|
||||
Mode = m;
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
return CfgUpdateFlags.None;
|
||||
case 1: E1 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 2: E2 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 3: E3 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 4: E4 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 5: E5 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 6: E6 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 7: E7 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 8: E8 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 9: E9 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 10: E10 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 11: E11 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 12: E12 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 13: E13 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 14: E14 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 15: E15 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 16: E16 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 17: E21 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 0:
|
||||
for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++)
|
||||
if (m.ToDescription() == sVal)
|
||||
{
|
||||
E1 = (sbyte)m;
|
||||
break;
|
||||
};
|
||||
break;
|
||||
|
||||
case 18: Delta_Q_pct = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 19: Delta_T = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 20: Delta_Tup_Tdn = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 21: TestTime_min = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 22: TestTime_max = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 23: AmbTemp_min = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 24: AmbTemp_max = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 25: Pressure_min = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 26: Pressure_max = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 27: Coef_E9 = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 28: Coef_E10 = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 29: Coef_E11 = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 30: Coef_E12 = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 31: Offset_E9 = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 32: Offset_E12 = Utils.ParseUFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 1: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E2 = (sbyte)m; break; }; break;
|
||||
case 2: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E3 = (sbyte)m; break; }; break;
|
||||
case 3: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E4 = (sbyte)m; break; }; break;
|
||||
case 4: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E5 = (sbyte)m; break; }; break;
|
||||
case 5: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E6 = (sbyte)m; break; }; break;
|
||||
case 6: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E7 = (sbyte)m; break; }; break;
|
||||
case 7: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E8 = (sbyte)m; break; }; break;
|
||||
case 8: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E9 = (sbyte)m; break; }; break;
|
||||
case 9: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E10 = (sbyte)m; break; }; break;
|
||||
case 10: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E11 = (sbyte)m; break; }; break;
|
||||
case 11: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E12 = (sbyte)m; break; }; break;
|
||||
case 12: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E13 = (sbyte)m; break; }; break;
|
||||
case 13: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E14 = (sbyte)m; break; }; break;
|
||||
case 14: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E15 = (sbyte)m; break; }; break;
|
||||
case 15: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E16 = (sbyte)m; break; }; break;
|
||||
case 16: for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++) if (m.ToDescription() == sVal) { E21 = (sbyte)m; break; }; break;
|
||||
|
||||
case 17: Delta_Q_pct = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 18: Delta_T = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 19: Delta_Tup_Tdn = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 20: TestTime_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 21: TestTime_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 22: AmbTemp_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 23: AmbTemp_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 24: Pressure_min = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 25: Pressure_max = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 26: Coef_E9 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 27: Coef_E10 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 28: Coef_E11 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 29: Coef_E12 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 30: Offset_E9 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
case 31: Offset_E12 = Utils.ParseUDouble(sVal); return CfgUpdateFlags.None;
|
||||
#if IPERL
|
||||
case 33: E25 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 34: E26 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 35: E27 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 36: E28 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 32: E25 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 33: E26 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 34: E27 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
case 35: E28 = (strValue == Strings.yes); return CfgUpdateFlags.None;
|
||||
#endif
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
|
||||
/// Verifies whether strings in UI controls represent valid parameters
|
||||
@@ -278,17 +273,11 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
{
|
||||
message = string.Empty;
|
||||
|
||||
float fdummy;
|
||||
double dummy;
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++)
|
||||
{
|
||||
if (m.ToDescription() == strValue) return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
@@ -304,14 +293,18 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 32:
|
||||
case 33:
|
||||
case 34:
|
||||
case 35:
|
||||
case 36:
|
||||
if (strValue == Strings.yes || strValue == Strings.no) return true;
|
||||
for (ErrorFlagsMode m = 0; m < ErrorFlagsMode.Count; m++)
|
||||
{
|
||||
if (m.ToDescription() == strValue)
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
@@ -319,15 +312,14 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
case 25:
|
||||
case 25:
|
||||
case 26:
|
||||
case 27:
|
||||
case 28:
|
||||
case 29:
|
||||
case 30:
|
||||
case 31:
|
||||
case 32:
|
||||
if (Utils.TryParseUFloat(strValue, out fdummy)) return true;
|
||||
if (Utils.TryParseUDouble(strValue, out dummy)) return true;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -341,7 +333,6 @@ namespace TBF.BenchControl.Various.ErrorFlags
|
||||
|
||||
void CopyContentTo(TestParams prms)
|
||||
{
|
||||
prms.Mode = this.Mode;
|
||||
prms.E1 = this.E1;
|
||||
prms.E2 = this.E2;
|
||||
prms.E3 = this.E3;
|
||||
|
||||
+4
-3
@@ -8,6 +8,7 @@ using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using Users;
|
||||
using Users.Entities;
|
||||
using TBF.Resources;
|
||||
using TBF.UI.Shared;
|
||||
|
||||
@@ -254,12 +255,12 @@ namespace TBF
|
||||
try
|
||||
{
|
||||
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
|
||||
Grp.GID[] reqGrpMembership = new Grp.GID[] { Grp.GID.Testers, Grp.GID.TestingSpecialists, Grp.GID.Metrologists, Grp.GID.HeadOfLab };
|
||||
GID[] reqGrpMembership = new Grp.GID[] { Grp.GID.Testers, Grp.GID.TestingSpecialists, Grp.GID.Metrologists, Grp.GID.HeadOfLab };
|
||||
#else
|
||||
Grp.GID[] reqGrpMembership = null;
|
||||
GID[] reqGrpMembership = null;
|
||||
#endif
|
||||
bool authorized = false;
|
||||
Users.Entities.AuthorizedAs authorizedAs = Users.Entities.AuthorizedAs.PowerUser;
|
||||
AuthorizedAs authorizedAs = Users.Entities.AuthorizedAs.PowerUser;
|
||||
|
||||
if (Users.Entities.User.IsPowerUser(loginDlgBench.Alias, loginDlgBench.Password))
|
||||
{
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.24.1368.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1368.0")]
|
||||
[assembly: AssemblyVersion("2.24.1378.0")]
|
||||
[assembly: AssemblyFileVersion("2.24.1378.0")]
|
||||
|
||||
Generated
+9
@@ -564,6 +564,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to calculated.
|
||||
/// </summary>
|
||||
internal static string calculated {
|
||||
get {
|
||||
return ResourceManager.GetString("calculated", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration.
|
||||
/// </summary>
|
||||
|
||||
@@ -2125,4 +2125,7 @@
|
||||
<data name="Test_profiles_selection" xml:space="preserve">
|
||||
<value>Test profiles selection</value>
|
||||
</data>
|
||||
<data name="calculated" xml:space="preserve">
|
||||
<value>calculated</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,34 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TestBenchFramework xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Language>en</Language>
|
||||
<Language>it</Language>
|
||||
<TestBenches>
|
||||
<DatabaseSettings>
|
||||
<BenchName>Test Bench</BenchName>
|
||||
<BenchName>Roma PT200</BenchName>
|
||||
<IsRealBench>true</IsRealBench>
|
||||
<ProceduresDBSettings>
|
||||
<DbType>MySql</DbType>
|
||||
<ConnectionString>SERVER=localhost; DATABASE=testbench; UID=root; PASSWORD=; CHARSET=utf8;</ConnectionString>
|
||||
<ConnectionString>SERVER=localhost; DATABASE=roma200; UID=root; PASSWORD=; CHARSET=utf8;</ConnectionString>
|
||||
</ProceduresDBSettings>
|
||||
<WaterMetersDBSettings>
|
||||
<DbType>MySql</DbType>
|
||||
<ConnectionString>SERVER=localhost; DATABASE=testbench-r; UID=root; PASSWORD=; CHARSET=utf8;</ConnectionString>
|
||||
<ConnectionString>SERVER=localhost; DATABASE=roma200-r; UID=root; PASSWORD=; CHARSET=utf8;</ConnectionString>
|
||||
</WaterMetersDBSettings>
|
||||
<UsersDBSettings>
|
||||
<DbType>MySql</DbType>
|
||||
<ConnectionString />
|
||||
</UsersDBSettings>
|
||||
</DatabaseSettings>
|
||||
</TestBenches>
|
||||
<LastBench>Test Bench</LastBench>
|
||||
<LoginMethod>UserName</LoginMethod>
|
||||
<LastBench>Roma PT200</LastBench>
|
||||
<BatchNr>1</BatchNr>
|
||||
<RealDensity>998.2008</RealDensity>
|
||||
<AtTemperature>20</AtTemperature>
|
||||
<RightPaneHorizSplitterDistance>25</RightPaneHorizSplitterDistance>
|
||||
<MainWndLeft>75</MainWndLeft>
|
||||
<MainWndTop>5</MainWndTop>
|
||||
<TopPaneVerticalSplitterDistance>596</TopPaneVerticalSplitterDistance>
|
||||
<MainWndLeft>76</MainWndLeft>
|
||||
<MainWndTop>21</MainWndTop>
|
||||
<MainWndWidth>1250</MainWndWidth>
|
||||
<MainWndHeight>750</MainWndHeight>
|
||||
<ManiWndMaximized>false</ManiWndMaximized>
|
||||
<ManiWndMaximized>true</ManiWndMaximized>
|
||||
<ComponentsDlgLeft>200</ComponentsDlgLeft>
|
||||
<ComponentsDlgTop>100</ComponentsDlgTop>
|
||||
<ComponentsDlgWidth>850</ComponentsDlgWidth>
|
||||
<ComponentsDlgHeight>500</ComponentsDlgHeight>
|
||||
<PopupResultsLeft>0</PopupResultsLeft>
|
||||
<PopupResultsTop>0</PopupResultsTop>
|
||||
<PopupResultsWidth>0</PopupResultsWidth>
|
||||
<PopupResultsHeight>0</PopupResultsHeight>
|
||||
<PathsDlgLeft>0</PathsDlgLeft>
|
||||
<PathsDlgTop>0</PathsDlgTop>
|
||||
<PathsDlgWidth>0</PathsDlgWidth>
|
||||
@@ -53,6 +63,10 @@
|
||||
<OneProcedureDlgHeight>0</OneProcedureDlgHeight>
|
||||
<PrintOrderLeft>0</PrintOrderLeft>
|
||||
<PrintOrderTop>0</PrintOrderTop>
|
||||
<EnduranceDlgLeft>0</EnduranceDlgLeft>
|
||||
<EnduranceDlgTop>0</EnduranceDlgTop>
|
||||
<EnduranceDlgWidth>0</EnduranceDlgWidth>
|
||||
<EnduranceDlgHeight>0</EnduranceDlgHeight>
|
||||
<PrintOrderOnlyGoodResult>false</PrintOrderOnlyGoodResult>
|
||||
<PrintOrderOnlyLastResult>false</PrintOrderOnlyLastResult>
|
||||
<ResultsConfigMeters>Vertically</ResultsConfigMeters>
|
||||
|
||||
@@ -60,10 +60,11 @@
|
||||
<logger name="NHibernate"> <level value="ERROR" /> </logger>
|
||||
<logger name="TBF.BenchControl.StateMachine"> <level value="INFO" /> </logger>
|
||||
<logger name="TBF.BenchControl.State"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.ControlComdWrap"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.ControlComWrap"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.Pump"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.PumpWithFM"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.MettlerToledo"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Fomulas"> <level value="FATAL" /> </logger>
|
||||
<logger name="TBF.BenchControl.Elde.StartMeasurementOp"> <level value="WARN" /> </logger>
|
||||
<logger name="TBF.BenchControl.Modbus"> <level value="DEBUG" /> </logger>
|
||||
</log4net>
|
||||
|
||||
+15
-6
@@ -39,7 +39,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ROMA_200;STABLE_MASS_EXTRAS;LANG_IT;TEST_PROFILES</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
@@ -49,7 +49,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
|
||||
<DefineConstants>TRACE;ROMA_200;STABLE_MASS_EXTRAS;LANG_IT;TEST_PROFILES</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -58,7 +58,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ROMA_200;STABLE_MASS_EXTRAS;LANG_IT;TEST_PROFILES</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
@@ -67,7 +67,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
|
||||
<DefineConstants>TRACE;ROMA_200;STABLE_MASS_EXTRAS;LANG_IT;TEST_PROFILES</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -97,8 +97,8 @@
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ControlComponent3Munich">
|
||||
<HintPath>..\packages\ControlBoard\Munich\ControlComponent3Munich.dll</HintPath>
|
||||
<Reference Include="ControlComponent3U">
|
||||
<HintPath>..\packages\ControlBoard\Roma200\ControlComponent3U.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
@@ -2274,6 +2274,12 @@
|
||||
<Compile Include="UI\Procedures\TestWizard\PressureSelection.designer.cs">
|
||||
<DependentUpon>PressureSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\TestProfileSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\TestProfileSelection.designer.cs">
|
||||
<DependentUpon>TestProfileSelection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Procedures\TestWizard\Roi1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -3234,6 +3240,9 @@
|
||||
<EmbeddedResource Include="UI\Procedures\TestWizard\PressureSelection.resx">
|
||||
<DependentUpon>PressureSelection.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Procedures\TestWizard\TestProfileSelection.resx">
|
||||
<DependentUpon>TestProfileSelection.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\Procedures\TestWizard\Roi1.resx">
|
||||
<DependentUpon>Roi1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace TBF.UI.Bench.Components
|
||||
selectComponentTypeDlg = new SelectComponentClassDlg();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.Metrologists };
|
||||
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add |
|
||||
SharedButtons.Buttons.Remove |
|
||||
|
||||
@@ -26,11 +26,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
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.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.Metrologists, Users.Entities.GID.MetrologicalAuthority };
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove;
|
||||
sharedButtons.Unlocked += unlockButton_Click;
|
||||
sharedButtons.OKClicked += okButton_Click;
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace TBF.UI.Bench.Paths
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.Metrologists };
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down;
|
||||
sharedButtons.Unlocked += Unlocked;
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.WaterMeterAuthority };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.MetrologicalAuthority };
|
||||
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down;
|
||||
@@ -87,7 +87,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
this.usedNames = usedNames;
|
||||
this.openUnlocked = openUnlocked;
|
||||
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.WaterMeterAuthority };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.MetrologicalAuthority };
|
||||
}
|
||||
|
||||
private void TestProfileDlg_Load(object sender, EventArgs e)
|
||||
@@ -171,11 +171,11 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
switch(LoadedProfile.ProfileType)
|
||||
{
|
||||
default:
|
||||
case ProfileType.Q3R: profileTypeRadioButton1.Checked = true; break;
|
||||
case ProfileType.QnClassLT15: profileTypeRadioButton2.Checked = true; break;
|
||||
case ProfileType.QnClassGT15: profileTypeRadioButton3.Checked = true; break;
|
||||
case ProfileType.QpQi: profileTypeRadioButton4.Checked = true; break;
|
||||
case ProfileType.Manual: profileTypeRadioButton5.Checked = true; break;
|
||||
case ProfileType.Q3R: profileTypeRadioButton1.Checked = true; break;
|
||||
case ProfileType.QnClassColdWater: profileTypeRadioButton2.Checked = true; break;
|
||||
case ProfileType.QnClassHotWater: profileTypeRadioButton3.Checked = true; break;
|
||||
case ProfileType.QpQi: profileTypeRadioButton4.Checked = true; break;
|
||||
case ProfileType.Manual: profileTypeRadioButton5.Checked = true; break;
|
||||
}
|
||||
|
||||
switch(LoadedProfile.ErrorLimitType)
|
||||
@@ -194,8 +194,8 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
LoadedProfile.Description = descriptionTextBox.Text;
|
||||
|
||||
LoadedProfile.ProfileType = profileTypeRadioButton1.Checked ? ProfileType.Q3R :
|
||||
(profileTypeRadioButton2.Checked ? ProfileType.QnClassLT15 :
|
||||
(profileTypeRadioButton3.Checked ? ProfileType.QnClassGT15 :
|
||||
(profileTypeRadioButton2.Checked ? ProfileType.QnClassColdWater :
|
||||
(profileTypeRadioButton3.Checked ? ProfileType.QnClassHotWater :
|
||||
(profileTypeRadioButton4.Checked ? ProfileType.QpQi
|
||||
: ProfileType.Manual)));
|
||||
|
||||
@@ -212,6 +212,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
public enum MtrlgyClmn
|
||||
{
|
||||
Name,
|
||||
Part,
|
||||
CoefQfrom,
|
||||
CoefQto,
|
||||
ErrLimLo,
|
||||
@@ -227,10 +228,11 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
{
|
||||
ListViewEx lv = metrologyListViewEx;
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Test_chdr, Width = 70 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Part, Width = 40 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = string.Format("Coef. {0}", Strings.Q_from), Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = string.Format("Coef. {0}", Strings.Q_to), Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Err_limit_neg_pct_chdr, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Err_limit_pos_pct_chdr, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Err_limit_neg_pct_chdr, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Err_limit_pos_pct_chdr, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = string.Format("{0} [°C]", Strings.Temp_lim_lo_chdr), Width = 100 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = string.Format("{0} [°C]", Strings.Temp_lim_hi_chdr), Width = 100 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Press_lim_lo_chdr, Width = 80 });
|
||||
@@ -239,6 +241,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
metrologyEditors = new Control[]
|
||||
{
|
||||
new TextBox(), /// Name
|
||||
new TextBox(), /// Part
|
||||
new TextBox(), /// CoefQfrom
|
||||
new TextBox(), /// CoefQto
|
||||
new TextBox(), /// Err.Lim. -
|
||||
@@ -273,10 +276,19 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
///
|
||||
ListViewItem lvi = new ListViewItem(pTest.Name);
|
||||
lvi.Tag = pTest;
|
||||
lvi.SubItems.Add((pTest.Part == 0) ? "-" : pTest.Part.ToString());
|
||||
lvi.SubItems.Add(pTest.CoefQfrom.ToString());
|
||||
lvi.SubItems.Add(pTest.CoefQto.ToString());
|
||||
lvi.SubItems.Add(pTest.ErrLimLo.ToString());
|
||||
lvi.SubItems.Add(pTest.ErrLimHi.ToString());
|
||||
if (LoadedProfile.ProfileType != ProfileType.QpQi)
|
||||
{
|
||||
lvi.SubItems.Add(pTest.ErrLimLo.ToString());
|
||||
lvi.SubItems.Add(pTest.ErrLimHi.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
lvi.SubItems.Add(Strings.calculated);
|
||||
lvi.SubItems.Add(Strings.calculated);
|
||||
}
|
||||
lvi.SubItems.Add(pTest.TempLimLo.ToString());
|
||||
lvi.SubItems.Add(pTest.TempLimHi.ToString());
|
||||
lvi.SubItems.Add(pTest.PressLimLo.ToString());
|
||||
@@ -295,20 +307,44 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
entity.Name = lvi.Text;
|
||||
entity.ItemNr = i;
|
||||
|
||||
float tmp;
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)MtrlgyClmn.CoefQfrom].Text, out tmp)) entity.CoefQfrom = tmp;
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)MtrlgyClmn.CoefQto].Text, out tmp)) entity.CoefQto = tmp;
|
||||
if (Utils.TryParseSFloat(lvi.SubItems[(int)MtrlgyClmn.ErrLimLo].Text, out tmp)) entity.ErrLimLo = tmp;
|
||||
if (Utils.TryParseSFloat(lvi.SubItems[(int)MtrlgyClmn.ErrLimHi].Text, out tmp)) entity.ErrLimHi = tmp;
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)MtrlgyClmn.TempLimLo].Text, out tmp)) entity.TempLimLo = tmp;
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)MtrlgyClmn.TempLimHi].Text, out tmp)) entity.TempLimHi = tmp;
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)MtrlgyClmn.PressLimLo].Text, out tmp)) entity.PressLimLo = tmp;
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)MtrlgyClmn.PressLimHi].Text, out tmp)) entity.PressLimHi = tmp;
|
||||
int part = entity.Part;
|
||||
if (lvi.SubItems[(int)MtrlgyClmn.Part].Text.Equals("-"))
|
||||
{
|
||||
entity.Part = 0;
|
||||
}
|
||||
else if (int.TryParse(lvi.SubItems[(int)MtrlgyClmn.Part].Text, out part))
|
||||
{
|
||||
entity.Part = part;
|
||||
}
|
||||
|
||||
double tmp;
|
||||
if (Utils.TryParseUDouble(lvi.SubItems[(int)MtrlgyClmn.CoefQfrom].Text, out tmp)) entity.CoefQfrom = tmp;
|
||||
if (Utils.TryParseUDouble(lvi.SubItems[(int)MtrlgyClmn.CoefQto].Text, out tmp)) entity.CoefQto = tmp;
|
||||
if (LoadedProfile.ProfileType != ProfileType.QpQi)
|
||||
{
|
||||
if (Utils.TryParseSDouble(lvi.SubItems[(int)MtrlgyClmn.ErrLimLo].Text, out tmp)) entity.ErrLimLo = tmp;
|
||||
if (Utils.TryParseSDouble(lvi.SubItems[(int)MtrlgyClmn.ErrLimHi].Text, out tmp)) entity.ErrLimHi = tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.ErrLimLo = +1.0;
|
||||
entity.ErrLimHi = -1.0;
|
||||
}
|
||||
if (Utils.TryParseUDouble(lvi.SubItems[(int)MtrlgyClmn.TempLimLo].Text, out tmp)) entity.TempLimLo = tmp;
|
||||
if (Utils.TryParseUDouble(lvi.SubItems[(int)MtrlgyClmn.TempLimHi].Text, out tmp)) entity.TempLimHi = tmp;
|
||||
if (Utils.TryParseUDouble(lvi.SubItems[(int)MtrlgyClmn.PressLimLo].Text, out tmp)) entity.PressLimLo = tmp;
|
||||
if (Utils.TryParseUDouble(lvi.SubItems[(int)MtrlgyClmn.PressLimHi].Text, out tmp)) entity.PressLimHi = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
private void metrologyListViewEx_SubItemClicked(object sender, SubItemEventArgs e)
|
||||
{
|
||||
if (LoadedProfile.ProfileType == ProfileType.QpQi &&
|
||||
((e.SubItem == (int)MtrlgyClmn.ErrLimLo) || (e.SubItem == (int)MtrlgyClmn.ErrLimHi)))
|
||||
{
|
||||
return; /// Prevent editing calculated error limits
|
||||
}
|
||||
|
||||
if (unlocked && (e.SubItem < (int)MtrlgyClmn.ColumnsCount))
|
||||
{
|
||||
metrologyListViewEx.StartEditing(metrologyEditors[e.SubItem], e.Item, e.SubItem);
|
||||
@@ -353,15 +389,27 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
}
|
||||
}
|
||||
|
||||
float fdummy;
|
||||
if ((e.SubItem == (int)MtrlgyClmn.CoefQfrom && !Utils.TryParseUFloat(e.DisplayText, out fdummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.CoefQto && !Utils.TryParseUFloat(e.DisplayText, out fdummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.ErrLimLo && !Utils.TryParseSFloat(e.DisplayText, out fdummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.ErrLimHi && !Utils.TryParseSFloat(e.DisplayText, out fdummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.TempLimLo && !Utils.TryParseUFloat(e.DisplayText, out fdummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.TempLimHi && !Utils.TryParseUFloat(e.DisplayText, out fdummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.PressLimLo && !Utils.TryParseUFloat(e.DisplayText, out fdummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.PressLimHi && !Utils.TryParseUFloat(e.DisplayText, out fdummy)))
|
||||
int idummy;
|
||||
if (e.SubItem == (int)MtrlgyClmn.Part)
|
||||
{
|
||||
if (e.DisplayText.Equals("-")) return; /// OK
|
||||
if (!int.TryParse(e.DisplayText, out idummy) || !Test.IsGoodPartNr(idummy))
|
||||
{
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
return; /// NOK
|
||||
}
|
||||
}
|
||||
|
||||
double dummy;
|
||||
if ((e.SubItem == (int)MtrlgyClmn.CoefQfrom && !Utils.TryParseUDouble(e.DisplayText, out dummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.CoefQto && !Utils.TryParseUDouble(e.DisplayText, out dummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.ErrLimLo && !Utils.TryParseSDouble(e.DisplayText, out dummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.ErrLimHi && !Utils.TryParseSDouble(e.DisplayText, out dummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.TempLimLo && !Utils.TryParseUDouble(e.DisplayText, out dummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.TempLimHi && !Utils.TryParseUDouble(e.DisplayText, out dummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.PressLimLo && !Utils.TryParseUDouble(e.DisplayText, out dummy)) ||
|
||||
(e.SubItem == (int)MtrlgyClmn.PressLimHi && !Utils.TryParseUDouble(e.DisplayText, out dummy)))
|
||||
{
|
||||
/// Cannot parse => revert content of the cell
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
@@ -654,19 +702,19 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
entity.ItemNr = i;
|
||||
|
||||
int j = 1;
|
||||
entity.Delta_Q_pct = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Delta_T = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Delta_Tup_Tdn = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.TestTime_min = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.TestTime_max = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.AmbTemp_min = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.AmbTemp_max = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Coef_E9 = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Coef_E10 = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Coef_E11 = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Coef_E12 = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Offset_E9 = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Offset_E12 = Utils.ParseUFloat(lvi.SubItems[j++].Text);
|
||||
entity.Delta_Q_pct = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.Delta_T = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.Delta_Tup_Tdn = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.TestTime_min = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.TestTime_max = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.AmbTemp_min = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.AmbTemp_max = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.Coef_E9 = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.Coef_E10 = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.Coef_E11 = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.Coef_E12 = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.Offset_E9 = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
entity.Offset_E12 = Utils.ParseUDouble(lvi.SubItems[j++].Text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -721,8 +769,8 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
}
|
||||
}
|
||||
|
||||
float dummy;
|
||||
if ((e.SubItem >= 1) && (e.SubItem < (int)ErrorFlags2Clmn.ColumnsCount) && !Utils.TryParseUFloat(e.DisplayText, out dummy))
|
||||
double dummy;
|
||||
if ((e.SubItem >= 1) && (e.SubItem < (int)ErrorFlags2Clmn.ColumnsCount) && !Utils.TryParseUDouble(e.DisplayText, out dummy))
|
||||
{
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
@@ -791,7 +839,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
//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));
|
||||
|
||||
if (usedNames != null && usedNames.Contains(LoadedProfile.Name))
|
||||
if (usedNames != null && usedNames.Contains(LoadedProfile.Name.ToLower()))
|
||||
{
|
||||
MessageBox.Show(string.Format("There is already a procedure named '{0}'.{1}Choose another name please.", LoadedProfile.Name, Environment.NewLine),
|
||||
Strings.Warning,
|
||||
@@ -953,19 +1001,118 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
default: return;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Find an unused test name
|
||||
///
|
||||
string newName;
|
||||
for (int nameId = 1; true; nameId++)
|
||||
{
|
||||
newName = Strings.New_test_name + nameId.ToString();
|
||||
if (nameId >= 5 || (nameId >= 4 && LoadedProfile.ProfileType == ProfileType.QpQi) || LoadedProfile.ProfileType == ProfileType.Manual)
|
||||
{
|
||||
newName = Strings.New_test_name + nameId.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (LoadedProfile.ProfileType)
|
||||
{
|
||||
default:
|
||||
case ProfileType.Q3R:
|
||||
newName = string.Format("Q{0}", 5 - nameId);
|
||||
break;
|
||||
|
||||
case ProfileType.QnClassColdWater:
|
||||
case ProfileType.QnClassHotWater:
|
||||
newName = (nameId == 1) ? "Qmax" : (nameId == 2) ? "Qn" : (nameId == 3) ? "Qt" : "Qmin";
|
||||
break;
|
||||
|
||||
case ProfileType.QpQi:
|
||||
newName = (nameId == 1) ? "qp" : (nameId == 2) ? "0,1qp" : "qi";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool notUsed = true;
|
||||
foreach (var t in LoadedProfile.Tests) if (t.Name.Equals(newName)) notUsed = false;
|
||||
if (notUsed) break;
|
||||
}
|
||||
|
||||
///
|
||||
/// Add a profile test
|
||||
PTest ptest = new PTest(newName, listViewEx.Items.Count, LoadedProfile);
|
||||
///
|
||||
int count = listViewEx.Items.Count;
|
||||
PTest ptest = new PTest(newName, count, LoadedProfile);
|
||||
|
||||
///
|
||||
/// Upper and lower limits of flow
|
||||
///
|
||||
switch (LoadedProfile.ProfileType)
|
||||
{
|
||||
case ProfileType.Q3R:
|
||||
case ProfileType.QnClassColdWater:
|
||||
case ProfileType.QnClassHotWater:
|
||||
switch (count)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
ptest.CoefQfrom = 0.9;
|
||||
ptest.CoefQto = 1.0;
|
||||
break;
|
||||
default:
|
||||
ptest.CoefQfrom = 1.0;
|
||||
ptest.CoefQto = 1.1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ProfileType.QpQi:
|
||||
switch (count)
|
||||
{
|
||||
case 0:
|
||||
ptest.CoefQfrom = 0.9;
|
||||
ptest.CoefQto = 1.0;
|
||||
break;
|
||||
default:
|
||||
ptest.CoefQfrom = 1.0;
|
||||
ptest.CoefQto = 1.1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
///
|
||||
/// Upper and lower limits of relative error
|
||||
///
|
||||
switch (LoadedProfile.ProfileType)
|
||||
{
|
||||
case ProfileType.Q3R:
|
||||
case ProfileType.QnClassColdWater:
|
||||
switch (count)
|
||||
{
|
||||
case 3:
|
||||
ptest.ErrLimLo = -5.0;
|
||||
ptest.ErrLimHi = 5.0;
|
||||
break;
|
||||
default:
|
||||
ptest.ErrLimLo = -2.0;
|
||||
ptest.ErrLimHi = 2.0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ProfileType.QnClassHotWater:
|
||||
switch (count)
|
||||
{
|
||||
case 3:
|
||||
ptest.ErrLimLo = -5.0;
|
||||
ptest.ErrLimHi = 5.0;
|
||||
break;
|
||||
default:
|
||||
ptest.ErrLimLo = -3.0;
|
||||
ptest.ErrLimHi = 3.0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
LoadedProfile.Tests.Add(ptest);
|
||||
AddToMetrologyTab(ptest);
|
||||
|
||||
@@ -147,6 +147,9 @@
|
||||
<data name="errorCalculationRadioButton2.Text" xml:space="preserve">
|
||||
<value>Qp and Class</value>
|
||||
</data>
|
||||
<data name="errorCalculationRadioButton2.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>errorCalculationRadioButton2.Name" xml:space="preserve">
|
||||
<value>errorCalculationRadioButton2</value>
|
||||
</data>
|
||||
@@ -177,6 +180,9 @@
|
||||
<data name="errorCalculationRadioButton1.Text" xml:space="preserve">
|
||||
<value>Entering numbers manually</value>
|
||||
</data>
|
||||
<data name="errorCalculationRadioButton1.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>errorCalculationRadioButton1.Name" xml:space="preserve">
|
||||
<value>errorCalculationRadioButton1</value>
|
||||
</data>
|
||||
@@ -201,6 +207,9 @@
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>Error bounds calculation</value>
|
||||
</data>
|
||||
<data name="groupBox2.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>groupBox2.Name" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
@@ -283,13 +292,13 @@
|
||||
<value>28, 42</value>
|
||||
</data>
|
||||
<data name="profileTypeRadioButton2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>169, 17</value>
|
||||
<value>146, 17</value>
|
||||
</data>
|
||||
<data name="profileTypeRadioButton2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>35</value>
|
||||
</data>
|
||||
<data name="profileTypeRadioButton2.Text" xml:space="preserve">
|
||||
<value>Qn and Class (Qn <= 15 m3/h)</value>
|
||||
<value>Qn and Class - cold water</value>
|
||||
</data>
|
||||
<data name=">>profileTypeRadioButton2.Name" xml:space="preserve">
|
||||
<value>profileTypeRadioButton2</value>
|
||||
@@ -343,13 +352,13 @@
|
||||
<value>28, 63</value>
|
||||
</data>
|
||||
<data name="profileTypeRadioButton3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 17</value>
|
||||
<value>141, 17</value>
|
||||
</data>
|
||||
<data name="profileTypeRadioButton3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>36</value>
|
||||
</data>
|
||||
<data name="profileTypeRadioButton3.Text" xml:space="preserve">
|
||||
<value>Qn and Class (Qn > 15 m3/h)</value>
|
||||
<value>Qn and Class - hot water</value>
|
||||
</data>
|
||||
<data name=">>profileTypeRadioButton3.Name" xml:space="preserve">
|
||||
<value>profileTypeRadioButton3</value>
|
||||
@@ -736,7 +745,7 @@
|
||||
<value>metrologyListViewEx</value>
|
||||
</data>
|
||||
<data name=">>metrologyListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1359.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1369.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>metrologyListViewEx.Parent" xml:space="preserve">
|
||||
<value>metrologyTabPage</value>
|
||||
@@ -787,7 +796,7 @@
|
||||
<value>errorFlagsListViewEx</value>
|
||||
</data>
|
||||
<data name=">>errorFlagsListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1359.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1369.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>errorFlagsListViewEx.Parent" xml:space="preserve">
|
||||
<value>errorFlagsTabPage</value>
|
||||
@@ -835,7 +844,7 @@
|
||||
<value>errorFlags2ListViewEx</value>
|
||||
</data>
|
||||
<data name=">>errorFlags2ListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1359.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1369.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>errorFlags2ListViewEx.Parent" xml:space="preserve">
|
||||
<value>errorFlags2TabPage</value>
|
||||
@@ -919,7 +928,7 @@
|
||||
<value>sharedButtons</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Shared.SharedButtons, TBF, Version=2.24.1365.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>TBF.UI.Shared.SharedButtons, TBF, Version=2.24.1372.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Parent" xml:space="preserve">
|
||||
<value>mainSplitContainer.Panel2</value>
|
||||
|
||||
@@ -49,6 +49,10 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
|
||||
public void Initialize(TestProfilesDlg parent, Control parentControl)
|
||||
{
|
||||
if (Parent == null) return;
|
||||
|
||||
session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
|
||||
this.parent = parent;
|
||||
this.parentControl = parentControl;
|
||||
|
||||
@@ -83,12 +87,20 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
|
||||
void ReloadAndRedrawAll()
|
||||
{
|
||||
/// Load the procedures
|
||||
if (session == null) session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
if (session == null) return;
|
||||
|
||||
MyItems = session.QueryOver<Profile>()
|
||||
.OrderBy(x => x.ItemNr).Asc
|
||||
.List();
|
||||
try
|
||||
{
|
||||
MyItems = session.QueryOver<Profile>()
|
||||
.OrderBy(x => x.ItemNr).Asc
|
||||
.List();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Loading Profiles from DB failed: {0}", exc.Message);
|
||||
MyItems = new List<Profile>();
|
||||
return;
|
||||
}
|
||||
|
||||
base.RedrawAll();
|
||||
}
|
||||
@@ -197,7 +209,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
{
|
||||
newName = Strings.New_profile_name + nameId.ToString();
|
||||
bool notUsed = true;
|
||||
foreach (var t in MyItems) if (t.Name.Equals(newName)) notUsed = false;
|
||||
foreach (var t in MyItems) if (t.Name.ToLower().Equals(newName.ToLower())) notUsed = false;
|
||||
if (notUsed) break;
|
||||
}
|
||||
|
||||
@@ -205,7 +217,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
newProfile.CreationUser = Users.GlobalData.CurrentUser.UserName;
|
||||
newProfile.CreationTime = DateTime.Now;
|
||||
|
||||
if (new TestProfileDlg(newProfile, GetUsedNames(), true).ShowDialog() == DialogResult.OK)
|
||||
if (new TestProfileDlg(newProfile, GetUsedNames(false), true).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
/// TODO: Make name uniqueness test
|
||||
parent.Unlock();
|
||||
@@ -252,7 +264,8 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var entity in ToBeRemovedItems) session.Delete(entity);
|
||||
foreach (var entity in ToBeRemovedItems)
|
||||
session.Delete(entity);
|
||||
ToBeRemovedItems.Clear();
|
||||
|
||||
int itemNr = 0;
|
||||
@@ -281,8 +294,8 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
|
||||
Profile editedProfile = SelectedItems[0].Tag as Profile;
|
||||
|
||||
IList<string> usedNames = GetUsedNames();
|
||||
usedNames.Remove(editedProfile.Name); /// Allow original procedure name
|
||||
IList<string> usedNames = GetUsedNames(false);
|
||||
usedNames.Remove(editedProfile.Name.ToLower()); /// Allow original procedure name
|
||||
///
|
||||
if (new TestProfileDlg(editedProfile, usedNames).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@@ -329,7 +342,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
newProfile.CreationUser = Users.GlobalData.CurrentUser.UserName;
|
||||
newProfile.CreationTime = DateTime.Now;
|
||||
|
||||
if ((new TestProfileDlg(newProfile, GetUsedNames(), true)).ShowDialog() == DialogResult.OK)
|
||||
if ((new TestProfileDlg(newProfile, GetUsedNames(false), true)).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
/// TODO: Make name uniqueness test
|
||||
parent.Unlock();
|
||||
@@ -378,7 +391,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
newProfile.CreationUser = Users.GlobalData.CurrentUser.UserName;
|
||||
newProfile.CreationTime = DateTime.Now;
|
||||
|
||||
if ((new TestProfileDlg(newProfile, GetUsedNames(), true)).ShowDialog() == DialogResult.OK)
|
||||
if ((new TestProfileDlg(newProfile, GetUsedNames(false), true)).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
/// TODO: Make name uniqueness test
|
||||
parent.Unlock();
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.MetrologicalAuthority };
|
||||
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
|
||||
SharedButtons.Buttons.Edit | SharedButtons.Buttons.Copy |
|
||||
@@ -46,7 +47,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
sharedButtons.CompareClicked += testProfilesCtrl.compareButton_Click;
|
||||
}
|
||||
|
||||
private void ProceduresDlg_Load(object sender, EventArgs e)
|
||||
private void TestProfilesDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadUISettings();
|
||||
Text = Strings.Test_profiles;
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "TestProfilesDlg";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ProceduresDlg_FormClosed);
|
||||
this.Load += new System.EventHandler(this.ProceduresDlg_Load);
|
||||
this.Load += new System.EventHandler(this.TestProfilesDlg_Load);
|
||||
this.splitContainer.Panel1.ResumeLayout(false);
|
||||
this.splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace TBF.UI.Bench.Transitions
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.Metrologists };
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
|
||||
SharedButtons.Buttons.Export | SharedButtons.Buttons.Import |
|
||||
|
||||
@@ -27,9 +27,9 @@ namespace TBF.UI.Bench.Uncertainties
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
#if KEMPNO_50
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.MetrologicalAuthority };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.MetrologicalAuthority };
|
||||
#else
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.Metrologists };
|
||||
#endif
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove;
|
||||
sharedButtons.Unlocked += unlockButton_Click;
|
||||
|
||||
Generated
+2
-2
@@ -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 ControlComponent3Munich.UserControl1();
|
||||
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
|
||||
this.processTabPage = new System.Windows.Forms.TabPage();
|
||||
this.processTabPageCtrl = new TBF.UI.Process.ProcessTabPageCtrl6();
|
||||
this.processTabPageCtrl = new TBF.UI.Process.ProcessTabPageCtrl24();
|
||||
this.insertTabPage = new System.Windows.Forms.TabPage();
|
||||
this.resultsTabPage = new System.Windows.Forms.TabPage();
|
||||
this.resultsTabPageCtrl = new TBF.UI.ResultsMI.ResultsTabPageCtrl();
|
||||
|
||||
+10
-10
@@ -114,10 +114,10 @@ namespace TBF.UI
|
||||
graphsToolStripMenuItem.Text = Strings.Graphs;
|
||||
#endif
|
||||
|
||||
usersTSMenuItem.Visible = Users.GlobalData.CurrentUser.IsMemberOf(Users.Grp.GID.Administrators) ||
|
||||
Users.GlobalData.CurrentUser.IsMemberOf(Users.Grp.GID.HeadOfLab);
|
||||
usersTSMenuItem.Visible = Users.GlobalData.CurrentUser.IsMemberOf(Users.Entities.GID.Administrators) ||
|
||||
Users.GlobalData.CurrentUser.IsMemberOf(Users.Entities.GID.HeadOfLab);
|
||||
|
||||
upgradeTSMenuItem.Visible = Users.GlobalData.CurrentUser.IsMemberOf(Users.Grp.GID.Administrators) && Users.GlobalData.CurrentUser.IsPowerUser();
|
||||
upgradeTSMenuItem.Visible = Users.GlobalData.CurrentUser.IsMemberOf(Users.Entities.GID.Administrators) && Users.GlobalData.CurrentUser.IsPowerUser();
|
||||
|
||||
#if IPERL
|
||||
iPerlHeadsToolStripMenuItem.Visible = true;
|
||||
@@ -806,9 +806,9 @@ namespace TBF.UI
|
||||
private void statusStrip1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
|
||||
Users.Grp.GID[] reqGrpMembership = new Users.Grp.GID[] { Users.Grp.GID.Testers, Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists, Users.Grp.GID.HeadOfLab };
|
||||
Users.Entities.GID[] reqGrpMembership = new Users.Entities.GID[] { Users.Entities.GID.Testers, Users.Entities.GID.TestingSpecialists, Users.Entities.GID.Metrologists, Users.Entities.GID.HeadOfLab };
|
||||
#else
|
||||
Users.Grp.GID[] reqGrpMembership = null;
|
||||
Users.Entities.GID[] reqGrpMembership = null;
|
||||
#endif
|
||||
|
||||
if (new Users.Forms.LoginDlg(reqGrpMembership).ShowDialog() == DialogResult.OK)
|
||||
@@ -819,12 +819,12 @@ namespace TBF.UI
|
||||
|
||||
private void clearCountersToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Users.Grp.GID[] reqGrpMembership = new Users.Grp.GID[]
|
||||
Users.Entities.GID[] reqGrpMembership = new Users.Entities.GID[]
|
||||
{
|
||||
Users.Grp.GID.TestingSpecialists,
|
||||
Users.Grp.GID.Metrologists,
|
||||
Users.Grp.GID.HeadOfLab,
|
||||
Users.Grp.GID.Administrators,
|
||||
Users.Entities.GID.TestingSpecialists,
|
||||
Users.Entities.GID.Metrologists,
|
||||
Users.Entities.GID.HeadOfLab,
|
||||
Users.Entities.GID.Administrators,
|
||||
};
|
||||
|
||||
if (new Users.Forms.LoginDlg(reqGrpMembership).ShowDialog() == DialogResult.OK)
|
||||
|
||||
+16
@@ -86,6 +86,8 @@ namespace TBF.UI.Procedures
|
||||
this.parametersTabPage = new System.Windows.Forms.TabPage();
|
||||
this.parametersListViewEx = new Results.Forms.ListViewEx();
|
||||
this.sharedButtons = new TBF.UI.Shared.SharedButtons();
|
||||
this.testProfileLabel = new System.Windows.Forms.Label();
|
||||
this.testProfileTextBox = new System.Windows.Forms.TextBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).BeginInit();
|
||||
this.mainSplitContainer.Panel1.SuspendLayout();
|
||||
this.mainSplitContainer.Panel2.SuspendLayout();
|
||||
@@ -128,6 +130,8 @@ namespace TBF.UI.Procedures
|
||||
//
|
||||
// generalTabPage
|
||||
//
|
||||
this.generalTabPage.Controls.Add(this.testProfileTextBox);
|
||||
this.generalTabPage.Controls.Add(this.testProfileLabel);
|
||||
this.generalTabPage.Controls.Add(this.altProcPeriodTextBox);
|
||||
this.generalTabPage.Controls.Add(this.altProcPeriodLabel);
|
||||
this.generalTabPage.Controls.Add(this.altProcNameTextBox);
|
||||
@@ -489,6 +493,16 @@ namespace TBF.UI.Procedures
|
||||
resources.ApplyResources(this.sharedButtons, "sharedButtons");
|
||||
this.sharedButtons.Name = "sharedButtons";
|
||||
//
|
||||
// testProfileLabel
|
||||
//
|
||||
resources.ApplyResources(this.testProfileLabel, "testProfileLabel");
|
||||
this.testProfileLabel.Name = "testProfileLabel";
|
||||
//
|
||||
// testProfileTextBox
|
||||
//
|
||||
resources.ApplyResources(this.testProfileTextBox, "testProfileTextBox");
|
||||
this.testProfileTextBox.Name = "testProfileTextBox";
|
||||
//
|
||||
// ProcedureDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@@ -568,5 +582,7 @@ namespace TBF.UI.Procedures
|
||||
private System.Windows.Forms.Label altProcNameLabel;
|
||||
private System.Windows.Forms.TextBox altProcPeriodTextBox;
|
||||
private System.Windows.Forms.Label altProcPeriodLabel;
|
||||
private System.Windows.Forms.Label testProfileLabel;
|
||||
private System.Windows.Forms.TextBox testProfileTextBox;
|
||||
}
|
||||
}
|
||||
+136
-102
@@ -67,9 +67,9 @@ namespace TBF.UI.Procedures
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.WaterMeterAuthority };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists, Users.Entities.GID.WaterMeterAuthority };
|
||||
#else
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists, Users.Entities.GID.Metrologists };
|
||||
#endif
|
||||
|
||||
#if TURA_SPECIAL || TURA_IPERL || TURA_IPERL_NEW
|
||||
@@ -119,11 +119,11 @@ namespace TBF.UI.Procedures
|
||||
this.openUnlocked = openUnlocked;
|
||||
|
||||
#if KEMPNO_50 || KRAKOW_50
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new Users.Grp.GID[] { Users.Grp.GID.WaterMeterAuthority }
|
||||
: new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.WaterMeterAuthority };
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new Users.Entities.GID[] { Users.Entities.GID.WaterMeterAuthority }
|
||||
: new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists, Users.Entities.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 };
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new Users.Entities.GID[] { Users.Entities.GID.Metrologists }
|
||||
: new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists, Users.Entities.GID.Metrologists };
|
||||
#endif
|
||||
using (NHibernate.ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config))
|
||||
{
|
||||
@@ -416,6 +416,7 @@ namespace TBF.UI.Procedures
|
||||
label15.Text = Strings.Date;
|
||||
label18.Text = Strings.Notes;
|
||||
watermetersLabel.Text = Strings.Meter_types_tested;
|
||||
testProfileLabel.Text = Strings.Test_profiles;
|
||||
altProcNameLabel.Text = Strings.Conditions;
|
||||
protectedCheckBox.Text = Strings.Protected_procedure;
|
||||
mustBeCompleteCheckBox.Text = Strings.All_tests_must_be_completed;
|
||||
@@ -454,8 +455,9 @@ namespace TBF.UI.Procedures
|
||||
transitionStartComboBox.Text = string.IsNullOrEmpty(LoadedProcedure.TransitionStart) ? "---" : LoadedProcedure.TransitionStart;
|
||||
transitionEndComboBox.Text = string.IsNullOrEmpty(LoadedProcedure.TransitionEnd) ? "---" : LoadedProcedure.TransitionEnd;
|
||||
|
||||
altProcNameTextBox.Text = string.IsNullOrEmpty(LoadedProcedure.AltProcName) ? "---" : LoadedProcedure.AltProcName;
|
||||
altProcPeriodTextBox.Text = LoadedProcedure.AltProcPeriod.ToString();
|
||||
testProfileTextBox.Text = string.IsNullOrEmpty(LoadedProcedure.AltProcName) ? "---" : LoadedProcedure.AltProcName;
|
||||
//altProcNameTextBox.Text = string.IsNullOrEmpty(LoadedProcedure.AltProcName) ? "---" : LoadedProcedure.AltProcName;
|
||||
//altProcPeriodTextBox.Text = LoadedProcedure.AltProcPeriod.ToString();
|
||||
|
||||
if (string.IsNullOrEmpty(LoadedProcedure.ResultsPrinter))
|
||||
{
|
||||
@@ -505,13 +507,9 @@ namespace TBF.UI.Procedures
|
||||
LoadedProcedure.MustBeComplete = mustBeCompleteCheckBox.Checked;
|
||||
LoadedProcedure.ManualCtrlDisabled = manualControlDisabledCheckBox.Checked;
|
||||
|
||||
LoadedProcedure.AltProcName = altProcNameTextBox.Text.Equals("---") ? string.Empty : altProcNameTextBox.Text;
|
||||
|
||||
int itmp;
|
||||
if (int.TryParse(altProcPeriodTextBox.Text, out itmp) && itmp >= 0)
|
||||
{
|
||||
LoadedProcedure.AltProcPeriod = itmp;
|
||||
}
|
||||
//LoadedProcedure.AltProcName = altProcNameTextBox.Text.Equals("---") ? string.Empty : altProcNameTextBox.Text;
|
||||
//int itmp;
|
||||
//if (int.TryParse(altProcPeriodTextBox.Text, out itmp) && itmp >= 0) { LoadedProcedure.AltProcPeriod = itmp; }
|
||||
|
||||
if (transitionStartComboBox.Items.Contains(transitionStartComboBox.Text))
|
||||
{
|
||||
@@ -805,10 +803,18 @@ namespace TBF.UI.Procedures
|
||||
#if TEST_PROFILES
|
||||
if (e.SubItem == (int)MtrlgyClmn.Qtg) return;
|
||||
#endif
|
||||
if (unlocked && (e.SubItem < (int)MtrlgyClmn.CoulumnsCount))
|
||||
{
|
||||
metrology1ListViewEx.StartEditing(metrology1Editors[e.SubItem], e.Item, e.SubItem);
|
||||
}
|
||||
if (!unlocked || (e.SubItem >= (int)MtrlgyClmn.CoulumnsCount)) return;
|
||||
|
||||
MtrlgyClmn[] protectedColumns = new MtrlgyClmn[]
|
||||
{
|
||||
MtrlgyClmn.Name,
|
||||
MtrlgyClmn.Qfrom, MtrlgyClmn.Qto,
|
||||
MtrlgyClmn.ErrLimLo, MtrlgyClmn.ErrLimHi,
|
||||
MtrlgyClmn.TempLimLo, MtrlgyClmn.TempLimHi
|
||||
};
|
||||
if (((e.Item.Tag as Test).Profile >= TestProfile.Protected) && protectedColumns.Contains<MtrlgyClmn>((MtrlgyClmn)e.SubItem)) return;
|
||||
|
||||
metrology1ListViewEx.StartEditing(metrology1Editors[e.SubItem], e.Item, e.SubItem);
|
||||
}
|
||||
|
||||
void metrology1ListViewEx_SubItemRightClicked(object sender, SubItemEventArgs e)
|
||||
@@ -1060,10 +1066,14 @@ namespace TBF.UI.Procedures
|
||||
|
||||
private void metrology2ListViewEx_SubItemClicked(object sender, SubItemEventArgs e)
|
||||
{
|
||||
if (!unlocked || e.SubItem >= (int)Mtrlgy2Clmn.ColumnsCount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!unlocked || e.SubItem >= (int)Mtrlgy2Clmn.ColumnsCount) return;
|
||||
|
||||
Mtrlgy2Clmn[] protectedColumns = new Mtrlgy2Clmn[]
|
||||
{
|
||||
Mtrlgy2Clmn.Name,
|
||||
Mtrlgy2Clmn.Publish, Mtrlgy2Clmn.Evaluate
|
||||
};
|
||||
if (((e.Item.Tag as Test).Profile >= TestProfile.Protected) && protectedColumns.Contains<Mtrlgy2Clmn>((Mtrlgy2Clmn)e.SubItem)) return;
|
||||
|
||||
metrology2ListViewEx.StartEditing(metrology2Editors[e.SubItem], e.Item, e.SubItem);
|
||||
}
|
||||
@@ -1256,6 +1266,7 @@ namespace TBF.UI.Procedures
|
||||
void AddToProcessTab(Test test)
|
||||
{
|
||||
ITestMethod tm = TBF.BenchControl.TbfComponents.FindComponent(test.Method, TbfComponents) as ITestMethod;
|
||||
bool isNotAHydroTest = (tm != null) && !tm.DoTransitions();
|
||||
|
||||
///
|
||||
/// Process item with subitems
|
||||
@@ -1263,23 +1274,8 @@ namespace TBF.UI.Procedures
|
||||
ListViewItem lvi = new ListViewItem(test.Name); /// Name
|
||||
lvi.Tag = test;
|
||||
lvi.SubItems.Add((test.Part == 0) ? "-" : test.Part.ToString()); /// Part
|
||||
|
||||
if (tm != null && tm.DoTransitions())
|
||||
{
|
||||
lvi.SubItems.Add(test.DoDraining ? Strings.yes : Strings.no); /// Draining before test
|
||||
lvi.SubItems.Add(test.DoDrainingAfter ? Strings.yes : Strings.no); /// Draining after test
|
||||
lvi.SubItems.Add(test.FeedingPath);
|
||||
lvi.SubItems.Add(test.BenchPath);
|
||||
lvi.SubItems.Add(test.OutputPath);
|
||||
#if HEAT_METERS
|
||||
lvi.SubItems.Add(test.HeatMetersPath);
|
||||
#endif
|
||||
lvi.SubItems.Add(test.MetersPath);
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBefore) ? "---" : test.RelTransBefore);
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBetween) ? "---" : test.RelTransBetween);
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.TransitionAfter) ? "---" : test.TransitionAfter);
|
||||
}
|
||||
else
|
||||
|
||||
if (isNotAHydroTest)
|
||||
{
|
||||
lvi.SubItems.Add(string.Empty); /// Draining before test N/A
|
||||
lvi.SubItems.Add(string.Empty); /// Draining after test N/A
|
||||
@@ -1294,6 +1290,21 @@ namespace TBF.UI.Procedures
|
||||
lvi.SubItems.Add(string.Empty); /// RelTransBetween N/A
|
||||
lvi.SubItems.Add(string.Empty); /// TransitionAfter N/A
|
||||
}
|
||||
else
|
||||
{
|
||||
lvi.SubItems.Add(test.DoDraining ? Strings.yes : Strings.no); /// Draining before test
|
||||
lvi.SubItems.Add(test.DoDrainingAfter ? Strings.yes : Strings.no); /// Draining after test
|
||||
lvi.SubItems.Add(test.FeedingPath);
|
||||
lvi.SubItems.Add(test.BenchPath);
|
||||
lvi.SubItems.Add(test.OutputPath);
|
||||
#if HEAT_METERS
|
||||
lvi.SubItems.Add(test.HeatMetersPath);
|
||||
#endif
|
||||
lvi.SubItems.Add(test.MetersPath);
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBefore) ? "---" : test.RelTransBefore);
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBetween) ? "---" : test.RelTransBetween);
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.TransitionAfter) ? "---" : test.TransitionAfter);
|
||||
}
|
||||
|
||||
processListViewEx.Items.Add(lvi);
|
||||
}
|
||||
@@ -1303,77 +1314,87 @@ namespace TBF.UI.Procedures
|
||||
for (int i = 0; i < processListViewEx.Items.Count; i++)
|
||||
{
|
||||
ListViewItem lvi = processListViewEx.Items[i];
|
||||
Test entity = (Test)lvi.Tag;
|
||||
Test test = (Test)lvi.Tag;
|
||||
|
||||
entity.Name = lvi.Text;
|
||||
entity.ItemNr = i;
|
||||
ITestMethod tm = TBF.BenchControl.TbfComponents.FindComponent(test.Method, TbfComponents) as ITestMethod;
|
||||
bool isNotAHydroTest = (tm != null) && !tm.DoTransitions();
|
||||
|
||||
int part = entity.Part;
|
||||
test.Name = lvi.Text;
|
||||
test.ItemNr = i;
|
||||
|
||||
int part = test.Part;
|
||||
if (lvi.SubItems[(int)ProcessClmn.Part].Text.Equals("-"))
|
||||
{
|
||||
entity.Part = 0;
|
||||
test.Part = 0;
|
||||
}
|
||||
else if (int.TryParse(lvi.SubItems[(int)ProcessClmn.Part].Text, out part))
|
||||
{
|
||||
entity.Part = part;
|
||||
test.Part = part;
|
||||
}
|
||||
|
||||
entity.DoDraining = lvi.SubItems[(int)ProcessClmn.DrainingBefore].Text.Equals(Strings.yes);
|
||||
entity.DoDrainingAfter = lvi.SubItems[(int)ProcessClmn.DrainingAfter].Text.Equals(Strings.yes);
|
||||
int column;
|
||||
string subItemText;
|
||||
if (!isNotAHydroTest)
|
||||
{
|
||||
/// Is a hydraulical test or test.Method component == null
|
||||
test.DoDraining = lvi.SubItems[(int)ProcessClmn.DrainingBefore].Text.Equals(Strings.yes);
|
||||
test.DoDrainingAfter = lvi.SubItems[(int)ProcessClmn.DrainingAfter].Text.Equals(Strings.yes);
|
||||
|
||||
int column = (int)ProcessClmn.Feeding;
|
||||
string subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
entity.FeedingPath = subItemText;
|
||||
}
|
||||
column = (int)ProcessClmn.Feeding;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
test.FeedingPath = subItemText;
|
||||
}
|
||||
|
||||
column = (int)ProcessClmn.Bench;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
entity.BenchPath = subItemText;
|
||||
}
|
||||
column = (int)ProcessClmn.Bench;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
test.BenchPath = subItemText;
|
||||
}
|
||||
|
||||
column = (int)ProcessClmn.Output;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
entity.OutputPath = subItemText;
|
||||
}
|
||||
column = (int)ProcessClmn.Output;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
test.OutputPath = subItemText;
|
||||
}
|
||||
|
||||
column = (int)ProcessClmn.TrnStart;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
test.RelTransBefore = (string.IsNullOrEmpty(subItemText) || subItemText.Equals("---")) ? string.Empty : subItemText;
|
||||
}
|
||||
|
||||
column = (int)ProcessClmn.TrnBetween;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
test.RelTransBetween = (string.IsNullOrEmpty(subItemText) || subItemText.Equals("---")) ? string.Empty : subItemText;
|
||||
}
|
||||
|
||||
column = (int)ProcessClmn.TrnStop;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
test.TransitionAfter = (string.IsNullOrEmpty(subItemText) || subItemText.Equals("---")) ? string.Empty : subItemText;
|
||||
}
|
||||
}
|
||||
|
||||
column = (int)ProcessClmn.Sensor;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if ((processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
entity.MetersPath = subItemText;
|
||||
}
|
||||
{
|
||||
test.MetersPath = subItemText;
|
||||
}
|
||||
#if HEAT_METERS
|
||||
if ((processEditors[(int)ProcessClmn.HeatMeterSensors] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.HeatMeterSensors].Text))
|
||||
{
|
||||
entity.HeatMetersPath = lvi.SubItems[(int)ProcessClmn.HeatMeterSensors].Text;
|
||||
}
|
||||
#endif
|
||||
column = (int)ProcessClmn.TrnStart;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
entity.RelTransBefore = (string.IsNullOrEmpty(subItemText) || subItemText.Equals("---")) ? string.Empty : subItemText;
|
||||
}
|
||||
|
||||
column = (int)ProcessClmn.TrnBetween;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
entity.RelTransBetween = (string.IsNullOrEmpty(subItemText) || subItemText.Equals("---")) ? string.Empty : subItemText;
|
||||
}
|
||||
|
||||
column = (int)ProcessClmn.TrnStop;
|
||||
subItemText = lvi.SubItems[column].Text;
|
||||
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
|
||||
{
|
||||
entity.TransitionAfter = (string.IsNullOrEmpty(subItemText) || subItemText.Equals("---")) ? string.Empty : subItemText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1384,18 +1405,22 @@ namespace TBF.UI.Procedures
|
||||
return;
|
||||
}
|
||||
|
||||
ITestMethod tm = TBF.BenchControl.TbfComponents.FindComponent((e.Item.Tag as Test).Method, TbfComponents) as ITestMethod;
|
||||
ProcessClmn[] protectedColumns = new ProcessClmn[] { ProcessClmn.Name };
|
||||
if (((e.Item.Tag as Test).Profile >= TestProfile.Protected) && protectedColumns.Contains<ProcessClmn>((ProcessClmn)e.SubItem)) return;
|
||||
|
||||
if (tm != null && (tm.DoTransitions() == false) && ((e.SubItem == (int)ProcessClmn.DrainingBefore) ||
|
||||
(e.SubItem == (int)ProcessClmn.DrainingAfter) ||
|
||||
(e.SubItem == (int)ProcessClmn.Feeding) ||
|
||||
(e.SubItem == (int)ProcessClmn.Bench) ||
|
||||
(e.SubItem == (int)ProcessClmn.Output) ||
|
||||
(e.SubItem == (int)ProcessClmn.TrnStart) ||
|
||||
(e.SubItem == (int)ProcessClmn.TrnBetween) ||
|
||||
(e.SubItem == (int)ProcessClmn.TrnStop)))
|
||||
ITestMethod tm = TBF.BenchControl.TbfComponents.FindComponent((e.Item.Tag as Test).Method, TbfComponents) as ITestMethod;
|
||||
bool isNotAHydroTest = (tm != null) && !tm.DoTransitions();
|
||||
|
||||
if (isNotAHydroTest && ((e.SubItem == (int)ProcessClmn.DrainingBefore) ||
|
||||
(e.SubItem == (int)ProcessClmn.DrainingAfter) ||
|
||||
(e.SubItem == (int)ProcessClmn.Feeding) ||
|
||||
(e.SubItem == (int)ProcessClmn.Bench) ||
|
||||
(e.SubItem == (int)ProcessClmn.Output) ||
|
||||
(e.SubItem == (int)ProcessClmn.TrnStart) ||
|
||||
(e.SubItem == (int)ProcessClmn.TrnBetween) ||
|
||||
(e.SubItem == (int)ProcessClmn.TrnStop)))
|
||||
{
|
||||
return;
|
||||
return; /// Prevent editing these cells
|
||||
}
|
||||
|
||||
processListViewEx.StartEditing(processEditors[e.SubItem], e.Item, e.SubItem);
|
||||
@@ -1651,6 +1676,9 @@ namespace TBF.UI.Procedures
|
||||
return;
|
||||
}
|
||||
|
||||
ProcessClmn[] protectedColumns = new ProcessClmn[] { ProcessClmn.Name };
|
||||
if (((e.Item.Tag as Test).Profile >= TestProfile.Protected) && protectedColumns.Contains<ProcessClmn>((ProcessClmn)e.SubItem)) return;
|
||||
|
||||
parametersListViewEx.StartEditing(parametersEditors[e.SubItem], e.Item, e.SubItem);
|
||||
}
|
||||
|
||||
@@ -1801,7 +1829,7 @@ namespace TBF.UI.Procedures
|
||||
procNameTextBox.Enabled = true;
|
||||
descriptionTextBox.Enabled = true;
|
||||
watermetersTextBox.Enabled = true;
|
||||
protectedCheckBox.Enabled = Users.GlobalData.CurrentUser.IsMemberOf(Users.Grp.GID.Metrologists);
|
||||
protectedCheckBox.Enabled = Users.GlobalData.CurrentUser.IsMemberOf(Users.Entities.GID.Metrologists);
|
||||
mustBeCompleteCheckBox.Enabled = true;
|
||||
manualControlDisabledCheckBox.Enabled = true;
|
||||
dataEntryComboBox.Enabled = true;
|
||||
@@ -1865,7 +1893,7 @@ namespace TBF.UI.Procedures
|
||||
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));
|
||||
|
||||
if (usedNames != null && usedNames.Contains(LoadedProcedure.Name))
|
||||
if (usedNames != null && usedNames.Contains(LoadedProcedure.Name.ToLower()))
|
||||
{
|
||||
MessageBox.Show(string.Format("There is already a procedure named '{0}'.{1}Choose another name please.", LoadedProcedure.Name, Environment.NewLine),
|
||||
Strings.Warning,
|
||||
@@ -2245,7 +2273,13 @@ namespace TBF.UI.Procedures
|
||||
/// Check the selected index validity
|
||||
if (listViewEx.SelectedItems.Count != 1) return;
|
||||
int removeItemNr = listViewEx.SelectedIndices[0];
|
||||
|
||||
|
||||
if (LoadedProcedure.Tests[removeItemNr].Profile >= TestProfile.Protected)
|
||||
{
|
||||
MessageBox.Show("This test is protected and cannot be deleted.");
|
||||
return;
|
||||
}
|
||||
|
||||
/// Remove the selected test
|
||||
Test toBeDeleted = LoadedProcedure.Tests[removeItemNr];
|
||||
LoadedProcedure.Tests.Remove(toBeDeleted);
|
||||
|
||||
@@ -129,14 +129,68 @@
|
||||
<data name="mainSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.Enabled" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 128</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>522, 20</value>
|
||||
</data>
|
||||
<data name="testProfileTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name=">>testProfileTextBox.Name" xml:space="preserve">
|
||||
<value>testProfileTextBox</value>
|
||||
</data>
|
||||
<data name=">>testProfileTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testProfileTextBox.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>testProfileTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 131</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>64, 13</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="testProfileLabel.Text" xml:space="preserve">
|
||||
<value>Test profiles</value>
|
||||
</data>
|
||||
<data name=">>testProfileLabel.Name" xml:space="preserve">
|
||||
<value>testProfileLabel</value>
|
||||
</data>
|
||||
<data name=">>testProfileLabel.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=">>testProfileLabel.Parent" xml:space="preserve">
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>testProfileLabel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="altProcPeriodTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 128</value>
|
||||
<value>676, 361</value>
|
||||
</data>
|
||||
<data name="altProcPeriodTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>34, 20</value>
|
||||
</data>
|
||||
<data name="altProcPeriodTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
<value>41</value>
|
||||
</data>
|
||||
<data name="altProcPeriodTextBox.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
@@ -151,7 +205,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcPeriodTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -160,13 +214,13 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>542, 131</value>
|
||||
<value>542, 364</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>116, 13</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
<value>40</value>
|
||||
</data>
|
||||
<data name="altProcPeriodLabel.Text" xml:space="preserve">
|
||||
<value>Alternative proc. period</value>
|
||||
@@ -184,16 +238,16 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcPeriodLabel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="altProcNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 128</value>
|
||||
<value>188, 361</value>
|
||||
</data>
|
||||
<data name="altProcNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>217, 20</value>
|
||||
</data>
|
||||
<data name="altProcNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
<value>39</value>
|
||||
</data>
|
||||
<data name="altProcNameTextBox.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
@@ -208,7 +262,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -217,13 +271,13 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 131</value>
|
||||
<value>20, 364</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 13</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
<value>38</value>
|
||||
</data>
|
||||
<data name="altProcNameLabel.Text" xml:space="preserve">
|
||||
<value>Alternative proc. name</value>
|
||||
@@ -241,7 +295,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>altProcNameLabel.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="manualControlDisabledCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -256,7 +310,7 @@
|
||||
<value>138, 17</value>
|
||||
</data>
|
||||
<data name="manualControlDisabledCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>39</value>
|
||||
<value>35</value>
|
||||
</data>
|
||||
<data name="manualControlDisabledCheckBox.Text" xml:space="preserve">
|
||||
<value>Manual control disabled</value>
|
||||
@@ -271,7 +325,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>manualControlDisabledCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="mustBeCompleteCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -286,7 +340,7 @@
|
||||
<value>152, 17</value>
|
||||
</data>
|
||||
<data name="mustBeCompleteCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>38</value>
|
||||
<value>34</value>
|
||||
</data>
|
||||
<data name="mustBeCompleteCheckBox.Text" xml:space="preserve">
|
||||
<value>All tests must be competed</value>
|
||||
@@ -301,7 +355,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>mustBeCompleteCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="protectedCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -316,7 +370,7 @@
|
||||
<value>123, 17</value>
|
||||
</data>
|
||||
<data name="protectedCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>37</value>
|
||||
<value>33</value>
|
||||
</data>
|
||||
<data name="protectedCheckBox.Text" xml:space="preserve">
|
||||
<value>Protected procedure</value>
|
||||
@@ -331,7 +385,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>protectedCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -346,7 +400,7 @@
|
||||
<value>77, 17</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>36</value>
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton3.Text" xml:space="preserve">
|
||||
<value>Heat meter</value>
|
||||
@@ -361,7 +415,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton3.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="fileWriter4ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 336</value>
|
||||
@@ -370,7 +424,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="fileWriter4ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>33</value>
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name=">>fileWriter4ComboBox.Name" xml:space="preserve">
|
||||
<value>fileWriter4ComboBox</value>
|
||||
@@ -382,7 +436,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter4ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="fileWriter3ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 312</value>
|
||||
@@ -391,7 +445,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="fileWriter3ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>32</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name=">>fileWriter3ComboBox.Name" xml:space="preserve">
|
||||
<value>fileWriter3ComboBox</value>
|
||||
@@ -403,7 +457,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter3ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="printer2ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 243</value>
|
||||
@@ -412,7 +466,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="printer2ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>28</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name=">>printer2ComboBox.Name" xml:space="preserve">
|
||||
<value>printer2ComboBox</value>
|
||||
@@ -424,7 +478,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer2ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="fileWriter2ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 289</value>
|
||||
@@ -433,7 +487,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="fileWriter2ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>31</value>
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name=">>fileWriter2ComboBox.Name" xml:space="preserve">
|
||||
<value>fileWriter2ComboBox</value>
|
||||
@@ -445,7 +499,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter2ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -460,7 +514,7 @@
|
||||
<value>72, 17</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>35</value>
|
||||
<value>31</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton2.Text" xml:space="preserve">
|
||||
<value>Combined</value>
|
||||
@@ -475,7 +529,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton2.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -490,7 +544,7 @@
|
||||
<value>54, 17</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>34</value>
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="metersKindRadioButton1.Text" xml:space="preserve">
|
||||
<value>Single</value>
|
||||
@@ -505,7 +559,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>metersKindRadioButton1.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="transitionEndComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 197</value>
|
||||
@@ -514,7 +568,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="transitionEndComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name=">>transitionEndComboBox.Name" xml:space="preserve">
|
||||
<value>transitionEndComboBox</value>
|
||||
@@ -526,7 +580,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionEndComboBox.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="transitionEndLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -541,7 +595,7 @@
|
||||
<value>63, 13</value>
|
||||
</data>
|
||||
<data name="transitionEndLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="transitionEndLabel.Text" xml:space="preserve">
|
||||
<value>Purge - End</value>
|
||||
@@ -556,7 +610,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionEndLabel.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="transitionStartComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 174</value>
|
||||
@@ -565,7 +619,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="transitionStartComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name=">>transitionStartComboBox.Name" xml:space="preserve">
|
||||
<value>transitionStartComboBox</value>
|
||||
@@ -577,7 +631,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionStartComboBox.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="transitionStartLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -592,7 +646,7 @@
|
||||
<value>71, 13</value>
|
||||
</data>
|
||||
<data name="transitionStartLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="transitionStartLabel.Text" xml:space="preserve">
|
||||
<value>Purge - Begin</value>
|
||||
@@ -607,7 +661,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>transitionStartLabel.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="fileWriter1ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 266</value>
|
||||
@@ -616,7 +670,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="fileWriter1ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name=">>fileWriter1ComboBox.Name" xml:space="preserve">
|
||||
<value>fileWriter1ComboBox</value>
|
||||
@@ -628,7 +682,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>fileWriter1ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="printer1ComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 220</value>
|
||||
@@ -637,7 +691,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="printer1ComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>27</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name=">>printer1ComboBox.Name" xml:space="preserve">
|
||||
<value>printer1ComboBox</value>
|
||||
@@ -649,7 +703,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>printer1ComboBox.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="dataEntryComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 151</value>
|
||||
@@ -658,7 +712,7 @@
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="dataEntryComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name=">>dataEntryComboBox.Name" xml:space="preserve">
|
||||
<value>dataEntryComboBox</value>
|
||||
@@ -670,7 +724,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>dataEntryComboBox.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -685,7 +739,7 @@
|
||||
<value>70, 13</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>29</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="resultsWriterLabel.Text" xml:space="preserve">
|
||||
<value>Results writer</value>
|
||||
@@ -700,7 +754,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>resultsWriterLabel.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -715,7 +769,7 @@
|
||||
<value>42, 13</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>26</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="resultsPrinterLabel.Text" xml:space="preserve">
|
||||
<value>Printers</value>
|
||||
@@ -730,7 +784,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>resultsPrinterLabel.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="dataEntryLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -745,7 +799,7 @@
|
||||
<value>57, 13</value>
|
||||
</data>
|
||||
<data name="dataEntryLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="dataEntryLabel.Text" xml:space="preserve">
|
||||
<value>Data Entry</value>
|
||||
@@ -760,7 +814,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>dataEntryLabel.ZOrder" xml:space="preserve">
|
||||
<value>23</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="notesTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>393, 243</value>
|
||||
@@ -772,7 +826,7 @@
|
||||
<value>317, 113</value>
|
||||
</data>
|
||||
<data name="notesTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>41</value>
|
||||
<value>37</value>
|
||||
</data>
|
||||
<data name=">>notesTextBox.Name" xml:space="preserve">
|
||||
<value>notesTextBox</value>
|
||||
@@ -784,7 +838,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>notesTextBox.ZOrder" xml:space="preserve">
|
||||
<value>24</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="label18.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -799,7 +853,7 @@
|
||||
<value>35, 13</value>
|
||||
</data>
|
||||
<data name="label18.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>40</value>
|
||||
<value>36</value>
|
||||
</data>
|
||||
<data name="label18.Text" xml:space="preserve">
|
||||
<value>Notes</value>
|
||||
@@ -814,7 +868,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label18.ZOrder" xml:space="preserve">
|
||||
<value>25</value>
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="watermetersTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 105</value>
|
||||
@@ -835,7 +889,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>watermetersTextBox.ZOrder" xml:space="preserve">
|
||||
<value>26</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="watermetersLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -865,7 +919,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>watermetersLabel.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="lastChangedOnTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>402, 82</value>
|
||||
@@ -886,7 +940,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>lastChangedOnTextBox.ZOrder" xml:space="preserve">
|
||||
<value>28</value>
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -916,7 +970,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label15.ZOrder" xml:space="preserve">
|
||||
<value>29</value>
|
||||
<value>31</value>
|
||||
</data>
|
||||
<data name="lastChangedByTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 82</value>
|
||||
@@ -937,7 +991,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>lastChangedByTextBox.ZOrder" xml:space="preserve">
|
||||
<value>30</value>
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name="label16.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -967,7 +1021,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label16.ZOrder" xml:space="preserve">
|
||||
<value>31</value>
|
||||
<value>33</value>
|
||||
</data>
|
||||
<data name="createdOnTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>402, 59</value>
|
||||
@@ -988,7 +1042,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>createdOnTextBox.ZOrder" xml:space="preserve">
|
||||
<value>32</value>
|
||||
<value>34</value>
|
||||
</data>
|
||||
<data name="label14.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1018,7 +1072,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label14.ZOrder" xml:space="preserve">
|
||||
<value>33</value>
|
||||
<value>35</value>
|
||||
</data>
|
||||
<data name="createdByTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 59</value>
|
||||
@@ -1039,7 +1093,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>createdByTextBox.ZOrder" xml:space="preserve">
|
||||
<value>34</value>
|
||||
<value>36</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1069,7 +1123,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>35</value>
|
||||
<value>37</value>
|
||||
</data>
|
||||
<data name="descriptionTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 36</value>
|
||||
@@ -1090,7 +1144,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>descriptionTextBox.ZOrder" xml:space="preserve">
|
||||
<value>36</value>
|
||||
<value>38</value>
|
||||
</data>
|
||||
<data name="label12.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1120,7 +1174,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label12.ZOrder" xml:space="preserve">
|
||||
<value>37</value>
|
||||
<value>39</value>
|
||||
</data>
|
||||
<data name="procNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>188, 13</value>
|
||||
@@ -1141,7 +1195,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>procNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>38</value>
|
||||
<value>40</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1171,7 +1225,7 @@
|
||||
<value>generalTabPage</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>39</value>
|
||||
<value>41</value>
|
||||
</data>
|
||||
<data name="generalTabPage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 34</value>
|
||||
@@ -1180,7 +1234,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="generalTabPage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>923, 366</value>
|
||||
<value>923, 391</value>
|
||||
</data>
|
||||
<data name="generalTabPage.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1216,7 +1270,7 @@
|
||||
<value>historyListViewEx</value>
|
||||
</data>
|
||||
<data name=">>historyListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.18.893.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>historyListViewEx.Parent" xml:space="preserve">
|
||||
<value>historyTabPage</value>
|
||||
@@ -1267,7 +1321,7 @@
|
||||
<value>metrology1ListViewEx</value>
|
||||
</data>
|
||||
<data name=">>metrology1ListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.18.893.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>metrology1ListViewEx.Parent" xml:space="preserve">
|
||||
<value>metrology1TabPage</value>
|
||||
@@ -1318,7 +1372,7 @@
|
||||
<value>metrology2ListViewEx</value>
|
||||
</data>
|
||||
<data name=">>metrology2ListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.18.893.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>metrology2ListViewEx.Parent" xml:space="preserve">
|
||||
<value>metrology2TabPage</value>
|
||||
@@ -1369,7 +1423,7 @@
|
||||
<value>processListViewEx</value>
|
||||
</data>
|
||||
<data name=">>processListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.18.893.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>processListViewEx.Parent" xml:space="preserve">
|
||||
<value>processTabPage</value>
|
||||
@@ -1420,7 +1474,7 @@
|
||||
<value>parametersListViewEx</value>
|
||||
</data>
|
||||
<data name=">>parametersListViewEx.Type" xml:space="preserve">
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.18.893.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>Results.Forms.ListViewEx, Results, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>parametersListViewEx.Parent" xml:space="preserve">
|
||||
<value>parametersTabPage</value>
|
||||
@@ -1462,7 +1516,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>931, 404</value>
|
||||
<value>931, 429</value>
|
||||
</data>
|
||||
<data name="tabControl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -1504,7 +1558,7 @@
|
||||
<value>sharedButtons</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Type" xml:space="preserve">
|
||||
<value>TBF.UiControls.SharedButtons, TBF, Version=2.18.901.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>TBF.UI.Shared.SharedButtons, TBF, Version=2.24.1368.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>sharedButtons.Parent" xml:space="preserve">
|
||||
<value>mainSplitContainer.Panel2</value>
|
||||
@@ -1525,7 +1579,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1034, 404</value>
|
||||
<value>1034, 429</value>
|
||||
</data>
|
||||
<data name="mainSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>931</value>
|
||||
@@ -1552,7 +1606,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1034, 404</value>
|
||||
<value>1034, 429</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace TBF.UI.Procedures
|
||||
Control[] editors;
|
||||
|
||||
ISession session;
|
||||
IErrorFlags errorFlagsCmpnt;
|
||||
|
||||
public ProceduresCtrl()
|
||||
: base()
|
||||
@@ -49,7 +50,10 @@ namespace TBF.UI.Procedures
|
||||
|
||||
public void Initialize(ProceduresDlg parent, Control parentControl)
|
||||
{
|
||||
this.parent = parent;
|
||||
/// Create a DB session
|
||||
session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
|
||||
this.parent = parent;
|
||||
this.parentControl = parentControl;
|
||||
|
||||
SubItemClicked += new SubItemEventHandler(listViewEx_SubItemClicked);
|
||||
@@ -57,10 +61,10 @@ namespace TBF.UI.Procedures
|
||||
|
||||
/// ListViewEx columns
|
||||
TBF.LocalSettings ls = Program.LocalSettings;
|
||||
Columns.Add(Strings.Nr, (ls.ProceduresColumnCount > 0) ? ls.ProceduresColumnWidths[0] : (30 * parent.Dpi / Constants.Dpi100pct));
|
||||
Columns.Add(Strings.Name, (ls.ProceduresColumnCount > 1) ? ls.ProceduresColumnWidths[1] : (100 * parent.Dpi / Constants.Dpi100pct));
|
||||
Columns.Add(Strings.Nr, (ls.ProceduresColumnCount > 0) ? ls.ProceduresColumnWidths[0] : ( 30 * parent.Dpi / Constants.Dpi100pct));
|
||||
Columns.Add(Strings.Name, (ls.ProceduresColumnCount > 1) ? ls.ProceduresColumnWidths[1] : (100 * parent.Dpi / Constants.Dpi100pct));
|
||||
Columns.Add(Strings.DescriptionColHdr, (ls.ProceduresColumnCount > 2) ? ls.ProceduresColumnWidths[2] : (300 * parent.Dpi / Constants.Dpi100pct));
|
||||
Columns.Add(Strings.More, (ls.ProceduresColumnCount > 3) ? ls.ProceduresColumnWidths[3] : (300 * parent.Dpi / Constants.Dpi100pct));
|
||||
Columns.Add(Strings.More, (ls.ProceduresColumnCount > 3) ? ls.ProceduresColumnWidths[3] : (300 * parent.Dpi / Constants.Dpi100pct));
|
||||
|
||||
editors = new Control[columnsCount];
|
||||
///
|
||||
@@ -83,13 +87,29 @@ namespace TBF.UI.Procedures
|
||||
|
||||
void ReloadAndRedrawAll()
|
||||
{
|
||||
/// Load the procedures
|
||||
if (session == null) session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
try
|
||||
{
|
||||
/// Find ErrorFlags component
|
||||
foreach (var cmpnt in TBF.BenchControl.TbfComponents.LoadComponentsFromDB(session))
|
||||
{
|
||||
if (cmpnt is IErrorFlags)
|
||||
{
|
||||
errorFlagsCmpnt = cmpnt as IErrorFlags;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MyItems = session.QueryOver<Procedure>()
|
||||
.Where(x => (x.ProcedureState == ProcedureState.Active))
|
||||
.OrderBy(x => x.ItemNr).Asc
|
||||
.List();
|
||||
/// Load the procedures
|
||||
MyItems = session.QueryOver<Procedure>()
|
||||
.Where(x => (x.ProcedureState == ProcedureState.Active))
|
||||
.OrderBy(x => x.ItemNr).Asc
|
||||
.List();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Loading Procedures from DB failed: {0}", exc.Message);
|
||||
MyItems = new List<Procedure>();
|
||||
}
|
||||
|
||||
base.RedrawAll();
|
||||
}
|
||||
@@ -198,7 +218,7 @@ namespace TBF.UI.Procedures
|
||||
{
|
||||
newName = Strings.New_procedure_name + nameId.ToString();
|
||||
bool notUsed = true;
|
||||
foreach (var t in MyItems) if (t.Name.Equals(newName)) notUsed = false;
|
||||
foreach (var t in MyItems) if (t.Name.ToLower().Equals(newName.ToLower())) notUsed = false;
|
||||
if (notUsed) break;
|
||||
}
|
||||
|
||||
@@ -210,7 +230,7 @@ namespace TBF.UI.Procedures
|
||||
newProcedure.CreationUser = Users.GlobalData.CurrentUser.UserName;
|
||||
newProcedure.CreationTime = DateTime.Now;
|
||||
|
||||
if (new ProcedureDlg(newProcedure, GetUsedNames(), true).ShowDialog() == DialogResult.OK)
|
||||
if (new ProcedureDlg(newProcedure, GetUsedNames(false), true).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
/// TODO: Make name uniqueness test
|
||||
parent.Unlock();
|
||||
@@ -290,8 +310,8 @@ namespace TBF.UI.Procedures
|
||||
modifiedProcedure.Revision = originalProcedure.Revision + 1;
|
||||
modifiedProcedure.ObtainedByCopy = false;
|
||||
|
||||
IList<string> usedNames = GetUsedNames();
|
||||
usedNames.Remove(originalProcedure.Name); /// Allow original procedure name
|
||||
IList<string> usedNames = GetUsedNames(false);
|
||||
usedNames.Remove(originalProcedure.Name.ToLower()); /// Allow original procedure name
|
||||
///
|
||||
if (new ProcedureDlg(modifiedProcedure, usedNames).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@@ -346,7 +366,7 @@ namespace TBF.UI.Procedures
|
||||
newProcedure.CreationTime = DateTime.Now;
|
||||
newProcedure.Protected = false;
|
||||
|
||||
if ((new ProcedureDlg(newProcedure, GetUsedNames(), true)).ShowDialog() == DialogResult.OK)
|
||||
if ((new ProcedureDlg(newProcedure, GetUsedNames(false), true)).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
/// TODO: Make name uniqueness test
|
||||
parent.Unlock();
|
||||
@@ -399,7 +419,7 @@ namespace TBF.UI.Procedures
|
||||
newProcedure.CreationUser = Users.GlobalData.CurrentUser.UserName;
|
||||
newProcedure.CreationTime = DateTime.Now;
|
||||
|
||||
if ((new ProcedureDlg(newProcedure, GetUsedNames(), true)).ShowDialog() == DialogResult.OK)
|
||||
if ((new ProcedureDlg(newProcedure, GetUsedNames(false), true)).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
/// TODO: Make name uniqueness test
|
||||
parent.Unlock();
|
||||
@@ -442,6 +462,217 @@ namespace TBF.UI.Procedures
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateFromProfile()
|
||||
{
|
||||
IList<Profile> profiles;
|
||||
|
||||
try
|
||||
{
|
||||
profiles = session.QueryOver<Profile>().List();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
log.Error("Reading Profiles failed");
|
||||
MessageBox.Show("Reading Profiles failed");
|
||||
return;
|
||||
}
|
||||
|
||||
TestWizard.TestProfileSelection dlg = new TestWizard.TestProfileSelection(profiles);
|
||||
if (dlg.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
/// Find an unused procedure name
|
||||
string newName;
|
||||
for (int nameId = 1; true; nameId++)
|
||||
{
|
||||
newName = Strings.New_procedure_name + nameId.ToString();
|
||||
bool notUsed = true;
|
||||
foreach (var t in MyItems) if (t.Name.ToLower().Equals(newName.ToLower())) notUsed = false;
|
||||
if (notUsed) break;
|
||||
}
|
||||
|
||||
ProfileType pt = dlg.SelectedProfile.ProfileType;
|
||||
|
||||
Procedure newProcedure = new Procedure(newName, MyItems.Count);
|
||||
Medium medium = (pt == ProfileType.QnClassHotWater) ? Medium.HotWater : Medium.ColdWater;
|
||||
IList<IParamsProvider> errorFlagsParamsOfCreatedTests = new List<IParamsProvider>();
|
||||
IList<IParamsProvider> waterMeterParamsOfNewProcedure = new List<IParamsProvider>();
|
||||
|
||||
IList<Component> cmpntEntities = session.QueryOver<Component>()
|
||||
.OrderBy(x => x.ItemNr).Asc
|
||||
.List<Component>();
|
||||
|
||||
IList<BenchControl.Generic.IComponent> components = BenchControl.TbfComponents.LoadComponentsFromDB(session);
|
||||
foreach (var cmptn in components)
|
||||
{
|
||||
if (cmptn.ClassName == "WaterMeter")
|
||||
{
|
||||
IParamsProvider waterMeterParams = cmptn.Cfg.GetUIProcParamsProvider(newProcedure);
|
||||
|
||||
TBF.BenchControl.WaterMeters.WaterMeter.ProcParams wmParams = waterMeterParams as TBF.BenchControl.WaterMeters.WaterMeter.ProcParams;
|
||||
if (wmParams != null)
|
||||
{
|
||||
wmParams.NewQnames = (pt == ProfileType.Q3R);
|
||||
wmParams.Qmax = (float)((pt == ProfileType.Manual) ? 0 : Config.Utils.GetQ4Qmax(dlg.Qn, dlg.MetroClass, medium));
|
||||
wmParams.Qn = (float)dlg.Qn;
|
||||
wmParams.Qt = (float)((pt == ProfileType.Manual) ? 0 : (pt == ProfileType.QpQi) ? (0.1 * dlg.Qn) : Config.Utils.GetQ2Qt(dlg.Qn, dlg.MetroClass, medium));
|
||||
wmParams.Qmin = (float)((pt == ProfileType.Manual) ? 0 : (pt == ProfileType.QpQi) ? dlg.Qn / dlg.QpQiRatio : Config.Utils.GetQ1Qmin(dlg.Qn, dlg.MetroClass, medium));
|
||||
wmParams.MetrologicalClass = dlg.MetroClass;
|
||||
wmParams.WaterTemp = medium;
|
||||
}
|
||||
|
||||
waterMeterParamsOfNewProcedure.Add(waterMeterParams);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int itemNr = 0;
|
||||
foreach (var ptest in dlg.SelectedProfile.Tests)
|
||||
{
|
||||
double Qtg;
|
||||
if (ptest.Name.Contains("Q4") || ptest.Name.Contains("Qmax"))
|
||||
{
|
||||
Qtg = Config.Utils.GetQ4Qmax(dlg.Qn, dlg.MetroClass, medium, ptest.CoefQto);
|
||||
}
|
||||
else if (ptest.Name.Contains("Q3") || ptest.Name.Contains("Qn") || ptest.Name.Equals("qp"))
|
||||
{
|
||||
Qtg = dlg.Qn;
|
||||
}
|
||||
else if (ptest.Name.Contains("Q2") || ptest.Name.Contains("Qt"))
|
||||
{
|
||||
Qtg = Config.Utils.GetQ4Qmax(dlg.Qn, dlg.MetroClass, medium, ptest.CoefQto);
|
||||
}
|
||||
else if (ptest.Name.Contains("Q1") || ptest.Name.Contains("Qmin"))
|
||||
{
|
||||
Qtg = Config.Utils.GetQ1Qmin(dlg.Qn, dlg.MetroClass, medium, ptest.CoefQto);
|
||||
}
|
||||
else if (ptest.Name.Contains("0,1qp") || ptest.Name.Contains("0.1qp"))
|
||||
{
|
||||
Qtg = 0.1 * dlg.Qn;
|
||||
}
|
||||
else if (ptest.Name.Contains("qi"))
|
||||
{
|
||||
Qtg = dlg.Qn / dlg.QpQiRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
Qtg = dlg.Qn; /// Manual flow selection: CoefQfrom and CoefQto are used to calculate Qfrom and Qto from Qn
|
||||
}
|
||||
|
||||
Test test = new Test(ptest.Name, itemNr++, newProcedure);
|
||||
test.Part = ptest.Part;
|
||||
test.Profile = (pt == ProfileType.QpQi) ? TestProfile.ProtectedHeatMeter : TestProfile.Protected;
|
||||
test.Qtg = (float)Qtg;
|
||||
test.Qfrom = (float)(Qtg * ptest.CoefQfrom);
|
||||
test.Qto = (float)(Qtg * ptest.CoefQto);
|
||||
test.TempLimLo = (float)ptest.TempLimLo;
|
||||
test.TempLimHi = (float)ptest.TempLimHi;
|
||||
test.DoEvaluate = true;
|
||||
test.Publish = (sbyte)Publish.Always;
|
||||
|
||||
if (pt != ProfileType.QpQi)
|
||||
{
|
||||
test.ErrLimLo = (float)ptest.ErrLimLo;
|
||||
test.ErrLimHi = (float)ptest.ErrLimHi;
|
||||
}
|
||||
else
|
||||
{
|
||||
int metroClass;
|
||||
if (int.TryParse(dlg.MetroClass, out metroClass)) test.ErrLimLo = (float)metroClass;
|
||||
test.ErrLimHi = -(float)dlg.Qn;
|
||||
}
|
||||
|
||||
newProcedure.Tests.Add(test);
|
||||
|
||||
if (errorFlagsCmpnt != null)
|
||||
{
|
||||
IParamsProvider errorFlagsParams = errorFlagsCmpnt.Cfg.GetUITestParamsProvider(test);
|
||||
|
||||
TBF.BenchControl.Various.ErrorFlags.TestParams eFlagParams = errorFlagsParams as TBF.BenchControl.Various.ErrorFlags.TestParams;
|
||||
if (eFlagParams != null)
|
||||
{
|
||||
eFlagParams.E1 = ptest.E1;
|
||||
eFlagParams.E2 = ptest.E2;
|
||||
eFlagParams.E3 = ptest.E3;
|
||||
eFlagParams.E4 = ptest.E4;
|
||||
eFlagParams.E5 = ptest.E5;
|
||||
eFlagParams.E6 = ptest.E6;
|
||||
eFlagParams.E7 = ptest.E7;
|
||||
eFlagParams.E8 = ptest.E8;
|
||||
eFlagParams.E9 = ptest.E9;
|
||||
eFlagParams.E10 = ptest.E10;
|
||||
eFlagParams.E11 = ptest.E11;
|
||||
eFlagParams.E12 = ptest.E12;
|
||||
eFlagParams.E13 = ptest.E13;
|
||||
eFlagParams.E14 = ptest.E14;
|
||||
eFlagParams.E15 = ptest.E15;
|
||||
eFlagParams.E16 = ptest.E16;
|
||||
eFlagParams.E21 = ptest.E21;
|
||||
|
||||
eFlagParams.Delta_Q_pct = ptest.Delta_Q_pct;
|
||||
eFlagParams.Delta_T = ptest.Delta_T;
|
||||
eFlagParams.Delta_Tup_Tdn = ptest.Delta_Tup_Tdn;
|
||||
eFlagParams.TestTime_min = ptest.TestTime_min;
|
||||
eFlagParams.TestTime_max = ptest.TestTime_max;
|
||||
eFlagParams.AmbTemp_min = ptest.AmbTemp_min;
|
||||
eFlagParams.AmbTemp_max = ptest.AmbTemp_max;
|
||||
eFlagParams.Pressure_min = ptest.PressLimLo;
|
||||
eFlagParams.Pressure_max = ptest.PressLimHi;
|
||||
eFlagParams.Coef_E9 = ptest.Coef_E9;
|
||||
eFlagParams.Coef_E10 = ptest.Coef_E10;
|
||||
eFlagParams.Coef_E11 = ptest.Coef_E11;
|
||||
eFlagParams.Coef_E12 = ptest.Coef_E12;
|
||||
eFlagParams.Offset_E9 = ptest.Offset_E9;
|
||||
eFlagParams.Offset_E12 = ptest.Offset_E12;
|
||||
}
|
||||
|
||||
errorFlagsParamsOfCreatedTests.Add(errorFlagsParams);
|
||||
}
|
||||
}
|
||||
|
||||
newProcedure.AltProcName = dlg.SelectedProfile.Name;
|
||||
newProcedure.ProcedureState = ProcedureState.Active;
|
||||
newProcedure.Revision = 1;
|
||||
newProcedure.PredecessorId = 0;
|
||||
newProcedure.ObtainedByCopy = false;
|
||||
newProcedure.CreationUser = Users.GlobalData.CurrentUser.UserName;
|
||||
newProcedure.CreationTime = DateTime.Now;
|
||||
|
||||
if (new ProcedureDlg(newProcedure, GetUsedNames(false), true).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
/// TODO: Make name uniqueness test
|
||||
parent.Unlock();
|
||||
|
||||
using (var transaction = session.BeginTransaction())
|
||||
{
|
||||
try
|
||||
{
|
||||
newProcedure.LastChgUser = Users.GlobalData.CurrentUser.UserName;
|
||||
newProcedure.LastChgTime = DateTime.Now;
|
||||
|
||||
base.AddOne(newProcedure);
|
||||
session.SaveOrUpdate(newProcedure);
|
||||
|
||||
foreach (var efp in errorFlagsParamsOfCreatedTests)
|
||||
{
|
||||
efp.UpdateEmbeddedDbEntity();
|
||||
}
|
||||
|
||||
transaction.Commit();
|
||||
|
||||
MessageBox.Show(string.Format(Strings.Procedure_0_added, newProcedure.Name),
|
||||
Strings.Confirmation,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
transaction.Rollback();
|
||||
log.ErrorFormat("Exception when saving Procedure '{0}' : {1}", newProcedure.Name, exc.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string GetWarningsBeforeSaving(ref Dictionary<string, string> renmInfo)
|
||||
{
|
||||
return string.Empty;
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
using TBF.UI.Shared;
|
||||
using Config.Entities;
|
||||
|
||||
namespace TBF.UI.Procedures
|
||||
{
|
||||
@@ -25,12 +26,23 @@ namespace TBF.UI.Procedures
|
||||
InitializeComponent();
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists, Users.Entities.GID.Metrologists };
|
||||
|
||||
#if TEST_PROFILES
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
|
||||
SharedButtons.Buttons.Edit | SharedButtons.Buttons.Copy |
|
||||
SharedButtons.Buttons.Export | SharedButtons.Buttons.Import |
|
||||
SharedButtons.Buttons.Compare |SharedButtons.Buttons.Custom1;
|
||||
sharedButtons.Custom1Caption = string.Format("Create from{0}test profiles", Environment.NewLine);
|
||||
sharedButtons.Custom1Clicked += custom1Button_Click;
|
||||
#else
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up | SharedButtons.Buttons.Down |
|
||||
SharedButtons.Buttons.Edit | SharedButtons.Buttons.Copy |
|
||||
SharedButtons.Buttons.Export | SharedButtons.Buttons.Import |
|
||||
SharedButtons.Buttons.Compare;
|
||||
#endif
|
||||
|
||||
sharedButtons.Unlocked += Unlocked;
|
||||
sharedButtons.OKClicked += okButton_Click;
|
||||
@@ -209,6 +221,11 @@ namespace TBF.UI.Procedures
|
||||
}
|
||||
}
|
||||
|
||||
private void custom1Button_Click(object sender, EventArgs e)
|
||||
{
|
||||
proceduresCtrl.CreateFromProfile();
|
||||
}
|
||||
|
||||
public void UpdateButtonStates(SharedButtons.SelectedItemPos selectedItemPos)
|
||||
{
|
||||
if (selectedItemPos == SharedButtons.SelectedItemPos.None)
|
||||
|
||||
@@ -189,11 +189,11 @@ namespace TBF.UI.Procedures
|
||||
listViewEx.Items.Clear();
|
||||
for (int i = 0; i < testParamsProviders.Count && i < parent.LoadedProcedure.Tests.Count; i++)
|
||||
{
|
||||
DrawOne(testParamsProviders[i], parent.LoadedProcedure.Tests[i].Name);
|
||||
DrawOne(testParamsProviders[i], parent.LoadedProcedure.Tests[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawOne(IParamsProvider item, string testName)
|
||||
void DrawOne(IParamsProvider item, Test test)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
@@ -204,7 +204,7 @@ namespace TBF.UI.Procedures
|
||||
ListViewItem lvi;
|
||||
if (showTestsColumn)
|
||||
{
|
||||
lvi = new ListViewItem(testName);
|
||||
lvi = new ListViewItem(test.Name);
|
||||
lvi.SubItems.Add(item.ToString(0));
|
||||
}
|
||||
else
|
||||
@@ -213,7 +213,9 @@ namespace TBF.UI.Procedures
|
||||
}
|
||||
for (int i = 1; i < paramsCount; i++) lvi.SubItems.Add(item.ToString(i));
|
||||
|
||||
lvi.Tag = item;
|
||||
/// Setting Tag to 'null' in case of ErrorFlags.TestParams and protected tests prevents editing ListViewEx items
|
||||
lvi.Tag = (item is TBF.BenchControl.Various.ErrorFlags.TestParams && (test.Profile >= TestProfile.Protected)) ? null : item;
|
||||
|
||||
listViewEx.Items.Add(lvi);
|
||||
}
|
||||
|
||||
@@ -231,7 +233,7 @@ namespace TBF.UI.Procedures
|
||||
entity.SetParamsProvider(testParams);
|
||||
testParamsProviders.Add(testParams);
|
||||
}
|
||||
DrawOne(testParams, test.Name);
|
||||
DrawOne(testParams, test);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -0,0 +1,356 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.UI.Procedures.TestWizard
|
||||
{
|
||||
public partial class TestProfileSelection : Form
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(TestProfileSelection));
|
||||
|
||||
IList<Profile> profiles;
|
||||
|
||||
public Profile SelectedProfile;
|
||||
public double Qn;
|
||||
public string MetroClass;
|
||||
public double QpQiRatio;
|
||||
|
||||
public TestProfileSelection(IList<Profile> profiles)
|
||||
{
|
||||
this.profiles = profiles;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
listView.Columns.Add(Strings.Name, 70);
|
||||
listView.Columns.Add(Strings.Part, 40);
|
||||
listView.Columns.Add(string.Format("{0} [m3/h]", Strings.Q_tg), 80);
|
||||
listView.Columns.Add(string.Format("{0} [m3/h]", Strings.Q_from), 80);
|
||||
listView.Columns.Add(string.Format("{0} [m3/h]", Strings.Q_to), 70);
|
||||
listView.Columns.Add(Strings.Err_limit_neg_pct_chdr, 80);
|
||||
listView.Columns.Add(Strings.Err_limit_pos_pct_chdr, 80);
|
||||
|
||||
if (profiles != null)
|
||||
{
|
||||
foreach (var p in profiles) profileComboBox.Items.Add(p.Name);
|
||||
}
|
||||
|
||||
foreach (var s in new string[] { "10", "25", "50", "100", "250" }) qpQiRatioComboBox.Items.Add(s);
|
||||
|
||||
nextButton.Enabled = false;
|
||||
}
|
||||
|
||||
private void TestProfileSelection_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Test_profiles_selection;
|
||||
nextButton.Text = Strings.NextBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
void RedrawQn(Profile profile)
|
||||
{
|
||||
switch (profile.ProfileType)
|
||||
{
|
||||
case ProfileType.Q3R:
|
||||
qnLabel.Text = "Q3";
|
||||
break;
|
||||
case ProfileType.QpQi:
|
||||
qnLabel.Text = "qp";
|
||||
break;
|
||||
case ProfileType.QnClassColdWater:
|
||||
case ProfileType.QnClassHotWater:
|
||||
case ProfileType.Manual:
|
||||
default:
|
||||
qnLabel.Text = "Qn";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void RedrawMClassCombo(Profile profile)
|
||||
{
|
||||
string oriText = metroClassComboBox.Text;
|
||||
metroClassComboBox.Items.Clear();
|
||||
bool clearTextFlag = true;
|
||||
|
||||
if (profile != null)
|
||||
{
|
||||
string[] mClasses;
|
||||
switch (profile.ProfileType)
|
||||
{
|
||||
default:
|
||||
case ProfileType.Q3R:
|
||||
mClasses = new string[] { "R40", "R50", "R63", "R80", "R100", "R125", "R160", "R200", "R250", "R315",
|
||||
"R400", "R500", "R630", "R800", "R1000", "R1250", "R1600", "R2000", "R2500" };
|
||||
break;
|
||||
case ProfileType.QnClassColdWater:
|
||||
mClasses = new string[] { "A", "B", "C" };
|
||||
break;
|
||||
case ProfileType.QnClassHotWater:
|
||||
mClasses = new string[] { "A", "B", "C", "D" };
|
||||
break;
|
||||
case ProfileType.QpQi:
|
||||
mClasses = new string[] { "1", "2", "3" };
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var mc in mClasses)
|
||||
{
|
||||
metroClassComboBox.Items.Add(mc);
|
||||
if (oriText == mc) clearTextFlag = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (clearTextFlag) metroClassComboBox.Text = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
void RedrawPTests(Profile profile)
|
||||
{
|
||||
listView.Items.Clear();
|
||||
|
||||
if (profile == null) return;
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var ptest in profile.Tests)
|
||||
{
|
||||
Medium medium = (profile.ProfileType == ProfileType.QnClassHotWater) ? Medium.HotWater : Medium.ColdWater;
|
||||
|
||||
double Qtg;
|
||||
if (ptest.Name.Contains("Q4") || ptest.Name.Contains("Qmax"))
|
||||
{
|
||||
Qtg = Config.Utils.GetQ4Qmax(Qn, MetroClass, medium, ptest.CoefQto);
|
||||
}
|
||||
else if (ptest.Name.Contains("Q3") || ptest.Name.Contains("Qn") || ptest.Name.Equals("qp"))
|
||||
{
|
||||
Qtg = Qn;
|
||||
}
|
||||
else if (ptest.Name.Contains("Q2") || ptest.Name.Contains("Qt"))
|
||||
{
|
||||
Qtg = Config.Utils.GetQ2Qt(Qn, MetroClass, medium, ptest.CoefQto);
|
||||
}
|
||||
else if (ptest.Name.Contains("Q1") || ptest.Name.Contains("Qmin"))
|
||||
{
|
||||
Qtg = Config.Utils.GetQ1Qmin(Qn, MetroClass, medium, ptest.CoefQto);
|
||||
}
|
||||
else if (ptest.Name.Contains("0,1qp") || ptest.Name.Contains("0.1qp"))
|
||||
{
|
||||
Qtg = 0.1 * Qn;
|
||||
}
|
||||
else if (ptest.Name.Contains("qi"))
|
||||
{
|
||||
Qtg = Qn / QpQiRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
Qtg = Qn; /// Manual flow selection: CoefQfrom and CoefQto are used to calculate Qfrom and Qto from Qn
|
||||
}
|
||||
|
||||
double Qfrom = Qtg * ptest.CoefQfrom;
|
||||
double Qto = Qtg * ptest.CoefQto;
|
||||
|
||||
ListViewItem lvi;
|
||||
if (profile.ProfileType != ProfileType.QpQi)
|
||||
{
|
||||
lvi = new ListViewItem(new string[] { ptest.Name,
|
||||
(ptest.Part > 0) ? ptest.Part.ToString() : "-",
|
||||
Qtg.ToString(),
|
||||
Qfrom.ToString(),
|
||||
Qto.ToString(),
|
||||
ptest.ErrLimLo.ToString(),
|
||||
ptest.ErrLimHi.ToString() });
|
||||
}
|
||||
else
|
||||
{
|
||||
lvi = new ListViewItem(new string[] { ptest.Name,
|
||||
(ptest.Part > 0) ? ptest.Part.ToString() : "-",
|
||||
Qtg.ToString(),
|
||||
Qfrom.ToString(),
|
||||
Qto.ToString(),
|
||||
Strings.calculated,
|
||||
Strings.calculated });
|
||||
}
|
||||
|
||||
lvi.Tag = ptest;
|
||||
listView.Items.Add(lvi);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Something went wrong");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void profileComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Profile newProfile = null;
|
||||
foreach (var p in profiles)
|
||||
{
|
||||
if (profileComboBox.Text == p.Name)
|
||||
{
|
||||
newProfile = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (SelectedProfile != newProfile)
|
||||
{
|
||||
SelectedProfile = newProfile;
|
||||
|
||||
qpQiRatioGroupBox.Visible = (SelectedProfile.ProfileType == ProfileType.QpQi);
|
||||
metroClassGroupBox.Visible = (SelectedProfile.ProfileType != ProfileType.Manual);
|
||||
|
||||
profileTypeLabel.Text = (newProfile != null) ? newProfile.ProfileType.ToString() : string.Empty;
|
||||
profileDescriptionLabel.Text = (newProfile != null) ? newProfile.Description : string.Empty;
|
||||
RedrawQn(newProfile);
|
||||
RedrawMClassCombo(newProfile);
|
||||
|
||||
if (IsFormValid())
|
||||
{
|
||||
RedrawPTests(newProfile);
|
||||
nextButton.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RedrawPTests(null);
|
||||
nextButton.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void qnComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (IsFormValid())
|
||||
{
|
||||
RedrawPTests(SelectedProfile);
|
||||
nextButton.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RedrawPTests(null);
|
||||
nextButton.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void metroClassComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (IsFormValid())
|
||||
{
|
||||
RedrawPTests(SelectedProfile);
|
||||
nextButton.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RedrawPTests(null);
|
||||
nextButton.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void qpQiRatioComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (IsFormValid())
|
||||
{
|
||||
RedrawPTests(SelectedProfile);
|
||||
nextButton.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RedrawPTests(null);
|
||||
nextButton.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool IsProfileValid()
|
||||
{
|
||||
return profileComboBox.Items.Contains(profileComboBox.Text); /// CB text must be one of the items
|
||||
}
|
||||
|
||||
bool IsQnValid()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(qnTextBox.Text) && Utils.TryParseUDouble(qnTextBox.Text, out Qn) && (Qn > 0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Qn = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsMetroClassValid()
|
||||
{
|
||||
if (SelectedProfile.ProfileType == ProfileType.Manual)
|
||||
{
|
||||
MetroClass = string.Empty;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(metroClassComboBox.Text) &&
|
||||
(metroClassComboBox.Items.Count == 0 || metroClassComboBox.Items.Contains(metroClassComboBox.Text)))
|
||||
{
|
||||
MetroClass = metroClassComboBox.Text;
|
||||
return true;
|
||||
}
|
||||
|
||||
MetroClass = string.Empty;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsQpQiRatioValid()
|
||||
{
|
||||
if (SelectedProfile.ProfileType != ProfileType.QpQi)
|
||||
{
|
||||
QpQiRatio = 1.0;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(qpQiRatioComboBox.Text) && qpQiRatioComboBox.Items.Contains(qpQiRatioComboBox.Text))
|
||||
{
|
||||
QpQiRatio = double.Parse(qpQiRatioComboBox.Text);
|
||||
return true;
|
||||
}
|
||||
|
||||
QpQiRatio = 1.0;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsFormValid()
|
||||
{
|
||||
return IsProfileValid() && IsQnValid() && IsMetroClassValid() && IsQpQiRatioValid();
|
||||
}
|
||||
|
||||
private void nextButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (IsFormValid())
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Something's wrong");
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.UI.Procedures.TestWizard
|
||||
{
|
||||
partial class TestProfileSelection
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.horizSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.horizSplitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.qpQiRatioGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.qpQiRatioComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.profileGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.profileTypeLabel = new System.Windows.Forms.Label();
|
||||
this.profileDescriptionLabel = new System.Windows.Forms.Label();
|
||||
this.profileComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.qnGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.qnLabel = new System.Windows.Forms.Label();
|
||||
this.metroClassGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.metroClassComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.listView = new System.Windows.Forms.ListView();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.nextButton = new System.Windows.Forms.Button();
|
||||
this.qnTextBox = new System.Windows.Forms.TextBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).BeginInit();
|
||||
this.horizSplitContainer.Panel1.SuspendLayout();
|
||||
this.horizSplitContainer.Panel2.SuspendLayout();
|
||||
this.horizSplitContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer2)).BeginInit();
|
||||
this.horizSplitContainer2.Panel1.SuspendLayout();
|
||||
this.horizSplitContainer2.Panel2.SuspendLayout();
|
||||
this.horizSplitContainer2.SuspendLayout();
|
||||
this.qpQiRatioGroupBox.SuspendLayout();
|
||||
this.profileGroupBox.SuspendLayout();
|
||||
this.qnGroupBox.SuspendLayout();
|
||||
this.metroClassGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// horizSplitContainer
|
||||
//
|
||||
this.horizSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.horizSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.horizSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.horizSplitContainer.Name = "horizSplitContainer";
|
||||
this.horizSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// horizSplitContainer.Panel1
|
||||
//
|
||||
this.horizSplitContainer.Panel1.Controls.Add(this.horizSplitContainer2);
|
||||
//
|
||||
// horizSplitContainer.Panel2
|
||||
//
|
||||
this.horizSplitContainer.Panel2.Controls.Add(this.cancelButton);
|
||||
this.horizSplitContainer.Panel2.Controls.Add(this.nextButton);
|
||||
this.horizSplitContainer.Size = new System.Drawing.Size(850, 363);
|
||||
this.horizSplitContainer.SplitterDistance = 283;
|
||||
this.horizSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// horizSplitContainer2
|
||||
//
|
||||
this.horizSplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.horizSplitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.horizSplitContainer2.IsSplitterFixed = true;
|
||||
this.horizSplitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.horizSplitContainer2.Name = "horizSplitContainer2";
|
||||
this.horizSplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// horizSplitContainer2.Panel1
|
||||
//
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.qpQiRatioGroupBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.profileGroupBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.qnGroupBox);
|
||||
this.horizSplitContainer2.Panel1.Controls.Add(this.metroClassGroupBox);
|
||||
//
|
||||
// horizSplitContainer2.Panel2
|
||||
//
|
||||
this.horizSplitContainer2.Panel2.Controls.Add(this.listView);
|
||||
this.horizSplitContainer2.Size = new System.Drawing.Size(850, 283);
|
||||
this.horizSplitContainer2.SplitterDistance = 115;
|
||||
this.horizSplitContainer2.TabIndex = 0;
|
||||
//
|
||||
// qpQiRatioGroupBox
|
||||
//
|
||||
this.qpQiRatioGroupBox.Controls.Add(this.qpQiRatioComboBox);
|
||||
this.qpQiRatioGroupBox.Location = new System.Drawing.Point(724, 12);
|
||||
this.qpQiRatioGroupBox.Name = "qpQiRatioGroupBox";
|
||||
this.qpQiRatioGroupBox.Size = new System.Drawing.Size(103, 75);
|
||||
this.qpQiRatioGroupBox.TabIndex = 3;
|
||||
this.qpQiRatioGroupBox.TabStop = false;
|
||||
this.qpQiRatioGroupBox.Text = "4. Qp / Qi";
|
||||
this.qpQiRatioGroupBox.Visible = false;
|
||||
//
|
||||
// qpQiRatioComboBox
|
||||
//
|
||||
this.qpQiRatioComboBox.FormattingEnabled = true;
|
||||
this.qpQiRatioComboBox.Location = new System.Drawing.Point(23, 22);
|
||||
this.qpQiRatioComboBox.Name = "qpQiRatioComboBox";
|
||||
this.qpQiRatioComboBox.Size = new System.Drawing.Size(55, 21);
|
||||
this.qpQiRatioComboBox.TabIndex = 0;
|
||||
this.qpQiRatioComboBox.SelectedIndexChanged += new System.EventHandler(this.qpQiRatioComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// profileGroupBox
|
||||
//
|
||||
this.profileGroupBox.Controls.Add(this.profileTypeLabel);
|
||||
this.profileGroupBox.Controls.Add(this.profileDescriptionLabel);
|
||||
this.profileGroupBox.Controls.Add(this.profileComboBox);
|
||||
this.profileGroupBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.profileGroupBox.Name = "profileGroupBox";
|
||||
this.profileGroupBox.Size = new System.Drawing.Size(386, 75);
|
||||
this.profileGroupBox.TabIndex = 0;
|
||||
this.profileGroupBox.TabStop = false;
|
||||
this.profileGroupBox.Text = "1. Test profile";
|
||||
//
|
||||
// profileTypeLabel
|
||||
//
|
||||
this.profileTypeLabel.AutoSize = true;
|
||||
this.profileTypeLabel.Location = new System.Drawing.Point(31, 51);
|
||||
this.profileTypeLabel.Name = "profileTypeLabel";
|
||||
this.profileTypeLabel.Size = new System.Drawing.Size(85, 13);
|
||||
this.profileTypeLabel.TabIndex = 25;
|
||||
this.profileTypeLabel.Text = "profileTypeLabel";
|
||||
//
|
||||
// profileDescriptionLabel
|
||||
//
|
||||
this.profileDescriptionLabel.AutoSize = true;
|
||||
this.profileDescriptionLabel.Location = new System.Drawing.Point(132, 51);
|
||||
this.profileDescriptionLabel.Name = "profileDescriptionLabel";
|
||||
this.profileDescriptionLabel.Size = new System.Drawing.Size(114, 13);
|
||||
this.profileDescriptionLabel.TabIndex = 24;
|
||||
this.profileDescriptionLabel.Text = "profileDescriptionLabel";
|
||||
//
|
||||
// profileComboBox
|
||||
//
|
||||
this.profileComboBox.FormattingEnabled = true;
|
||||
this.profileComboBox.Location = new System.Drawing.Point(32, 22);
|
||||
this.profileComboBox.Name = "profileComboBox";
|
||||
this.profileComboBox.Size = new System.Drawing.Size(318, 21);
|
||||
this.profileComboBox.TabIndex = 0;
|
||||
this.profileComboBox.SelectedIndexChanged += new System.EventHandler(this.profileComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// qnGroupBox
|
||||
//
|
||||
this.qnGroupBox.Controls.Add(this.qnTextBox);
|
||||
this.qnGroupBox.Controls.Add(this.qnLabel);
|
||||
this.qnGroupBox.Location = new System.Drawing.Point(406, 12);
|
||||
this.qnGroupBox.Name = "qnGroupBox";
|
||||
this.qnGroupBox.Size = new System.Drawing.Size(156, 75);
|
||||
this.qnGroupBox.TabIndex = 1;
|
||||
this.qnGroupBox.TabStop = false;
|
||||
this.qnGroupBox.Text = "2. Nominal flow";
|
||||
//
|
||||
// qnLabel
|
||||
//
|
||||
this.qnLabel.AutoSize = true;
|
||||
this.qnLabel.Location = new System.Drawing.Point(17, 26);
|
||||
this.qnLabel.Name = "qnLabel";
|
||||
this.qnLabel.Size = new System.Drawing.Size(21, 13);
|
||||
this.qnLabel.TabIndex = 10;
|
||||
this.qnLabel.Text = "Q3";
|
||||
//
|
||||
// metroClassGroupBox
|
||||
//
|
||||
this.metroClassGroupBox.Controls.Add(this.metroClassComboBox);
|
||||
this.metroClassGroupBox.Location = new System.Drawing.Point(571, 12);
|
||||
this.metroClassGroupBox.Name = "metroClassGroupBox";
|
||||
this.metroClassGroupBox.Size = new System.Drawing.Size(144, 75);
|
||||
this.metroClassGroupBox.TabIndex = 2;
|
||||
this.metroClassGroupBox.TabStop = false;
|
||||
this.metroClassGroupBox.Text = "3. Metrological class";
|
||||
//
|
||||
// metroClassComboBox
|
||||
//
|
||||
this.metroClassComboBox.FormattingEnabled = true;
|
||||
this.metroClassComboBox.Location = new System.Drawing.Point(23, 22);
|
||||
this.metroClassComboBox.Name = "metroClassComboBox";
|
||||
this.metroClassComboBox.Size = new System.Drawing.Size(100, 21);
|
||||
this.metroClassComboBox.TabIndex = 0;
|
||||
this.metroClassComboBox.SelectedIndexChanged += new System.EventHandler(this.metroClassComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// listView
|
||||
//
|
||||
this.listView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listView.GridLines = true;
|
||||
this.listView.Location = new System.Drawing.Point(0, 0);
|
||||
this.listView.Name = "listView";
|
||||
this.listView.Size = new System.Drawing.Size(850, 164);
|
||||
this.listView.TabIndex = 0;
|
||||
this.listView.UseCompatibleStateImageBehavior = false;
|
||||
this.listView.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(752, 17);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.cancelButton.TabIndex = 1;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// nextButton
|
||||
//
|
||||
this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.nextButton.Location = new System.Drawing.Point(671, 17);
|
||||
this.nextButton.Name = "nextButton";
|
||||
this.nextButton.Size = new System.Drawing.Size(75, 42);
|
||||
this.nextButton.TabIndex = 0;
|
||||
this.nextButton.Text = "&Next >";
|
||||
this.nextButton.UseVisualStyleBackColor = true;
|
||||
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
|
||||
//
|
||||
// qnTextBox
|
||||
//
|
||||
this.qnTextBox.Location = new System.Drawing.Point(50, 22);
|
||||
this.qnTextBox.Name = "qnTextBox";
|
||||
this.qnTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.qnTextBox.TabIndex = 11;
|
||||
//
|
||||
// TestProfileSelection
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(850, 363);
|
||||
this.Controls.Add(this.horizSplitContainer);
|
||||
this.Name = "TestProfileSelection";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Test profile selection";
|
||||
this.Load += new System.EventHandler(this.TestProfileSelection_Load);
|
||||
this.horizSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.horizSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).EndInit();
|
||||
this.horizSplitContainer.ResumeLayout(false);
|
||||
this.horizSplitContainer2.Panel1.ResumeLayout(false);
|
||||
this.horizSplitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer2)).EndInit();
|
||||
this.horizSplitContainer2.ResumeLayout(false);
|
||||
this.qpQiRatioGroupBox.ResumeLayout(false);
|
||||
this.profileGroupBox.ResumeLayout(false);
|
||||
this.profileGroupBox.PerformLayout();
|
||||
this.qnGroupBox.ResumeLayout(false);
|
||||
this.qnGroupBox.PerformLayout();
|
||||
this.metroClassGroupBox.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer horizSplitContainer;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button nextButton;
|
||||
private System.Windows.Forms.SplitContainer horizSplitContainer2;
|
||||
private System.Windows.Forms.Label qnLabel;
|
||||
private System.Windows.Forms.ComboBox profileComboBox;
|
||||
private System.Windows.Forms.GroupBox qnGroupBox;
|
||||
private System.Windows.Forms.GroupBox metroClassGroupBox;
|
||||
private System.Windows.Forms.GroupBox profileGroupBox;
|
||||
private System.Windows.Forms.ComboBox metroClassComboBox;
|
||||
private System.Windows.Forms.ListView listView;
|
||||
private System.Windows.Forms.Label profileDescriptionLabel;
|
||||
private System.Windows.Forms.Label profileTypeLabel;
|
||||
private System.Windows.Forms.GroupBox qpQiRatioGroupBox;
|
||||
private System.Windows.Forms.ComboBox qpQiRatioComboBox;
|
||||
private System.Windows.Forms.TextBox qnTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -106,7 +106,7 @@ namespace TBF.UI.ResultsMI
|
||||
else if (mode == PreviousResultsMode.Fix)
|
||||
{
|
||||
/// Access only to thise who manage production tracing
|
||||
Users.Grp.GID[] rqrdGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TraceabilityManagement };
|
||||
Users.Entities.GID[] rqrdGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.TraceabilityManagement };
|
||||
|
||||
if ((new Users.Forms.LoginDlg(Users.GlobalData.CurrentUser.UserName, rqrdGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace TBF.UI.ResultsMI
|
||||
/// <summary>
|
||||
/// Required access rights to make changes with this form
|
||||
/// </summary>
|
||||
static readonly Users.Grp.GID[] RequiredGroupMembership = new Users.Grp.GID[] { Users.Grp.GID.TestingSpecialists, Users.Grp.GID.Metrologists };
|
||||
static readonly Users.Entities.GID[] RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists, Users.Entities.GID.Metrologists };
|
||||
|
||||
public bool Unlocked; /// true = changes enabled
|
||||
|
||||
|
||||
@@ -609,6 +609,7 @@ namespace TBF.UI.Settings
|
||||
" PRIMARY KEY (`Id`)," +
|
||||
" KEY `Component_id` (`Component_id`)" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;",
|
||||
"UPDATE `test` SET `RelTransAfter`='UserDefined';",
|
||||
};
|
||||
|
||||
string[] resultsDbCommands = new string[]
|
||||
|
||||
@@ -202,13 +202,26 @@ namespace TBF.UI.Shared
|
||||
}
|
||||
|
||||
|
||||
public IList<string> GetUsedNames()
|
||||
public IList<string> GetUsedNames(bool caseSensitive = true)
|
||||
{
|
||||
IList<string> usedNames = new List<string>();
|
||||
|
||||
if (MyItems != null)
|
||||
{
|
||||
foreach (var item in MyItems) if (item is IHasName) usedNames.Add((item as IHasName).Name);
|
||||
if (caseSensitive)
|
||||
{
|
||||
foreach (var item in MyItems)
|
||||
{
|
||||
if (item is IHasName) usedNames.Add((item as IHasName).Name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in MyItems)
|
||||
{
|
||||
if (item is IHasName) usedNames.Add((item as IHasName).Name.ToLower());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return usedNames;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user