Compare commits

..
Author SHA1 Message Date
marekf 550459285b Test commit 2026-03-09 10:48:23 +01:00
82 changed files with 6224 additions and 6924 deletions
+2 -2
View File
@@ -17,7 +17,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
@@ -25,7 +25,7 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE;LANG_PL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
-2
View File
@@ -68,7 +68,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CalendarEvent\ICalendarEvent.cs" /> <Compile Include="CalendarEvent\ICalendarEvent.cs" />
<Compile Include="Data.cs" />
<Compile Include="Entities\BenchPath.cs" /> <Compile Include="Entities\BenchPath.cs" />
<Compile Include="Entities\CustomEvent.cs" /> <Compile Include="Entities\CustomEvent.cs" />
<Compile Include="Entities\Component.cs" /> <Compile Include="Entities\Component.cs" />
@@ -96,7 +95,6 @@
<Compile Include="Entities\VirtualBenchStep.cs" /> <Compile Include="Entities\VirtualBenchStep.cs" />
<Compile Include="CalendarEvent\Utils.cs" /> <Compile Include="CalendarEvent\Utils.cs" />
<Compile Include="FluentCommon.cs" /> <Compile Include="FluentCommon.cs" />
<Compile Include="Formulas.cs" />
<Compile Include="Mappings\BenchPathMap.cs" /> <Compile Include="Mappings\BenchPathMap.cs" />
<Compile Include="Mappings\ComponentMap.cs" /> <Compile Include="Mappings\ComponentMap.cs" />
<Compile Include="Mappings\ComponentProcedureMap.cs" /> <Compile Include="Mappings\ComponentProcedureMap.cs" />
+4 -9
View File
@@ -18,9 +18,8 @@ namespace Config.Entities
public virtual Unit FlowUnit { get; set; } /// Not mapped to database, used in UI public virtual Unit FlowUnit { get; set; } /// Not mapped to database, used in UI
public virtual string Selector { get; set; } public virtual string Selector { get; set; }
public virtual string RegValve { get; set; } public virtual string RegValve { get; set; }
public virtual int RegulMinStep { get; set; } public virtual string FlowMeter { get; set; }
public virtual string FlowMeter { get; set; } public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
public virtual string StartValve { get; set; } public virtual string StartValve { get; set; }
public virtual string Diverter { get; set; } public virtual string Diverter { get; set; }
public virtual string TempMtrDiv { get; set; } public virtual string TempMtrDiv { get; set; }
@@ -40,7 +39,6 @@ namespace Config.Entities
{ {
ValvesOpen = string.Empty; ValvesOpen = string.Empty;
ValvesClose = string.Empty; ValvesClose = string.Empty;
RegulMinStep = 0;
} }
public OutputPath(string name, int itemNr) public OutputPath(string name, int itemNr)
@@ -48,9 +46,7 @@ namespace Config.Entities
{ {
Name = name; Name = name;
ItemNr = itemNr; ItemNr = itemNr;
RegulMinStep = 0; }
}
public virtual OutputPath Clone(string name, int itemNr) public virtual OutputPath Clone(string name, int itemNr)
{ {
@@ -62,8 +58,7 @@ namespace Config.Entities
result.FlowUnit = FlowUnit; result.FlowUnit = FlowUnit;
result.Selector = Selector; result.Selector = Selector;
result.RegValve = RegValve; result.RegValve = RegValve;
result.RegulMinStep = RegulMinStep; result.FlowMeter = FlowMeter;
result.FlowMeter = FlowMeter;
result.PidCoef = PidCoef; result.PidCoef = PidCoef;
result.StartValve = StartValve; result.StartValve = StartValve;
result.Diverter = Diverter; result.Diverter = Diverter;
+2 -3
View File
@@ -128,11 +128,10 @@ namespace Config
case GID.Administrators: case GID.Administrators:
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL #if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
case GID.TraceabilityManagement: case GID.TraceabilityManagement:
//#elif LANG_PL #elif LANG_PL
#endif
case GID.MetrologicalAuthority: case GID.MetrologicalAuthority:
case GID.WaterMeterAuthority: case GID.WaterMeterAuthority:
#endif
admin.AddGroup(group); admin.AddGroup(group);
session.SaveOrUpdate(group); /// Save this group session.SaveOrUpdate(group); /// Save this group
break; break;
+1 -2
View File
@@ -17,8 +17,7 @@ namespace Config.Mappings
Map(x => x.Qto); Map(x => x.Qto);
Map(x => x.Selector); Map(x => x.Selector);
Map(x => x.RegValve); Map(x => x.RegValve);
Map(x => x.RegulMinStep); Map(x => x.FlowMeter);
Map(x => x.FlowMeter);
Map(x => x.PidCoef); Map(x => x.PidCoef);
Map(x => x.StartValve); Map(x => x.StartValve);
Map(x => x.Diverter); Map(x => x.Diverter);
+1 -17
View File
@@ -29,12 +29,8 @@ namespace Results.Entities
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags) 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 long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
public virtual bool TestDone { get; set; } /// true = test was completed public virtual bool TestDone { get; set; } /// true = test was completed
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
#if IPERL #if IPERL
public virtual int CalibFactor { get; set; }
public virtual int CalibFactorLNA { get; set; }
public virtual int Q2CorrRL { get; set; }
public virtual int Q2CorrLR { get; set; }
public virtual string ExtraDataPath { get; set; } /// Relative path to a file with opto-data/raw-data public virtual string ExtraDataPath { get; set; } /// Relative path to a file with opto-data/raw-data
public virtual float X1 { get; set; } public virtual float X1 { get; set; }
public virtual float X2 { get; set; } public virtual float X2 { get; set; }
@@ -170,10 +166,6 @@ namespace Results.Entities
TestDone = src.TestDone; TestDone = src.TestDone;
Passed = src.Passed; Passed = src.Passed;
#if IPERL #if IPERL
CalibFactor = src.CalibFactor;
CalibFactorLNA = src.CalibFactorLNA;
Q2CorrRL = src.Q2CorrRL;
Q2CorrLR = src.Q2CorrLR;
ExtraDataPath = src.ExtraDataPath; ExtraDataPath = src.ExtraDataPath;
X1 = src.X1; X1 = src.X1;
X2 = src.X2; X2 = src.X2;
@@ -217,10 +209,6 @@ namespace Results.Entities
writer.Write(TestDone); writer.Write(TestDone);
writer.Write(Passed); writer.Write(Passed);
#if IPERL #if IPERL
writer.Write(CalibFactor);
writer.Write(CalibFactorLNA);
writer.Write(Q2CorrRL);
writer.Write(Q2CorrLR);
writer.Write((ExtraDataPath != null) ? ExtraDataPath : string.Empty); writer.Write((ExtraDataPath != null) ? ExtraDataPath : string.Empty);
writer.Write(X1); writer.Write(X1);
writer.Write(X2); writer.Write(X2);
@@ -261,10 +249,6 @@ namespace Results.Entities
TestDone = reader.ReadBoolean(); TestDone = reader.ReadBoolean();
Passed = reader.ReadBoolean(); Passed = reader.ReadBoolean();
#if IPERL #if IPERL
CalibFactor = reader.ReadInt32();
CalibFactorLNA = reader.ReadInt32();
Q2CorrRL = reader.ReadInt32();
Q2CorrLR = reader.ReadInt32();
ExtraDataPath = reader.ReadString(); ExtraDataPath = reader.ReadString();
X1 = reader.ReadSingle(); X1 = reader.ReadSingle();
X2 = reader.ReadSingle(); X2 = reader.ReadSingle();
+3 -5
View File
@@ -19,7 +19,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@@ -29,7 +29,7 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;IPERL</DefineConstants> <DefineConstants>TRACE;LANG_PL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
@@ -241,9 +241,7 @@
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.fr.resx" /> <EmbeddedResource Include="Resources\Strings.fr.resx" />
<EmbeddedResource Include="Resources\Strings.it.resx" /> <EmbeddedResource Include="Resources\Strings.it.resx" />
<EmbeddedResource Include="Resources\Strings.pl.resx"> <EmbeddedResource Include="Resources\Strings.pl.resx" />
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.resx"> <EmbeddedResource Include="Resources\Strings.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput> <LastGenOutput>Strings.Designer.cs</LastGenOutput>
+1 -41
View File
@@ -378,40 +378,6 @@ namespace SchematicDrawing
Properties.Resources.Valve_XL_closed, Properties.Resources.Valve_XL_closed,
Properties.Resources.Valve_XL_vacuum, Properties.Resources.Valve_XL_vacuum,
Properties.Resources.Valve_XL_open_dry); Properties.Resources.Valve_XL_open_dry);
/// ValveSw
Shapes[DrShIx(Shape.ValveSw, Sz.S)] = new DrawingShape(Shape.ValveSw, Sz.S, 2, 2,
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1), new Edge(1, 0, 20, RouteCouple.OpenWhen1) },
0, 0, 20, 20,
Properties.Resources.ValveSw_S_open,
Properties.Resources.ValveSw_S_closed,
Properties.Resources.ValveSw_S_vacuum,
Properties.Resources.ValveSw_S_open_dry);
Shapes[DrShIx(Shape.ValveSw, Sz.M)] = new DrawingShape(Shape.ValveSw, Sz.M, 3, 4,
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1), new Edge(1, 0, 30, RouteCouple.OpenWhen1) },
0, 5, 30, 30,
Properties.Resources.ValveSw_M_open,
Properties.Resources.ValveSw_M_closed,
Properties.Resources.ValveSw_M_vacuum,
Properties.Resources.ValveSw_M_open_dry);
Shapes[DrShIx(Shape.ValveSw, Sz.L)] = new DrawingShape(Shape.ValveSw, Sz.L, 4, 4,
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1), new Edge(1, 0, 40, RouteCouple.OpenWhen1) },
0, 0, 40, 40,
Properties.Resources.ValveSw_L_open,
Properties.Resources.ValveSw_L_closed,
Properties.Resources.ValveSw_L_vacuum,
Properties.Resources.ValveSw_L_open_dry);
Shapes[DrShIx(Shape.ValveSw, Sz.XL)] = new DrawingShape(Shape.ValveSw, Sz.XL, 5, 6,
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1), new Edge(1, 0, 50, RouteCouple.OpenWhen1) },
0, 5, 50, 50,
Properties.Resources.ValveSw_XL_open,
Properties.Resources.ValveSw_XL_closed,
Properties.Resources.ValveSw_XL_vacuum,
Properties.Resources.ValveSw_XL_open_dry);
/// Diverter /// Diverter
Shapes[DrShIx(Shape.Div, Sz.S)] = new DrawingShape(Shape.Div, Sz.S, 2, 2, Shapes[DrShIx(Shape.Div, Sz.S)] = new DrawingShape(Shape.Div, Sz.S, 2, 2,
new Node[] { new Node(2, 0, Orient.Up), new Node(1, 2, Orient.Dn), new Node(3, 2, Orient.Dn) }, new Node[] { new Node(2, 0, Orient.Up), new Node(1, 2, Orient.Dn), new Node(3, 2, Orient.Dn) },
@@ -557,18 +523,12 @@ namespace SchematicDrawing
Shapes[DrShIx(Shape.Scale, Sz.L)] = new DrawingShape(Shape.Scale, Sz.L, 12, 11, new Node[] { new Node(6, 11, Orient.Dn) }, null, 0, 0, 120, 110, Properties.Resources.Scale_L); Shapes[DrShIx(Shape.Scale, Sz.L)] = new DrawingShape(Shape.Scale, Sz.L, 12, 11, new Node[] { new Node(6, 11, Orient.Dn) }, null, 0, 0, 120, 110, Properties.Resources.Scale_L);
Shapes[DrShIx(Shape.Scale, Sz.XL)] = new DrawingShape(Shape.Scale, Sz.XL, 16, 13, new Node[] { new Node(8, 13, Orient.Dn) }, null, 0, 0, 160, 130, Properties.Resources.Scale_XL); Shapes[DrShIx(Shape.Scale, Sz.XL)] = new DrawingShape(Shape.Scale, Sz.XL, 16, 13, new Node[] { new Node(8, 13, Orient.Dn) }, null, 0, 0, 160, 130, Properties.Resources.Scale_XL);
/// Tank uni /// Tank
Shapes[DrShIx(Shape.Tank, Sz.S)] = new DrawingShape(Shape.Tank, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S); Shapes[DrShIx(Shape.Tank, Sz.S)] = new DrawingShape(Shape.Tank, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S);
Shapes[DrShIx(Shape.Tank, Sz.M)] = new DrawingShape(Shape.Tank, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M); Shapes[DrShIx(Shape.Tank, Sz.M)] = new DrawingShape(Shape.Tank, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M);
Shapes[DrShIx(Shape.Tank, Sz.L)] = new DrawingShape(Shape.Tank, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L); Shapes[DrShIx(Shape.Tank, Sz.L)] = new DrawingShape(Shape.Tank, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L);
Shapes[DrShIx(Shape.Tank, Sz.XL)] = new DrawingShape(Shape.Tank, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL); Shapes[DrShIx(Shape.Tank, Sz.XL)] = new DrawingShape(Shape.Tank, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL);
/// Tank hot
Shapes[DrShIx(Shape.TankHot, Sz.S)] = new DrawingShape(Shape.TankHot, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S_hot);
Shapes[DrShIx(Shape.TankHot, Sz.M)] = new DrawingShape(Shape.TankHot, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M_hot);
Shapes[DrShIx(Shape.TankHot, Sz.L)] = new DrawingShape(Shape.TankHot, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L_hot);
Shapes[DrShIx(Shape.TankHot, Sz.XL)] = new DrawingShape(Shape.TankHot, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL_hot);
/// Junction /// Junction
Shapes[DrShIx(Shape.Junction, Sz.None)] = new DrawingShape(Shape.Junction, Sz.None, 0, 0, new Node[] { new Node(0, 0, Orient.R) }); Shapes[DrShIx(Shape.Junction, Sz.None)] = new DrawingShape(Shape.Junction, Sz.None, 0, 0, new Node[] { new Node(0, 0, Orient.R) });
Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2, Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2,
-2
View File
@@ -45,13 +45,11 @@ namespace SchematicDrawing
Scale, Scale,
Sink, Sink,
Tank, Tank,
TankHot,
Tee, Tee,
TempM, TempM,
UniCB, UniCB,
Vacuum, Vacuum,
Valve, Valve,
ValveSw,
WaterM, WaterM,
ElectricM, ElectricM,
+1 -201
View File
@@ -19,7 +19,7 @@ namespace SchematicDrawing.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
@@ -730,16 +730,6 @@ namespace SchematicDrawing.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Tank_L_hot {
get {
object obj = ResourceManager.GetObject("Tank_L_hot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@@ -750,16 +740,6 @@ namespace SchematicDrawing.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Tank_M_hot {
get {
object obj = ResourceManager.GetObject("Tank_M_hot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@@ -770,16 +750,6 @@ namespace SchematicDrawing.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Tank_S_hot {
get {
object obj = ResourceManager.GetObject("Tank_S_hot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@@ -790,16 +760,6 @@ namespace SchematicDrawing.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Tank_XL_hot {
get {
object obj = ResourceManager.GetObject("Tank_XL_hot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@@ -1010,166 +970,6 @@ namespace SchematicDrawing.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_L_closed {
get {
object obj = ResourceManager.GetObject("ValveSw_L_closed", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_L_open {
get {
object obj = ResourceManager.GetObject("ValveSw_L_open", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_L_open_dry {
get {
object obj = ResourceManager.GetObject("ValveSw_L_open_dry", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_L_vacuum {
get {
object obj = ResourceManager.GetObject("ValveSw_L_vacuum", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_M_closed {
get {
object obj = ResourceManager.GetObject("ValveSw_M_closed", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_M_open {
get {
object obj = ResourceManager.GetObject("ValveSw_M_open", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_M_open_dry {
get {
object obj = ResourceManager.GetObject("ValveSw_M_open_dry", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_M_vacuum {
get {
object obj = ResourceManager.GetObject("ValveSw_M_vacuum", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_S_closed {
get {
object obj = ResourceManager.GetObject("ValveSw_S_closed", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_S_open {
get {
object obj = ResourceManager.GetObject("ValveSw_S_open", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_S_open_dry {
get {
object obj = ResourceManager.GetObject("ValveSw_S_open_dry", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_S_vacuum {
get {
object obj = ResourceManager.GetObject("ValveSw_S_vacuum", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_XL_closed {
get {
object obj = ResourceManager.GetObject("ValveSw_XL_closed", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_XL_open {
get {
object obj = ResourceManager.GetObject("ValveSw_XL_open", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_XL_open_dry {
get {
object obj = ResourceManager.GetObject("ValveSw_XL_open_dry", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ValveSw_XL_vacuum {
get {
object obj = ResourceManager.GetObject("ValveSw_XL_vacuum", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
+1 -72
View File
@@ -319,18 +319,6 @@
<data name="Tank_XL" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Tank_XL" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\Tank-XL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Pictures\Tank-XL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="Tank_L_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\Tank-L-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Tank_M_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\Tank-M-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Tank_S_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\Tank-S-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Tank_XL_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\Tank-XL-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Vacuum_L_dry" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Vacuum_L_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\Vacuum-L-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Pictures\Vacuum-L-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@@ -385,66 +373,7 @@
<data name="Valve_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Valve_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\Valve-XL-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Pictures\Valve-XL-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="WaterM_L" type="System.Resources.ResXFileRef, System.Windows.Forms">
<data name="ValveSw_L_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-L-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_L_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-L-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_L_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-L-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_L_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-L-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_M_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-M-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_M_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-M-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_M_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-M-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_M_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-M-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_S_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-S-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_S_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-S-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_S_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-S-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_S_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-S-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_XL_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-XL-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_XL_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-XL-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_XL_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-XL-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ValveSw_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\ValveSw-XL-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WaterM_L" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\WaterM-L.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Pictures\WaterM-L.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="EmergencyStop_XL_off" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="EmergencyStop_XL_off" type="System.Resources.ResXFileRef, System.Windows.Forms">
-4
View File
@@ -118,10 +118,6 @@
<Content Include="Pictures\Div-XL-tank-wet.png" /> <Content Include="Pictures\Div-XL-tank-wet.png" />
<Content Include="Pictures\EmergencyStop-XL-off.png" /> <Content Include="Pictures\EmergencyStop-XL-off.png" />
<Content Include="Pictures\EmergencyStop-XL-on.png" /> <Content Include="Pictures\EmergencyStop-XL-on.png" />
<Content Include="Pictures\Tank-L-hot.png" />
<Content Include="Pictures\Tank-M-hot.png" />
<Content Include="Pictures\Tank-S-hot.png" />
<Content Include="Pictures\Tank-XL-hot.png" />
<Content Include="Pictures\UniCB-M-error.png" /> <Content Include="Pictures\UniCB-M-error.png" />
<Content Include="Pictures\UniCB-M-off.png" /> <Content Include="Pictures\UniCB-M-off.png" />
<Content Include="Pictures\UniCB-M-on.png" /> <Content Include="Pictures\UniCB-M-on.png" />
+2 -2
View File
@@ -365,7 +365,7 @@ namespace SchematicDrawing
{ {
GNode gnode = new GNode(item, nid); GNode gnode = new GNode(item, nid);
item.GNodes.Add(gnode); item.GNodes.Add(gnode);
graph.AddNode(gnode, dshape.Shape == Shape.Tank || dshape.Shape == Shape.TankHot, dshape.Shape == Shape.Scale); graph.AddNode(gnode, dshape.Shape == Shape.Tank, dshape.Shape == Shape.Scale);
} }
foreach (var edge in dshape.Edges) foreach (var edge in dshape.Edges)
@@ -864,7 +864,7 @@ namespace SchematicDrawing
/// Draw the component image /// Draw the component image
Rectangle rect = dsh.GetRotatedFlippedImageRectangle(item); Rectangle rect = dsh.GetRotatedFlippedImageRectangle(item);
if (item is IRouteBasedDrawingItem && routeBit == false /// closed if (item is IRouteBasedDrawingItem && routeBit == false /// closed
&& item.GNodes.Count > 0 && item.GNodes[0].Dist < Const.Vacuum /// wet && item.GNodes.Count > 0 && item.GNodes[0].Dist < Const.Vacuum /// wet
&& dsh.HasClosedWet) /// has appropriate image && dsh.HasClosedWet) /// has appropriate image
{ {
+1 -1
View File
@@ -25,7 +25,7 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE;LANG_PL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
+9 -84
View File
@@ -5,18 +5,16 @@ VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBF", "TBF\TBF.csproj", "{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBF", "TBF\TBF.csproj", "{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28} = {7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}
{C8939821-BA5C-4988-A3D0-BF53B74865C7} = {C8939821-BA5C-4988-A3D0-BF53B74865C7}
{211B5E3F-9996-48A7-ABDE-C878DD2D71C2} = {211B5E3F-9996-48A7-ABDE-C878DD2D71C2}
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA} = {0C0A1F4D-1363-4544-A7C5-196C76D26CCA} {0C0A1F4D-1363-4544-A7C5-196C76D26CCA} = {0C0A1F4D-1363-4544-A7C5-196C76D26CCA}
{0F79CA69-9DBC-41F3-A6FC-5A2937365343} = {0F79CA69-9DBC-41F3-A6FC-5A2937365343} {0F79CA69-9DBC-41F3-A6FC-5A2937365343} = {0F79CA69-9DBC-41F3-A6FC-5A2937365343}
{211B5E3F-9996-48A7-ABDE-C878DD2D71C2} = {211B5E3F-9996-48A7-ABDE-C878DD2D71C2}
{32817BF9-E380-4467-9C7F-936F4B122BC7} = {32817BF9-E380-4467-9C7F-936F4B122BC7}
{439D0878-C76E-452B-B17D-209A89E91D36} = {439D0878-C76E-452B-B17D-209A89E91D36} {439D0878-C76E-452B-B17D-209A89E91D36} = {439D0878-C76E-452B-B17D-209A89E91D36}
{46E3B0E1-209F-4550-B0DD-D7E2C039B3CE} = {46E3B0E1-209F-4550-B0DD-D7E2C039B3CE}
{743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28} = {7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}
{8F942729-F454-4C99-BA6C-746962065AE3} = {8F942729-F454-4C99-BA6C-746962065AE3}
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
{C8939821-BA5C-4988-A3D0-BF53B74865C7} = {C8939821-BA5C-4988-A3D0-BF53B74865C7} {743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2} = {FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2} {46E3B0E1-209F-4550-B0DD-D7E2C039B3CE} = {46E3B0E1-209F-4550-B0DD-D7E2C039B3CE}
{32817BF9-E380-4467-9C7F-936F4B122BC7} = {32817BF9-E380-4467-9C7F-936F4B122BC7}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Results", "Results\Results.csproj", "{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Results", "Results\Results.csproj", "{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}"
@@ -28,8 +26,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Config", "Config\Config.csp
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultsBrowser", "ResultsBrowser\ResultsBrowser.csproj", "{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultsBrowser", "ResultsBrowser\ResultsBrowser.csproj", "{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48} = {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48} = {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceTest", "DeviceTest\DeviceTest.csproj", "{6D3384DC-4638-4A92-91A8-F39D900377C6}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceTest", "DeviceTest\DeviceTest.csproj", "{6D3384DC-4638-4A92-91A8-F39D900377C6}"
@@ -106,19 +104,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabelPrinting", "LabelPrint
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBFTests", "TBFTests\TBFTests.csproj", "{77EB589F-C670-4489-AAD6-2A3C02061FD1}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBFTests", "TBFTests\TBFTests.csproj", "{77EB589F-C670-4489-AAD6-2A3C02061FD1}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppDiagnostic", "AppDiagnostic\AppDiagnostic.csproj", "{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}"
ProjectSection(ProjectDependencies) = postProject
{8F942729-F454-4C99-BA6C-746962065AE3} = {8F942729-F454-4C99-BA6C-746962065AE3}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedComponents", "SharedComponents\SharedComponents.csproj", "{8F942729-F454-4C99-BA6C-746962065AE3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.RfidCom", "..\iPerlHead\Sensus.iPerl.RfidCom\Sensus.iPerl.RfidCom.csproj", "{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.TestConsole", "..\iPerlHead\Sensus.iPerl.TestConsole\Sensus.iPerl.TestConsole.csproj", "{5025ED8B-A94F-4E58-8BE0-68481B061609}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcS5_DLL", "..\NfcS5_DLL\NfcS5_DLL.csproj", "{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -142,15 +127,15 @@ Global
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.ActiveCfg = Release|x86 {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.ActiveCfg = Release|x86
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.Build.0 = Release|x86 {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.Build.0 = Release|x86
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|x86.ActiveCfg = Debug|Any CPU {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|x86.ActiveCfg = Debug|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.ActiveCfg = Release|Any CPU {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.Build.0 = Release|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.Build.0 = Release|Any CPU {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|x86.ActiveCfg = Release|Any CPU {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|x86.ActiveCfg = Release|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.Build.0 = Release|Any CPU
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.Build.0 = Debug|Any CPU {743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -479,66 +464,6 @@ Global
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|Mixed Platforms.Build.0 = Release|Any CPU {77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|x86.ActiveCfg = Release|Any CPU {77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|x86.ActiveCfg = Release|Any CPU
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|x86.Build.0 = Release|Any CPU {77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|x86.Build.0 = Release|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|x86.ActiveCfg = Debug|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|x86.Build.0 = Debug|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Any CPU.Build.0 = Release|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|x86.ActiveCfg = Release|Any CPU
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|x86.Build.0 = Release|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|x86.ActiveCfg = Debug|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|x86.Build.0 = Debug|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Any CPU.Build.0 = Release|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|x86.ActiveCfg = Release|Any CPU
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|x86.Build.0 = Release|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|x86.ActiveCfg = Debug|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|x86.Build.0 = Debug|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Any CPU.Build.0 = Release|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|x86.ActiveCfg = Release|Any CPU
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|x86.Build.0 = Release|Any CPU
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Mixed Platforms.Build.0 = Debug|x86
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|x86.ActiveCfg = Debug|x86
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|x86.Build.0 = Debug|x86
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Any CPU.Build.0 = Release|Any CPU
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Mixed Platforms.ActiveCfg = Release|x86
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Mixed Platforms.Build.0 = Release|x86
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|x86.ActiveCfg = Release|x86
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|x86.Build.0 = Release|x86
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|x86.ActiveCfg = Debug|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|x86.Build.0 = Debug|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Any CPU.Build.0 = Release|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.ActiveCfg = Release|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number // Build Number
// Revision // Revision
// //
[assembly: AssemblyVersion("3.9.2144.1")] [assembly: AssemblyVersion("3.9.2143.1")]
[assembly: AssemblyFileVersion("3.9.2144.1")] [assembly: AssemblyFileVersion("3.9.2143.1")]
-27
View File
@@ -401,24 +401,6 @@ namespace TBF.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Application diagnostic.
/// </summary>
internal static string AppDiagnostic {
get {
return ResourceManager.GetString("AppDiagnostic", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Application diagnostic.
/// </summary>
internal static string Application_Diagnostic {
get {
return ResourceManager.GetString("Application_Diagnostic", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Approval. /// Looks up a localized string similar to Approval.
/// </summary> /// </summary>
@@ -4793,15 +4775,6 @@ namespace TBF.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Reg. min step.
/// </summary>
internal static string RegulMinStep {
get {
return ResourceManager.GetString("RegulMinStep", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Relative Q from. /// Looks up a localized string similar to Relative Q from.
/// </summary> /// </summary>
-9
View File
@@ -197,12 +197,6 @@
</data> </data>
<data name="Reg_valve" xml:space="preserve"> <data name="Reg_valve" xml:space="preserve">
<value>Reg. valve</value> <value>Reg. valve</value>
</data>
<data name="RegulMinStep" xml:space="preserve">
<value>Reg. min step</value>
</data>
<data name="Application_Diagnostic" xml:space="preserve">
<value>Application diagnostic</value>
</data> </data>
<data name="Balance" xml:space="preserve"> <data name="Balance" xml:space="preserve">
<value>Scale</value> <value>Scale</value>
@@ -2448,9 +2442,6 @@
</data> </data>
<data name="Upgrade_DB" xml:space="preserve"> <data name="Upgrade_DB" xml:space="preserve">
<value>Upgrade database</value> <value>Upgrade database</value>
</data>
<data name="AppDiagnostic" xml:space="preserve">
<value>Application diagnostic</value>
</data> </data>
<data name="About" xml:space="preserve"> <data name="About" xml:space="preserve">
<value>About</value> <value>About</value>
+51 -65
View File
@@ -8,7 +8,6 @@ using Dirichlet.Numerics;
using TBF.Boxes; using TBF.Boxes;
using TBF.Rig.ControlBoard; using TBF.Rig.ControlBoard;
using TBF.Rig.GenericDevices; using TBF.Rig.GenericDevices;
using System.Windows.Forms;
namespace TBF.Rig.BuiltIn namespace TBF.Rig.BuiltIn
{ {
@@ -195,79 +194,66 @@ namespace TBF.Rig.BuiltIn
/// <remarks>Only Elde.Valve valves are used, other valves on the lists are ignored</remarks> /// <remarks>Only Elde.Valve valves are used, other valves on the lists are ignored</remarks>
public SetValvesOp(IControlBoard cb, bool open, OutputPath outPath, DateTimeBox timeStamp, FloatBox switchTime) public SetValvesOp(IControlBoard cb, bool open, OutputPath outPath, DateTimeBox timeStamp, FloatBox switchTime)
{ {
try this.cb = cb;
if (this.cb == null) throw new ArgumentNullException("ctrlBoard");
this.timeStamp = timeStamp;
this.switchTime = switchTime;
this.startStopValveBitNr = outPath.StartValve1 is Valve.Valve ? (outPath.StartValve1 as Valve.Valve).BitPosition : 0;
IList<IValve> none = new List<IValve>(); /// An empty list of valves
switchPointsRaw = new List<SwitchPoint>();
if (open)
{ {
this.cb = cb; if (outPath.InvertSV1)
if (this.cb == null) throw new ArgumentNullException("ctrlBoard"); AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
this.timeStamp = timeStamp;
this.switchTime = switchTime;
this.startStopValveBitNr = outPath.StartValve1 is Valve.Valve ? (outPath.StartValve1 as Valve.Valve).BitPosition : 0;
IList<IValve> none = new List<IValve>(); /// An empty list of valves
switchPointsRaw = new List<SwitchPoint>();
if (open)
{
if (outPath.InvertSV1)
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
else
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
if (outPath.StartValve2 != null)
{
if (outPath.InvertSV2)
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), -outPath.LagSV2); /// close SV2 after lag
else
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, -outPath.LagSV2); /// open SV2 after lag
}
if (outPath.StartValve3 != null)
{
if (outPath.InvertSV3)
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), -outPath.LagSV3); /// close SV3 after lag
else
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, -outPath.LagSV3); /// open SV3 after lag
}
}
else else
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
if (outPath.StartValve2 != null)
{ {
if (outPath.InvertSV1) if (outPath.InvertSV2)
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1 AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), -outPath.LagSV2); /// close SV2 after lag
else else
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1 AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, -outPath.LagSV2); /// open SV2 after lag
if (outPath.StartValve2 != null)
{
if (outPath.InvertSV2)
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, outPath.LagSV2); /// open SV2 after lag
else
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), outPath.LagSV2); /// close SV2 after lag
}
if (outPath.StartValve3 != null)
{
if (outPath.InvertSV3)
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, outPath.LagSV3); /// open SV3 after lag
else
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), outPath.LagSV3); /// close SV3 after lag
}
} }
switchPoints = SortAndMergeSwitchPoints(switchPointsRaw); if (outPath.StartValve3 != null)
timeShift = -switchPoints[0].TimeSec; {
MakeMasks(switchPoints, timeShift); if (outPath.InvertSV3)
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), -outPath.LagSV3); /// close SV3 after lag
else
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, -outPath.LagSV3); /// open SV3 after lag
}
} }
catch (Exception ex) else
{ {
MessageBox.Show( if (outPath.InvertSV1)
$"Chyba počas zastavenia regulácie prietoku, v ramci SetValvesOp():\n{ex.Message}\n\nStack trace:\n{ex.StackTrace}", AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
"Chyba", else
MessageBoxButtons.OK, AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
MessageBoxIcon.Error
); if (outPath.StartValve2 != null)
throw; {
if (outPath.InvertSV2)
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, outPath.LagSV2); /// open SV2 after lag
else
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), outPath.LagSV2); /// close SV2 after lag
}
if (outPath.StartValve3 != null)
{
if (outPath.InvertSV3)
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, outPath.LagSV3); /// open SV3 after lag
else
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), outPath.LagSV3); /// close SV3 after lag
}
} }
switchPoints = SortAndMergeSwitchPoints(switchPointsRaw);
timeShift = -switchPoints[0].TimeSec;
MakeMasks(switchPoints, timeShift);
} }
/// <summary>Start this operation</summary> /// <summary>Start this operation</summary>
+1 -1
View File
@@ -93,7 +93,7 @@ namespace TBF.Rig.ControlBoard
/// <returns>Operation</returns> /// <returns>Operation</returns>
IOperation QueryMeasurementEndOp(); IOperation QueryMeasurementEndOp();
void StopFlowControl(bool isFromUI, int regVId, int regulationMinStep = 0); void StopFlowControl(bool isFromUI, int regVId);
void StopAll(bool isFromUI); void StopAll(bool isFromUI);
} }
+1 -1
View File
@@ -492,7 +492,7 @@ namespace TBF.Rig.ControlBoard.Papouch
return null; return null;
} }
public void StopFlowControl(bool isFromUI, int rvId, int regulationMinStep = 0) public void StopFlowControl(bool isFromUI, int rvId)
{ {
} }
+7 -20
View File
@@ -55,9 +55,6 @@ namespace TBF.Rig.ControlBoard.Uni
public int StabTime { get; set; } /// SetFlow public int StabTime { get; set; } /// SetFlow
public int InitDacVal { get; set; } /// SetFlow public int InitDacVal { get; set; } /// SetFlow
public int DivThreshold { get; set; } /// StartTest argument public int DivThreshold { get; set; } /// StartTest argument
public int RegulationMinStep { get;
set;
}
public Action() public Action()
@@ -81,7 +78,6 @@ namespace TBF.Rig.ControlBoard.Uni
RVMovePar1 = 0; RVMovePar1 = 0;
RVMovePar2 = 0; RVMovePar2 = 0;
InitDacVal = 0; InitDacVal = 0;
RegulationMinStep = 0;
} }
@@ -127,7 +123,7 @@ namespace TBF.Rig.ControlBoard.Uni
} }
///---------------------------------------------------------------------------------------------- ///----------------------------------------------------------------------------------------------
public static Action MeasureFlow(bool isFromUI, int flowMeterId, int regulationMinStep = 0) public static Action MeasureFlow(bool isFromUI, int flowMeterId)
{ {
return new Action return new Action
{ {
@@ -167,7 +163,7 @@ namespace TBF.Rig.ControlBoard.Uni
///---------------------------------------------------------------------------------------------- ///----------------------------------------------------------------------------------------------
public static Action SetFlow(bool isFromUI, int regValveId, double freqLo, double freqHi, public static Action SetFlow(bool isFromUI, int regValveId, double freqLo, double freqHi,
int pid, int stabTime_ms, int regulationMinStep = 0) int pid, int stabTime_ms)
{ {
int rvMovePar1 = Convert.ToInt32(Math.Round(13.1072 * freqLo)); int rvMovePar1 = Convert.ToInt32(Math.Round(13.1072 * freqLo));
int rvMovePar2 = Convert.ToInt32(Math.Round(13.1072 * freqHi)); int rvMovePar2 = Convert.ToInt32(Math.Round(13.1072 * freqHi));
@@ -182,7 +178,6 @@ namespace TBF.Rig.ControlBoard.Uni
RegVMode = RegValveMode.TargetFrequency, RegVMode = RegValveMode.TargetFrequency,
RVMovePar1 = rvMovePar1, RVMovePar1 = rvMovePar1,
RVMovePar2 = rvMovePar2, RVMovePar2 = rvMovePar2,
//RegulationMinStep = regulationMinStep,
PID = pid, PID = pid,
TolerRV = (regValveId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) TolerRV = (regValveId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
? Convert.ToInt32(Math.Round(13.1072 * 0.015 * freqLo)) : 0, ? Convert.ToInt32(Math.Round(13.1072 * 0.015 * freqLo)) : 0,
@@ -212,7 +207,7 @@ namespace TBF.Rig.ControlBoard.Uni
///---------------------------------------------------------------------------------------------- ///----------------------------------------------------------------------------------------------
public static Action StartTest(bool isFromUI, int flowMId, int divId, int divThreshold, public static Action StartTest(bool isFromUI, int flowMId, int divId, int divThreshold,
bool isSyncMethod, bool isDivUsed, bool isDelayedStart, bool isStartStop, bool isSyncMethod, bool isDivUsed, bool isDelayedStart, bool isStartStop,
bool isProlonged, int totalPulsesCount, int massPulsesCount = 0, int regulationMinStep = 0) bool isProlonged, int totalPulsesCount, int massPulsesCount = 0)
{ {
return new Action return new Action
{ {
@@ -230,7 +225,6 @@ namespace TBF.Rig.ControlBoard.Uni
TotalPulsesCount = totalPulsesCount, TotalPulsesCount = totalPulsesCount,
MassPulsesCount = (massPulsesCount <= 0) ? totalPulsesCount : massPulsesCount, MassPulsesCount = (massPulsesCount <= 0) ? totalPulsesCount : massPulsesCount,
StartStop = Command.Start, StartStop = Command.Start,
//RegulationMinStep = regulationMinStep,
}; };
} }
void SetStartTestArgs(Action action) void SetStartTestArgs(Action action)
@@ -278,7 +272,7 @@ namespace TBF.Rig.ControlBoard.Uni
} }
///---------------------------------------------------------------------------------------------- ///----------------------------------------------------------------------------------------------
public static Action RegVlvIncrMove(bool isFromUI, int regValveId, double timeSec, int regulationMinStep = 0) public static Action RegVlvIncrMove(bool isFromUI, int regValveId, double timeSec)
{ {
int rvMovePar = Math.Abs(Convert.ToInt32(Math.Round(timeSec / 0.050))); /// Step is 50 ms int rvMovePar = Math.Abs(Convert.ToInt32(Math.Round(timeSec / 0.050))); /// Step is 50 ms
@@ -291,7 +285,6 @@ namespace TBF.Rig.ControlBoard.Uni
RegVMode = (timeSec >= 0) ? RegValveMode.PulseWidth : (RegValveMode.PulseWidth | RegValveMode.NegPulseWidth), RegVMode = (timeSec >= 0) ? RegValveMode.PulseWidth : (RegValveMode.PulseWidth | RegValveMode.NegPulseWidth),
RVMovePar1 = rvMovePar, RVMovePar1 = rvMovePar,
RVMovePar2 = rvMovePar, RVMovePar2 = rvMovePar,
//RegulationMinStep = regulationMinStep,
}; };
} }
void SetRegVlvIncrMoveArgs(Action action) void SetRegVlvIncrMoveArgs(Action action)
@@ -300,7 +293,6 @@ namespace TBF.Rig.ControlBoard.Uni
RegVMode = action.RegVMode; RegVMode = action.RegVMode;
RVMovePar1 = action.RVMovePar1; RVMovePar1 = action.RVMovePar1;
RVMovePar2 = action.RVMovePar2; RVMovePar2 = action.RVMovePar2;
//RegulationMinStep = action.RegulationMinStep;
} }
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes) /// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
bool CheckSharedRegVlvIncrMoveArgs(Action newAction) bool CheckSharedRegVlvIncrMoveArgs(Action newAction)
@@ -310,7 +302,7 @@ namespace TBF.Rig.ControlBoard.Uni
} }
///---------------------------------------------------------------------------------------------- ///----------------------------------------------------------------------------------------------
public static Action RegVlvMoveToPos(bool isFromUI, int regValveId, int adcValLo, int adcValHi = -1, int regulationMinStep = 0) public static Action RegVlvMoveToPos(bool isFromUI, int regValveId, int adcValLo, int adcValHi = -1)
{ {
int rvMovePar1, rvMovePar2; int rvMovePar1, rvMovePar2;
@@ -336,7 +328,6 @@ namespace TBF.Rig.ControlBoard.Uni
RegVMode = RegValveMode.TargetPosition, RegVMode = RegValveMode.TargetPosition,
RVMovePar1 = rvMovePar1, RVMovePar1 = rvMovePar1,
RVMovePar2 = rvMovePar2, RVMovePar2 = rvMovePar2,
//RegulationMinStep = regulationMinStep,
}; };
} }
void SetRegVlvMoveToPosArgs(Action action) void SetRegVlvMoveToPosArgs(Action action)
@@ -345,7 +336,6 @@ namespace TBF.Rig.ControlBoard.Uni
RegVMode = action.RegVMode; RegVMode = action.RegVMode;
RVMovePar1 = action.RVMovePar1; RVMovePar1 = action.RVMovePar1;
RVMovePar2 = action.RVMovePar2; RVMovePar2 = action.RVMovePar2;
//RegulationMinStep = action.RegulationMinStep;
} }
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes) /// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
bool CheckSharedRegVlvMoveToPosArgs(Action newAction) bool CheckSharedRegVlvMoveToPosArgs(Action newAction)
@@ -355,7 +345,7 @@ namespace TBF.Rig.ControlBoard.Uni
} }
///---------------------------------------------------------------------------------------------- ///----------------------------------------------------------------------------------------------
public static Action RegVlvStop(bool isFromUI, int regValveId, int RegulationMinStep = 0) public static Action RegVlvStop(bool isFromUI, int regValveId)
{ {
return new Action return new Action
{ {
@@ -366,7 +356,6 @@ namespace TBF.Rig.ControlBoard.Uni
RegVMode = RegValveMode.Stop, RegVMode = RegValveMode.Stop,
RVMovePar1 = 0, RVMovePar1 = 0,
RVMovePar2 = 0, RVMovePar2 = 0,
//RegulationMinStep = RegulationMinStep
}; };
} }
void SetRegVlvStopArgs(Action action) void SetRegVlvStopArgs(Action action)
@@ -375,7 +364,6 @@ namespace TBF.Rig.ControlBoard.Uni
RegVMode = action.RegVMode; RegVMode = action.RegVMode;
RVMovePar1 = action.RVMovePar1; RVMovePar1 = action.RVMovePar1;
RVMovePar2 = action.RVMovePar2; RVMovePar2 = action.RVMovePar2;
//RegulationMinStep = action.RegulationMinStep;
} }
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes) /// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
bool CheckSharedRegVlvStopArgs(Action newAction) bool CheckSharedRegVlvStopArgs(Action newAction)
@@ -616,8 +604,7 @@ namespace TBF.Rig.ControlBoard.Uni
combinedAction.TolerRV, combinedAction.TolerRV,
combinedAction.StabTime, combinedAction.StabTime,
combinedAction.InitDacVal, combinedAction.InitDacVal,
combinedAction.DivThreshold, combinedAction.DivThreshold);
combinedAction.RegulationMinStep);
return combinedAction; return combinedAction;
} }
+3 -25
View File
@@ -5,8 +5,6 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using log4net; using log4net;
using Dirichlet.Numerics; using Dirichlet.Numerics;
using Common;
using System.Web.Routing;
namespace TBF.Rig.ControlBoard.Uni namespace TBF.Rig.ControlBoard.Uni
{ {
@@ -100,21 +98,8 @@ namespace TBF.Rig.ControlBoard.Uni
message[37] = (byte)Math.Max(0, Math.Min(255, arguments.StabTime)); /// StabRV message[37] = (byte)Math.Max(0, Math.Min(255, arguments.StabTime)); /// StabRV
message[38] = (byte)((arguments.DivThreshold >> 2) & 0xFF); message[38] = (byte)((arguments.DivThreshold >> 2) & 0xFF);
//--- message[39] = 0;
message[39] = (byte)((action.RegulationMinStep << 4) & 0xFF); // ak 0 = koli kompatibilite, 1-6 = hodnoty prislusne pre spodnu saturaciu vypinacej periody casu message[40] = 0;
message[40] = (byte)((action.RegulationMinStep << 4) & 0xFF);
//---
/*int x = 0;
if (action.RegVId == 1 || action.RegVId == 2) x = 3;
else if (action.RegVId == 3 || action.RegVId == 4) x = 5;
else if (action.RegVId == 5 || action.RegVId == 5) x = 3;
message[39] = (byte)((x << 4) & 0xFF);
message[40] = (byte)((x << 4) & 0xFF);*/
/*//---
message[39] = 0x50; // ak 0 = koli kompatibilite, 1-6 = hodnoty prislusne pre spodnu saturaciu vypinacej periody casu
message[40] = 0x50;
//---*/
Debug.Assert(40 == PayloadLen + 2); Debug.Assert(40 == PayloadLen + 2);
/// Checksum (2 bytes) /// Checksum (2 bytes)
@@ -123,8 +108,6 @@ namespace TBF.Rig.ControlBoard.Uni
message[PayloadLen + 3] = (byte)(checksum & 0xFF); message[PayloadLen + 3] = (byte)(checksum & 0xFF);
message[PayloadLen + 4] = (byte)((checksum >> 8) & 0xFF); message[PayloadLen + 4] = (byte)((checksum >> 8) & 0xFF);
log.Info("");
return message; return message;
} }
@@ -168,16 +151,11 @@ namespace TBF.Rig.ControlBoard.Uni
return (byte)0x20; return (byte)0x20;
} }
else if ((a.ActionId & ActionID.SetFlow) != 0 && a.RegVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) if ((a.ActionId & ActionID.SetFlow) != 0 && a.RegVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
{ {
return (byte)0x42; return (byte)0x42;
} }
/*else
{
return (a.RegulationMinStep >= 0 || a.RegulationMinStep <= 6)?(byte)(a.RegulationMinStep << 4):(byte)(7<<4);
}*/
return 0; return 0;
} }
} }
@@ -2,9 +2,6 @@
/// Copyright (c) 2021 Sensus Slovensko a.s. /// Copyright (c) 2021 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using log4net; using log4net;
using TBF.Rig.GenericDevices; using TBF.Rig.GenericDevices;
@@ -19,8 +16,7 @@ namespace TBF.Rig.ControlBoard.Uni
/// Set by the constructor /// Set by the constructor
/// ///
readonly UniCB uniCB; readonly UniCB uniCB;
readonly object flowMeter; readonly TBF.Rig.Uni.FlowMeter.FlowMeter flowMeter;
readonly TBF.Rig.Uni.FlowMetersInParallel.FlowMeter flowMeterInParallel;
readonly TBF.Rig.Uni.Diverter.Diverter diverter; readonly TBF.Rig.Uni.Diverter.Diverter diverter;
readonly int pulsesCount; /// Number of reference pulses for a complete test readonly int pulsesCount; /// Number of reference pulses for a complete test
readonly bool withDiverter; /// Test with diverter (and scale) readonly bool withDiverter; /// Test with diverter (and scale)
@@ -54,119 +50,36 @@ namespace TBF.Rig.ControlBoard.Uni
public StandingStartStopTestOp(UniCB cb, OutputPath devices, int pulsesCount, bool withDiverter) public StandingStartStopTestOp(UniCB cb, OutputPath devices, int pulsesCount, bool withDiverter)
{ {
this.uniCB = cb; this.uniCB = cb;
try
{
flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMeter.FlowMeter;
if(flowMeter == null) flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMetersInParallel.FlowMeter;
if (flowMeter == null) throw new ArgumentNullException("Invalid flow meter"); flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMeter.FlowMeter;
} if (flowMeter == null) throw new ArgumentNullException("Invalid flow meter");
catch (Exception ex)
{
string deviceInfo = GetAllDevicesInfo(devices);
string flowMeterStatus = devices.FlowMeter == null
? "devices.FlowMeter je NULL"
: $"devices.FlowMeter je typu: {devices.FlowMeter.GetType().FullName}";
MessageBox.Show(
$"Chyba počas zastavenia regulácie prietoku, v ramci StandingStartStopTestOp() pre flowMeter:\n" +
$"{ex.Message}\n\n" +
$"Diagnostika:\n{flowMeterStatus}\n\n" +
$"{deviceInfo}\n\n" +
$"Stack trace:\n{ex.StackTrace}",
"Chyba",
MessageBoxButtons.OK,
MessageBoxIcon.Error
);
throw;
}
this.pulsesCount = pulsesCount; this.pulsesCount = pulsesCount;
this.withDiverter = withDiverter; this.withDiverter = withDiverter;
if (withDiverter) if (withDiverter)
{ {
try diverter = devices.Diverter as TBF.Rig.Uni.Diverter.Diverter;
{ if (diverter == null) throw new ArgumentNullException("Invalid diverter");
diverter = devices.Diverter as TBF.Rig.Uni.Diverter.Diverter;
if (diverter == null) throw new ArgumentNullException("Invalid diverter");
}
catch (Exception ex)
{
string deviceInfo = GetAllDevicesInfo(devices);
MessageBox.Show(
$"Chyba počas zastavenia regulácie prietoku, v ramci StandingStartStopTestOp() pre diverter:\n" +
$"{ex.Message}\n\n{deviceInfo}\n\nStack trace:\n{ex.StackTrace}",
"Chyba",
MessageBoxButtons.OK,
MessageBoxIcon.Error
);
throw;
}
} }
log.Debug(this.ToString()); log.Debug(this.ToString());
} }
string GetAllDevicesInfo(object obj) /// <summary>
{
if (obj == null) return "devices objekt je null.";
StringBuilder sb = new StringBuilder();
sb.AppendLine("Zoznam zariadení v devices:");
var props = obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
foreach (var prop in props)
{
try
{
object value = prop.GetValue(obj);
string valueStr = value != null ? value.ToString() : "null";
sb.AppendLine($"{prop.Name}: {valueStr}");
}
catch (Exception ex)
{
sb.AppendLine($"{prop.Name}: [Chyba pri načítaní - {ex.Message}]");
}
}
return sb.ToString();
}
/// <summary>
/// Start this operation /// Start this operation
/// </summary> /// </summary>
public void Start() public void Start()
{ {
if (flowMeter is TBF.Rig.Uni.FlowMeter.FlowMeter) log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", flowMeter.Idx1, pulsesCount, withDiverter);
{
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", ((TBF.Rig.Uni.FlowMeter.FlowMeter)flowMeter).Idx1, pulsesCount, withDiverter);
/// Start the test (and the flow measurement)
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
uniCB.SetActivity(Activity.StandingStartStopTest);
uniCB.StartTest(false, ((TBF.Rig.Uni.FlowMeter.FlowMeter)flowMeter).Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
false, withDiverter, false, true, false, pulsesCount);
opState = OpState.StartingTest;
}
else if (flowMeter is TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)
{
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", ((TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)flowMeter).Idx1, pulsesCount, withDiverter);
/// Start the test (and the flow measurement)
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
uniCB.SetActivity(Activity.StandingStartStopTest);
uniCB.StartTest(false, ((TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)flowMeter).Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
false, withDiverter, false, true, false, pulsesCount);
opState = OpState.StartingTest;
}
/// Start the test (and the flow measurement)
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
uniCB.SetActivity(Activity.StandingStartStopTest);
uniCB.StartTest(false, flowMeter.Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
false, withDiverter, false, true, false, pulsesCount);
opState = OpState.StartingTest;
} }
/// <summary> /// <summary>
+12 -29
View File
@@ -17,8 +17,6 @@ using TBF.Boxes;
using TBF.Rig.GenericDevices; using TBF.Rig.GenericDevices;
using TBF.Rig.Sequences; using TBF.Rig.Sequences;
using TBF.UiBridge; using TBF.UiBridge;
using AppDiagnostic;
using SharedComponents;
namespace TBF.Rig.ControlBoard.Uni namespace TBF.Rig.ControlBoard.Uni
{ {
@@ -575,11 +573,7 @@ namespace TBF.Rig.ControlBoard.Uni
var combinedAction = Action.FetchNonConflictingActions(actionQueue); /// Default action is RequestDataOnly var combinedAction = Action.FetchNonConflictingActions(actionQueue); /// Default action is RequestDataOnly
combinedAction.RegulationMinStep = devices.RegulMinStep;
byte[] outData = OutputMessage.GetMessage(combinedAction, config, (ulong)valvesToInvert); byte[] outData = OutputMessage.GetMessage(combinedAction, config, (ulong)valvesToInvert);
if (outData != null && outData.Length > 0) if (outData != null && outData.Length > 0)
{ {
if ((combinedAction.ActionId & ActionID.ChangeRoute) != 0) if ((combinedAction.ActionId & ActionID.ChangeRoute) != 0)
@@ -621,7 +615,7 @@ namespace TBF.Rig.ControlBoard.Uni
{ {
} }
#endregion #endregion
#region IControlBoard interface #region IControlBoard interface
@@ -787,13 +781,12 @@ namespace TBF.Rig.ControlBoard.Uni
#endregion #endregion
public void MeasureFlow(bool isFromUI, int flowMeterId, int regulationMinStep = 0) public void MeasureFlow(bool isFromUI, int flowMeterId)
{ {
if (IsUIBlocked && isFromUI) return; if (IsUIBlocked && isFromUI) return;
actionQueue.Enqueue(Action.MeasureFlow(isFromUI, flowMeterId, regulationMinStep)); actionQueue.Enqueue(Action.MeasureFlow(isFromUI, flowMeterId));
log.InfoFormat("Enqueue( MeasureFlow(fm={0}) )", flowMeterId); log.InfoFormat("Enqueue( MeasureFlow(fm={0}) )", flowMeterId);
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -801,13 +794,12 @@ namespace TBF.Rig.ControlBoard.Uni
/// To be used with a regulation valve controlled by incremental pulses. /// To be used with a regulation valve controlled by incremental pulses.
/// Stability time is fixed: 200 ms /// Stability time is fixed: 200 ms
/// </summary> /// </summary>
public void SetFlow(bool isFromUI, int regVId, double freqLo, double freqHi, int regulationMinStep = 0) public void SetFlow(bool isFromUI, int regVId, double freqLo, double freqHi)
{ {
if (IsUIBlocked && isFromUI) return; if (IsUIBlocked && isFromUI) return;
actionQueue.Enqueue(Action.SetFlow(isFromUI, regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)), 200, regulationMinStep)); actionQueue.Enqueue(Action.SetFlow(isFromUI, regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)), 200));
log.InfoFormat("Enqueue( SetFlow(rv={0}, fLo={1}, fHi={2}, pid={3}) )", regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef))); log.InfoFormat("Enqueue( SetFlow(rv={0}, fLo={1}, fHi={2}, pid={3}) )", regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)));
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -822,23 +814,22 @@ namespace TBF.Rig.ControlBoard.Uni
totalPulsesCount, massPulsesCount)); totalPulsesCount, massPulsesCount));
log.InfoFormat("Enqueue( StartTest(fm={0}, div={1}, Sync={2}, withDiv={3}, s/s={4}, prolonged={5} pulsesCount={6} massPulsesCount={7}) )", log.InfoFormat("Enqueue( StartTest(fm={0}, div={1}, Sync={2}, withDiv={3}, s/s={4}, prolonged={5} pulsesCount={6} massPulsesCount={7}) )",
flowMId, divId, isSyncMethod, isDivUsed, isStartStop, isProlonged, totalPulsesCount, massPulsesCount); flowMId, divId, isSyncMethod, isDivUsed, isStartStop, isProlonged, totalPulsesCount, massPulsesCount);
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
public void StopFlowControl(bool isFromUI, int regVId, int regulationMinStep = 0) public void StopFlowControl(bool isFromUI, int regVId)
{ {
if (IsUIBlocked && isFromUI) return; if (IsUIBlocked && isFromUI) return;
if (regVId < TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) if (regVId < TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
{ {
actionQueue.Enqueue(Action.RegVlvStop(isFromUI, regVId, regulationMinStep)); actionQueue.Enqueue(Action.RegVlvStop(isFromUI, regVId));
log.InfoFormat("Enqueue( RegVlvStop(rv={0}) )", regVId); log.InfoFormat("Enqueue( RegVlvStop(rv={0}) )", regVId);
} }
else if (regVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) else if (regVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
{ {
int dacVal = Data.StavDA[0]; int dacVal = Data.StavDA[0];
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, dacVal, regulationMinStep)); actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, dacVal));
log.InfoFormat("Enqueue( RegVlvMoveToPos(rv={0}, positionLo={1}) )", regVId, dacVal); log.InfoFormat("Enqueue( RegVlvMoveToPos(rv={0}, positionLo={1}) )", regVId, dacVal);
} }
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
@@ -850,7 +841,6 @@ namespace TBF.Rig.ControlBoard.Uni
actionQueue.Enqueue(Action.Stop(isFromUI)); actionQueue.Enqueue(Action.Stop(isFromUI));
log.InfoFormat("Enqueue( Stop() )"); log.InfoFormat("Enqueue( Stop() )");
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -859,11 +849,11 @@ namespace TBF.Rig.ControlBoard.Uni
/// </summary> /// </summary>
/// <param name="rvId">Reg. valve ID</param> /// <param name="rvId">Reg. valve ID</param>
/// <param name="time">Time in seconds, positive value opens the reg. valve</param> /// <param name="time">Time in seconds, positive value opens the reg. valve</param>
public void RegVlvIncrMove(bool isFromUI, int regVId, double time, int regulationMinStep = 0) public void RegVlvIncrMove(bool isFromUI, int regVId, double time)
{ {
if (IsUIBlocked && isFromUI || regVId >= TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) return; if (IsUIBlocked && isFromUI || regVId >= TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) return;
var newAction = Action.RegVlvIncrMove(isFromUI, regVId, time, regulationMinStep); var newAction = Action.RegVlvIncrMove(isFromUI, regVId, time);
var actionsToModify = actionQueue.Where(x => (x.ActionId == ActionID.RegVlvIncrMove && x.RegVId == newAction.RegVId)); var actionsToModify = actionQueue.Where(x => (x.ActionId == ActionID.RegVlvIncrMove && x.RegVId == newAction.RegVId));
bool oneModified = false; bool oneModified = false;
@@ -895,13 +885,12 @@ namespace TBF.Rig.ControlBoard.Uni
/// </summary> /// </summary>
/// <param name="rvId">Reg. valve ID</param> /// <param name="rvId">Reg. valve ID</param>
/// <param name="position">Reg. valve position (0 .. 1.0)</param> /// <param name="position">Reg. valve position (0 .. 1.0)</param>
public void RegVlvMoveToPos(bool isFromUI, int regVId, int adcValLo, int adcValHi = -1, int regulationMinStep = 0) public void RegVlvMoveToPos(bool isFromUI, int regVId, int adcValLo, int adcValHi = -1)
{ {
if (IsUIBlocked && isFromUI || regVId > TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) return; if (IsUIBlocked && isFromUI || regVId > TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) return;
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, adcValLo, adcValHi, regulationMinStep)); actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, adcValLo, adcValHi));
log.InfoFormat("Enqueue( RegVlvMoveToPos(rv={0}, positionLo={1}, positionHi={2}) )", regVId, adcValLo, adcValHi); log.InfoFormat("Enqueue( RegVlvMoveToPos(rv={0}, positionLo={1}, positionHi={2}) )", regVId, adcValLo, adcValHi);
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -918,7 +907,6 @@ namespace TBF.Rig.ControlBoard.Uni
actionQueue.Enqueue(Action.Stop(isFromUI)); actionQueue.Enqueue(Action.Stop(isFromUI));
} }
log.InfoFormat("Enqueue( SwitchDiverter(div#={0}, toTank={1}) )", divNr1, toTank); log.InfoFormat("Enqueue( SwitchDiverter(div#={0}, toTank={1}) )", divNr1, toTank);
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -928,7 +916,6 @@ namespace TBF.Rig.ControlBoard.Uni
actionQueue.Enqueue(Action.DelayStartOrStop(isFromUI)); actionQueue.Enqueue(Action.DelayStartOrStop(isFromUI));
log.InfoFormat("Enqueue( DelayStartOrStop() )"); log.InfoFormat("Enqueue( DelayStartOrStop() )");
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -943,7 +930,6 @@ namespace TBF.Rig.ControlBoard.Uni
DivTransitionData.DiverterAssociationValidUntil = StateMachine.Time + 5; DivTransitionData.DiverterAssociationValidUntil = StateMachine.Time + 5;
actionQueue.Enqueue(Action.GetDiverterTransitionData(isFromUI)); actionQueue.Enqueue(Action.GetDiverterTransitionData(isFromUI));
log.InfoFormat("Enqueue( GetDiverterTransitionData(div#={0}, toTank={1}) )", diverter.DiverterNr, toTank); log.InfoFormat("Enqueue( GetDiverterTransitionData(div#={0}, toTank={1}) )", diverter.DiverterNr, toTank);
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -953,7 +939,6 @@ namespace TBF.Rig.ControlBoard.Uni
actionQueue.Enqueue(Action.GetScopeAnalyzerData(isFromUI)); actionQueue.Enqueue(Action.GetScopeAnalyzerData(isFromUI));
log.InfoFormat("Enqueue( GetScopeAnalyzerData() )"); log.InfoFormat("Enqueue( GetScopeAnalyzerData() )");
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -963,7 +948,6 @@ namespace TBF.Rig.ControlBoard.Uni
actionQueue.Enqueue(Action.ResetScopeAnalyzer(isFromUI)); actionQueue.Enqueue(Action.ResetScopeAnalyzer(isFromUI));
log.InfoFormat("Enqueue( ResetScopeAnalyzer() )"); log.InfoFormat("Enqueue( ResetScopeAnalyzer() )");
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -973,7 +957,6 @@ namespace TBF.Rig.ControlBoard.Uni
actionQueue.Enqueue(Action.GetSwitchCounterData(isFromUI)); actionQueue.Enqueue(Action.GetSwitchCounterData(isFromUI));
log.InfoFormat("Enqueue( GetSwitchCounterData() )"); log.InfoFormat("Enqueue( GetSwitchCounterData() )");
foreach (var a in actionQueue) log.DebugFormat(" {0}", a); foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
} }
@@ -669,10 +669,7 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
{ {
foreach (PurchaseOrder pOrder in purchaseOrderListExample) foreach (PurchaseOrder pOrder in purchaseOrderListExample)
{ {
if (pOrder != null && !String.IsNullOrEmpty(pOrder.Name)) orderComboBox.Items.Add(pOrder.Name);
{
orderComboBox.Items.Add(pOrder.Name);
}
} }
LoadPurchaseBox(""); LoadPurchaseBox("");
+21 -23
View File
@@ -33,9 +33,10 @@ namespace TBF.Rig.DataEntry.iPerl
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
this.okButton = new System.Windows.Forms.Button(); this.okButton = new System.Windows.Forms.Button();
this.orderGroupBox = new System.Windows.Forms.GroupBox();
this.orderComboBox = new System.Windows.Forms.ComboBox();
this.pictureBox = new System.Windows.Forms.PictureBox(); this.pictureBox = new System.Windows.Forms.PictureBox();
this.orderComboBox = new TBF.UI.Shared.SuggestComboBox(); this.orderGroupBox.SuspendLayout();
this.labelOrder = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
@@ -47,53 +48,50 @@ namespace TBF.Rig.DataEntry.iPerl
this.okButton.UseVisualStyleBackColor = true; this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click); this.okButton.Click += new System.EventHandler(this.okButton_Click);
// //
// orderGroupBox
//
this.orderGroupBox.Controls.Add(this.orderComboBox);
resources.ApplyResources(this.orderGroupBox, "orderGroupBox");
this.orderGroupBox.ForeColor = System.Drawing.Color.Black;
this.orderGroupBox.Name = "orderGroupBox";
this.orderGroupBox.TabStop = false;
//
// orderComboBox
//
this.orderComboBox.FormattingEnabled = true;
resources.ApplyResources(this.orderComboBox, "orderComboBox");
this.orderComboBox.Name = "orderComboBox";
//
// pictureBox // pictureBox
// //
resources.ApplyResources(this.pictureBox, "pictureBox"); resources.ApplyResources(this.pictureBox, "pictureBox");
this.pictureBox.Name = "pictureBox"; this.pictureBox.Name = "pictureBox";
this.pictureBox.TabStop = false; this.pictureBox.TabStop = false;
// //
// orderComboBox
//
this.orderComboBox.DropDownHeight = 530;
this.orderComboBox.FilterRule = null;
resources.ApplyResources(this.orderComboBox, "orderComboBox");
this.orderComboBox.FormattingEnabled = true;
this.orderComboBox.Name = "orderComboBox";
this.orderComboBox.PropertySelector = null;
this.orderComboBox.SuggestBoxHeight = 192;
this.orderComboBox.SuggestListOrderRule = null;
//
// labelOrder
//
resources.ApplyResources(this.labelOrder, "labelOrder");
this.labelOrder.Name = "labelOrder";
//
// CycleBeginningForm // CycleBeginningForm
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.DarkGray; this.BackColor = System.Drawing.Color.DarkGray;
this.Controls.Add(this.labelOrder);
this.Controls.Add(this.orderComboBox);
this.Controls.Add(this.pictureBox); this.Controls.Add(this.pictureBox);
this.Controls.Add(this.orderGroupBox);
this.Controls.Add(this.okButton); this.Controls.Add(this.okButton);
this.ForeColor = System.Drawing.Color.Black; this.ForeColor = System.Drawing.Color.Black;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "CycleBeginningForm"; this.Name = "CycleBeginningForm";
this.TopMost = true; this.TopMost = true;
this.Load += new System.EventHandler(this.CycleBeginningForm_Load); this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
this.orderGroupBox.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion
private System.Windows.Forms.Button okButton; private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox orderGroupBox;
private System.Windows.Forms.ComboBox orderComboBox;
private System.Windows.Forms.PictureBox pictureBox; private System.Windows.Forms.PictureBox pictureBox;
private UI.Shared.SuggestComboBox orderComboBox;
private System.Windows.Forms.Label labelOrder;
} }
} }
+137 -27
View File
@@ -11,6 +11,7 @@ using TBF.Rig.Sequences;
using TBF.Rig.Output.DB.SensusOracle; using TBF.Rig.Output.DB.SensusOracle;
using TBF.Resources; using TBF.Resources;
using System.Drawing; using System.Drawing;
using NHibernate;
namespace TBF.Rig.DataEntry.iPerl namespace TBF.Rig.DataEntry.iPerl
{ {
@@ -23,7 +24,8 @@ namespace TBF.Rig.DataEntry.iPerl
readonly EntryFormCfg cfg; readonly EntryFormCfg cfg;
/// Loaded from database beforethe form is open /// Loaded from database beforethe form is open
IList<OrderDetails> listOfOrders; IList<IOrderInfo> listOfOrders;
string preselectedOrder;
/// To be retrieved after the form is closed /// To be retrieved after the form is closed
public string PurchaseOrder; public string PurchaseOrder;
@@ -40,6 +42,7 @@ namespace TBF.Rig.DataEntry.iPerl
{ {
InitializeComponent(); InitializeComponent();
ControlBox = false; ControlBox = false;
preselectedOrder = null;
completed = false; completed = false;
StartForceCloseHandler(); StartForceCloseHandler();
@@ -50,11 +53,12 @@ namespace TBF.Rig.DataEntry.iPerl
/// Constructor /// Constructor
/// </summary> /// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param> /// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public CycleBeginningForm(int waterMetersCount, EntryFormCfg cfg) public CycleBeginningForm(int waterMetersCount, EntryFormCfg cfg, string preselectedOrder = null)
: this() : this()
{ {
this.WaterMetersCount = waterMetersCount; this.WaterMetersCount = waterMetersCount;
this.cfg = cfg; this.cfg = cfg;
this.preselectedOrder = preselectedOrder;
SNText = null; SNText = null;
Disabled = null; Disabled = null;
} }
@@ -63,12 +67,49 @@ namespace TBF.Rig.DataEntry.iPerl
private void CycleBeginningForm_Load(object sender, EventArgs e) private void CycleBeginningForm_Load(object sender, EventArgs e)
{ {
Text = Strings.Data; Text = Strings.Data;
labelOrder.Text = Strings.Purchase_order; orderGroupBox.Text = Strings.Purchase_order;
okButton.Text = Strings.OkBtnText; okButton.Text = Strings.OkBtnText;
listOfOrders = ((cfg.Orders == Orders.FromOracle || cfg.Orders == Orders.CombinedAndFromOracle) && ProcessData.OracleDB != null) listOfOrders = new List<IOrderInfo>();
? ProcessData.OracleDB.ReadOrders()
: new List<OrderDetails>(); if ((cfg.Orders == Orders.FromOracle || cfg.Orders == Orders.CombinedAndFromOracle)
&& ProcessData.OracleDB != null)
{
foreach (var o in ProcessData.OracleDB.ReadOrders())
{
listOfOrders.Add(o);
}
}
if ((cfg.Orders == Orders.FromTracingDB || cfg.Orders == Orders.CombinedAndFromTracingDB)
&& ProcessData.TracingDB != null
&& ProcessData.TracingDB.DebugLevel == DebugMode.Normal)
{
foreach (var o in ProcessData.TracingDB.ReadOrders())
{
listOfOrders.Add(o);
}
}
string insertFirst = null;
if (!string.IsNullOrEmpty(preselectedOrder))
{
insertFirst = preselectedOrder;
}
else
{
if (Program.LocalSettings.PurchaseOrderHistoryCount > 0)
{
foreach (var o in listOfOrders)
{
if (o.POName == Program.LocalSettings.PurchaseOrderHistory[0])
{
insertFirst = o.POName;
break;
}
}
}
}
switch (cfg.Orders) switch (cfg.Orders)
{ {
@@ -76,25 +117,71 @@ namespace TBF.Rig.DataEntry.iPerl
PrepareOrderCombo(orderComboBox); PrepareOrderCombo(orderComboBox);
break; break;
case Orders.CombinedAndFromOracle:
case Orders.FromOracle: case Orders.FromOracle:
case Orders.FromTracingDB:
if (insertFirst != null)
{
orderComboBox.Items.Add(insertFirst);
orderComboBox.Text = insertFirst;
}
foreach (var o in listOfOrders) foreach (var o in listOfOrders)
{ if (o.POName != insertFirst)
orderComboBox.Items.Add(o.POName + " - " + o.SNPrefix); orderComboBox.Items.Add(o.POName);
} break;
if (Program.LocalSettings.PurchaseOrderHistoryCount > 0)
orderComboBox.SelectedIndex = orderComboBox.FindString(Program.LocalSettings.PurchaseOrderHistory[0]);
case Orders.CombinedAndFromOracle:
case Orders.CombinedAndFromTracingDB:
if (insertFirst != null)
{
orderComboBox.Items.Add(insertFirst);
orderComboBox.Text = insertFirst;
}
orderComboBox.Items.Add("BBAAMMXX");
orderComboBox.Items.Add("BBAAOMXX");
orderComboBox.Items.Add("BBAAQMXX");
orderComboBox.Items.Add("BBAATMFR");
orderComboBox.Items.Add("BBAATMXX");
orderComboBox.Items.Add("CCAAMMXX");
orderComboBox.Items.Add("CCAAOMXX");
orderComboBox.Items.Add("CCAAQMXX");
orderComboBox.Items.Add("CCAATMFR");
orderComboBox.Items.Add("CCAATMXX");
orderComboBox.Items.Add("DDAAMMXX");
orderComboBox.Items.Add("DDAAOMXX");
orderComboBox.Items.Add("DDAAQMXX");
orderComboBox.Items.Add("DDAATMXX");
orderComboBox.Items.Add("DEAAMMXX");
orderComboBox.Items.Add("DEAAOMXX");
orderComboBox.Items.Add("DEAAQMXX");
orderComboBox.Items.Add("DEAATMXX");
orderComboBox.Items.Add("EEAAMMXX");
orderComboBox.Items.Add("EEAAOMXX");
orderComboBox.Items.Add("EEAAQMXX");
orderComboBox.Items.Add("EEAATMFR");
orderComboBox.Items.Add("EEAATMXX");
orderComboBox.Items.Add("FFAAMMXX");
orderComboBox.Items.Add("FFAAOMXX");
orderComboBox.Items.Add("FFAAQMXX");
orderComboBox.Items.Add("FFAATMFR");
orderComboBox.Items.Add("FFAATMXX");
orderComboBox.Items.Add("GFAAMMXX");
orderComboBox.Items.Add("GFAAOMXX");
orderComboBox.Items.Add("GFAAQMXX");
orderComboBox.Items.Add("GFAATMXX");
foreach (var o in listOfOrders)
if (o.POName != insertFirst)
orderComboBox.Items.Add(o.POName);
break; break;
} }
/// ///
/// Draw an appropriate test bench picture /// Draw an appropriate test bench picture
/// ///
Side side = (ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component) Side side = (TBF.Rig.Sequences.ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component)
? (ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).Side ? (TBF.Rig.Sequences.ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).Side
: Side.Left; : Side.Left;
if ((cfg.Direction == Direction.Reversed_LR) && (side == Side.Left)) if ((cfg.Direction == Direction.Reversed_LR) && (side == Side.Left))
{ {
/// direction L->R (reversed), left side /// direction L->R (reversed), left side
@@ -115,9 +202,7 @@ namespace TBF.Rig.DataEntry.iPerl
/// direction R->L (forward), left side /// direction R->L (forward), left side
pictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\forward_dir_left.jpg", Program.ExecutableDir, true)); pictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\forward_dir_left.jpg", Program.ExecutableDir, true));
} }
pictureBox.SendToBack(); }
}
/// <summary> /// <summary>
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array /// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
@@ -138,20 +223,45 @@ namespace TBF.Rig.DataEntry.iPerl
private void okButton_Click(object sender, EventArgs e) private void okButton_Click(object sender, EventArgs e)
{ {
PurchaseOrder = orderComboBox.Text.Split(' ')[0].Trim(); if (orderComboBox.Text.Length > 8 ||
(cfg.Orders != Orders.Arbitrary && !orderComboBox.Items.Contains(orderComboBox.Text)))
if (PurchaseOrder.Length > 10 ||
(cfg.Orders != Orders.Arbitrary && orderComboBox.FindString(PurchaseOrder) < 0))
{ {
MessageBox.Show(Strings.Invalid_order_number, Strings.Error, MessageBoxButtons.OK, MessageBox.Show(Strings.Invalid_order_number, Strings.Error, MessageBoxButtons.OK,
MessageBoxIcon.Exclamation); MessageBoxIcon.Exclamation);
return; return;
} }
ProcessData.OrderDetails = (listOfOrders == null) ? null : listOfOrders.FirstOrDefault<OrderDetails>(x => x.POName == orderComboBox.Text); IOrderInfo oInfo = (listOfOrders == null) ? null : listOfOrders.FirstOrDefault<IOrderInfo>(x => x.POName == orderComboBox.Text);
///
if (oInfo is Output.DB.SensusOracle.OrderDetails)
{
ProcessData.OrderInfo = oInfo;
}
else if (oInfo is SharedDatabase.Entities.OrderInfo && ProcessData.TracingDB != null)
{
try
{
using (var session = ProcessData.TracingDB.SessionFactory.OpenSession())
{
var list = session.QueryOver<SharedDatabase.Entities.OrderInfo>()
.Where(x => (x.POName == Program.MainWnd.SelectedProcedure.OrderInfo.POName))
.List();
ProcessData.OrderInfo = (list.Count == 1) ? list[0] : null;
string workflow = (list.Count == 1) ? list[0].Workflow : null;
ProcessData.WorkflowSummary = SharedDatabase.WorkflowSummary.ReadFromDB(workflow, "test", session);
session.Close();
}
}
catch (Exception ex)
{
log.ErrorFormat("Unable to load an order, workflow or workstep: {0}", ex);
ProcessData.OrderInfo = null;
ProcessData.WorkflowSummary = null;
}
}
PurchaseOrder = orderComboBox.Text;
Program.LocalSettings.UpdateHistory(PurchaseOrder, ref Program.LocalSettings.PurchaseOrderHistory); Program.LocalSettings.UpdateHistory(orderComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
completed = true; completed = true;
Close(); Close();
@@ -175,6 +285,6 @@ namespace TBF.Rig.DataEntry.iPerl
Close(); Close();
} }
#endregion #endregion
} }
} }
+56 -75
View File
@@ -122,14 +122,10 @@
<value>Verdana, 14.25pt</value> <value>Verdana, 14.25pt</value>
</data> </data>
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing"> <data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
<value>836, 32</value> <value>627, 26</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="okButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value>
</data> </data>
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing"> <data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 78</value> <value>112, 63</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="okButton.TabIndex" type="System.Int32, mscorlib"> <data name="okButton.TabIndex" type="System.Int32, mscorlib">
@@ -148,16 +144,61 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;okButton.ZOrder" xml:space="preserve"> <data name="&gt;&gt;okButton.ZOrder" xml:space="preserve">
<value>4</value> <value>2</value>
</data>
<data name="orderComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>90, 32</value>
</data>
<data name="orderComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>432, 31</value>
</data>
<data name="orderComboBox.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;orderComboBox.Name" xml:space="preserve">
<value>orderComboBox</value>
</data>
<data name="&gt;&gt;orderComboBox.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;orderComboBox.Parent" xml:space="preserve">
<value>orderGroupBox</value>
</data>
<data name="&gt;&gt;orderComboBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="orderGroupBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Verdana, 14.25pt</value>
</data>
<data name="orderGroupBox.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 12</value>
</data>
<data name="orderGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>565, 82</value>
</data>
<data name="orderGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="orderGroupBox.Text" xml:space="preserve">
<value>Order</value>
</data>
<data name="&gt;&gt;orderGroupBox.Name" xml:space="preserve">
<value>orderGroupBox</value>
</data>
<data name="&gt;&gt;orderGroupBox.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;orderGroupBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;orderGroupBox.ZOrder" xml:space="preserve">
<value>1</value>
</data> </data>
<data name="pictureBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="pictureBox.Location" type="System.Drawing.Point, System.Drawing">
<value>37, 145</value> <value>28, 118</value>
</data>
<data name="pictureBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value>
</data> </data>
<data name="pictureBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="pictureBox.Size" type="System.Drawing.Size, System.Drawing">
<value>948, 612</value> <value>711, 497</value>
</data> </data>
<data name="pictureBox.TabIndex" type="System.Int32, mscorlib"> <data name="pictureBox.TabIndex" type="System.Int32, mscorlib">
<value>8</value> <value>8</value>
@@ -172,79 +213,19 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;pictureBox.ZOrder" xml:space="preserve"> <data name="&gt;&gt;pictureBox.ZOrder" xml:space="preserve">
<value>3</value> <value>0</value>
</data>
<data name="orderComboBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Verdana, 14.25pt</value>
</data>
<data name="orderComboBox.IntegralHeight" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="orderComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>37, 73</value>
</data>
<data name="orderComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>777, 37</value>
</data>
<data name="orderComboBox.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;orderComboBox.Name" xml:space="preserve">
<value>orderComboBox</value>
</data>
<data name="&gt;&gt;orderComboBox.Type" xml:space="preserve">
<value>TBF.UI.Shared.SuggestComboBox, TBF, Version=2.33.2152.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;orderComboBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;orderComboBox.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="labelOrder.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelOrder.Font" type="System.Drawing.Font, System.Drawing">
<value>Verdana, 14.25pt</value>
</data>
<data name="labelOrder.Location" type="System.Drawing.Point, System.Drawing">
<value>32, 32</value>
</data>
<data name="labelOrder.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 29</value>
</data>
<data name="labelOrder.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="labelOrder.Text" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;labelOrder.Name" xml:space="preserve">
<value>labelOrder</value>
</data>
<data name="&gt;&gt;labelOrder.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="&gt;&gt;labelOrder.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;labelOrder.ZOrder" xml:space="preserve">
<value>1</value>
</data> </data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>8, 16</value> <value>6, 13</value>
</data> </data>
<data name="$this.AutoSize" type="System.Boolean, mscorlib"> <data name="$this.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>1025, 786</value> <value>769, 639</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>Batch data</value> <value>Batch data</value>
+30 -26
View File
@@ -7,6 +7,7 @@ using log4net;
using Config.Entities; using Config.Entities;
using TBF.Rig; using TBF.Rig;
using TBF.Rig.GenericDevices; using TBF.Rig.GenericDevices;
using TBF.Rig.Sequences;
namespace TBF.Rig.DataEntry.iPerl namespace TBF.Rig.DataEntry.iPerl
{ {
@@ -84,7 +85,7 @@ namespace TBF.Rig.DataEntry.iPerl
{ {
if (currentOp != CurrentOp.None) throw new Exception("Sequence error"); if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.ShowFormAtCycleBeginning; currentOp = CurrentOp.ShowFormAtCycleBeginning;
this.waterMeters = TBF.Rig.Sequences.ProcessData.BatchRslts.Batch.WaterMeters; this.waterMeters = ProcessData.BatchRslts.Batch.WaterMeters;
return this; return this;
} }
@@ -97,6 +98,10 @@ namespace TBF.Rig.DataEntry.iPerl
return this; return this;
} }
/// <returns>null (not implemented)</returns>
public IOperation ShowAdvancedTestStartFormOp(IRegReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters, bool isCondOp) { return null; }
public IOperation ShowTestCollectFormOp(IRegReader[] regReaders, double volumeRef, double errLimLo, double errLimHi) { return null; }
/// <returns>Reference to the operation</returns> /// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi) public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
{ {
@@ -113,7 +118,8 @@ namespace TBF.Rig.DataEntry.iPerl
/// ///
void OpenBeginningDlg(EntryForm myRef) void OpenBeginningDlg(EntryForm myRef)
{ {
myRef.modelessDlg = new CycleBeginningForm(TBF.Data.WMsCount, myRef.entryFormCfg); myRef.modelessDlg = new CycleBeginningForm(TBF.Data.WMsCount, myRef.entryFormCfg,
ProcessData.SelectedProcedure.OrderInfo != null ? ProcessData.SelectedProcedure.OrderInfo.POName : string.Empty);
modelessDlg.Show(); modelessDlg.Show();
} }
/// ///
@@ -136,7 +142,16 @@ namespace TBF.Rig.DataEntry.iPerl
switch (currentOp) switch (currentOp)
{ {
case CurrentOp.ShowFormAtCycleBeginning: case CurrentOp.ShowFormAtCycleBeginning:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this); if (ProcessData.SelectedProcedure.OrderInfo == null || entryFormCfg.Direction != Direction.S640)
{
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
}
else
{
/// Only in case of 640 meters and an order information entered during the procedure selection
/// this DataEntry form at the beginning of the cycle is skipped
modelessDlg = null;
}
break; break;
case CurrentOp.EnterTestStartStates: case CurrentOp.EnterTestStartStates:
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this); Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
@@ -151,7 +166,17 @@ namespace TBF.Rig.DataEntry.iPerl
/// <returns>Event.ResultsPrinted</returns> /// <returns>Event.ResultsPrinted</returns>
public Event Run() public Event Run()
{ {
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed) if (ProcessData.SelectedProcedure.OrderInfo != null && entryFormCfg.Direction == Direction.S640)
{
for (int i = 0; i < waterMeters.Count; i++)
{
if (waterMeters[i] != null)
waterMeters[i].PurchaseOrder = ProcessData.SelectedProcedure.OrderInfo.POName;
}
return Event.ModelessFormClosed;
}
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
{ {
return Event.ModelessFormIsOpen; return Event.ModelessFormIsOpen;
} }
@@ -214,26 +239,5 @@ namespace TBF.Rig.DataEntry.iPerl
} }
currentOp = CurrentOp.None; currentOp = CurrentOp.None;
} }
}
public IOperation ShowAdvancedTestStartFormOp(IRegReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters, bool isCondOp = false)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
this.regReaders = regReaders;
this.waterMeters = waterMeters;
// Handle isCondOp if necessary
return this;
}
public IOperation ShowTestCollectFormOp(IRegReader[] regReaders, double volumeRef, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
this.regReaders = regReaders;
this.refVolume = volumeRef;
this.errLimLo = errLimLo;
this.errLimHi = errLimHi;
return this;
}
}
} }
+21 -22
View File
@@ -32,17 +32,23 @@ namespace TBF.Rig.DataEntry.iPerl
public enum Orders public enum Orders
{ {
#if LANG_SK #if LANG_SK
[Description("Ľubovolné")] Arbitrary, [Description("Ľubovolné")] Arbitrary,
[Description("Aktívne z Oracle")] FromOracle, [Description("Z Oracle databázy")] FromOracle,
[Description("Združené a aktívne z Oracle")] CombinedAndFromOracle, [Description("Zo sledovacej databázy")] FromTracingDB,
#elif LANG_DE [Description("Združené a z Oracle")] CombinedAndFromOracle,
[Description("Arbitrary")] Arbitrary, [Description("Združené a zo sledovacej databázy")] CombinedAndFromTracingDB,
[Description("Active from Oracle")] FromOracle, #elif LANG_CZ
[Description("Combined and active from Oracle")] CombinedAndFromOracle, [Description("Libovolné")] Arbitrary,
[Description("Z Oracle databáze")] FromOracle,
[Description("Ze sledovací databáze")] FromTracingDB,
[Description("Sdružené a z Oracle")] CombinedAndFromOracle,
[Description("Sdružené a ze sledovací databáze")] CombinedAndFromTracingDB,
#else #else
[Description("Arbitrary")] Arbitrary, [Description("Arbitrary")] Arbitrary,
[Description("Active from Oracle")] FromOracle, [Description("From Oracle")] FromOracle,
[Description("Combined and active from Oracle")] CombinedAndFromOracle, [Description("From Tracing DB")] FromTracingDB,
[Description("Combined and from Oracle")] CombinedAndFromOracle,
[Description("Combined and from Tracing DB")] CombinedAndFromTracingDB,
#endif #endif
Count, Count,
} }
@@ -93,22 +99,15 @@ namespace TBF.Rig.DataEntry.iPerl
public ICollection<string> ParamValues(int i) public ICollection<string> ParamValues(int i)
{ {
var list = new List<string>();
switch (i) switch (i)
{ {
case 0: case 0:
return new string[] for (Direction d = 0; d < Direction.Count; d++) list.Add(d.ToDescription());
{ return list;
Direction.Forward_RL.ToDescription(),
Direction.Reversed_LR.ToDescription(),
Direction.S640.ToDescription(),
};
case 1: case 1:
return new string[] for (Orders o = 0; o < Orders.Count; o++) list.Add(o.ToDescription());
{ return list;
Orders.Arbitrary.ToDescription(),
Orders.FromOracle.ToDescription(),
Orders.CombinedAndFromOracle.ToDescription(),
};
default: default:
return null; return null;
} }
+1 -1
View File
@@ -8,7 +8,7 @@ namespace TBF.Rig.DataEntry.iPerl
{ {
public class Factory : IComponentFactory public class Factory : IComponentFactory
{ {
public string ClassName { get { return "DataEntry-iPerl"; } } public string ClassName { get { return GetType().Namespace.Substring(8); } }
public override string ToString() { return ClassName; } public override string ToString() { return ClassName; }
public IComponent DummyComponent() { return new EntryForm(); } public IComponent DummyComponent() { return new EntryForm(); }
+1 -2
View File
@@ -22,8 +22,7 @@ namespace TBF.Rig.Dummy.RegValve
public bool IsCoax { get { return false; } } public bool IsCoax { get { return false; } }
public double Position { get { return 50.0; } } public double Position { get { return 50.0; } }
///
public int RegulationMinStep { get { return 0; } }
IDictionary<double, double> dict; IDictionary<double, double> dict;
public IDictionary<double, double> Dict { get { return dict; } } public IDictionary<double, double> Dict { get { return dict; } }
+3 -5
View File
@@ -15,8 +15,7 @@ namespace TBF.Rig
public string Selector; public string Selector;
public IFlowMeter FlowMeter; public IFlowMeter FlowMeter;
public IRegValve RegValve; public IRegValve RegValve;
public int RegulMinStep; public float PidCoef;
public float PidCoef;
public IDiverter Diverter; public IDiverter Diverter;
public ITempMeter TempMtrDiv; public ITempMeter TempMtrDiv;
public IScaleOrTank Scale; public IScaleOrTank Scale;
@@ -40,7 +39,7 @@ namespace TBF.Rig
RegVPositions = new List<RegValvePosition>(); RegVPositions = new List<RegValvePosition>();
ValvesOpen = new List<IValve>(); ValvesOpen = new List<IValve>();
ValvesClose = new List<IValve>(); ValvesClose = new List<IValve>();
} }
/// Constructor from data entity /// Constructor from data entity
public OutputPath(Config.Entities.OutputPath entity, IList<Rig.Generic.IComponent> components) public OutputPath(Config.Entities.OutputPath entity, IList<Rig.Generic.IComponent> components)
@@ -51,8 +50,7 @@ namespace TBF.Rig
Selector = entity.Selector; Selector = entity.Selector;
FlowMeter = TbfComponents.FindComponent(entity.FlowMeter, components) as IFlowMeter; FlowMeter = TbfComponents.FindComponent(entity.FlowMeter, components) as IFlowMeter;
RegValve = TbfComponents.FindComponent(entity.RegValve, components) as IRegValve; RegValve = TbfComponents.FindComponent(entity.RegValve, components) as IRegValve;
RegulMinStep = entity.RegulMinStep; PidCoef = entity.PidCoef;
PidCoef = entity.PidCoef;
Diverter = TbfComponents.FindComponent(entity.Diverter, components) as IDiverter; Diverter = TbfComponents.FindComponent(entity.Diverter, components) as IDiverter;
TempMtrDiv = TbfComponents.FindComponent(entity.TempMtrDiv, components) as ITempMeter; TempMtrDiv = TbfComponents.FindComponent(entity.TempMtrDiv, components) as ITempMeter;
Scale = TbfComponents.FindComponent(entity.Scale, components) as IScaleOrTank; Scale = TbfComponents.FindComponent(entity.Scale, components) as IScaleOrTank;
+8 -47
View File
@@ -18,8 +18,6 @@ using TBF.Rig.Network.RestAPI;
using TBF.Rig.Network.RestAPI.facade; using TBF.Rig.Network.RestAPI.facade;
using TBF.Rig.Output.Printers.GroupPrinting.Single; using TBF.Rig.Output.Printers.GroupPrinting.Single;
using TBF.UiBridge; using TBF.UiBridge;
using SharedComponents;
using System.Text;
namespace TBF.Rig.Sequences namespace TBF.Rig.Sequences
{ {
@@ -35,7 +33,6 @@ namespace TBF.Rig.Sequences
int simultWithPurgingCount; int simultWithPurgingCount;
Generic.IComponentCfg simultWithPurgingCfg; Generic.IComponentCfg simultWithPurgingCfg;
Generic.IComponent simultWithPurging;
Generic.IProcedureParams simultWithPurgingProcParams; Generic.IProcedureParams simultWithPurgingProcParams;
IList<Config.Entities.Test> simultWithPurgingTests; IList<Config.Entities.Test> simultWithPurgingTests;
IList<Generic.ITestParams> simultWithPurgingTestParams; IList<Generic.ITestParams> simultWithPurgingTestParams;
@@ -47,10 +44,10 @@ namespace TBF.Rig.Sequences
IList<Generic.ITestParams> simultWithEvacuationTestParams; IList<Generic.ITestParams> simultWithEvacuationTestParams;
System.Windows.Forms.Form modelessDlg; System.Windows.Forms.Form modelessDlg;
///
delegate void CommunicationFormDlgt(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams);
/// ///
delegate void CommunicationFormDlgt(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams); void OpenIPerlCommForm(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
///
void OpenIPerlCommForm(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
{ {
try try
{ {
@@ -63,13 +60,9 @@ namespace TBF.Rig.Sequences
IList<TestMethods.iPerlCommunication.iPerlCommunicationParams> iPerlCommParams = new List<TestMethods.iPerlCommunication.iPerlCommunicationParams>(); IList<TestMethods.iPerlCommunication.iPerlCommunicationParams> iPerlCommParams = new List<TestMethods.iPerlCommunication.iPerlCommunicationParams>();
foreach (var tp in multiTestParams) iPerlCommParams.Add(tp as TestMethods.iPerlCommunication.iPerlCommunicationParams); foreach (var tp in multiTestParams) iPerlCommParams.Add(tp as TestMethods.iPerlCommunication.iPerlCommunicationParams);
/*myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(iPerlCfg, tests, iPerlCommParams); myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(iPerlCfg, tests, iPerlCommParams);
myRef.modelessDlg.Show();*/ myRef.modelessDlg.Show();
}
myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(
testMethod as TBF.Rig.TestMethods.iPerlCommunication.TestMethod, tests, iPerlCommParams);
myRef.modelessDlg.Show();
}
catch (Exception e) catch (Exception e)
{ {
log.FatalFormat("---------------( MainSeq : OpenIperlCommForm crashed !!! )---------------"); log.FatalFormat("---------------( MainSeq : OpenIperlCommForm crashed !!! )---------------");
@@ -83,7 +76,7 @@ namespace TBF.Rig.Sequences
} }
} }
/// ///
void OpenS640CommForm(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams) void OpenS640CommForm(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
{ {
try try
{ {
@@ -1501,45 +1494,13 @@ namespace TBF.Rig.Sequences
goto error; goto error;
} }
} }
/*catch (Exception exc) catch (Exception exc)
{ {
string msg = string.Format("Unable to update Batch.RsltsSent in local MySQL DB, BatchNr = {0}", string msg = string.Format("Unable to update Batch.RsltsSent in local MySQL DB, BatchNr = {0}",
ProcessData.BatchRslts.Batch.BatchNr); ProcessData.BatchRslts.Batch.BatchNr);
Bridge.OnError(this, msg); Bridge.OnError(this, msg);
log.FatalFormat("{0}: {1}", msg, exc.Message); log.FatalFormat("{0}: {1}", msg, exc.Message);
goto error; goto error;
}*/
catch (Exception exc)
{
var batch = ProcessData.BatchRslts.Batch;
// ⚠️ Skladanie detailného logu do jedného reťazca
var logBuilder = new StringBuilder();
logBuilder.AppendLine("----------------- Unable to update Batch.RsltsSent in local MySQL DB, BatchNr = {0} ------------------");
logBuilder.AppendLine("❌ Chyba pri UPDATE `batch` SET `RsltsSent` = '1'");
logBuilder.AppendLine($"BatchNr = {batch.BatchNr}");
logBuilder.AppendLine($"SQL príkaz: UPDATE `batch` SET `RsltsSent` = '1' WHERE `batch`.`BatchNr` = {batch.BatchNr};");
logBuilder.AppendLine();
logBuilder.AppendLine("💥 Výnimka:");
logBuilder.AppendLine($" - Message: {exc.Message}");
logBuilder.AppendLine($" - StackTrace: {exc.StackTrace}");
logBuilder.AppendLine($" - InnerException: {(exc.InnerException != null ? exc.InnerException.Message : "null")}");
logBuilder.AppendLine();
logBuilder.AppendLine("📦 Batch obsah:");
// 💡 Dynamický výpis vlastností objektu Batch
var props = batch.GetType().GetProperties();
foreach (var prop in props)
{
object value = prop.GetValue(batch, null);
logBuilder.AppendLine($" - {prop.Name}: {value}");
}
// ✍️ Uloženie do vlastného logu
LiveLogCache.Instance.AddLog(logBuilder.ToString());
Bridge.OnError(this, "Chyba pri aktualizácii výsledkov v MySQL.");
goto error;
} }
} }
+18 -29
View File
@@ -26,7 +26,6 @@ namespace TBF.Rig.Sequences
public static IErrorFlags ErrorFlagsComp; public static IErrorFlags ErrorFlagsComp;
public static IStatisticsMonitoring StatisticsMonitoringComp; public static IStatisticsMonitoring StatisticsMonitoringComp;
public static Output.DB.SensusOracle.Database OracleDB; public static Output.DB.SensusOracle.Database OracleDB;
public static Output.DB.SensusOracle.OrderDetails OrderDetails;
public static Output.DB.ProductionTracing.Tracing TracingDB; public static Output.DB.ProductionTracing.Tracing TracingDB;
/// ///
@@ -529,21 +528,17 @@ namespace TBF.Rig.Sequences
StateMachine.ControlBoardMain.TestTime.ToString("F3"),/// test time in s StateMachine.ControlBoardMain.TestTime.ToString("F3"),/// test time in s
StateMachine.ControlBoardMain.RefPulses, /// reference flow meter pulses count StateMachine.ControlBoardMain.RefPulses, /// reference flow meter pulses count
outPath.FlowMeter != null ? Formulas.VolumeFromPulses(StateMachine.ControlBoardMain.RefPulses, 1 / outPath.FlowMeter.LtrPerPulse).ToString("F3") : "0.000", /// volume in l outPath.FlowMeter != null ? Formulas.VolumeFromPulses(StateMachine.ControlBoardMain.RefPulses, 1 / outPath.FlowMeter.LtrPerPulse).ToString("F3") : "0.000", /// volume in l
benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C
benchPath.TempMtrDown != null ? benchPath.TempMtrDown.ReadTemperature() : 0, /// temp. at the end of line in degree C benchPath.TempMtrDown != null ? benchPath.TempMtrDown.ReadTemperature() : 0, /// temp. at the end of line in degree C
outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C
//---new2 PressUp, /// water pressure at the beginning of test line in bar (= 100 kPa)
PressUp.ToString(), /// water pressure at the beginning of test line in bar (= 100 kPa) PressDown, /// water pressure at the end of test line in bar (= 100 kPa)
PressDown.ToString(), /// water pressure at the end of test line in bar (= 100 kPa) PressDelta,
PressDelta.ToString(),
//---endnew2
(outPath.Scale is IScale) ? (outPath.Scale as IScale).Mass : 0, /// collected water mass in kg (outPath.Scale is IScale) ? (outPath.Scale as IScale).Mass : 0, /// collected water mass in kg
"VolMM", "VolMM",
//---new2 AmbTemp, /// ambient temperature in degree C
AmbTemp.ToString(), /// ambient temperature in degree C AmbHumi, /// ambient humidity in R%
AmbHumi.ToString(), /// ambient humidity in R% AmbPress, /// ambient pressure in mbar (= 1 hPa)
AmbPress.ToString(), /// ambient pressure in mbar (= 1 hPa)
//---endnew2
outPath.RegValve.Position.ToString("F1")); /// regulation valve position in % (0=closed / 100=open) outPath.RegValve.Position.ToString("F1")); /// regulation valve position in % (0=closed / 100=open)
} }
@@ -566,25 +561,19 @@ namespace TBF.Rig.Sequences
benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C
benchPath.TempMtrDown != null ? benchPath.TempMtrDown.ReadTemperature() : 0, /// temp. at the end of test in degree C benchPath.TempMtrDown != null ? benchPath.TempMtrDown.ReadTemperature() : 0, /// temp. at the end of test in degree C
outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C
//---new2 PressUp,
PressUp.ToString(), PressDown,
PressDown.ToString(), PressDelta,
PressDelta.ToString(),
//---endnew2
(outPath.Scale is IScale) ? (outPath.Scale as IScale).Mass : 0, /// collected water mass in kg (outPath.Scale is IScale) ? (outPath.Scale as IScale).Mass : 0, /// collected water mass in kg
"VolMM", "VolMM",
//---new2 AmbTemp,
AmbTemp.ToString(), AmbHumi,
AmbHumi.ToString(), AmbPress,
AmbPress.ToString(),
//---endnew2
outPath.RegValve.Position.ToString("F1"), outPath.RegValve.Position.ToString("F1"),
//---new2 TempRefHi1,
TempRefHi1.ToString(), TempRefHi2,
TempRefHi2.ToString(), TempRefLo1,
TempRefLo1.ToString(), TempRefLo2);
TempRefLo2.ToString());
//---endnew2
} }
/// ///
-1
View File
@@ -133,7 +133,6 @@ namespace TBF.Rig
new RegisterReaders.KPackE.Radio.Factory(), /// Radio for KPackE register readers new RegisterReaders.KPackE.Radio.Factory(), /// Radio for KPackE register readers
new Uni.RegValve.Factory(), new Uni.RegValve.Factory(),
new Uni.RegValveAnalog.Factory(), new Uni.RegValveAnalog.Factory(),
new Uni.RegValveLowRegulTimeSaturation.Factory(),
new Scales.MettlerToledo.Factory(), new Scales.MettlerToledo.Factory(),
new TestMethods.Adjustment.Factory(), new TestMethods.Adjustment.Factory(),
new TestMethods.ChangeFlowDirection.Factory(), new TestMethods.ChangeFlowDirection.Factory(),
+20 -5
View File
@@ -28,7 +28,7 @@ namespace TBF.Rig.TestMethods.Endurance
/// Auxiliary public lists used also by user controls in tab pages /// Auxiliary public lists used also by user controls in tab pages
public IList<Rig.Generic.IComponent> TbfComponents; public IList<Rig.Generic.IComponent> TbfComponents;
public IList<Rig.BuiltIn.Valve.Valve> Valves = new List<Rig.BuiltIn.Valve.Valve>(); public IList<IValve> Valves;
ITabWithListViewEx seqStepsCtrl; ITabWithListViewEx seqStepsCtrl;
@@ -39,9 +39,8 @@ namespace TBF.Rig.TestMethods.Endurance
EnduranceCycle = new List<CycleStep>(); EnduranceCycle = new List<CycleStep>();
} }
public CycleDlg(IList<CycleStep> cycle, IList<Rig.BuiltIn.Valve.Valve> valves) public CycleDlg(IList<CycleStep> cycle)
{ {
this.Valves = valves;
/// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi. /// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi.
Dpi = (int)this.CreateGraphics().DpiX; Dpi = (int)this.CreateGraphics().DpiX;
@@ -65,9 +64,25 @@ namespace TBF.Rig.TestMethods.Endurance
seqStepsCtrl = new CycleStepsCtrl() as ITabWithListViewEx; seqStepsCtrl = new CycleStepsCtrl() as ITabWithListViewEx;
/// Prepare a list of valves for the endurance test /// Prepare a list of valves for the endurance test
/// ... list is set by user
EnduranceCycle = (cycle != null) ? cycle : new List<CycleStep>(); /// TODO: Load from component parameters /// Load the list of components from the database
NHibernate.ISession session = TBF.DB.CreateSession(DBKind.Config);
var cmptnEntities = session.QueryOver<Config.Entities.Component>().OrderBy(x => x.ItemNr).Asc .List();
TbfComponents = TBF.Rig.TbfComponents.LoadComponentsFromDB(cmptnEntities);
Valves = new List<IValve>();
for (int bitNr = 0; bitNr < 8; bitNr++)
{
foreach (var vlv in TbfComponents)
{
if (vlv is TBF.Rig.BuiltIn.Valve.Valve && (vlv as TBF.Rig.BuiltIn.Valve.Valve).BitPosition == bitNr)
{
Valves.Add(vlv as IValve);
break;
}
}
}
EnduranceCycle = (cycle != null) ? cycle : new List<CycleStep>(); /// TODO: Load from component parameters
/// Create a tab with sequence steps for each sequence ordered by ItemNr. /// Create a tab with sequence steps for each sequence ordered by ItemNr.
AddCycleStepsTab(EnduranceCycle); AddCycleStepsTab(EnduranceCycle);
@@ -2,28 +2,17 @@
/// Copyright (c) 2016 Sensus Metering Systems /// Copyright (c) 2016 Sensus Metering Systems
/// ///
using System; using System;
using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using TBF.Resources;
using TBF.Rig.Generic;
using TBF.Rig.GenericDevices;
using Common; using Common;
using Config.Entities; using Config.Entities;
using TBF.Rig.Generic;
using System.Linq; using TBF.Resources;
using TBF.Rig.Sequences;
using NHibernate;
using log4net;
namespace TBF.Rig.TestMethods.Endurance namespace TBF.Rig.TestMethods.Endurance
{ {
public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl
{ {
IList<Rig.BuiltIn.Valve.Valve> valvesFromDB = new List<Rig.BuiltIn.Valve.Valve>(); public bool ShowMore { get { return false; } }
public bool ShowMore { get { return false; } }
string cycle; string cycle;
@@ -41,9 +30,7 @@ namespace TBF.Rig.TestMethods.Endurance
public TestMethodCfgCtrl() public TestMethodCfgCtrl()
{ {
InitializeComponent(); InitializeComponent();
valvesFromDB = LoadValvesFromDB(); }
CreateValveRows(valvesFromDB.Count, valvesFromDB); // toľko riadkov, koľko ventilov
}
private void EntryFormCfgCtrl_Load(object sender, EventArgs e) private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
{ {
@@ -89,109 +76,11 @@ namespace TBF.Rig.TestMethods.Endurance
private void enduranceCycleButton_Click(object sender, EventArgs e) private void enduranceCycleButton_Click(object sender, EventArgs e)
{ {
CycleDlg dlg = new CycleDlg(CycleStep.StringToCycle(cycle), GetSelectedValves()); CycleDlg dlg = new CycleDlg(CycleStep.StringToCycle(cycle));
if (dlg.ShowDialog() == DialogResult.OK) if (dlg.ShowDialog() == DialogResult.OK)
{ {
cycle = CycleStep.CycleToString(dlg.EnduranceCycle); cycle = CycleStep.CycleToString(dlg.EnduranceCycle);
} }
} }
private void CreateValveRows(int numberOfRows, IList<Rig.BuiltIn.Valve.Valve> valves) }
{
tableLayoutPanel1.RowCount = numberOfRows;
tableLayoutPanel1.ColumnCount = 2;
tableLayoutPanel1.Controls.Clear();
tableLayoutPanel1.ColumnStyles.Clear();
tableLayoutPanel1.RowStyles.Clear();
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100));
for (int i = 0; i < numberOfRows; i++)
{
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.AutoSize));
var label = new Label
{
Text = $"Valve {i + 1}",
Anchor = AnchorStyles.Left,
AutoSize = true,
Margin = new Padding(5)
};
var comboBox = new ComboBox
{
DropDownStyle = ComboBoxStyle.DropDownList,
Anchor = AnchorStyles.Left | AnchorStyles.Right,
Dock = DockStyle.Fill,
Margin = new Padding(5),
Name = $"comboValve{i + 1}",
DisplayMember = "Name" // zobrazenie názvu ventilu
};
comboBox.Items.Add("None");
foreach (var valve in valves)
{
comboBox.Items.Add(valve.Name/* + " (bit nr = " + valve.BitPosition + ")"*/);
}
comboBox.SelectedIndex = 0;
tableLayoutPanel1.Controls.Add(label, 0, i);
tableLayoutPanel1.Controls.Add(comboBox, 1, i);
}
}
private IList<Rig.BuiltIn.Valve.Valve> LoadValvesFromDB()
{
/// Load the list of components from the database
IList<Rig.BuiltIn.Valve.Valve> valves = new List<Rig.BuiltIn.Valve.Valve>();
using (NHibernate.ISession session = TBF.DB.CreateSession(DBKind.Config))
{
IList<IComponent> TbfComponents = Rig.TbfComponents.LoadComponentsFromDB(session);
valves = getAllValves(TbfComponents);
}
/// Find all master valvesFromDB
return valves;
}
/// <summary>
/// Process the list of components and return all valvesFromDB (masters and coupled)
/// </summary>
public static IList<Rig.BuiltIn.Valve.Valve> getAllValves(IList<Generic.IComponent> cmpnts)
{
IList<Rig.BuiltIn.Valve.Valve> result = new List<Rig.BuiltIn.Valve.Valve>();
foreach (var cmpnt in cmpnts) if (cmpnt is Rig.BuiltIn.Valve.Valve) result.Add(cmpnt as Rig.BuiltIn.Valve.Valve);
return result;
}
private List<Rig.BuiltIn.Valve.Valve> GetSelectedValves()
{
var selectedValves = new List<Rig.BuiltIn.Valve.Valve>();
foreach (Control control in tableLayoutPanel1.Controls)
{
if (control is ComboBox comboBox)
{
var selectedName = comboBox.SelectedItem?.ToString();
if (!string.IsNullOrEmpty(selectedName) && selectedName != "None")
{
// Nájdeme ventil podľa mena v zozname všetkých
var valve = valvesFromDB.FirstOrDefault(v => v.Name == selectedName);
if (valve != null)
{
selectedValves.Add(valve);
}
}
}
}
return selectedValves;
}
}
} }
+57 -81
View File
@@ -31,85 +31,62 @@ namespace TBF.Rig.TestMethods.Endurance
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.nameTextBox = new System.Windows.Forms.TextBox(); this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label(); this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label(); this.classNameLabel = new System.Windows.Forms.Label();
this.enduranceCycleButton = new System.Windows.Forms.Button(); this.enduranceCycleButton = new System.Windows.Forms.Button();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.SuspendLayout();
this.SuspendLayout(); //
// // nameTextBox
// nameTextBox //
// this.nameTextBox.Enabled = false;
this.nameTextBox.Enabled = false; this.nameTextBox.Location = new System.Drawing.Point(137, 57);
this.nameTextBox.Location = new System.Drawing.Point(137, 57); this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Name = "nameTextBox"; this.nameTextBox.Size = new System.Drawing.Size(130, 20);
this.nameTextBox.Size = new System.Drawing.Size(130, 20); this.nameTextBox.TabIndex = 5;
this.nameTextBox.TabIndex = 5; //
// // nameLabel
// nameLabel //
// this.nameLabel.AutoSize = true;
this.nameLabel.AutoSize = true; this.nameLabel.Location = new System.Drawing.Point(27, 60);
this.nameLabel.Location = new System.Drawing.Point(27, 60); this.nameLabel.Name = "nameLabel";
this.nameLabel.Name = "nameLabel"; this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.Size = new System.Drawing.Size(35, 13); this.nameLabel.TabIndex = 4;
this.nameLabel.TabIndex = 4; this.nameLabel.Text = "Name";
this.nameLabel.Text = "Name"; //
// // classNameLabel
// classNameLabel //
// this.classNameLabel.AutoSize = true;
this.classNameLabel.AutoSize = true; this.classNameLabel.Location = new System.Drawing.Point(134, 33);
this.classNameLabel.Location = new System.Drawing.Point(134, 33); this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Name = "classNameLabel"; this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.Size = new System.Drawing.Size(83, 13); this.classNameLabel.TabIndex = 3;
this.classNameLabel.TabIndex = 3; this.classNameLabel.Text = "ComonentName";
this.classNameLabel.Text = "ComonentName"; //
// // enduranceCycleButton
// enduranceCycleButton //
// this.enduranceCycleButton.Enabled = false;
this.enduranceCycleButton.Enabled = false; this.enduranceCycleButton.Location = new System.Drawing.Point(137, 83);
this.enduranceCycleButton.Location = new System.Drawing.Point(137, 83); this.enduranceCycleButton.Name = "enduranceCycleButton";
this.enduranceCycleButton.Name = "enduranceCycleButton"; this.enduranceCycleButton.Size = new System.Drawing.Size(130, 31);
this.enduranceCycleButton.Size = new System.Drawing.Size(130, 31); this.enduranceCycleButton.TabIndex = 6;
this.enduranceCycleButton.TabIndex = 6; this.enduranceCycleButton.Text = "Endurance cycle";
this.enduranceCycleButton.Text = "Endurance cycle"; this.enduranceCycleButton.UseVisualStyleBackColor = true;
this.enduranceCycleButton.UseVisualStyleBackColor = true; this.enduranceCycleButton.Click += new System.EventHandler(this.enduranceCycleButton_Click);
this.enduranceCycleButton.Click += new System.EventHandler(this.enduranceCycleButton_Click); //
// // TestMethodCfgCtrl
// tableLayoutPanel1 //
// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.tableLayoutPanel1.AutoSize = true; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.Controls.Add(this.enduranceCycleButton);
this.tableLayoutPanel1.ColumnCount = 2; this.Controls.Add(this.nameTextBox);
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.5F)); this.Controls.Add(this.nameLabel);
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 62.5F)); this.Controls.Add(this.classNameLabel);
this.tableLayoutPanel1.Location = new System.Drawing.Point(30, 120); this.Name = "TestMethodCfgCtrl";
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.Size = new System.Drawing.Size(300, 200);
this.tableLayoutPanel1.RowCount = 8; this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.ResumeLayout(false);
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.PerformLayout();
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(0, 120);
this.tableLayoutPanel1.TabIndex = 8;
//
// TestMethodCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.enduranceCycleButton);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "TestMethodCfgCtrl";
this.Size = new System.Drawing.Size(300, 502);
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
} }
@@ -119,6 +96,5 @@ namespace TBF.Rig.TestMethods.Endurance
private System.Windows.Forms.Label nameLabel; private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel; private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Button enduranceCycleButton; private System.Windows.Forms.Button enduranceCycleButton;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; }
}
} }
@@ -224,7 +224,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
/// ///
State.Create(string.Format("{0}({1}) : Starting pump {2}", test.Method, test.Name, (inPath.Pump != null) ? inPath.Pump.Name : "?")) State.Create(string.Format("{0}({1}) : Starting pump {2}", test.Method, test.Name, (inPath.Pump != null) ? inPath.Pump.Name : "?"))
.AddOperation(checkUiOp) .AddOperation(checkUiOp)
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60)) // .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
.AddOperations(readTempPressOps) .AddOperations(readTempPressOps)
.AddOperation(heatMetersPromptOp) .AddOperation(heatMetersPromptOp)
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null) .AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
+1 -15
View File
@@ -11,7 +11,6 @@ using TBF.Rig;
using TBF.Boxes; using TBF.Boxes;
using TBF.Resources; using TBF.Resources;
using TBF.UiBridge; using TBF.UiBridge;
//using AppDiagnostic;
namespace TBF.Rig.TestMethods.PMaxTest namespace TBF.Rig.TestMethods.PMaxTest
{ {
@@ -180,24 +179,11 @@ namespace TBF.Rig.TestMethods.PMaxTest
Bridge.OnActivity(this, Strings.Test_in_progress); Bridge.OnActivity(this, Strings.Test_in_progress);
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test)); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test));
//------------------------------------------------ //------------------------------------------------
/*//---new1
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "Start mass");
else LogProcessDataHeaderHeatMeters(processDataLogger, "Start mass");
//---endNew1*/
//DiagApi.addLog();
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name)) State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
.AddOperation(checkUiOp) .AddOperation(checkUiOp)
.AddOperations(readTempPressOps) .AddOperations(readTempPressOps)
.AddOperation(new Operations.TimerOp(testParams.DurationPMax)) .AddOperation(new Operations.TimerOp(testParams.DurationPMax))
//---new1 .EnterState();
.AddOperation(processDataLoggingOp)
//---endNew1
.EnterState();
do { do {
e = StateMachine.WaitRunDevsRunOps(); e = StateMachine.WaitRunDevsRunOps();
@@ -1,18 +1,19 @@
/// ///
/// Copyright (c) 2015-2022 Sensus Slovensko a.s. /// Copyright (c) 2015-2021 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.IO.Ports;
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using Common; using Common;
using Config.Entities; using Config.Entities;
using TBF.Rig.GenericDevices; using TBF.Rig;
using TBF.Rig.Sequences; using TBF.Rig.Sequences;
using TBF.UiBridge; using TBF.UiBridge;
namespace TBF.Rig.TestMethods.iPerlCommunication namespace TBF.Rig.TestMethods.iPerlCommunication
{ {
public class TestMethod : ComponentBase, ISimultTestMethod, ISequenceCondition, ISessionDataMngmnt public class TestMethod : ComponentBase, GenericDevices.ISimultTestMethod
{ {
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod)); private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData"); protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
@@ -21,6 +22,12 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; } public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
public bool DoTransitions() { return false; } public bool DoTransitions() { return false; }
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
{
message = string.Format("{0}: CheckDeviceCaps() is not implemented yet", Name);
return false;
}
public bool SimultWithPrevious { get { return testMethodCfg.TestParams.SimultWithPrevious; } } public bool SimultWithPrevious { get { return testMethodCfg.TestParams.SimultWithPrevious; } }
public bool SimultWithNext { get { return testMethodCfg.TestParams.SimultWithNext; } } public bool SimultWithNext { get { return testMethodCfg.TestParams.SimultWithNext; } }
@@ -62,31 +69,13 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
readonly TestMethodCfg testMethodCfg; readonly TestMethodCfg testMethodCfg;
public bool[] IperlCommMilestone; public TestMethod() { }
IList<IOperation> sequenceConditionOps;
public TestMethod()
{
CreateMilestonesAndConditions();
}
public TestMethod(Generic.IComponentCfg cfg) public TestMethod(Generic.IComponentCfg cfg)
: base(cfg) : base(cfg)
{ {
testMethodCfg = cfg as TestMethodCfg; testMethodCfg = cfg as TestMethodCfg;
CreateMilestonesAndConditions(); }
}
void CreateMilestonesAndConditions()
{
IperlCommMilestone = new bool[(int)ConditionID.Count];
sequenceConditionOps = new List<IOperation>();
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
{
sequenceConditionOps.Add(new SequenceConditionOp(this, id));
}
}
/// IDevice interface - only Initialize() is used /// IDevice interface - only Initialize() is used
public override void Initialize() public override void Initialize()
@@ -108,60 +97,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
{ {
if (DebugLevel == DebugMode.Normal) if (DebugLevel == DebugMode.Normal)
{ {
return (new iPerlCommunicationSeq()).Execute(test, repetNr, this, testMethodCfg.TestParams); return (new iPerlCommunicationSeq()).Execute(test, repetNr, testMethodCfg, testMethodCfg.TestParams);
} }
else else
{ {
/// DebugLevel == DebugMode.Simulate /// DebugLevel == DebugMode.Simulate
(new iPerlCommunicationSeq()).MakeSimulatedTrivial(test, repetNr, test.Part); (new iPerlCommunicationSeq()).MakeSimulatedTrivial(test, repetNr, test.Part);
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Progress.Completed)); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Progress.Completed));
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Common.Utils.GetTestName(test.Name, 1, 1), 0))); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
return new List<Event> { Event.Done }; return new List<Event> { Event.Done };
} }
} }
}
public int ConditionsCount { get { return (int)ConditionID.Count; } }
public string ConditionName(int i)
{
return (i >= 0 && i < (int)ConditionID.Count) ? ConditionOp(i).ToString() : string.Empty;
}
public IOperation ConditionOp(int i)
{
return (i >= 0 && i < (int)ConditionID.Count) ? sequenceConditionOps[i] : null;
}
public void StartSession()
{
/// Clear milestones
if (IperlCommMilestone != null)
{
for (int i = 0; i < IperlCommMilestone.Length; i++)
{
IperlCommMilestone[i] = false;
}
}
}
public void SaveMark(object o)
{
/// No marks
}
public void EndSession()
{
/// Nothing at the end of session
}
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
{
// Implement the method to satisfy the ITestMethod interface.
// For now, provide a basic implementation.
message = "Device capabilities check not implemented.";
return true;
}
}
} }
@@ -2,8 +2,6 @@
/// Copyright (c) 2015-2021 Sensus Slovensko a.s. /// Copyright (c) 2015-2021 Sensus Slovensko a.s.
/// ///
using System.Collections.Generic; using System.Collections.Generic;
using System.IO.Ports;
using System.Threading;
using System.Xml.Serialization; using System.Xml.Serialization;
using Common; using Common;
using Config.Entities; using Config.Entities;
@@ -24,20 +22,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
public int CommTimeout; /// Communication timeout in ms (500 .. 5000) public int CommTimeout; /// Communication timeout in ms (500 .. 5000)
public int DelayBetweenRetries; /// Delay between communication retries in ms (0 .. 5000) public int DelayBetweenRetries; /// Delay between communication retries in ms (0 .. 5000)
public int MaxCommRetries; /// Max. number of retries (1 .. 10) public int MaxCommRetries; /// Max. number of retries (1 .. 10)
public int WaitTimeAfterFailure; /// Wait time after communication failure in ms
public int PassThroughWaitTime; /// Pass Through wait time for radio parameters in ms
public int NrThreads; /// Numbwr of parallel threads (1, 2 or 4) public int NrThreads; /// Numbwr of parallel threads (1, 2 or 4)
public int IperlCheckErrorsToStop; public int IperlCheckErrorsToStop;
///
/// NFC S4.5 Combihead params
///
public int MciTimeoutMs;
public int BaudRate;
public int DataBits;
public Parity ParityBit;
public StopBits StopBits;
public int DfltQ2c_15_rl; public int DfltQ2c_15_rl;
public int DfltQ2c_15_lr; public int DfltQ2c_15_lr;
public int DfltQ2c_20_rl; public int DfltQ2c_20_rl;
@@ -72,17 +59,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
ParentName = string.Empty; ParentName = string.Empty;
CommTimeout = 1800; /// ms CommTimeout = 1800; /// ms
MaxCommRetries = 4; MaxCommRetries = 4;
WaitTimeAfterFailure = 2200; NrThreads = 2; /// 1, 2 or 4 threads
PassThroughWaitTime = 1500;
NrThreads = 2; /// 1, 2 or 4 threads
IperlCheckErrorsToStop = 10; IperlCheckErrorsToStop = 10;
MciTimeoutMs = 4000; // ms, NFC interface
BaudRate = 57600; // NFC Interface
DataBits = 8; // NFC Interface
ParityBit = Parity.None; // NFC Interface
StopBits = StopBits.Two; // NFC Interface
TestParams = CreateTestParamsProvider() as iPerlCommunicationParams; TestParams = CreateTestParamsProvider() as iPerlCommunicationParams;
} }
public TestMethodCfg(IComponentFactory factory) public TestMethodCfg(IComponentFactory factory)
@@ -9,6 +9,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
public class TestMethodFactory : IComponentFactory public class TestMethodFactory : IComponentFactory
{ {
public string ClassName { get { return GetType().Namespace.Substring(8); } } public string ClassName { get { return GetType().Namespace.Substring(8); } }
public override string ToString() { return ClassName; }
public IComponent DummyComponent() { return new TestMethod(); } public IComponent DummyComponent() { return new TestMethod(); }
File diff suppressed because it is too large Load Diff
@@ -178,6 +178,54 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
this.pictureBox3 = new System.Windows.Forms.PictureBox(); this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.checkBoxImage1 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage2 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage3 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage4 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage5 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage6 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage7 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage8 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage9 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage10 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage11 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage12 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage13 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage14 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage15 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage16 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage17 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage18 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage19 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage20 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage21 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage22 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage23 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage24 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage25 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage26 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage27 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage28 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage29 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage30 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage31 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage32 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage33 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage34 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage35 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage36 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage37 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage38 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage39 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage40 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage41 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage42 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage43 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage44 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage45 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage46 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage47 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage48 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.saveButton = new System.Windows.Forms.Button(); this.saveButton = new System.Windows.Forms.Button();
this.samplePictureBox1 = new System.Windows.Forms.PictureBox(); this.samplePictureBox1 = new System.Windows.Forms.PictureBox();
this.samplePictureBox2 = new System.Windows.Forms.PictureBox(); this.samplePictureBox2 = new System.Windows.Forms.PictureBox();
@@ -185,54 +233,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
this.sampleLabel1 = new System.Windows.Forms.Label(); this.sampleLabel1 = new System.Windows.Forms.Label();
this.sampleLabel2 = new System.Windows.Forms.Label(); this.sampleLabel2 = new System.Windows.Forms.Label();
this.sampleLabel3 = new System.Windows.Forms.Label(); this.sampleLabel3 = new System.Windows.Forms.Label();
this.checkBoxImage48 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage47 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage46 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage45 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage44 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage43 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage42 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage41 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage40 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage39 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage38 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage37 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage36 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage35 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage34 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage33 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage32 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage31 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage30 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage29 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage28 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage27 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage26 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage25 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage24 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage23 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage22 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage21 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage20 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage19 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage18 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage17 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage16 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage15 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage14 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage13 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage12 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage11 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage10 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage9 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage8 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage7 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage6 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage5 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage4 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage3 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage2 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
this.checkBoxImage1 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
((System.ComponentModel.ISupportInitialize)(this.pictureBox48)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox48)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox47)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox47)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox46)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox46)).BeginInit();
@@ -281,57 +281,57 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.samplePictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.samplePictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.samplePictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// wmTextBox2 // wmTextBox2
@@ -2639,57 +2639,57 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.samplePictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.samplePictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.samplePictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
File diff suppressed because it is too large Load Diff
@@ -65,8 +65,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRStr); retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRStr);
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionIncl05Str); retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionIncl05Str);
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionAltIncl05Str); retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionAltIncl05Str);
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionPlusIncl05Str);
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionPlusAltIncl05Str);
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionGreeceIncl05Str); retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionGreeceIncl05Str);
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionRLIncl05Str); retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionRLIncl05Str);
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRIncl05Str); retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRIncl05Str);
@@ -88,16 +86,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
retVal.Add(iPerlCommunicationForm.Write2HzCorrectionStr); retVal.Add(iPerlCommunicationForm.Write2HzCorrectionStr);
retVal.Add(iPerlCommunicationForm.DewaReworkRLStr); retVal.Add(iPerlCommunicationForm.DewaReworkRLStr);
retVal.Add(iPerlCommunicationForm.DewaReworkLRStr); retVal.Add(iPerlCommunicationForm.DewaReworkLRStr);
retVal.Add(iPerlCommunicationForm.StartTestingSealedMetersStr);
retVal.Add(iPerlCommunicationForm.EndTestingSealedMetersStr);
retVal.Add(string.Format("{0} if enabled", iPerlCommunicationForm.ReadConfigurationStr)); retVal.Add(string.Format("{0} if enabled", iPerlCommunicationForm.ReadConfigurationStr));
retVal.Add(string.Format("{0} 80", iPerlCommunicationForm.SetTestModeStr)); retVal.Add(string.Format("{0} 80", iPerlCommunicationForm.SetTestModeStr));
retVal.Add("iPerl_check prevWorkStep direction q2factors"); retVal.Add("iPerl_check prevWorkStep direction q2factors");
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
{
retVal.Add(string.Format(SequenceConditionOp.ConditionNameFmt, id));
}
return retVal; return retVal;
} }
else else
@@ -1,5 +1,5 @@
/// ///
/// Copyright (c) 2015-2023 Sensus Slovensko a.s. /// Copyright (c) 2015-2022 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -11,9 +11,6 @@ using RestClient;
using TBF.Rig.Sequences; using TBF.Rig.Sequences;
using TBF.Resources; using TBF.Resources;
using TBF.UiBridge; using TBF.UiBridge;
using Results;
using Results.Entities;
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
namespace TBF.Rig.TestMethods.iPerlCommunication namespace TBF.Rig.TestMethods.iPerlCommunication
{ {
@@ -25,16 +22,15 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
public const string StrictQ2ErrorCheckStr = "Strict Q2 error check "; public const string StrictQ2ErrorCheckStr = "Strict Q2 error check ";
public const string Q2correctionCheckCmd = "Q2 correction check "; public const string Q2correctionCheckCmd = "Q2 correction check ";
public const string IperlCheckCmd = "iPERL_check "; public const string IperlCheckCmd = "iPERL_check ";
public const string SimulateCmd = "simulate ";
System.Windows.Forms.Form modelessDlg; System.Windows.Forms.Form modelessDlg;
/// ///
delegate void iPerlCommFormDlgt(iPerlCommunicationSeq myRef, TestMethod method, Test test, iPerlCommunicationParams testParams); delegate void iPerlCommFormDlgt(iPerlCommunicationSeq myRef, TestMethodCfg cfg, Test test, iPerlCommunicationParams testParams);
/// ///
void OpenIPerlCommForm(iPerlCommunicationSeq myRef, TestMethod method, Test test, iPerlCommunicationParams testParams) void OpenIPerlCommForm(iPerlCommunicationSeq myRef, TestMethodCfg cfg, Test test, iPerlCommunicationParams testParams)
{ {
myRef.modelessDlg = new iPerlCommunicationForm(method, test, testParams); myRef.modelessDlg = new iPerlCommunicationForm(cfg, test, testParams);
myRef.modelessDlg.Show(); myRef.modelessDlg.Show();
} }
@@ -56,10 +52,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
/// Event.OpArgumentError . Target flow is out of range /// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error /// Event.Error . . . . . . Unspecified error
/// </returns> /// </returns>
public IList<Event> Execute(Test test, int repetitionNr, TestMethod method, iPerlCommunicationParams testParams) public IList<Event> Execute(Test test, int repetitionNr, TestMethodCfg cfg, iPerlCommunicationParams testParams)
{ {
TestMethodCfg cfg = method.Cfg as TestMethodCfg;
IList<Event> e; /// Events from currently running operations IList<Event> e; /// Events from currently running operations
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
modelessDlg = null; modelessDlg = null;
@@ -75,16 +69,17 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
/// Get 'wmType' from IperlHead procedure parameters /// Get 'wmType' from IperlHead procedure parameters
int wmType = 0; int wmType = 0;
#if IPERL if (IperlHeads != null)
/*foreach (var wm in ProcessData.BatchRslts.Batch.WaterMeters)
{ {
if (wm != null && !wm.Disabled && wm.WMTypeId() > 0) foreach (var ih in IperlHeads)
{ {
wmType = wm.WMTypeId(); if (ih.WMType_ID > 0)
break; {
wmType = ih.WMType_ID;
break;
}
} }
}*/ }
#endif
if (cfg.UseWebService) if (cfg.UseWebService)
{ {
@@ -126,10 +121,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted)); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted));
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.FlowSetting)); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.FlowSetting));
string[] args = testParams.Activity.Substring(cmd.Length).Split(new char[] { ' ' }); string fromTestName = testParams.Activity.Substring(cmd.Length);
string fromTestName = (args.Length >= 1) ? args[0] : string.Empty;
bool isPlus = (args.Length >= 2) ? args[1].ToLower().Contains("plus") : false; MakeQ2CorrectedFrom(test.Name, fromTestName);
MakeQ2CorrectedFrom(test.Name, fromTestName, isPlus);
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.Completed)); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.Completed));
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(test.Name, 0))); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(test.Name, 0)));
@@ -180,9 +174,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
string[] args = testParams.Activity.Substring(cmd.Length).Split(new char[] { ' ' }); string[] args = testParams.Activity.Substring(cmd.Length).Split(new char[] { ' ' });
//int maxTestIndex = (ProcessData.BenchInfo is TBF.Rig.DataContainer.BenchInfo.Component) int maxTestIndex = (ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component)
// ? (ProcessData.BenchInfo as TBF.Rig.DataContainer.BenchInfo.Component).MaxTestIndex ? (ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).MaxTestIndex
// : int.MaxValue; : int.MaxValue;
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(test.Name, 0); Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(test.Name, 0);
@@ -291,7 +285,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
return new List<Event> { Event.Done }; return new List<Event> { Event.Done };
} }
else if (testParams.Activity.ToLower().Contains(cmd = SimulateCmd)) else if (testParams.Activity.ToLower().Contains(cmd = "simulate "))
{ {
TestProgressEventArgs.SetEstimatedTimes(new int[] { 0, 0, 0, 30, 0, 30, 0, 0 }); TestProgressEventArgs.SetEstimatedTimes(new int[] { 0, 0, 0, 30, 0, 30, 0, 0 });
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted)); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted));
@@ -304,49 +298,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound nok") MakeSimulatedCompound(test, 1, 0, 4.7f, 0.9f); else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound nok") MakeSimulatedCompound(test, 1, 0, 4.7f, 0.9f);
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound rise") MakeSimulatedCompound(test, 1, 0, 0.7f, 0.0f); else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound rise") MakeSimulatedCompound(test, 1, 0, 0.7f, 0.0f);
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound fall") MakeSimulatedCompound(test, 1, 0, 0.7f, 0.9f); else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound fall") MakeSimulatedCompound(test, 1, 0, 0.7f, 0.9f);
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "iperls")
{
string[] pcbNrs = new string[] { "831232435539", "831232435562", "831232435587",
"831232432141", "831232432497", "831232763641" };
TestRslt tstRslt = BatchRslts.GetTestRslt(test.Name, test.Part);
if (tstRslt != null)
{
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
/// Auxiliary results ... not required
/// Main results
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
tstRslt.TestDone = true;
tstRslt.StartTime = tstRslt.Batch.StartTime;
tstRslt.EndTime = DateTime.Now;
tstRslt.FlowSetTime = 0;
tstRslt.MassOfEvapWater = 0;
tstRslt.TestTime = 1;
for (int i = 0; i < BatchRslts.Batch.WaterMeters.Count; i++)
{
MeterTestRslt meterRslt =
BatchRslts.GetMeterTestRslt(test.Name, i, CompoundMeterId.Single);
if (meterRslt != null)
{
meterRslt.WaterMeter.SerialNr = pcbNrs[i % pcbNrs.Length];
meterRslt.Passed = true;
meterRslt.TestDone = true;
}
//if (iperlHeads[i] != null)
//{
// iperlHeads[i].CommFailed = iperlHeads[i].Disabled = false;
// iperlHeads[i].SerialNr = pcbNrs[i % pcbNrs.Length];
//}
}
}
}
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.Completed)); Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.Completed));
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Common.Utils.GetTestName(test.Name, 1, 1), 0))); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file
//------------------------------------------------ //------------------------------------------------
@@ -354,8 +308,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
//------------------------------------------------ //------------------------------------------------
State.Create(string.Format("iPerlCommunicationSeq : {0}", testParams.Activity)) State.Create(string.Format("iPerlCommunicationSeq : {0}", testParams.Activity))
.AddOperation(checkUiOp) .AddOperation(checkUiOp)
.EnterState(); .EnterState();
e = StateMachine.WaitRunDevsRunOps(); e = StateMachine.WaitRunDevsRunOps();
if (TestAndLogUiCmdStop(test, e)) if (TestAndLogUiCmdStop(test, e))
@@ -368,7 +322,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
/// ///
/// Show the modeless dialog with error indication /// Show the modeless dialog with error indication
/// ///
Program.MainWnd.Invoke(new iPerlCommFormDlgt(OpenIPerlCommForm), new object[] { this, method, test, testParams }); Program.MainWnd.Invoke(new iPerlCommFormDlgt(OpenIPerlCommForm), new object[] { this, cfg, test, testParams });
//------------------------------------------------ //------------------------------------------------
Bridge.OnActivity(this, Strings.iPerl_Communication_in_progress); Bridge.OnActivity(this, Strings.iPerl_Communication_in_progress);
@@ -378,9 +332,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
bool completed = false; bool completed = false;
State.Create("iPerlCommunicationSeq : Wait until the entry form is closed") State.Create("iPerlCommunicationSeq : Wait until the entry form is closed")
.AddOperation(checkUiOp) .AddOperation(checkUiOp)
.EnterState(); .EnterState();
do { do
{
e = StateMachine.WaitRunDevsRunOps(); e = StateMachine.WaitRunDevsRunOps();
stopPressed = TestAndLogUiCmdStop(test, e); stopPressed = TestAndLogUiCmdStop(test, e);
completed = (modelessDlg is GenericDevices.IHasCompleted) completed = (modelessDlg is GenericDevices.IHasCompleted)
@@ -520,7 +475,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
/// <param name="testName">This test name</param> /// <param name="testName">This test name</param>
/// <param name="oriTestRslt">Name of Q2 test done before Q2 correction (Q2adj)</param> /// <param name="oriTestRslt">Name of Q2 test done before Q2 correction (Q2adj)</param>
/// <remarks>Assuming this test does not have multiple parts (part = 0)</remarks> /// <remarks>Assuming this test does not have multiple parts (part = 0)</remarks>
void MakeQ2CorrectedFrom(string testName, string oriTestName, bool isPlus = false) void MakeQ2CorrectedFrom(string testName, string oriTestName)
{ {
Results.Entities.TestRslt oriTestRslt = ProcessData.BatchRslts.GetTestRslt(oriTestName, 0); Results.Entities.TestRslt oriTestRslt = ProcessData.BatchRslts.GetTestRslt(oriTestName, 0);
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(testName, 0); Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(testName, 0);
@@ -596,8 +551,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw; tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
tstRslt.MassEnd = oriTestRslt.MassEnd; tstRslt.MassEnd = oriTestRslt.MassEnd;
tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater; tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater;
//tstRslt.FlowMass = oriTestRslt.FlowMass; tstRslt.Qdetected = oriTestRslt.Qdetected;
//tstRslt.FlowVolume = oriTestRslt.FlowVolume; tstRslt.Flow = oriTestRslt.Flow;
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV; tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster; tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
tstRslt.ErrorMaster = oriTestRslt.ErrorMaster; tstRslt.ErrorMaster = oriTestRslt.ErrorMaster;
@@ -617,19 +572,15 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
for (int i = 0; i < ProcessData.BatchRslts.WMPositionsCount; i++) for (int i = 0; i < ProcessData.BatchRslts.WMPositionsCount; i++)
{ {
// Fix for CS7036: Added the missing 'meterId' argument to the GetMeterTestRslt method call. Results.Entities.MeterTestRslt oriMeterRslt = ProcessData.BatchRslts.GetMeterTestRslt(oriTestName, i, CompoundMeterId.Single);
var q3mtr = ProcessData.BatchRslts.GetMeterTestRslt("Q3", i, CompoundMeterId.SingleOrCompound); Results.Entities.MeterTestRslt meterRslt = ProcessData.BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.Single);
double q3error = (q3mtr != null) ? q3mtr.Error : 0;
Results.Entities.MeterTestRslt oriMeterRslt = ProcessData.BatchRslts.GetMeterTestRslt(oriTestName, i, CompoundMeterId.SingleOrCompound);
Results.Entities.MeterTestRslt meterRslt = ProcessData.BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.SingleOrCompound);
/// Reference to iPerl water meter or null: /// Reference to iPerl water meter or null:
TestMethods.iPerlCommunication.iPerlHead.IperlHead iPerl = ((sensPath != null) && (sensPath.RegisterReaders != null) && (i < sensPath.RegisterReaders.Length)) TestMethods.iPerlCommunication.iPerlHead.IperlHead iPerl = ((sensPath != null) && (sensPath.RegisterReaders != null) && (i < sensPath.RegisterReaders.Length))
? (sensPath.RegisterReaders[i] as TestMethods.iPerlCommunication.iPerlHead.IperlHead) ? (sensPath.RegisterReaders[i] as TestMethods.iPerlCommunication.iPerlHead.IperlHead)
: null; : null;
if (iPerl != null && meterRslt != null && oriMeterRslt != null) if (meterRslt != null && oriMeterRslt != null)
{ {
#if ORACLE_DB #if ORACLE_DB
meterRslt.ErrorBC = oriMeterRslt.Error; meterRslt.ErrorBC = oriMeterRslt.Error;
@@ -640,27 +591,33 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
meterRslt.VolumeRef = oriMeterRslt.VolumeRef; meterRslt.VolumeRef = oriMeterRslt.VolumeRef;
meterRslt.TestTime = oriMeterRslt.TestTime; meterRslt.TestTime = oriMeterRslt.TestTime;
if (q3error * oriMeterRslt.Error < 0) if (iPerl == null || ((iPerl.Q2CorrRL == 0) && (iPerl.Q2CorrLR == 0)))
{ {
/// iPerl with Q2 correction => generate an artificial error equal to +1/10 of the original one (relative to Q2 target error) /// Either no iPerl head or no Q2 correction
meterRslt.Error = 0.1 * oriMeterRslt.Error; meterRslt.Error = oriMeterRslt.Error;
meterRslt.VolumeMeter = oriMeterRslt.VolumeMeter;
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd;
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
meterRslt.TestDone = true;
tstRslt.TestDone = true;
} }
else else
{ {
/// iPerl with Q2 correction => generate an artificial error equal to -1/10 of the original one (relative to Q2 target error) /// iPerl with Q2 correction => generate an artificial error equal to -1/10 of the original one (relative to Q2 target error)
meterRslt.Error = - 0.1 * oriMeterRslt.Error; double targetError = iPerl.CalibTargetQ2;
meterRslt.Error = targetError - 0.1 * (oriMeterRslt.Error - targetError);
meterRslt.VolumeMeter = oriMeterRslt.VolumeRef * (100.0 + meterRslt.Error) / 100.0;
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
double signature = (oriMeterRslt.VolumeEnd > oriMeterRslt.VolumeStart) ? (+1) : (-1);
meterRslt.VolumeEnd = meterRslt.VolumeStart + signature * meterRslt.VolumeMeter;
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
meterRslt.TestDone = true;
tstRslt.TestDone = true;
} }
}
meterRslt.VolumeMeter = meterRslt.VolumeRef * (100.0 + meterRslt.Error) / 100.0;
double signature = (oriMeterRslt.VolumeEnd > oriMeterRslt.VolumeStart) ? (+1) : (-1);
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
meterRslt.VolumeEnd = meterRslt.VolumeStart + signature * meterRslt.VolumeMeter;
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
meterRslt.TestDone = true;
tstRslt.TestDone = true;
}
} }
} }
@@ -746,8 +703,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw; tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
tstRslt.MassEnd = oriTestRslt.MassEnd; tstRslt.MassEnd = oriTestRslt.MassEnd;
tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater; tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater;
//tstRslt.FlowMass = oriTestRslt.FlowMass; tstRslt.Qdetected = oriTestRslt.Qdetected;
//tstRslt.FlowVolume = oriTestRslt.FlowVolume; tstRslt.Flow = oriTestRslt.Flow;
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV; tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster; tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
tstRslt.ErrorMaster = oriTestRslt.ErrorMaster; tstRslt.ErrorMaster = oriTestRslt.ErrorMaster;
@@ -795,7 +752,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
meterRslt.VolumeStart = oriMeterRslt.VolumeStart; meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd; meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd;
#if ORACLE_DB #if ORACLE_DB
if ((ProcessData.BatchRslts.Batch.WaterMeters[i].Pruefindex % 100) == 1) if (ProcessData.BatchRslts.Batch.WaterMeters[i].Pruefindex == 1)
{ {
meterRslt.Passed = (oriMeterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin() meterRslt.Passed = (oriMeterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
&& oriMeterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin()); && oriMeterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
@@ -898,8 +855,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
tstRslt.MassEndRaw = testRsltQ2ac.MassEndRaw; tstRslt.MassEndRaw = testRsltQ2ac.MassEndRaw;
tstRslt.MassEnd = testRsltQ2ac.MassEnd; tstRslt.MassEnd = testRsltQ2ac.MassEnd;
tstRslt.MassOfEvapWater = testRsltQ2ac.MassOfEvapWater; tstRslt.MassOfEvapWater = testRsltQ2ac.MassOfEvapWater;
//tstRslt.FlowMass = testRsltQ2ac.FlowMass; tstRslt.Qdetected = testRsltQ2ac.Qdetected;
//tstRslt.FlowVolume = testRsltQ2ac.FlowVolume; tstRslt.Flow = testRsltQ2ac.Flow;
tstRslt.VolumeCTV = testRsltQ2ac.VolumeCTV; tstRslt.VolumeCTV = testRsltQ2ac.VolumeCTV;
tstRslt.VolumeMaster = testRsltQ2ac.VolumeMaster; tstRslt.VolumeMaster = testRsltQ2ac.VolumeMaster;
tstRslt.ErrorMaster = testRsltQ2ac.ErrorMaster; tstRslt.ErrorMaster = testRsltQ2ac.ErrorMaster;
@@ -937,8 +894,14 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
meterRslt.TestDone = meterRsltQ2ac.TestDone; meterRslt.TestDone = meterRsltQ2ac.TestDone;
tstRslt.TestDone = true; tstRslt.TestDone = true;
if (((meterRsltQ2bc.Error < -0.51) && (meterRsltQ2ac.Error < meterRsltQ2bc.Error)) || double targetError = 0;
((meterRsltQ2bc.Error > +0.51) && (meterRsltQ2ac.Error > meterRsltQ2bc.Error))) if ((sensPath != null) && (sensPath.RegisterReaders != null) && (sensPath.RegisterReaders.Length > i) && (sensPath.RegisterReaders[i] is iPerlHead.IperlHead))
{
targetError = (sensPath.RegisterReaders[i] as iPerlHead.IperlHead).CalibTargetQ2;
}
if ((((meterRsltQ2bc.Error - targetError) < -0.51) && (meterRsltQ2ac.Error < meterRsltQ2bc.Error)) ||
(((meterRsltQ2bc.Error - targetError) > +0.51) && (meterRsltQ2ac.Error > meterRsltQ2bc.Error)))
{ {
meterRslt.Passed = false; /// Q2 correction check failed meterRslt.Passed = false; /// Q2 correction check failed
} }
@@ -2,22 +2,19 @@
/// Copyright (c) 2021 Sensus Slovensko a.s. /// Copyright (c) 2021 Sensus Slovensko a.s.
/// ///
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead; using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
using static Sensus.iPerl.NfcHandler.MCI_Protocol;
namespace TBF.Rig.TestMethods.iPerlCommunication namespace TBF.Rig.TestMethods.iPerlCommunication
{ {
public class iPerlDataWrite public class iPerlDataWrite
{ {
public MessageID MessageID; public MessageID MessageID;
public StructName StructName;
public int Offset; public int Offset;
public byte[] Data; public byte[] Data;
public string Description; public string Description;
public iPerlDataWrite(MessageID mesageID, StructName structName, int offset, byte[] data, string description) public iPerlDataWrite(MessageID mesageID, int offset, byte[] data, string description)
{ {
MessageID = mesageID; MessageID = mesageID;
StructName = structName;
Offset = offset; Offset = offset;
Data = data; Data = data;
Description = description; Description = description;
@@ -17,9 +17,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
RL, RL,
LR, LR,
Standard_incl_05, Standard_incl_05,
Standard_plus_incl_05,
Dewa_incl_05, Dewa_incl_05,
Dewa_plus_incl_05,
Greece_incl_05, Greece_incl_05,
RL_incl_05, RL_incl_05,
LR_incl_05, LR_incl_05,
@@ -104,10 +104,4 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
Flush = 0, Flush = 0,
ProcessAndSave, ProcessAndSave,
} }
public enum CommunicationInterface
{
RFID,
NFC
}
} }
@@ -9,6 +9,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
public class Factory : IComponentFactory public class Factory : IComponentFactory
{ {
public string ClassName { get { return "RegisterReader for iPerl"; } } public string ClassName { get { return "RegisterReader for iPerl"; } }
public override string ToString() { return ClassName; }
public IComponent DummyComponent() { return new IperlHead(); } public IComponent DummyComponent() { return new IperlHead(); }
@@ -2,28 +2,25 @@
/// Copyright (c) 2015-2022 Sensus Slovensko a.s. /// Copyright (c) 2015-2022 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.IO.Ports; using System.IO.Ports;
using System.Linq;
using log4net; using log4net;
using Common; using Common;
using Common.Iperl; using Common.Iperl;
using Config.Entities; using Config.Entities;
using TBF.Rig.Generic; using TBF.Rig.Generic;
using TBF.Rig.GenericDevices; using TBF.Rig.GenericDevices;
using Sensus.iPerl.NfcHandler; using TBF.Rig.Output;
using NHibernate; using TBF.Rig.Sequences;
using Renci.SshNet;
using System.Linq;
using System.Xml;
using System.Xml.Linq; // This line is correct and does not need to be changed.
using System.Windows;
namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
{ {
/// <summary> /// <summary>
/// This component = instance of this class is a placeholder for a combined main watermeter /// This component = instance of this class is a placeholder for a combined main watermeter
/// </summary> /// </summary>
public class IperlHead : ComponentBase, IDevice,IRegReaderDatastream, ISessionDataMngmnt, IOperation public class IperlHead : ComponentBase, IDevice, IRegReaderDatastream, ISessionDataMngmnt, IOperation
{ {
private static readonly ILog log = LogManager.GetLogger(typeof(IperlHead)); private static readonly ILog log = LogManager.GetLogger(typeof(IperlHead));
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); } public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
@@ -43,11 +40,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
readonly IperlHeadCfg iperlHeadCfg; readonly IperlHeadCfg iperlHeadCfg;
public int RfidComPortNr { get { return iperlHeadCfg.RfidComPortNr; } } public int RfidComPortNr { get { return iperlHeadCfg.RfidComPortNr; } }
public int OptoComPortNr { get { return iperlHeadCfg.OptoComPortNr; } }
public int MuxBoardNrOrGroup14 { get { return iperlHeadCfg.MuxBoardNr; } } public int MuxBoardNrOrGroup14 { get { return iperlHeadCfg.MuxBoardNr; } }
public int Group { get { return iperlHeadCfg.Group; } } public int Group { get { return iperlHeadCfg.Group; } }
public iPerlHead.MeterType MeterType { get { return iperlHeadCfg.MeterType; } } public iPerlHead.MeterType MeterType { get { return iperlHeadCfg.MeterType; } }
public CommunicationInterface CommInterface { get { return iperlHeadCfg.CommunicationInterface; } }
public int Position public int Position
{ {
@@ -63,9 +58,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
public double LtrsPerPulse { get { return 1 / PulsesPerLtr; } } public double LtrsPerPulse { get { return 1 / PulsesPerLtr; } }
public double CalibTarget { get { return iperlHeadCfg.ProcParams.CalibTarget; } } public double CalibTarget { get { return iperlHeadCfg.ProcParams.CalibTarget; } }
public double CalibTargetQ2 { get { return iperlHeadCfg.ProcParams.CalibTargetQ2; } }
public ushort FactorLimitLo { get { return (ushort)iperlHeadCfg.ProcParams.FactorLimitLo; } } public ushort FactorLimitLo { get { return (ushort)iperlHeadCfg.ProcParams.FactorLimitLo; } }
public ushort FactorLimitHi { get { return (ushort)iperlHeadCfg.ProcParams.FactorLimitHi; } } public ushort FactorLimitHi { get { return (ushort)iperlHeadCfg.ProcParams.FactorLimitHi; } }
public Counting InitFlowDir { get { return (iperlHeadCfg != null && iperlHeadCfg.ProcParams != null) ? iperlHeadCfg.ProcParams.Counting : Counting.Arbitrary; } } public Counting InitFlowDir { get { return (iperlHeadCfg != null && iperlHeadCfg.ProcParams != null) ? iperlHeadCfg.ProcParams.Counting : Counting.Arbitrary; } }
public int WMType_ID { get { return iperlHeadCfg.ProcParams.WMType_ID; } } /// Required by Oracle DB
/// Properties set by the Begin and the End form /// Properties set by the Begin and the End form
@@ -73,17 +70,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
{ {
get get
{ {
if (ConfigStruct != null) if (ConfigStruct != null) return ConfigStruct.GetPcbNrString();
return ConfigStruct.GetPcbNrString(); else return string.Empty;
else if (simulatedPcbNr != null)
return simulatedPcbNr;
else
return string.Empty;
}
set
{
simulatedPcbNr = value;
} }
set { }
} }
public bool Disabled; public bool Disabled;
@@ -113,8 +103,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
public CalibrationStruct CalibrationStruct; /// CalibrationStruct of WM obtained or updated by iPerlCommunication public CalibrationStruct CalibrationStruct; /// CalibrationStruct of WM obtained or updated by iPerlCommunication
public CalibrationStructV4 CalibrationStructV4; /// CalibrationStruct of WM obtained or updated by iPerlCommunication public CalibrationStructV4 CalibrationStructV4; /// CalibrationStruct of WM obtained or updated by iPerlCommunication
public Byte OrigTestModeConfig; /// Written to by StartTestingSealedMeter(), read from by EndTestingSealedMeter()
public ushort OrigCalibFactor; public ushort OrigCalibFactor;
public ushort CalibFactor public ushort CalibFactor
{ {
@@ -164,8 +152,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
public double WMVolume { get { return wmVolume; } } public double WMVolume { get { return wmVolume; } }
public double WMTestTime { get { return wmTestTime; } } public double WMTestTime { get { return wmTestTime; } }
string simulatedPcbNr = null;
int wmPulses; int wmPulses;
int wmRefPulses; int wmRefPulses;
double beginWMState; double beginWMState;
@@ -227,11 +213,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
/// <param name="nominalFlow">Nominal flow in m3/h</param> /// <param name="nominalFlow">Nominal flow in m3/h</param>
/// <param name="currentFactor">0 or the current Q2 correction factor when updating the factor</param> /// <param name="currentFactor">0 or the current Q2 correction factor when updating the factor</param>
/// <returns>Calculated Q2 correction factor</returns> /// <returns>Calculated Q2 correction factor</returns>
public double CalculateQ2CorrectionFactor(Results.Entities.MeterTestRslt currentQ2Result, int currentFactor, double nominalFlow, double errorTarget = 0) public double CalculateQ2CorrectionFactor(Results.Entities.MeterTestRslt q2adjResult, double calibTarget, double nominalFlow, int currentFactor = 0)
{ {
double nominalTestFlowLph = Units.ConvertTo(Unit.lph, nominalFlow); double nominalTestFlowLph = Units.ConvertTo(Common.Unit.lph, nominalFlow);
double volumeRefShiftedToTarget = currentQ2Result.VolumeRef * (1.0 + errorTarget / 100.0); double volumeRefShiftedToTarget = q2adjResult.VolumeRef * (1.0 + calibTarget / 100.0);
double q2adjErrorShiftedToTarget = Config.Formulas.ErrorFromVolumes(currentQ2Result.VolumeMeter, volumeRefShiftedToTarget); double q2adjErrorShiftedToTarget = Formulas.ErrorFromVolumes(q2adjResult.VolumeMeter, volumeRefShiftedToTarget);
double A = 16.0 / ScalingFactor(); /// Raw units per ml: DN15=16, DN20=8, DN25=4, DN32=2, DN40=1 double A = 16.0 / ScalingFactor(); /// Raw units per ml: DN15=16, DN20=8, DN25=4, DN32=2, DN40=1
const double B = 8.0; /// Raw units per minute, 8 const double B = 8.0; /// Raw units per minute, 8
@@ -240,16 +226,14 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
double F = D / (nominalTestFlowLph * 10.0); /// Error corrected with 8 Raw Units per minute [%] double F = D / (nominalTestFlowLph * 10.0); /// Error corrected with 8 Raw Units per minute [%]
double G = F / B; /// Error corrected with 1 Raw Unit per minute [%] double G = F / B; /// Error corrected with 1 Raw Unit per minute [%]
/// Do not change the factor for an invalid measurement (q2adjResult.VolumeMeter == 0) double q2CorrectionFactor = Convert.ToDouble(currentFactor)
double q2CorrectionFactor = (Math.Abs(currentQ2Result.VolumeMeter) <= float.Epsilon) ? Convert.ToDouble(currentFactor) : - (q2adjErrorShiftedToTarget / G) * (volumeRefShiftedToTarget / q2adjResult.VolumeMeter);
Convert.ToDouble(currentFactor) - (q2adjErrorShiftedToTarget / G) * (volumeRefShiftedToTarget / currentQ2Result.VolumeMeter);
log.WarnFormat("CalculateQ2CorrectionFactor() : Pos={0}, PCB#={1}, Error={2}%, Target={3}%, Current factor={4} New factor={5}", log.WarnFormat("CalculateQ2CorrectionFactor() : Pos={0}, PCB#={1}, Error={2}%, CalTarget={3}%, Q2CorrFactor={4}",
Name, Name,
SerialNr, SerialNr,
currentQ2Result.Error.ToString("F2"), q2adjResult.Error.ToString("F2"),
errorTarget.ToString("F3"), calibTarget.ToString("F1"),
currentFactor.ToString("F1"),
q2CorrectionFactor.ToString("F1")); q2CorrectionFactor.ToString("F1"));
return q2CorrectionFactor; return q2CorrectionFactor;
@@ -299,11 +283,12 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
/// </summary> /// </summary>
/// <param name="test">Currently executed test</param> /// <param name="test">Currently executed test</param>
/// <param name="repetitionNr">Currently executed repetition number</param> /// <param name="repetitionNr">Currently executed repetition number</param>
public void TestIsGoingToStartSoon(Test _test, int _repetitionNr) public void TestIsGoingToStartSoon(Test test, int repetitionNr)
{ {
/// Store/update values to be used as a part of the opto-data log file name /// Store/update values to be used as a part of the opto-data log file name
this.test = _test; testName = test.Name;
this.repetitionNr = _repetitionNr; testRepeats = test.Repeats;
this.repetitionNr = repetitionNr;
if (IsDataStreamProcessing()) if (IsDataStreamProcessing())
{ {
@@ -339,7 +324,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
} }
} }
/// ///
Test test; string testName;
int testRepeats;
int repetitionNr; int repetitionNr;
@@ -434,26 +420,20 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
synchronized = false; synchronized = false;
synchronized2 = false; synchronized2 = false;
partOfTelegram = string.Empty; partOfTelegram = string.Empty;
optoSerialPort = null;
if (DebugLevel == DebugMode.Normal) if (DebugLevel == DebugMode.Normal)
{ {
/// Open serial port: 9600 Bd, 8 data bits, 1 stop bit, no parity /// Open serial port: 9600 Bd, 8 data bits, 1 stop bit, no parity
/// Check whether head is connected, working string portName = string.Format("COM{0}", iperlHeadCfg.OptoComPortNr);
try optoSerialPort = new SerialPort(portName, 9600, Parity.None, 8, StopBits.One);
{ optoSerialPort.Handshake = Handshake.None;
OpenOptoSerialPort($"COM{iperlHeadCfg.OptoComPortNr}", 9600, Parity.None, 8, StopBits.One, Handshake.None); optoSerialPort.Open();
CloseOptoSerialPort(); log.FatalFormat("{0} initialized: {1}", Name, this);
log.FatalFormat($"{Name} initialized: {this}");
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
} }
else else
{ {
log.FatalFormat($"{Name} simulated: {this}"); optoSerialPort = null;
log.FatalFormat("{0} simulated: {1}", Name, this);
} }
} }
@@ -471,8 +451,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
CalibrationStruct = null; CalibrationStruct = null;
CalibrationStructV4 = null; CalibrationStructV4 = null;
OrigTestModeConfig = 0;
LastTestResult = null; LastTestResult = null;
LastTestResult2 = null; LastTestResult2 = null;
@@ -482,8 +460,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
Q2CorrRL = 0; Q2CorrRL = 0;
Q2CorrLR = 0; Q2CorrLR = 0;
simulatedPcbNr = null;
dataStreamState = DataStreamState.Flush; dataStreamState = DataStreamState.Flush;
currentFlowDir = InitFlowDir; currentFlowDir = InitFlowDir;
@@ -559,9 +535,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
{ {
try try
{ {
if (optoSerialPort != null) if (DebugLevel == DebugMode.Normal && optoSerialPort != null)
{ {
CloseOptoSerialPort(); optoSerialPort.Close();
optoSerialPort = null;
} }
} }
catch catch
@@ -575,7 +552,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
/// Events: Event.ReadRegisterDone, Event.Error /// Events: Event.ReadRegisterDone, Event.Error
/// </summary> /// </summary>
/// <returns>ReadWaterMeter instance reference casted to IOperaton</returns> /// <returns>ReadWaterMeter instance reference casted to IOperaton</returns>
public IOperation ReadRegisterOp() public IOperation ReadDatastreamOp()
{ {
return this; return this;
} }
@@ -679,26 +656,20 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
// //
// log.DebugFormat("Feature vector calculation end, save opto-file start: {0:HH:mm:ss.fff}", DateTime.Now); // log.DebugFormat("Feature vector calculation end, save opto-file start: {0:HH:mm:ss.fff}", DateTime.Now);
#if ORACLE_DB string relativeDirectory = Path.Combine(StateMachine.CycleStartTimeStamp.ToString("yy"),
if (test.RawDataId + (test.Repeats - repetitionNr) * test.RawDataIdRepetMulti != 0) StateMachine.CycleStartTimeStamp.ToString("MM"),
StateMachine.CycleStartTimeStamp.ToString("dd"));
string directory = Path.Combine(OptoDataDirectory, relativeDirectory);
string fileName = DetermineExtraDataFileName();
if (!string.IsNullOrEmpty(fileName))
{ {
string relativeDirectory = Path.Combine(StateMachine.CycleStartTimeStamp.ToString("yy"), if (SaveOptoDataToFile(directory, fileName))
StateMachine.CycleStartTimeStamp.ToString("MM"),
StateMachine.CycleStartTimeStamp.ToString("dd"));
string fileName = DetermineExtraDataFileName();
if (SaveOptoDataToFile(Path.Combine(OptoDataDirectory, relativeDirectory), fileName))
{ {
extraDataPath = Path.Combine(relativeDirectory, fileName); extraDataPath = Path.Combine(relativeDirectory, fileName);
} }
}
log.WarnFormat("IperlHead.Stop() startIx={0} endIx={1} len={2} raw data file = {3}", log.WarnFormat("IperlHeadd.Stop() startIx={0} endIx={1} optoData.Len={2} filename={3}", startIx, endIx, optoData.Length, !string.IsNullOrEmpty(fileName) ? fileName : "<null>");
startIx, endIx, optoData.Length, fileName);
}
else
#endif
{
log.WarnFormat("IperlHead.Stop() startIx={0} endIx={1} len={2} no raw data file", startIx, endIx, optoData.Length);
}
if (TestStartTelegramIx == 0 || optoDataCount < 100) if (TestStartTelegramIx == 0 || optoDataCount < 100)
{ {
@@ -765,27 +736,36 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
string DetermineExtraDataFileName() string DetermineExtraDataFileName()
{ {
/// ///
/// Get required pieces of information /// Select or create appropriate test infos
///
Results.Output.SensusTestInfo[] testInfos = Sequences.ProcessData.CompleteTestInfos;
///
if ((ProcessData.OracleDB != null && ProcessData.OracleDB.DesigMode == Output.DB.SensusOracle.DesigMode.Based_on_procedure) ||
(testInfos == null && StateMachine.Procedure != null))
{
testInfos = Results.Output.SensusTestInfo.CreateFromProcedure(StateMachine.Procedure);
}
///
/// Select or create appropriate 'qBezeichnung'
///
string fullTestName = Results.Utils.GetTestName(testName, testRepeats, repetitionNr);
var ti = testInfos.FirstOrDefault(x => x.PruefungsNrOpto != 0 && x.TestName == fullTestName);
string qBezeichnung = (ti == null) ? fullTestName /// No appropriate TestInfo found => set default opto data file name
: string.IsNullOrEmpty(ti.QBezeichnungOpto) ? ti.PruefungsNrOpto.ToString("D2")
: ti.QBezeichnungOpto;
///
/// Get other required pieces of information
/// ///
string pcbNr = (ConfigStruct != null) ? ConfigStruct.GetPcbNrString() : "UnknownPcbNr"; string pcbNr = (ConfigStruct != null) ? ConfigStruct.GetPcbNrString() : "UnknownPcbNr";
string wmPosition = Name.Substring(5); /// WMPosition is extracted from a component name in form 'iPerl#' string wmPosition = Name.Substring(5); /// WMPosition is extracted from a component name in form 'iPerl#'
if (wmPosition.Length == 1) wmPosition = "0" + wmPosition; if (wmPosition.Length == 1) wmPosition = "0" + wmPosition;
string cycleStartTime = StateMachine.CycleStartTimeStamp.ToString("HH_mm_ss"); string cycleStartTime = StateMachine.CycleStartTimeStamp.ToString("HH_mm_ss");
#if ORACLE_DB
string[] designations = string.IsNullOrEmpty(test.RawDataDesignation) ? new string[0] : test.RawDataDesignation.Split(new char[] { '~' });
int testId = test.RawDataId + (test.Repeats - repetitionNr) * test.RawDataIdRepetMulti;
string designation = string.IsNullOrEmpty(test.RawDataDesignation)
? testId.ToString(testId > 0 ? "D2" : "D1") /// Name is generated from Id
: (designations.Length > repetitionNr - 1) ? designations[repetitionNr - 1] /// Name is from 'RawDataDesignation' parameter
: string.Format("{0}-{1}", designations[0], repetitionNr); /// Name is form test name and repetition nr.
#else
int testId = 0;
string designation = (test.Repeats == 1) ? test.Name : string.Format("{0}-{1}", test.Name, repetitionNr);
#endif
/// ///
/// Return the file name /// Return the file name
/// ///
return string.Format("{0}_{1}_{2}_{3}.txt", pcbNr, wmPosition, designation, cycleStartTime); return string.Format("{0}_{1}_{2}_{3}.txt", pcbNr, wmPosition, qBezeichnung, cycleStartTime);
} }
@@ -795,7 +775,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
bool SaveOptoDataToFile(string directory, string fileName) bool SaveOptoDataToFile(string directory, string fileName)
{ {
string fullFileName = Path.Combine(directory, fileName); string fullFileName = Path.Combine(directory, fileName);
log.WarnFormat("Saving {0} raw data to {1}", Name, fullFileName); log.WarnFormat("Saving {0} opto data to {1}", Name, fullFileName);
try try
{ {
@@ -860,42 +840,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
wmTestTime = timestampSec - timestampSec0; wmTestTime = timestampSec - timestampSec0;
} }
private void OpenOptoSerialPort(string comPort, int baudRate, Parity parity, int dataBits, StopBits stopBit, Handshake handshake)
{
if (DebugLevel == DebugMode.FailureDuringOperation) DebugLevel = DebugMode.Normal;
if (DebugLevel == DebugMode.Normal)
{
/// Open serial port: 9600 Bd, 8 data bits, 1 stop bit, no parity
try
{
CloseOptoSerialPort();
optoSerialPort = new SerialPort(comPort, baudRate, parity, dataBits, stopBit);
optoSerialPort.Handshake = handshake;
optoSerialPort.Open();
log.FatalFormat($"{Name} OptoPort opened: {this}");
}
catch (Exception ex)
{
log.FatalFormat($"{Name} OptoPort - error opening port: {this}" + Environment.NewLine + ex.Message);
throw ex;
}
}
else
{
optoSerialPort = null;
log.FatalFormat($"{Name} OproPort simulated: {this}");
}
}
private void CloseOptoSerialPort()
{
if (optoSerialPort != null)
{
optoSerialPort.Close();
optoSerialPort = null;
log.FatalFormat($"{Name} OptoPort closed: {this}");
}
}
DataStreamState dataStreamState; DataStreamState dataStreamState;
@@ -904,13 +848,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
/// </summary> /// </summary>
public void StartDataStreamProcessing() public void StartDataStreamProcessing()
{ {
try
{
OpenOptoSerialPort($"COM{iperlHeadCfg.OptoComPortNr}", 9600, Parity.None, 8, StopBits.One, Handshake.None);
}
catch (Exception)
{
}
/// Reset opto-data, etc. /// Reset opto-data, etc.
optoDataCount = 0; optoDataCount = 0;
timeFromStart = 0; timeFromStart = 0;
@@ -941,21 +878,20 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
/// <summary> /// <summary>
/// Stop processing and saving datastream data /// Stop processing and saving datastream data
/// </summary> /// </summary>
public void StopDataStreamProcessing() void StopDataStreamProcessing()
{ {
dataStreamState = DataStreamState.Flush; dataStreamState = DataStreamState.Flush;
CloseOptoSerialPort();
} }
/// ///
/// Variables storing the context of serial port data parsing (ReadOptoSerialPort(...)) /// Variables storing the context of serial port data parsing (ReadOptoSerialPort(...))
/// ///
bool synchronized; bool synchronized;
bool synchronized2; bool synchronized2;
string partOfTelegram; string partOfTelegram;
/// <summary> /// <summary>
/// Reads opto-datastream via serial port. Invoked from RunDeviceBefore() /// Reads opto-datastream via serual port. Invoked from RunDeviceBefore()
/// ///
/// Telegram description: /// Telegram description:
/// AAAAAA[tab]BBBB[tab]CCCC[tab]DDDDDD[tab]EEEE[tab]FFFFFFFF[tab]GG[cr][lf] (42 bytes) /// AAAAAA[tab]BBBB[tab]CCCC[tab]DDDDDD[tab]EEEE[tab]FFFFFFFF[tab]GG[cr][lf] (42 bytes)
@@ -967,7 +903,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
/// <param name="optoState">OptoState.Read or OptoState.Flush</param> /// <param name="optoState">OptoState.Read or OptoState.Flush</param>
void ReadOptoData(DataStreamState optoState) void ReadOptoData(DataStreamState optoState)
{ {
if (optoSerialPort is null) return;
lock (this) lock (this)
{ {
int nrBytes = optoSerialPort.BytesToRead; int nrBytes = optoSerialPort.BytesToRead;
@@ -1014,7 +949,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
{ {
/// CR+LF was found && (pos >= OptoTelegramRaw.Length - 2) && the telegram is OK /// CR+LF was found && (pos >= OptoTelegramRaw.Length - 2) && the telegram is OK
flowDirectionDetection.WriteToFifo(volumeRawExtLast, timestampExtLast); flowDirectionDetection.WriteToFifo(volumeRawExtLast, timestampExtLast);
OptoTelegramReceived(optoDataCount, synchronized2, volumeRawExtLast, timestampExtLast); OptoTelegramRreceived(optoDataCount, synchronized2, volumeRawExtLast, timestampExtLast);
synchronized2 = synchronized; synchronized2 = synchronized;
allRcvd = allRcvd.Substring(pos + 2); allRcvd = allRcvd.Substring(pos + 2);
} }
@@ -1063,25 +998,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
} }
} }
public string ReadOptoData()
{
if (optoSerialPort is null) return "";
string received = ".";
lock (this)
{
int nrBytes = optoSerialPort.BytesToRead;
if (nrBytes > 0)
{
char[] buffer = new char[nrBytes];
optoSerialPort.Read(buffer, 0, nrBytes);
received = new string(buffer);
}
}
return received;
}
void OptoTelegramRreceived(int currentIx, bool async, Int64 volumeRawExt, Int64 timestampRawExt)
void OptoTelegramReceived(int currentIx, bool async, Int64 volumeRawExt, Int64 timestampRawExt)
{ {
currentTelegramIx = currentIx; currentTelegramIx = currentIx;
@@ -1111,7 +1029,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
/// <summary> /// <summary>
///
/// Called from the state machine when a test is selected and UI needs to be updated. /// Called from the state machine when a test is selected and UI needs to be updated.
/// </summary> /// </summary>
public void OnOptoReceived(object sender, OptoReceivedEventArgs args) public void OnOptoReceived(object sender, OptoReceivedEventArgs args)
@@ -1409,72 +1326,5 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
if (reader.ReadBoolean()) (LastTestResult = new Results.Entities.MeterTestRslt()).ReadBinary(reader, null); if (reader.ReadBoolean()) (LastTestResult = new Results.Entities.MeterTestRslt()).ReadBinary(reader, null);
if (reader.ReadBoolean()) (LastTestResult2 = new Results.Entities.MeterTestRslt()).ReadBinary(reader, null); if (reader.ReadBoolean()) (LastTestResult2 = new Results.Entities.MeterTestRslt()).ReadBinary(reader, null);
} }
internal void ResetNfcInterface(bool? nfc_on = null)
{
if (iperlHeadCfg.HeadCommunicationComPortNr == 0) return;
SERIAL_Driver _SERIAL_Driver_Head_Config = new SERIAL_Driver();
_SERIAL_Driver_Head_Config.OpenConnection($"COM{iperlHeadCfg.HeadCommunicationComPortNr}", 9600, 8, Parity.None, StopBits.One);
NFCHeadConfig _NFCHead_Config = new NFCHeadConfig(_SERIAL_Driver_Head_Config);
if (nfc_on == null || nfc_on == false) _NFCHead_Config.NFCHeadConfig_SetInterface(false); // set RFID interface
if (nfc_on == null || nfc_on == true ) _NFCHead_Config.NFCHeadConfig_SetInterface(true); // set NFC interface
_SERIAL_Driver_Head_Config.Close();
_SERIAL_Driver_Head_Config.Dispose();
}
internal void SetNfcInterface()
{
ResetNfcInterface(true);
}
internal void SetRfidInterface()
{
ResetNfcInterface(false);
}
internal void SetCommunicationInterface(CommunicationInterface commInterface)
{
//using (ISession session = TBF.DB.ConfigDBSessionFactory.OpenSession())
// Replace the problematic line with the following code to fix the error:
using (ISession session = TBF.DB.SessionFactories[(int)DBKind.Config].OpenSession())
using (ITransaction tx = session.BeginTransaction())
{
try
{
var cmpntEntities = session.QueryOver<Component>()
.OrderBy(x => x.ItemNr).Asc
.List<Component>();
var cmpnt = cmpntEntities.Where(x => x.Name == Name).First();
if (cmpnt != null)
{
XDocument doc = XDocument.Parse(cmpnt.Parameters);
if (doc != null)
{
XElement element = doc.Root.Element("CommunicationInterface");
if (element != null)
{
element.Value = commInterface.ToString();
cmpnt.Parameters = doc.ToString();
session.SaveOrUpdate(cmpnt);
tx.Commit();
log.FatalFormat($"Set CommunicationInterface {Name} to {commInterface.ToString()}");
}
}
}
}
catch (Exception ex)
{
if (tx != null) tx.Rollback();
log.FatalFormat($"Set CommunicationInterface {Name} error: {ex.Message}");
}
}
}
public IOperation ReadDatastreamOp()
{
return this;
}
} }
} }
@@ -21,12 +21,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
public bool UseTcpIP; public bool UseTcpIP;
public string OptoIPAddress; public string OptoIPAddress;
public ushort OptoTcpipPortNr; public ushort OptoTcpipPortNr;
public int HeadCommunicationComPortNr;
public int OptoComPortNr; public int OptoComPortNr;
public int RfidComPortNr; /// 0 = use MuxBoardNr public int RfidComPortNr; /// 0 = use MuxBoardNr
public int MuxBoardNr; /// 0 = use RfidComPort(Nr), otherwise mux. board nr. 1 .. 4 public int MuxBoardNr; /// 0 = use RfidComPort(Nr), otherwise mux. board nr. 1 .. 4
public int Group; /// Number written to QuidoRS to connct the watermeter to RfidComPort, 1 .. 10 public int Group; /// Number written to QuidoRS to connct the watermeter to RfidComPort, 1 .. 10
public CommunicationInterface CommunicationInterface; /// Communication Interface: RFID or NFC
/// <summary> Procedure parameters </summary> /// <summary> Procedure parameters </summary>
[XmlIgnore] [XmlIgnore]
@@ -47,8 +45,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
RfidComPortNr = 0; /// = use mux. board RfidComPortNr = 0; /// = use mux. board
MuxBoardNr = 1; MuxBoardNr = 1;
ProcParams = CreateProcParamsProvider() as ProcParams; ProcParams = CreateProcParamsProvider() as ProcParams;
CommunicationInterface = CommunicationInterface.RFID;
HeadCommunicationComPortNr = 0;
} }
public IperlHeadCfg(IComponentFactory factory) public IperlHeadCfg(IComponentFactory factory)
@@ -59,7 +55,12 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
public string ToString(int i) public string ToString(int i)
{ {
return $"{Name} Group1 (mux#)={MuxBoardNr}, Group2={Group}, Opto=Com{OptoComPortNr}, {CommunicationInterface}=Com{RfidComPortNr}"; return string.Format("{0} Group1 (mux#)={1}, Group2={2}, Opto=Com{3}, RFID=Com{4}",
Name,
MuxBoardNr,
Group,
OptoComPortNr,
RfidComPortNr);
} }
} }
} }
@@ -3,14 +3,16 @@
/// ///
using System; using System;
using System.Net; using System.Net;
using System.Net.Sockets;
using System.Windows.Forms; using System.Windows.Forms;
using Common; using Common;
using Config.Entities;
using TBF.Rig.Generic; using TBF.Rig.Generic;
using TBF.Resources; using TBF.Resources;
namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
{ {
public partial class IperlHeadCfgCtrl : UserControl, IComponentCfgCtrl public partial class IperlHeadCfgCtrl : UserControl, IComponentCfgCtrl
{ {
public bool ShowMore { get { return false; } } public bool ShowMore { get { return false; } }
@@ -49,14 +51,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
radioButton2.Checked = !config.UseTcpIP; radioButton2.Checked = !config.UseTcpIP;
ipAddressTextBox.Text = (config.OptoIPAddress != null) ? config.OptoIPAddress : "0.0.0.0"; ipAddressTextBox.Text = (config.OptoIPAddress != null) ? config.OptoIPAddress : "0.0.0.0";
tcpipPortTextBox.Text = config.OptoTcpipPortNr.ToString(); tcpipPortTextBox.Text = config.OptoTcpipPortNr.ToString();
headPortNrTextBox.Text = config.HeadCommunicationComPortNr.ToString();
optoSerialPortTextBox.Text = config.OptoComPortNr.ToString(); optoSerialPortTextBox.Text = config.OptoComPortNr.ToString();
rfidPortNrTextBox.Text = config.RfidComPortNr.ToString(); rfidPortNrTextBox.Text = config.RfidComPortNr.ToString();
muxBoardNrTextBox.Text = config.MuxBoardNr.ToString(); muxBoardNrTextBox.Text = config.MuxBoardNr.ToString();
groupTextBox.Text = config.Group.ToString(); groupTextBox.Text = config.Group.ToString();
comboBoxCommunicationInterface.SelectedItem = config.CommunicationInterface.ToString(); }
tabPage2.Controls.Add(new IperlHeadTestCtrl(config));
}
public void Unlock() public void Unlock()
{ {
@@ -67,10 +66,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
tcpipPortTextBox.Enabled = true; tcpipPortTextBox.Enabled = true;
optoSerialPortTextBox.Enabled = true; optoSerialPortTextBox.Enabled = true;
rfidPortNrTextBox.Enabled = true; rfidPortNrTextBox.Enabled = true;
headPortNrTextBox.Enabled = true;
muxBoardNrTextBox.Enabled = true; muxBoardNrTextBox.Enabled = true;
groupTextBox.Enabled = true; groupTextBox.Enabled = true;
comboBoxCommunicationInterface.Enabled = true;
} }
public CfgUpdateFlags VerifyCfg(ref string message) public CfgUpdateFlags VerifyCfg(ref string message)
@@ -109,12 +106,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
message += Environment.NewLine + "'RFID serial port nr.' is not valid"; message += Environment.NewLine + "'RFID serial port nr.' is not valid";
} }
if (!int.TryParse(headPortNrTextBox.Text, out dummy) || dummy < 0 || dummy > 999)
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Head communication serial port nr.' is not valid";
}
if (!int.TryParse(muxBoardNrTextBox.Text, out dummy) || dummy < 1 || dummy > 4) if (!int.TryParse(muxBoardNrTextBox.Text, out dummy) || dummy < 1 || dummy > 4)
{ {
flags |= CfgUpdateFlags.Error; flags |= CfgUpdateFlags.Error;
@@ -153,10 +144,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
config.RfidComPortNr = int.Parse(rfidPortNrTextBox.Text); config.RfidComPortNr = int.Parse(rfidPortNrTextBox.Text);
config.MuxBoardNr = int.Parse(muxBoardNrTextBox.Text); config.MuxBoardNr = int.Parse(muxBoardNrTextBox.Text);
config.Group = int.Parse(groupTextBox.Text); config.Group = int.Parse(groupTextBox.Text);
config.CommunicationInterface = (CommunicationInterface)comboBoxCommunicationInterface.SelectedIndex;
config.HeadCommunicationComPortNr = int.Parse(headPortNrTextBox.Text);
return flags; return flags;
} }
} }
} }
@@ -31,150 +31,149 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.tabControl1 = new System.Windows.Forms.TabControl(); this.nameTextBox = new System.Windows.Forms.TextBox();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.nameLabel = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.classNameLabel = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.optoSerialPortTextBox = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.optoSerialPortLabel = new System.Windows.Forms.Label();
this.comboBoxCommunicationInterface = new System.Windows.Forms.ComboBox(); this.muxBoardNrTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.muxBoardNrLabel = new System.Windows.Forms.Label();
this.groupTextBox = new System.Windows.Forms.TextBox();
this.groupLabel = new System.Windows.Forms.Label();
this.rfidPortNrTextBox = new System.Windows.Forms.TextBox(); this.rfidPortNrTextBox = new System.Windows.Forms.TextBox();
this.rfidSerialPortNrLabel = new System.Windows.Forms.Label(); this.rfidSerialPortNrLabel = new System.Windows.Forms.Label();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.optoDataGroupBox = new System.Windows.Forms.GroupBox(); this.optoDataGroupBox = new System.Windows.Forms.GroupBox();
this.tcpipPortLabel = new System.Windows.Forms.Label(); this.tcpipPortLabel = new System.Windows.Forms.Label();
this.tcpipPortTextBox = new System.Windows.Forms.TextBox(); this.tcpipPortTextBox = new System.Windows.Forms.TextBox();
this.ipAddressLabel = new System.Windows.Forms.Label(); this.ipAddressLabel = new System.Windows.Forms.Label();
this.ipAddressTextBox = new System.Windows.Forms.TextBox(); this.ipAddressTextBox = new System.Windows.Forms.TextBox();
this.radioButton1 = new System.Windows.Forms.RadioButton(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.radioButton2 = new System.Windows.Forms.RadioButton(); this.label3 = new System.Windows.Forms.Label();
this.optoSerialPortLabel = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.optoSerialPortTextBox = new System.Windows.Forms.TextBox();
this.groupTextBox = new System.Windows.Forms.TextBox();
this.groupLabel = new System.Windows.Forms.Label();
this.muxBoardNrTextBox = new System.Windows.Forms.TextBox();
this.muxBoardNrLabel = new System.Windows.Forms.Label();
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.headPortNrTextBox = new System.Windows.Forms.TextBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.optoDataGroupBox.SuspendLayout(); this.optoDataGroupBox.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tabControl1 // nameTextBox
// //
this.tabControl1.Controls.Add(this.tabPage1); this.nameTextBox.Enabled = false;
this.tabControl1.Controls.Add(this.tabPage2); this.nameTextBox.Location = new System.Drawing.Point(135, 40);
this.tabControl1.Location = new System.Drawing.Point(3, 3); this.nameTextBox.Name = "nameTextBox";
this.tabControl1.Name = "tabControl1"; this.nameTextBox.Size = new System.Drawing.Size(121, 20);
this.tabControl1.SelectedIndex = 0; this.nameTextBox.TabIndex = 2;
this.tabControl1.Size = new System.Drawing.Size(611, 432);
this.tabControl1.TabIndex = 0;
// //
// tabPage1 // nameLabel
// //
this.tabPage1.Controls.Add(this.groupBox2); this.nameLabel.AutoSize = true;
this.tabPage1.Controls.Add(this.label4); this.nameLabel.Location = new System.Drawing.Point(25, 43);
this.tabPage1.Controls.Add(this.label3); this.nameLabel.Name = "nameLabel";
this.tabPage1.Controls.Add(this.groupBox1); this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.tabPage1.Controls.Add(this.optoDataGroupBox); this.nameLabel.TabIndex = 1;
this.tabPage1.Controls.Add(this.groupTextBox); this.nameLabel.Text = "Name";
this.tabPage1.Controls.Add(this.groupLabel);
this.tabPage1.Controls.Add(this.muxBoardNrTextBox);
this.tabPage1.Controls.Add(this.muxBoardNrLabel);
this.tabPage1.Controls.Add(this.nameTextBox);
this.tabPage1.Controls.Add(this.nameLabel);
this.tabPage1.Controls.Add(this.classNameLabel);
this.tabPage1.Location = new System.Drawing.Point(4, 25);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(603, 403);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Config";
this.tabPage1.UseVisualStyleBackColor = true;
// //
// label4 // classNameLabel
// //
this.label4.AutoSize = true; this.classNameLabel.AutoSize = true;
this.label4.Location = new System.Drawing.Point(208, 101); this.classNameLabel.Location = new System.Drawing.Point(132, 16);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.classNameLabel.Name = "classNameLabel";
this.label4.Name = "label4"; this.classNameLabel.Size = new System.Drawing.Size(60, 13);
this.label4.Size = new System.Drawing.Size(40, 16); this.classNameLabel.TabIndex = 0;
this.label4.TabIndex = 25; this.classNameLabel.Text = "ClassName";
this.label4.Text = "1 .. 10";
// //
// label3 // optoSerialPortTextBox
// //
this.label3.AutoSize = true; this.optoSerialPortTextBox.Enabled = false;
this.label3.Location = new System.Drawing.Point(208, 72); this.optoSerialPortTextBox.Location = new System.Drawing.Point(329, 42);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.optoSerialPortTextBox.Name = "optoSerialPortTextBox";
this.label3.Name = "label3"; this.optoSerialPortTextBox.Size = new System.Drawing.Size(34, 20);
this.label3.Size = new System.Drawing.Size(33, 16); this.optoSerialPortTextBox.TabIndex = 7;
this.label3.TabIndex = 24;
this.label3.Text = "1 .. 4";
// //
// groupBox1 // optoSerialPortLabel
// //
this.groupBox1.Controls.Add(this.comboBoxCommunicationInterface); this.optoSerialPortLabel.AutoSize = true;
this.groupBox1.Controls.Add(this.label1); this.optoSerialPortLabel.Location = new System.Drawing.Point(241, 45);
this.groupBox1.Controls.Add(this.rfidPortNrTextBox); this.optoSerialPortLabel.Name = "optoSerialPortLabel";
this.groupBox1.Controls.Add(this.rfidSerialPortNrLabel); this.optoSerialPortLabel.Size = new System.Drawing.Size(72, 13);
this.groupBox1.Location = new System.Drawing.Point(10, 259); this.optoSerialPortLabel.TabIndex = 6;
this.groupBox1.Margin = new System.Windows.Forms.Padding(4); this.optoSerialPortLabel.Text = "Serial port nr.:";
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
this.groupBox1.Size = new System.Drawing.Size(552, 68);
this.groupBox1.TabIndex = 23;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "RFID / NFC communication (in case mux. board is not used)";
// //
// comboBoxCommunicationInterface // muxBoardNrTextBox
// //
this.comboBoxCommunicationInterface.Enabled = false; this.muxBoardNrTextBox.Enabled = false;
this.comboBoxCommunicationInterface.FormattingEnabled = true; this.muxBoardNrTextBox.Location = new System.Drawing.Point(135, 63);
this.comboBoxCommunicationInterface.Items.AddRange(new object[] { this.muxBoardNrTextBox.Name = "muxBoardNrTextBox";
"RFID", this.muxBoardNrTextBox.Size = new System.Drawing.Size(34, 20);
"NFC"}); this.muxBoardNrTextBox.TabIndex = 9;
this.comboBoxCommunicationInterface.Location = new System.Drawing.Point(201, 27);
this.comboBoxCommunicationInterface.Name = "comboBoxCommunicationInterface";
this.comboBoxCommunicationInterface.Size = new System.Drawing.Size(71, 24);
this.comboBoxCommunicationInterface.TabIndex = 9;
// //
// label1 // muxBoardNrLabel
// //
this.label1.AutoSize = true; this.muxBoardNrLabel.AutoSize = true;
this.label1.Location = new System.Drawing.Point(41, 30); this.muxBoardNrLabel.Location = new System.Drawing.Point(25, 66);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.muxBoardNrLabel.Name = "muxBoardNrLabel";
this.label1.Name = "label1"; this.muxBoardNrLabel.Size = new System.Drawing.Size(106, 13);
this.label1.Size = new System.Drawing.Size(153, 16); this.muxBoardNrLabel.TabIndex = 8;
this.label1.TabIndex = 8; this.muxBoardNrLabel.Text = "Group 1 (mux. board)";
this.label1.Text = "Communication Interface"; //
// groupTextBox
//
this.groupTextBox.Enabled = false;
this.groupTextBox.Location = new System.Drawing.Point(135, 86);
this.groupTextBox.Name = "groupTextBox";
this.groupTextBox.Size = new System.Drawing.Size(34, 20);
this.groupTextBox.TabIndex = 11;
//
// groupLabel
//
this.groupLabel.AutoSize = true;
this.groupLabel.Location = new System.Drawing.Point(25, 89);
this.groupLabel.Name = "groupLabel";
this.groupLabel.Size = new System.Drawing.Size(45, 13);
this.groupLabel.TabIndex = 10;
this.groupLabel.Text = "Group 2";
// //
// rfidPortNrTextBox // rfidPortNrTextBox
// //
this.rfidPortNrTextBox.Enabled = false; this.rfidPortNrTextBox.Enabled = false;
this.rfidPortNrTextBox.Location = new System.Drawing.Point(439, 26); this.rfidPortNrTextBox.Location = new System.Drawing.Point(329, 21);
this.rfidPortNrTextBox.Margin = new System.Windows.Forms.Padding(4);
this.rfidPortNrTextBox.Name = "rfidPortNrTextBox"; this.rfidPortNrTextBox.Name = "rfidPortNrTextBox";
this.rfidPortNrTextBox.Size = new System.Drawing.Size(44, 22); this.rfidPortNrTextBox.Size = new System.Drawing.Size(34, 20);
this.rfidPortNrTextBox.TabIndex = 7; this.rfidPortNrTextBox.TabIndex = 7;
// //
// rfidSerialPortNrLabel // rfidSerialPortNrLabel
// //
this.rfidSerialPortNrLabel.AutoSize = true; this.rfidSerialPortNrLabel.AutoSize = true;
this.rfidSerialPortNrLabel.Location = new System.Drawing.Point(321, 30); this.rfidSerialPortNrLabel.Location = new System.Drawing.Point(241, 24);
this.rfidSerialPortNrLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.rfidSerialPortNrLabel.Name = "rfidSerialPortNrLabel"; this.rfidSerialPortNrLabel.Name = "rfidSerialPortNrLabel";
this.rfidSerialPortNrLabel.Size = new System.Drawing.Size(88, 16); this.rfidSerialPortNrLabel.Size = new System.Drawing.Size(72, 13);
this.rfidSerialPortNrLabel.TabIndex = 6; this.rfidSerialPortNrLabel.TabIndex = 6;
this.rfidSerialPortNrLabel.Text = "Serial port nr.:"; this.rfidSerialPortNrLabel.Text = "Serial port nr.:";
// //
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Enabled = false;
this.radioButton1.Location = new System.Drawing.Point(22, 19);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(83, 17);
this.radioButton1.TabIndex = 0;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "Use TCP/IP";
this.radioButton1.UseVisualStyleBackColor = true;
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Enabled = false;
this.radioButton2.Location = new System.Drawing.Point(234, 19);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(92, 17);
this.radioButton2.TabIndex = 1;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "Use serial port";
this.radioButton2.UseVisualStyleBackColor = true;
//
// optoDataGroupBox // optoDataGroupBox
// //
this.optoDataGroupBox.Controls.Add(this.tcpipPortLabel); this.optoDataGroupBox.Controls.Add(this.tcpipPortLabel);
@@ -185,257 +184,125 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
this.optoDataGroupBox.Controls.Add(this.radioButton2); this.optoDataGroupBox.Controls.Add(this.radioButton2);
this.optoDataGroupBox.Controls.Add(this.optoSerialPortLabel); this.optoDataGroupBox.Controls.Add(this.optoSerialPortLabel);
this.optoDataGroupBox.Controls.Add(this.optoSerialPortTextBox); this.optoDataGroupBox.Controls.Add(this.optoSerialPortTextBox);
this.optoDataGroupBox.Location = new System.Drawing.Point(10, 131); this.optoDataGroupBox.Location = new System.Drawing.Point(28, 114);
this.optoDataGroupBox.Margin = new System.Windows.Forms.Padding(4);
this.optoDataGroupBox.Name = "optoDataGroupBox"; this.optoDataGroupBox.Name = "optoDataGroupBox";
this.optoDataGroupBox.Padding = new System.Windows.Forms.Padding(4); this.optoDataGroupBox.Size = new System.Drawing.Size(414, 97);
this.optoDataGroupBox.Size = new System.Drawing.Size(552, 119); this.optoDataGroupBox.TabIndex = 5;
this.optoDataGroupBox.TabIndex = 18;
this.optoDataGroupBox.TabStop = false; this.optoDataGroupBox.TabStop = false;
this.optoDataGroupBox.Text = "Opto-data"; this.optoDataGroupBox.Text = "Opto-data";
// //
// tcpipPortLabel // tcpipPortLabel
// //
this.tcpipPortLabel.AutoSize = true; this.tcpipPortLabel.AutoSize = true;
this.tcpipPortLabel.Location = new System.Drawing.Point(41, 87); this.tcpipPortLabel.Location = new System.Drawing.Point(31, 71);
this.tcpipPortLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.tcpipPortLabel.Name = "tcpipPortLabel"; this.tcpipPortLabel.Name = "tcpipPortLabel";
this.tcpipPortLabel.Size = new System.Drawing.Size(54, 16); this.tcpipPortLabel.Size = new System.Drawing.Size(47, 13);
this.tcpipPortLabel.TabIndex = 4; this.tcpipPortLabel.TabIndex = 4;
this.tcpipPortLabel.Text = "Port nr..:"; this.tcpipPortLabel.Text = "Port nr..:";
// //
// tcpipPortTextBox // tcpipPortTextBox
// //
this.tcpipPortTextBox.Enabled = false; this.tcpipPortTextBox.Enabled = false;
this.tcpipPortTextBox.Location = new System.Drawing.Point(143, 84); this.tcpipPortTextBox.Location = new System.Drawing.Point(107, 68);
this.tcpipPortTextBox.Margin = new System.Windows.Forms.Padding(4);
this.tcpipPortTextBox.Name = "tcpipPortTextBox"; this.tcpipPortTextBox.Name = "tcpipPortTextBox";
this.tcpipPortTextBox.Size = new System.Drawing.Size(51, 22); this.tcpipPortTextBox.Size = new System.Drawing.Size(39, 20);
this.tcpipPortTextBox.TabIndex = 5; this.tcpipPortTextBox.TabIndex = 5;
// //
// ipAddressLabel // ipAddressLabel
// //
this.ipAddressLabel.AutoSize = true; this.ipAddressLabel.AutoSize = true;
this.ipAddressLabel.Location = new System.Drawing.Point(41, 59); this.ipAddressLabel.Location = new System.Drawing.Point(31, 48);
this.ipAddressLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.ipAddressLabel.Name = "ipAddressLabel"; this.ipAddressLabel.Name = "ipAddressLabel";
this.ipAddressLabel.Size = new System.Drawing.Size(78, 16); this.ipAddressLabel.Size = new System.Drawing.Size(63, 13);
this.ipAddressLabel.TabIndex = 2; this.ipAddressLabel.TabIndex = 2;
this.ipAddressLabel.Text = "IP address.:"; this.ipAddressLabel.Text = "IP address.:";
// //
// ipAddressTextBox // ipAddressTextBox
// //
this.ipAddressTextBox.Enabled = false; this.ipAddressTextBox.Enabled = false;
this.ipAddressTextBox.Location = new System.Drawing.Point(143, 55); this.ipAddressTextBox.Location = new System.Drawing.Point(107, 45);
this.ipAddressTextBox.Margin = new System.Windows.Forms.Padding(4);
this.ipAddressTextBox.Name = "ipAddressTextBox"; this.ipAddressTextBox.Name = "ipAddressTextBox";
this.ipAddressTextBox.Size = new System.Drawing.Size(129, 22); this.ipAddressTextBox.Size = new System.Drawing.Size(98, 20);
this.ipAddressTextBox.TabIndex = 3; this.ipAddressTextBox.TabIndex = 3;
// //
// radioButton1 // groupBox1
// //
this.radioButton1.AutoSize = true; this.groupBox1.Controls.Add(this.rfidPortNrTextBox);
this.radioButton1.Checked = true; this.groupBox1.Controls.Add(this.rfidSerialPortNrLabel);
this.radioButton1.Enabled = false; this.groupBox1.Location = new System.Drawing.Point(28, 218);
this.radioButton1.Location = new System.Drawing.Point(29, 23); this.groupBox1.Name = "groupBox1";
this.radioButton1.Margin = new System.Windows.Forms.Padding(4); this.groupBox1.Size = new System.Drawing.Size(414, 55);
this.radioButton1.Name = "radioButton1"; this.groupBox1.TabIndex = 12;
this.radioButton1.Size = new System.Drawing.Size(99, 20); this.groupBox1.TabStop = false;
this.radioButton1.TabIndex = 0; this.groupBox1.Text = "RFID communication (in case mux. board is not used)";
this.radioButton1.TabStop = true;
this.radioButton1.Text = "Use TCP/IP";
this.radioButton1.UseVisualStyleBackColor = true;
// //
// radioButton2 // label3
// //
this.radioButton2.AutoSize = true; this.label3.AutoSize = true;
this.radioButton2.Enabled = false; this.label3.Location = new System.Drawing.Point(176, 66);
this.radioButton2.Location = new System.Drawing.Point(312, 23); this.label3.Name = "label3";
this.radioButton2.Margin = new System.Windows.Forms.Padding(4); this.label3.Size = new System.Drawing.Size(31, 13);
this.radioButton2.Name = "radioButton2"; this.label3.TabIndex = 13;
this.radioButton2.Size = new System.Drawing.Size(115, 20); this.label3.Text = "1 .. 4";
this.radioButton2.TabIndex = 1;
this.radioButton2.Text = "Use serial port";
this.radioButton2.UseVisualStyleBackColor = true;
// //
// optoSerialPortLabel // label4
// //
this.optoSerialPortLabel.AutoSize = true; this.label4.AutoSize = true;
this.optoSerialPortLabel.Location = new System.Drawing.Point(321, 55); this.label4.Location = new System.Drawing.Point(176, 89);
this.optoSerialPortLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4";
this.optoSerialPortLabel.Name = "optoSerialPortLabel"; this.label4.Size = new System.Drawing.Size(37, 13);
this.optoSerialPortLabel.Size = new System.Drawing.Size(88, 16); this.label4.TabIndex = 14;
this.optoSerialPortLabel.TabIndex = 6; this.label4.Text = "1 .. 10";
this.optoSerialPortLabel.Text = "Serial port nr.:";
// //
// optoSerialPortTextBox // WaterMeterCfgCtrl
// //
this.optoSerialPortTextBox.Enabled = false; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.optoSerialPortTextBox.Location = new System.Drawing.Point(439, 52);
this.optoSerialPortTextBox.Margin = new System.Windows.Forms.Padding(4);
this.optoSerialPortTextBox.Name = "optoSerialPortTextBox";
this.optoSerialPortTextBox.Size = new System.Drawing.Size(44, 22);
this.optoSerialPortTextBox.TabIndex = 7;
//
// groupTextBox
//
this.groupTextBox.Enabled = false;
this.groupTextBox.Location = new System.Drawing.Point(153, 97);
this.groupTextBox.Margin = new System.Windows.Forms.Padding(4);
this.groupTextBox.Name = "groupTextBox";
this.groupTextBox.Size = new System.Drawing.Size(44, 22);
this.groupTextBox.TabIndex = 22;
//
// groupLabel
//
this.groupLabel.AutoSize = true;
this.groupLabel.Location = new System.Drawing.Point(6, 101);
this.groupLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.groupLabel.Name = "groupLabel";
this.groupLabel.Size = new System.Drawing.Size(54, 16);
this.groupLabel.TabIndex = 21;
this.groupLabel.Text = "Group 2";
//
// muxBoardNrTextBox
//
this.muxBoardNrTextBox.Enabled = false;
this.muxBoardNrTextBox.Location = new System.Drawing.Point(153, 69);
this.muxBoardNrTextBox.Margin = new System.Windows.Forms.Padding(4);
this.muxBoardNrTextBox.Name = "muxBoardNrTextBox";
this.muxBoardNrTextBox.Size = new System.Drawing.Size(44, 22);
this.muxBoardNrTextBox.TabIndex = 20;
//
// muxBoardNrLabel
//
this.muxBoardNrLabel.AutoSize = true;
this.muxBoardNrLabel.Location = new System.Drawing.Point(6, 72);
this.muxBoardNrLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.muxBoardNrLabel.Name = "muxBoardNrLabel";
this.muxBoardNrLabel.Size = new System.Drawing.Size(131, 16);
this.muxBoardNrLabel.TabIndex = 19;
this.muxBoardNrLabel.Text = "Group 1 (mux. board)";
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(153, 40);
this.nameTextBox.Margin = new System.Windows.Forms.Padding(4);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(160, 22);
this.nameTextBox.TabIndex = 17;
//
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(6, 44);
this.nameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(44, 16);
this.nameLabel.TabIndex = 16;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(149, 11);
this.classNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(78, 16);
this.classNameLabel.TabIndex = 15;
this.classNameLabel.Text = "ClassName";
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 25);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(603, 403);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Test";
this.tabPage2.UseVisualStyleBackColor = true;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.headPortNrTextBox);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Location = new System.Drawing.Point(10, 335);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(552, 50);
this.groupBox2.TabIndex = 26;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Head Communication";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(321, 18);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(88, 16);
this.label2.TabIndex = 7;
this.label2.Text = "Serial port nr.:";
//
// headPortNrTextBox
//
this.headPortNrTextBox.Enabled = false;
this.headPortNrTextBox.Location = new System.Drawing.Point(439, 15);
this.headPortNrTextBox.Margin = new System.Windows.Forms.Padding(4);
this.headPortNrTextBox.Name = "headPortNrTextBox";
this.headPortNrTextBox.Size = new System.Drawing.Size(44, 22);
this.headPortNrTextBox.TabIndex = 8;
//
// IperlHeadCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tabControl1); this.Controls.Add(this.label4);
this.Margin = new System.Windows.Forms.Padding(4); this.Controls.Add(this.label3);
this.Name = "IperlHeadCfgCtrl"; this.Controls.Add(this.groupBox1);
this.Size = new System.Drawing.Size(617, 438); this.Controls.Add(this.optoDataGroupBox);
this.Controls.Add(this.groupTextBox);
this.Controls.Add(this.groupLabel);
this.Controls.Add(this.muxBoardNrTextBox);
this.Controls.Add(this.muxBoardNrLabel);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "WaterMeterCfgCtrl";
this.Size = new System.Drawing.Size(500, 300);
this.Load += new System.EventHandler(this.WaterMeterCfgCtrl_Load); this.Load += new System.EventHandler(this.WaterMeterCfgCtrl_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.optoDataGroupBox.ResumeLayout(false); this.optoDataGroupBox.ResumeLayout(false);
this.optoDataGroupBox.PerformLayout(); this.optoDataGroupBox.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupBox1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Label label3; private System.Windows.Forms.TextBox optoSerialPortTextBox;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label optoSerialPortLabel;
private System.Windows.Forms.ComboBox comboBoxCommunicationInterface; private System.Windows.Forms.TextBox muxBoardNrTextBox;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label muxBoardNrLabel;
private System.Windows.Forms.TextBox groupTextBox;
private System.Windows.Forms.Label groupLabel;
private System.Windows.Forms.TextBox rfidPortNrTextBox; private System.Windows.Forms.TextBox rfidPortNrTextBox;
private System.Windows.Forms.Label rfidSerialPortNrLabel; private System.Windows.Forms.Label rfidSerialPortNrLabel;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.GroupBox optoDataGroupBox; private System.Windows.Forms.GroupBox optoDataGroupBox;
private System.Windows.Forms.Label tcpipPortLabel; private System.Windows.Forms.Label tcpipPortLabel;
private System.Windows.Forms.TextBox tcpipPortTextBox; private System.Windows.Forms.TextBox tcpipPortTextBox;
private System.Windows.Forms.Label ipAddressLabel; private System.Windows.Forms.Label ipAddressLabel;
private System.Windows.Forms.TextBox ipAddressTextBox; private System.Windows.Forms.TextBox ipAddressTextBox;
private System.Windows.Forms.RadioButton radioButton1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton radioButton2; private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label optoSerialPortLabel; private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox optoSerialPortTextBox; }
private System.Windows.Forms.TextBox groupTextBox;
private System.Windows.Forms.Label groupLabel;
private System.Windows.Forms.TextBox muxBoardNrTextBox;
private System.Windows.Forms.Label muxBoardNrLabel;
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox headPortNrTextBox;
private System.Windows.Forms.Label label2;
}
} }
@@ -1,5 +1,5 @@
/// ///
/// Copyright (c) 2015-2023 Sensus Slovensko a.s. /// Copyright (c) 2015-2019 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.IO; using System.IO;
@@ -16,30 +16,35 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ProcParams) })[0]; public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ProcParams) })[0];
public override XmlSerializer GetSerializer() { return Serializer; } public override XmlSerializer GetSerializer() { return Serializer; }
public int WMType_ID; public MeterType MeterType;
public MeterType MeterType;
public float CalibTarget; /// Target error after calibration in [%] public float CalibTarget; /// Target error after calibration in [%]
public float CalibTargetQ2; /// Target error at Q2 after Q2 correction in [%]
public int FactorLimitLo; /// Lower limit for the calibration factor public int FactorLimitLo; /// Lower limit for the calibration factor
public int FactorLimitHi; /// Upper limit for the calibration factor public int FactorLimitHi; /// Upper limit for the calibration factor
public Counting Counting; /// Initial iPerl counting (Artbitrary, Positive or Negative) public Counting Counting; /// Initial iPerl counting (Artbitrary, Positive or Negative)
public int WMType_ID; /// Required for Oracle DB: ID_WZTyp in table VT_PRUEFPUNKT_SOLL_SD
public override void InitializeAll() public override void InitializeAll()
{ {
MeterType = MeterType.AutoDetect; MeterType = MeterType.AutoDetect;
CalibTarget = 0; CalibTarget = 0;
CalibTargetQ2 = 0;
FactorLimitLo = 1000; FactorLimitLo = 1000;
FactorLimitHi = 8000; FactorLimitHi = 8000;
Counting = Counting.Arbitrary; Counting = Counting.Arbitrary;
WMType_ID = 2; /// Value for iPerl DN15
} }
string[] paramNames = new string[] string[] paramNames = new string[]
{ {
"iPerl type", "iPerl type",
"Calib. target [%]", "Calib. target [%]",
"Calib. target at Q2 [%]",
"Calib. factor Lo", "Calib. factor Lo",
"Calib. factor Hi", "Calib. factor Hi",
"Counting", "Counting",
"WM type ID",
}; };
public override string ParamName(int i) { return paramNames[i]; } public override string ParamName(int i) { return paramNames[i]; }
public override int ParamsCount() { return paramNames.Length; } public override int ParamsCount() { return paramNames.Length; }
@@ -67,9 +72,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
{ {
case 0: return MeterType.ToString(); case 0: return MeterType.ToString();
case 1: return CalibTarget.ToString(); case 1: return CalibTarget.ToString();
case 2: return FactorLimitLo.ToString(); case 2: return CalibTargetQ2.ToString();
case 3: return FactorLimitHi.ToString(); case 3: return FactorLimitLo.ToString();
case 4: return Counting.ToString(); case 4: return FactorLimitHi.ToString();
case 5: return Counting.ToString();
case 6: return WMType_ID.ToString();
default: return string.Empty; default: return string.Empty;
} }
} }
@@ -85,14 +92,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
} }
break; break;
case 1: CalibTarget = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None; case 1: CalibTarget = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
case 2: FactorLimitLo = int.Parse(strValue); return CfgUpdateFlags.None; case 2: CalibTargetQ2 = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
case 3: FactorLimitHi = int.Parse(strValue); return CfgUpdateFlags.None; case 3: FactorLimitLo = int.Parse(strValue); return CfgUpdateFlags.None;
case 4: case 4: FactorLimitHi = int.Parse(strValue); return CfgUpdateFlags.None;
case 5:
for (Counting c = 0; c < Counting.Count; c++) for (Counting c = 0; c < Counting.Count; c++)
{ {
if (c.ToString().Equals(strValue)) { Counting = c; return CfgUpdateFlags.None; } if (c.ToString().Equals(strValue)) { Counting = c; return CfgUpdateFlags.None; }
} }
break; break;
case 6: WMType_ID = int.Parse(strValue); return CfgUpdateFlags.None;
default: return CfgUpdateFlags.None; default: return CfgUpdateFlags.None;
} }
@@ -112,14 +121,18 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
for (MeterType mt = 0; mt < MeterType.Count; mt++) if (mt.ToString().Equals(strValue)) return true; for (MeterType mt = 0; mt < MeterType.Count; mt++) if (mt.ToString().Equals(strValue)) return true;
break; break;
case 1: case 1:
case 2:
if (Utils.TryParseSFloat(strValue, out fDummy) && fDummy >= -10.0f && fDummy <= 10.0f) return true; if (Utils.TryParseSFloat(strValue, out fDummy) && fDummy >= -10.0f && fDummy <= 10.0f) return true;
break; break;
case 2:
case 3: case 3:
case 4:
if (int.TryParse(strValue, out iDummy) && iDummy >= 1000 && iDummy <= 8000) return true; if (int.TryParse(strValue, out iDummy) && iDummy >= 1000 && iDummy <= 8000) return true;
break; break;
case 4: case 5:
for (Counting c = 0; c < Counting.Count; c++) if (c.ToString().Equals(strValue)) return true; for (Counting c = 0; c < Counting.Count; c++) if (c.ToString().Equals(strValue)) return true;
break;
case 6: /// WMType_ID
if (int.TryParse(strValue, out iDummy)) return true;
break; break;
default: default:
message = "Invalid index"; message = "Invalid index";
@@ -134,9 +147,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
{ {
prms.MeterType = this.MeterType; prms.MeterType = this.MeterType;
prms.CalibTarget = this.CalibTarget; prms.CalibTarget = this.CalibTarget;
prms.CalibTargetQ2 = this.CalibTargetQ2;
prms.FactorLimitLo = this.FactorLimitLo; prms.FactorLimitLo = this.FactorLimitLo;
prms.FactorLimitHi = this.FactorLimitHi; prms.FactorLimitHi = this.FactorLimitHi;
prms.Counting = this.Counting; prms.Counting = this.Counting;
prms.WMType_ID = this.WMType_ID;
} }
public IParamsProvider Clone() public IParamsProvider Clone()
-1
View File
@@ -10,7 +10,6 @@ using SchematicDrawing;
using TBF.Rig.ControlBoard.Uni; using TBF.Rig.ControlBoard.Uni;
using TBF.Boxes; using TBF.Boxes;
using TBF.Resources; using TBF.Resources;
using AppDiagnostic;
namespace TBF.Rig.Uni.FlowMeter namespace TBF.Rig.Uni.FlowMeter
{ {
+2 -13
View File
@@ -415,7 +415,7 @@ namespace TBF.Rig.Uni.FlowMeter
case 0: case 0:
return new string[] { "1", "2", "3", "4", "5", "6", "7" }; return new string[] { "1", "2", "3", "4", "5", "6", "7" };
case 4: case 4:
return new string[] { "m3/h", "l/h", "gal/m" }; return new string[] { "m3/h", "l/h" };
case 5: case 5:
return new string[] { "°C", "°F", "K" }; return new string[] { "°C", "°F", "K" };
case 6: case 6:
@@ -488,8 +488,7 @@ namespace TBF.Rig.Uni.FlowMeter
case 1: NominalFlow = TBF.Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd; case 1: NominalFlow = TBF.Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd;
case 2: NominalFreq = TBF.Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd; case 2: NominalFreq = TBF.Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd;
case 3: MsrdFormat = str; return CfgUpdateFlags.RestartRqrd; case 3: MsrdFormat = str; return CfgUpdateFlags.RestartRqrd;
//case 4: MsrdUnit = (str == "l/h") ? Unit.lph : Unit.m3ph; return CfgUpdateFlags.RestartRqrd; case 4: MsrdUnit = (str == "l/h") ? Unit.lph : Unit.m3ph; return CfgUpdateFlags.RestartRqrd;
case 4: MsrdUnit = ParseFlowUnit(str); return CfgUpdateFlags.RestartRqrd;
case 5: TempUnit.ToDescription(); return CfgUpdateFlags.RestartRqrd; case 5: TempUnit.ToDescription(); return CfgUpdateFlags.RestartRqrd;
case 6: PressureUnit.ToDescription(); return CfgUpdateFlags.RestartRqrd; case 6: PressureUnit.ToDescription(); return CfgUpdateFlags.RestartRqrd;
@@ -639,15 +638,5 @@ namespace TBF.Rig.Uni.FlowMeter
{ {
return true; /// =OK, do nothing return true; /// =OK, do nothing
} }
public static Unit ParseFlowUnit(string str)
{
switch (str)
{
case "l/h": return Unit.lph;
case "gal/m": return Unit.USgalpm;
case "m3/h":
default: return Unit.m3ph;
}
}
} }
} }
@@ -115,7 +115,7 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
fmtrs.Add("---"); fmtrs.Add("---");
return fmtrs; return fmtrs;
case 5: case 5:
return new string[] { "m3/h", "l/h", "gal/m" }; return new string[] { "m3/h", "l/h" };
default: default:
return null; return null;
} }
@@ -148,8 +148,7 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
case 2: Flowmeter3 = (str != "---") ? str : string.Empty; return CfgUpdateFlags.RestartRqrd; case 2: Flowmeter3 = (str != "---") ? str : string.Empty; return CfgUpdateFlags.RestartRqrd;
case 3: InactiveFlowmtr = (str != "---") ? str : string.Empty; return CfgUpdateFlags.RestartRqrd; case 3: InactiveFlowmtr = (str != "---") ? str : string.Empty; return CfgUpdateFlags.RestartRqrd;
case 4: MsrdFormat = str; return CfgUpdateFlags.RestartRqrd; case 4: MsrdFormat = str; return CfgUpdateFlags.RestartRqrd;
//case 5: MsrdUnit = (str == "l/h") ? Unit.lph : Unit.m3ph; return CfgUpdateFlags.RestartRqrd; case 5: MsrdUnit = (str == "l/h") ? Unit.lph : Unit.m3ph; return CfgUpdateFlags.RestartRqrd;
case 5: MsrdUnit = ParseFlowUnit(str); return CfgUpdateFlags.RestartRqrd;
default: default:
return CfgUpdateFlags.None; return CfgUpdateFlags.None;
} }
@@ -200,15 +199,5 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
{ {
return true; /// =OK, do nothing return true; /// =OK, do nothing
} }
public static Unit ParseFlowUnit(string str)
{
switch (str)
{
case "l/h": return Unit.lph;
case "gal/m": return Unit.USgalpm;
case "m3/h":
default: return Unit.m3ph;
}
}
} }
} }
@@ -1,9 +1,10 @@
/// ///
/// Copyright (c) 2021 Sensus Metering Systems /// Copyright (c) 2021-2023 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using log4net; using log4net;
using TBF.Rig.ControlBoard.Uni;
using TBF.Rig.GenericDevices; using TBF.Rig.GenericDevices;
namespace TBF.Rig.Uni.RegValve namespace TBF.Rig.Uni.RegValve
@@ -13,12 +14,12 @@ namespace TBF.Rig.Uni.RegValve
private static readonly ILog log = LogManager.GetLogger(typeof(ChangeRegValvePositionOp)); private static readonly ILog log = LogManager.GetLogger(typeof(ChangeRegValvePositionOp));
public override string ToString() public override string ToString()
{ {
return string.Format("ChangeRegValvePositionOp({0},{1}s)", regulValve.Name, timePulseSec.ToString("F2")); return string.Format("ChangeRegValvePositionOp({0},{1}s)", regV.Name, timePulseSec.ToString("F2"));
} }
/// Set by the constructor /// Set by the constructor
readonly TBF.Rig.ControlBoard.Uni.UniCB controlBoard; readonly UniCB uniCB;
readonly RegValve regulValve; readonly RegValve regV;
readonly int regulValveNr; readonly int regulValveNr;
readonly double timePulseSec; readonly double timePulseSec;
@@ -32,14 +33,14 @@ namespace TBF.Rig.Uni.RegValve
/// <param name="posHiPct">Upper limit of the position to be achieved</param> /// <param name="posHiPct">Upper limit of the position to be achieved</param>
/// <param name="timeout">Timeout in sec. for setting the flow</param> /// <param name="timeout">Timeout in sec. for setting the flow</param>
/// <remarks>Only Elde.Valve flow are used, other flow on the lists are ignored</remarks> /// <remarks>Only Elde.Valve flow are used, other flow on the lists are ignored</remarks>
public ChangeRegValvePositionOp(TBF.Rig.ControlBoard.IControlBoard cb, RegValve rv, double timePulseSec) public ChangeRegValvePositionOp(UniCB uniCB, RegValve regV, double timePulseSec)
{ {
controlBoard = cb as TBF.Rig.ControlBoard.Uni.UniCB; this.uniCB = uniCB;
if (controlBoard == null) throw new ArgumentNullException("ctrlBoard"); if (this.uniCB == null) throw new ArgumentNullException("ctrlBoard");
regulValve = rv as RegValve; this.regV = regV as RegValve;
if (regulValve == null) throw new ArgumentNullException("regValve is null or not Elde"); if (this.regV == null) throw new ArgumentNullException("regValve is null or not Uni");
regulValveNr = this.regulValve.Idx1; regulValveNr = this.regV.Idx1;
this.timePulseSec = timePulseSec; this.timePulseSec = timePulseSec;
@@ -49,13 +50,7 @@ namespace TBF.Rig.Uni.RegValve
/// <summary>Start this operation</summary> /// <summary>Start this operation</summary>
public void Start() public void Start()
{ {
//double positionPct = controlBoard.RValvePosition(regulValveNr); uniCB.RegVlvIncrMove(false, regulValveNr, timePulseSec);
//log.WarnFormat("RV#={0}, actPos={1}%", regulValveNr, positionPct.ToString("F1"));
//controlBoard.ValveMove(regulValveNr,
// TBF.Rig.ControlBoard.Legacy.RegulValveMode.PulseWidth,
// new double[2] { timePulseSec, timePulseSec },
// regulValve.StableTime);
} }
/// <summary>Run this operation</summary> /// <summary>Run this operation</summary>
@@ -64,9 +59,6 @@ namespace TBF.Rig.Uni.RegValve
/// </returns> /// </returns>
public Event Run() public Event Run()
{ {
//float positionPct = controlBoard.RValvePosition(regulValveNr);
//log.WarnFormat("RV#={0}, actPos={1}%", regulValveNr, positionPct.ToString("F1"));
return Event.PositionReached; return Event.PositionReached;
} }
+1 -1
View File
@@ -1,5 +1,5 @@
/// ///
/// Copyright (c) 2021 Sensus Metering Systems /// Copyright (c) 2021 Sensus Slovensko a.s.
/// ///
using System.Collections.Generic; using System.Collections.Generic;
using TBF.Rig.Generic; using TBF.Rig.Generic;
+1 -1
View File
@@ -1,5 +1,5 @@
/// ///
/// Copyright (c) 2021 Sensus Metering Systems /// Copyright (c) 2021 Sensus Slovensko a.s.
/// ///
using System; using System;
using log4net; using log4net;
+27 -9
View File
@@ -33,14 +33,29 @@ namespace TBF.Rig.Uni.RegValve
/// ///
public bool IsCoax { get { return false; } } public bool IsCoax { get { return false; } }
/// 0.0 .. 100.0 public RegValveState RegValveState
{
get
{
switch (UniCB.Data.RegVStatus[Idx1 - 1])
{
default:
case 0: return ControlBoard.Uni.RegValveState.Idle;
case 2: return ControlBoard.Uni.RegValveState.PwOrFreqRegul;
case 3: return ControlBoard.Uni.RegValveState.DacValueRegul;
}
}
}
/// Position 0.0 .. 100.0 in %
public double Position public double Position
{ {
get get
{ {
int denominator = DacValueOpen - DacValueClosed; int denominator = DacValueOpen - DacValueClosed;
if (denominator == 0) denominator = 1; if (denominator == 0) denominator = 1;
return 100.0 * Convert.ToDouble(UniCB.AnalogInput(adcChannel) - DacValueClosed) / Convert.ToDouble(denominator); return 100.0 * Convert.ToDouble(Math.Max(0, Math.Min(denominator, (int)UniCB.AnalogInput(adcChannel) - DacValueClosed)))
/ Convert.ToDouble(denominator);
} }
} }
/// ///
@@ -61,7 +76,6 @@ namespace TBF.Rig.Uni.RegValve
} }
int adcChannel; int adcChannel;
public RegValveState RegValveState;
public double TargetRegValvePosition; public double TargetRegValvePosition;
@@ -79,11 +93,15 @@ namespace TBF.Rig.Uni.RegValve
/// </summary> /// </summary>
/// <param name="rvId">Reg. valve ID</param> /// <param name="rvId">Reg. valve ID</param>
/// <param name="position">Reg. valve position (0 .. 1.0)</param> /// <param name="position">Reg. valve position (0 .. 1.0)</param>
public void MoveToPosition(bool isFromUI, double positionLo, double positionHi = -1) public void MoveToPosition(bool isFromUI, double posPctLo, double posPctHi = -1)
{ {
int positionLoInt = Convert.ToInt32(positionLo); int adcDiff = Math.Abs(regValveCfg.AdcValueOpen - regValveCfg.AdcValueClosed);
int positionHiInt = Convert.ToInt32(positionHi); int adcLower = Math.Min(regValveCfg.AdcValueOpen, regValveCfg.AdcValueClosed);
UniCB.RegVlvMoveToPos(isFromUI, Idx1, positionLoInt, positionHiInt);
int targetAdcValLo = Math.Max(0, Convert.ToInt32(Math.Round((posPctLo * adcDiff / 100.0) + adcLower)));
int targetAdcValHi = (posPctHi < 0) ? -1 : Math.Min(1023, Convert.ToInt32(Math.Round((posPctHi * adcDiff / 100.0) + adcLower)));
UniCB.RegVlvMoveToPos(isFromUI, Idx1, targetAdcValLo, targetAdcValHi);
} }
@@ -139,8 +157,6 @@ namespace TBF.Rig.Uni.RegValve
this.UniCB = TbfComponents.FindComponent(cfg.ParentName, components) as UniCB; this.UniCB = TbfComponents.FindComponent(cfg.ParentName, components) as UniCB;
if (this.UniCB == null) throw new Exception(string.Format("Cannot find {0} (a parent of {1})", cfg.ParentName, Name)); if (this.UniCB == null) throw new Exception(string.Format("Cannot find {0} (a parent of {1})", cfg.ParentName, Name));
log.Warn(this.ToString());
} }
public override void Initialize() public override void Initialize()
@@ -155,6 +171,8 @@ namespace TBF.Rig.Uni.RegValve
if (args.Increase) IncreaseSetpoint(); else DecreaseSetpoint(); if (args.Increase) IncreaseSetpoint(); else DecreaseSetpoint();
} }
}; };
log.FatalFormat("{0} initialized: {1}", Name, this);
} }
/// ///
+29 -34
View File
@@ -3,6 +3,7 @@
/// ///
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Common;
using log4net; using log4net;
using Config.Entities; using Config.Entities;
using TBF.Rig.ControlBoard.Uni; using TBF.Rig.ControlBoard.Uni;
@@ -19,11 +20,10 @@ namespace TBF.Rig.Uni.RegValve
return string.Format("SetFlowOp({0}, Qfrom={1}, Qto={2})", regV.Name, shrinkedTgtFlowLo, shrinkedTgtFlowHi); return string.Format("SetFlowOp({0}, Qfrom={1}, Qto={2})", regV.Name, shrinkedTgtFlowLo, shrinkedTgtFlowHi);
} }
public const double RqrdFlowRangeRatio = 0.5; public const double RqrdFlowRangeRatio = 0.5;
/// ///
/// Set by the constructor /// Set by the constructor
/// ///
readonly UniCB uniCB; readonly UniCB uniCB;
readonly RegValve regV; readonly RegValve regV;
@@ -37,7 +37,7 @@ namespace TBF.Rig.Uni.RegValve
readonly double maximalFlow; readonly double maximalFlow;
/// ///
/// Internal state of this operation /// Internal state of this operation
/// ///
enum OpState enum OpState
@@ -56,13 +56,12 @@ namespace TBF.Rig.Uni.RegValve
double currentReqFlowLo; double currentReqFlowLo;
double currentReqFlowHi; double currentReqFlowHi;
double targetPositionLo; double targetPositionLo;
double targetPositionHi; double targetPositionHi;
int startTime;
int setFlowTime; int setFlowTime;
int expireTime; int expireTime;
DoubleBox flowBox; DoubleBox msrdFlow;
int isFlowOkDuration; int isFlowOkDuration;
@@ -71,23 +70,23 @@ namespace TBF.Rig.Uni.RegValve
/// Events: FlowSet, FlowTimeOut /// Events: FlowSet, FlowTimeOut
/// </summary> /// </summary>
/// <param name="uniCB">Control board device</param> /// <param name="uniCB">Control board device</param>
/// <param name="regulValve">Regulation valve component</param> /// <param name="regValve">Regulation valve component</param>
/// <param name="flowMeter">Flowmeter component</param> /// <param name="flowMeter">Flowmeter component</param>
/// <param name="qFrom">Lower limit of the flow to be achieved in [m3/h]</param> /// <param name="qFrom">Lower limit of the flow to be achieved in [m3/h]</param>
/// <param name="qTo">Upper limit of the flow to be achieved in [m3/h]</param> /// <param name="qTo">Upper limit of the flow to be achieved in [m3/h]</param>
/// <param name="pidCoef">PID coefficient (float)</param> /// <param name="msrdFlow">DoubleBox for measured flow</param>
/// <param name="timeout">Timeout for the flow setting in [s]</param> /// <param name="timeout">Timeout for the flow setting in [s]</param>
/// <param name="delay">Flow setting starts after this delay [s]</param> /// <param name="delay">Flow setting starts after this delay in [s]</param>
/// <param name="leaveFlowControlRunning">true = Leave the measurement running after op. stop</param> /// <param name="leaveFlowControlRunning">true = Leave the measurement running after op. stop</param>
/// <remarks>Only Elde.Valve flow are used, other flow on the lists are ignored</remarks> /// <remarks>Only Elde.Valve flow are used, other flow on the lists are ignored</remarks>
public SetFlowOp(UniCB uniCB, IRegValve regValve, IFlowMeter flowMeter, double qFrom, double qTo, DoubleBox flowBox, public SetFlowOp(UniCB uniCB, IRegValve regValve, IFlowMeter flowMeter, double qFrom, double qTo, DoubleBox msrdFlow,
int timeout, int delay, bool leaveFlowControlRunning) int timeout, int delay, bool leaveFlowControlRunning)
{ {
this.uniCB = uniCB; this.uniCB = uniCB;
if (this.uniCB == null) throw new ArgumentNullException("cBoard is null or not Uni"); if (this.uniCB == null) throw new ArgumentNullException("Control board is null or not Uni");
this.regV = regValve as RegValve; this.regV = regValve as RegValve;
if (this.regV == null) throw new ArgumentNullException("regValve is null or not Uni"); if (this.regV == null) throw new ArgumentNullException(string.Format("{0} is not Uni.RegValve", regValve.Name));
this.flowMeter = flowMeter; this.flowMeter = flowMeter;
if (this.flowMeter == null) throw new ArgumentNullException("flowMeter"); if (this.flowMeter == null) throw new ArgumentNullException("flowMeter");
@@ -97,15 +96,14 @@ namespace TBF.Rig.Uni.RegValve
double rqrdFlowLoBeforeCorr = qFrom - MeasurementCorrection.GetCorrection(qFrom, flowMeter.Corrections); double rqrdFlowLoBeforeCorr = qFrom - MeasurementCorrection.GetCorrection(qFrom, flowMeter.Corrections);
double rqrdFlowHiBeforeCorr = qTo - MeasurementCorrection.GetCorrection(qTo, flowMeter.Corrections); double rqrdFlowHiBeforeCorr = qTo - MeasurementCorrection.GetCorrection(qTo, flowMeter.Corrections);
targetFlowAve = (rqrdFlowLoBeforeCorr + rqrdFlowHiBeforeCorr) / 2; targetFlowAve = (rqrdFlowLoBeforeCorr + rqrdFlowHiBeforeCorr) / 2;
shrinkedTgtFlowLo = (RqrdFlowRangeRatio * rqrdFlowLoBeforeCorr) + ((1 - RqrdFlowRangeRatio) * targetFlowAve); /// Move the lower limit 15% of the range up shrinkedTgtFlowLo = (RqrdFlowRangeRatio * rqrdFlowLoBeforeCorr)
shrinkedTgtFlowHi = (RqrdFlowRangeRatio * rqrdFlowHiBeforeCorr) + ((1 - RqrdFlowRangeRatio) * targetFlowAve); /// Move the upper limit 15% of the range down + ((1 - RqrdFlowRangeRatio) * targetFlowAve); /// Move the lower limit 15% of the range up
shrinkedTgtFlowHi = (RqrdFlowRangeRatio * rqrdFlowHiBeforeCorr)
this.flowBox = flowBox; + ((1 - RqrdFlowRangeRatio) * targetFlowAve); /// Move the upper limit 15% of the range down
if (this.flowBox == null) throw new ArgumentNullException("flowBox");
this.msrdFlow = msrdFlow;
this.timeout = timeout; this.timeout = timeout;
this.delay = delay; this.delay = delay;
this.leaveFlowControlRunning = leaveFlowControlRunning; this.leaveFlowControlRunning = leaveFlowControlRunning;
log.Debug(this.ToString()); log.Debug(this.ToString());
@@ -171,16 +169,13 @@ namespace TBF.Rig.Uni.RegValve
return; return;
} }
/// <summary> /// <summary>Start this operation</summary>
/// Start this operation
/// </summary>
public void Start() public void Start()
{ {
log.InfoFormat("SetFlowOp:Start() rv#={0} flowMtr#={1} TARGET: flowLo={2} flowHi={3}", log.InfoFormat("SetFlowOp:Start() rv#={0} flowMtr#={1} TARGET: flowLo={2} flowHi={3}",
regV.Idx1, flowMeter.Idx1, currentReqFlowLo, currentReqFlowHi); regV.Idx1, flowMeter.Idx1, currentReqFlowLo, currentReqFlowHi);
/// Store the current time, etc. /// Store the current time, etc.
startTime = StateMachine.Time;
setFlowTime = StateMachine.Time + delay; setFlowTime = StateMachine.Time + delay;
expireTime = StateMachine.Time + timeout; expireTime = StateMachine.Time + timeout;
if (expireTime < 0) expireTime = int.MaxValue; if (expireTime < 0) expireTime = int.MaxValue;
@@ -211,6 +206,8 @@ namespace TBF.Rig.Uni.RegValve
if (opState == OpState.Wait4FlowMsrmntAndSendRVMove) if (opState == OpState.Wait4FlowMsrmntAndSendRVMove)
{ {
if (flowMeter.DebugLevel == DebugMode.Simulate) return Event.FlowReached;
if (!flowMeter.MsrmntAvailable) return Event.Starting; if (!flowMeter.MsrmntAvailable) return Event.Starting;
double flow1 = flowMeter.ReadFlow(); double flow1 = flowMeter.ReadFlow();
@@ -228,8 +225,8 @@ namespace TBF.Rig.Uni.RegValve
if (StateMachine.Time > setFlowTime) if (StateMachine.Time > setFlowTime)
{ {
uniCB.SetFlow(false, regV.Idx1, 2000.0 * currentReqFlowLo / flowMeter.NominalFlow, uniCB.SetFlow(false, regV.Idx1, flowMeter.NominalFreq * currentReqFlowLo / flowMeter.NominalFlow,
2000.0 * currentReqFlowHi / flowMeter.NominalFlow); flowMeter.NominalFreq * currentReqFlowHi / flowMeter.NominalFlow);
log.InfoFormat("Run(): rv#={0} TARGET: flowLo={1} flowHi={2}", regV.Idx1, currentReqFlowLo, currentReqFlowHi); log.InfoFormat("Run(): rv#={0} TARGET: flowLo={1} flowHi={2}", regV.Idx1, currentReqFlowLo, currentReqFlowHi);
@@ -273,17 +270,16 @@ namespace TBF.Rig.Uni.RegValve
/// ///
double frequency = flowMeter.ReadFrequency(); double frequency = flowMeter.ReadFrequency();
double flow = flowMeter.ReadFlow(); double flow = flowMeter.ReadFlow();
if (flow != 0) flowBox.Val = flow; if (msrdFlow != null && flow != 0) msrdFlow.Val = flow;
if ((currentReqFlowLo <= flow) && (flow <= currentReqFlowHi)) if (currentReqFlowLo <= flow && flow <= currentReqFlowHi)
{ {
/// Flow is within range isFlowOkDuration++; /// Increment the flow within range duration
isFlowOkDuration++;
if (isFlowOkDuration >= regV.FlowStableSec) if (isFlowOkDuration >= regV.FlowStableSec)
{ {
/// Flow is within range for sufficiently long time /// Flow is within range for sufficiently long time
if (regV.regValveCfg.StoredPositionReuse) if (regV.StoredPositionReuse)
{ {
double rvPosition = regV.Position; /// Read the current position double rvPosition = regV.Position; /// Read the current position
double storedPosition; double storedPosition;
@@ -330,13 +326,12 @@ namespace TBF.Rig.Uni.RegValve
} }
} }
/// <summary>Start this operation</summary> /// <summary>Stop this operation</summary>
public void Stop() public void Stop()
{ {
if (!leaveFlowControlRunning) if (!leaveFlowControlRunning)
{ {
/// Stop flow measurement uniCB.StopFlowControl(false, regV.Idx1); /// Stop the flow measurement
uniCB.StopFlowControl(false, regV.Idx1);
} }
opState = OpState.Idle; opState = OpState.Idle;
+19 -22
View File
@@ -1,5 +1,5 @@
/// ///
/// Copyright (c) 2021 Sensus Slovensko a.s. /// Copyright (c) 2021-2022 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -17,8 +17,6 @@ namespace TBF.Rig.Uni.RegValve
return string.Format("SetRegValvePositionOp({0},{1},{2})", regV.Name, posLoPct, posHiPct); return string.Format("SetRegValvePositionOp({0},{1},{2})", regV.Name, posLoPct, posHiPct);
} }
const int CoaxValveNr = 7; /// Coax. valve has number 7
/// ///
/// Internal states of this operation /// Internal states of this operation
/// ///
@@ -32,7 +30,7 @@ namespace TBF.Rig.Uni.RegValve
OpState opState; OpState opState;
/// Set by the constructor /// Set by the constructor
readonly UniCB cBoard; readonly UniCB uniCB;
readonly RegValve regV; readonly RegValve regV;
readonly int regValveNr; readonly int regValveNr;
readonly double posLoPct; readonly double posLoPct;
@@ -47,24 +45,23 @@ namespace TBF.Rig.Uni.RegValve
/// Set required water flow. /// Set required water flow.
/// Events: FlowSet, FlowTimeOut /// Events: FlowSet, FlowTimeOut
/// </summary> /// </summary>
/// <param name="cBoard">Control board device</param> /// <param name="uniCB">Control board device</param>
/// <param name="_regulValve">Regulation valve component</param> /// <param name="_regulValve">Regulation valve component</param>
/// <param name="posLoPct">Lower limit of the position to be achieved</param> /// <param name="posLoPct">Lower limit of the position to be achieved</param>
/// <param name="posHiPct">Upper limit of the position to be achieved</param> /// <param name="posHiPct">Upper limit of the position to be achieved</param>
/// <param name="timeout">Timeout in sec. for setting the flow</param> /// <param name="timeout">Timeout in sec. for setting the flow</param>
/// <remarks>Only Elde.Valve flow are used, other flow on the lists are ignored</remarks> /// <remarks>Only Elde.Valve flow are used, other flow on the lists are ignored</remarks>
public SetRegValvePositionOp(UniCB cBoard, RegValve regValve, double posLoPct, double posHiPct, int timeout) public SetRegValvePositionOp(UniCB uniCB, RegValve regV, double posLoPct, double posHiPct, int timeout)
{ {
this.cBoard = cBoard; this.uniCB = uniCB;
if (this.cBoard == null) throw new ArgumentNullException("ctrlBoard"); if (this.uniCB == null) throw new ArgumentNullException("ctrlBoard");
this.regV = regValve as RegValve; this.regV = regV as RegValve;
if (this.regV == null) throw new ArgumentNullException("regValve is null or not Elde"); if (this.regV == null) throw new ArgumentNullException("regValve is null or not Uni");
this.regValveNr = this.regV.Idx1; this.regValveNr = this.regV.Idx1;
this.posLoPct = posLoPct; this.posLoPct = posLoPct;
this.posHiPct = posHiPct; this.posHiPct = posHiPct;
this.timeout = timeout; this.timeout = timeout;
log.Debug(this.ToString()); log.Debug(this.ToString());
@@ -88,7 +85,9 @@ namespace TBF.Rig.Uni.RegValve
opState = OpState.MoveToPosition; opState = OpState.MoveToPosition;
} }
/// <summary>Run this operation</summary> /// <summary>
/// Run this operation
/// </summary>
/// <returns> /// <returns>
/// Event.None . . . . . . . busy adjusting position /// Event.None . . . . . . . busy adjusting position
/// Event.PositionReached . . position reached /// Event.PositionReached . . position reached
@@ -98,29 +97,25 @@ namespace TBF.Rig.Uni.RegValve
{ {
if (opState == OpState.MoveToPosition) if (opState == OpState.MoveToPosition)
{ {
if (posLoPct >= posHiPct || posLoPct > 100.0f || posHiPct < 0) if (posLoPct >= posHiPct || posLoPct > 100.0 || posHiPct < 0)
{ {
return Event.OpArgumentError; return Event.OpArgumentError;
} }
regV.MoveToPosition(false, posLoPct, posHiPct); regV.MoveToPosition(false, posLoPct, posHiPct);
opState = OpState.CheckState; opState = OpState.CheckState;
log.WarnFormat("Run(): RV#={0}, state={1}, MoveToPosition(false, {2:D1}, {3:D1}) issued", regValveNr, opState, posLoPct, posHiPct);
return Event.None; return Event.None;
} }
if (positionReached) return Event.PositionReached; if (positionReached) return Event.PositionReached;
double positionPct = regV.Position; double positionPct = regV.Position;
log.WarnFormat("Run(): RV#={0}, actPos={1}%", regValveNr, positionPct.ToString("F1")); log.WarnFormat("Run(): RV#={0}, state={1}, pos={2}%", regValveNr, opState, positionPct.ToString("F1"));
if (opState == OpState.CheckState) if (opState == OpState.CheckState)
{ {
if (regValveNr == CoaxValveNr && (cBoard.State & (ulong)StatusP.CoaxRegValveBusy) == 0) if (posLoPct <= positionPct && positionPct <= posHiPct)
{
opState = OpState.MoveToPosition;
return Event.None;
}
else if (posLoPct <= positionPct && positionPct <= posHiPct)
{ {
positionReached = true; positionReached = true;
return Event.PositionReached; return Event.PositionReached;
@@ -153,6 +148,8 @@ namespace TBF.Rig.Uni.RegValve
} }
/// <summary>Stop this operation</summary> /// <summary>Stop this operation</summary>
public void Stop() { } public void Stop()
{
}
} }
} }
-2
View File
@@ -43,8 +43,6 @@ namespace TBF.Rig.Uni.RegValveAnalog
return (1 / CalibDA) * uniCB.Data.StavDA[0]; return (1 / CalibDA) * uniCB.Data.StavDA[0];
} }
} }
///
public int RegulationMinStep { get { return 0; } } /// Analog RegValve not operates with this variable
/// ///
public double SetpointVal public double SetpointVal
{ {
+1 -3
View File
@@ -39,10 +39,8 @@ namespace TBF.Rig.Uni.RegValveTandem
get { return regValve.Position; } get { return regValve.Position; }
} }
///
public int RegulationMinStep { get { return 0; } } /// Analog RegValve not operates with this variable
public RegValveTandem() { } public RegValveTandem() { }
public RegValveTandem(Generic.IComponentCfg cfg, IList<Generic.IComponent> components) public RegValveTandem(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
: base(cfg) : base(cfg)
+1 -9
View File
@@ -38,20 +38,12 @@
<conversionPattern value="%date %-5level %logger - %message%newline" /> <conversionPattern value="%date %-5level %logger - %message%newline" />
</layout> </layout>
</appender> </appender>
<appender name="LogCache" type="AppDiagnostic.LogCacheAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<!-- Set root logger --> <!-- Set root logger -->
<root> <root>
<level value="WARN" /> <level value="WARN" />
</root> </root>
<root>
<level value="DEBUG" />
<appender-ref ref="MemoryAppender" />
</root>
<!-- Set process loggers --> <!-- Set process loggers -->
<logger name="AllResults"><level value="INFO" /><appender-ref ref="AllResults" /></logger> <logger name="AllResults"><level value="INFO" /><appender-ref ref="AllResults" /></logger>
+56 -101
View File
@@ -28,7 +28,7 @@
<UpdateRequired>false</UpdateRequired> <UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions> <MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision> <ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>2.12.497.1</ApplicationVersion> <ApplicationVersion>2.12.497.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>
@@ -39,7 +39,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;CAMERA</DefineConstants> <DefineConstants>TRACE;DEBUG;CAMERA;LANG_PL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -60,7 +60,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;CAMERA</DefineConstants> <DefineConstants>TRACE;DEBUG;CAMERA;LANG_PL</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
@@ -70,7 +70,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath> <OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;IPERL;CAMERA</DefineConstants> <DefineConstants>TRACE;CAMERA;LANG_PL</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@@ -152,7 +152,6 @@
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Boxes\DateTimeBox.cs" /> <Compile Include="Boxes\DateTimeBox.cs" />
@@ -1346,50 +1345,6 @@
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon> <DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Rig\TestMethods\FlyingStartMassCollection\Single\TestParams.cs" /> <Compile Include="Rig\TestMethods\FlyingStartMassCollection\Single\TestParams.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\AllCompletedEventArgs.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\CheckBoxImage.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\CommCompletedEventArgs.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.designer.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationParams.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationSeq.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlDataWrite.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlEnums.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\CalibrationStruct.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\CalibrationStructV4.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\ConfigStruct.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\Enums.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\Factory.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\FlowDirectionDetection.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHead.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfg.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfgCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfgCtrl.designer.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadTestCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadTestCtrl.Designer.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\NfcServices.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\OptoReceivedEventArgs.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\ProcParams.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\RfidServices.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\SimulationServices.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\StatusStruct.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\OpticalHeadTest.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\SequenceConditionOp.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethod.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfg.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfgCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfgCtrl.designer.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodFactory.cs" />
<Compile Include="Rig\TestMethods\LiveStream\TestParams.cs" /> <Compile Include="Rig\TestMethods\LiveStream\TestParams.cs" />
<Compile Include="Rig\TestMethods\S640Communication\CheckBoxImage.cs"> <Compile Include="Rig\TestMethods\S640Communication\CheckBoxImage.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
@@ -1649,6 +1604,46 @@
<Compile Include="Rig\TestMethods\GrabImage\Component.cs" /> <Compile Include="Rig\TestMethods\GrabImage\Component.cs" />
<Compile Include="Rig\TestMethods\GrabImage\Factory.cs" /> <Compile Include="Rig\TestMethods\GrabImage\Factory.cs" />
<Compile Include="Rig\TestMethods\GrabImage\GrabImageSeq.cs" /> <Compile Include="Rig\TestMethods\GrabImage\GrabImageSeq.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\AllCompletedEventArgs.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\CheckBoxImage.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\CommCompletedEventArgs.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationParams.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationSeq.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.designer.cs">
<DependentUpon>iPerlCommunicationForm.cs</DependentUpon>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlEnums.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\CalibrationStruct.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\CalibrationStructV4.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\ConfigStruct.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\Enums.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\Factory.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHead.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfg.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfgCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfgCtrl.designer.cs">
<DependentUpon>IperlHeadCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\FlowDirectionDetection.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\OptoReceivedEventArgs.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\ProcParams.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlHead\StatusStruct.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethod.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfg.cs" />
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfgCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfgCtrl.designer.cs">
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodFactory.cs" />
<Compile Include="Rig\TestMethods\LiveStream\Component.cs" /> <Compile Include="Rig\TestMethods\LiveStream\Component.cs" />
<Compile Include="Rig\TestMethods\LiveStream\LiveStreamCfg.cs" /> <Compile Include="Rig\TestMethods\LiveStream\LiveStreamCfg.cs" />
<Compile Include="Rig\TestMethods\LiveStream\CfgCtrl.cs"> <Compile Include="Rig\TestMethods\LiveStream\CfgCtrl.cs">
@@ -1792,19 +1787,6 @@
</Compile> </Compile>
<Compile Include="Rig\Uni\RegValveAnalog\SetFlowOp.cs" /> <Compile Include="Rig\Uni\RegValveAnalog\SetFlowOp.cs" />
<Compile Include="Rig\Uni\RegValveAnalog\SetRegValvePositionOp.cs" /> <Compile Include="Rig\Uni\RegValveAnalog\SetRegValvePositionOp.cs" />
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\ChangeRegValvePositionOp.cs" />
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\Factory.cs" />
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\Handlers.cs" />
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\RegValve.cs" />
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\RegValveCfg.cs" />
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\RegValveCfgCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\RegValveCfgCtrl.designer.cs">
<DependentUpon>RegValveCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\SetFlowOp.cs" />
<Compile Include="Rig\Uni\RegValveLowRegulTimeSaturation\SetRegValvePositionOp.cs" />
<Compile Include="Rig\Uni\RegValveTandem\ChangeRegValvePositionOp.cs" /> <Compile Include="Rig\Uni\RegValveTandem\ChangeRegValvePositionOp.cs" />
<Compile Include="Rig\Uni\RegValveTandem\RegValveTandem.cs" /> <Compile Include="Rig\Uni\RegValveTandem\RegValveTandem.cs" />
<Compile Include="Rig\Uni\RegValveTandem\RegValveTandemCfg.cs" /> <Compile Include="Rig\Uni\RegValveTandem\RegValveTandemCfg.cs" />
@@ -2085,10 +2067,6 @@
<DependentUpon>Strings.resx</DependentUpon> <DependentUpon>Strings.resx</DependentUpon>
</Compile> </Compile>
<Compile Include="Strings.Designer.cs" /> <Compile Include="Strings.Designer.cs" />
<Compile Include="Tools\ByteFormatter.cs" />
<Compile Include="Tools\IniUtil.cs" />
<Compile Include="Tools\LogChecker.cs" />
<Compile Include="Tools\XmlTools.cs" />
<Compile Include="UiBridge\ActivityEventArgs.cs" /> <Compile Include="UiBridge\ActivityEventArgs.cs" />
<Compile Include="UiBridge\AdjustmentInProgressEventArgs.cs" /> <Compile Include="UiBridge\AdjustmentInProgressEventArgs.cs" />
<Compile Include="UiBridge\Bridge.cs" /> <Compile Include="UiBridge\Bridge.cs" />
@@ -2647,9 +2625,6 @@
<Compile Include="UI\Shared\SharedButtons.designer.cs"> <Compile Include="UI\Shared\SharedButtons.designer.cs">
<DependentUpon>SharedButtons.cs</DependentUpon> <DependentUpon>SharedButtons.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UI\Shared\SuggestComboBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="UI\Shared\TabNameDlg.cs"> <Compile Include="UI\Shared\TabNameDlg.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -3105,10 +3080,9 @@
<EmbeddedResource Include="Rig\TestMethods\GrabImage\GrabImageCfgCtrl.resx"> <EmbeddedResource Include="Rig\TestMethods\GrabImage\GrabImageCfgCtrl.resx">
<DependentUpon>GrabImageCfgCtrl.cs</DependentUpon> <DependentUpon>GrabImageCfgCtrl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.resx" /> <EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfgCtrl.resx">
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfgCtrl.resx" /> <DependentUpon>IperlHeadCfgCtrl.cs</DependentUpon>
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadTestCtrl.resx" /> </EmbeddedResource>
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\TestMethodCfgCtrl.resx" />
<EmbeddedResource Include="Rig\TestMethods\LiveStream\CfgCtrl.resx"> <EmbeddedResource Include="Rig\TestMethods\LiveStream\CfgCtrl.resx">
<DependentUpon>CfgCtrl.cs</DependentUpon> <DependentUpon>CfgCtrl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -3172,6 +3146,12 @@
<EmbeddedResource Include="Rig\TestMethods\FlyingStart\HeatMeters\TestMethodCfgCtrl.resx"> <EmbeddedResource Include="Rig\TestMethods\FlyingStart\HeatMeters\TestMethodCfgCtrl.resx">
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon> <DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.resx">
<DependentUpon>iPerlCommunicationForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\TestMethodCfgCtrl.resx">
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Rig\TestMethods\SensitivityTest\TestMethodCfgCtrl.resx"> <EmbeddedResource Include="Rig\TestMethods\SensitivityTest\TestMethodCfgCtrl.resx">
<DependentUpon>TestMethodCfgCtrl.cs</DependentUpon> <DependentUpon>TestMethodCfgCtrl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -3184,9 +3164,6 @@
<EmbeddedResource Include="Rig\Uni\RegValveAnalog\RegValveCfgCtrl.resx"> <EmbeddedResource Include="Rig\Uni\RegValveAnalog\RegValveCfgCtrl.resx">
<DependentUpon>RegValveCfgCtrl.cs</DependentUpon> <DependentUpon>RegValveCfgCtrl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Rig\Uni\RegValveLowRegulTimeSaturation\RegValveCfgCtrl.resx">
<DependentUpon>RegValveCfgCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Rig\Uni\RegValveTandem\RegValveTandemCfgCtrl.resx"> <EmbeddedResource Include="Rig\Uni\RegValveTandem\RegValveTandemCfgCtrl.resx">
<DependentUpon>RegValveTandemCfgCtrl.cs</DependentUpon> <DependentUpon>RegValveTandemCfgCtrl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -3362,11 +3339,9 @@
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\MainWnd.cs.resx"> <EmbeddedResource Include="UI\MainWnd.cs.resx">
<DependentUpon>MainWnd.cs</DependentUpon> <DependentUpon>MainWnd.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\MainWnd.de.resx"> <EmbeddedResource Include="UI\MainWnd.de.resx">
<DependentUpon>MainWnd.cs</DependentUpon> <DependentUpon>MainWnd.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\MainWnd.fr.resx"> <EmbeddedResource Include="UI\MainWnd.fr.resx">
<DependentUpon>MainWnd.cs</DependentUpon> <DependentUpon>MainWnd.cs</DependentUpon>
@@ -3376,7 +3351,6 @@
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\MainWnd.resx"> <EmbeddedResource Include="UI\MainWnd.resx">
<DependentUpon>MainWnd.cs</DependentUpon> <DependentUpon>MainWnd.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\MainWnd.ru.resx"> <EmbeddedResource Include="UI\MainWnd.ru.resx">
<DependentUpon>MainWnd.cs</DependentUpon> <DependentUpon>MainWnd.cs</DependentUpon>
@@ -3473,7 +3447,6 @@
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\Shared\BenchControlPanel.resx"> <EmbeddedResource Include="UI\Shared\BenchControlPanel.resx">
<DependentUpon>BenchControlPanel.cs</DependentUpon> <DependentUpon>BenchControlPanel.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\Shared\ClosingTbfForm.resx"> <EmbeddedResource Include="UI\Shared\ClosingTbfForm.resx">
<DependentUpon>ClosingTbfForm.cs</DependentUpon> <DependentUpon>ClosingTbfForm.cs</DependentUpon>
@@ -3647,22 +3620,6 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\iPerlHead\Sensus.iPerl.RfidCom\Sensus.iPerl.RfidCom.csproj">
<Project>{a3e14180-7f00-42e5-94a9-8db62ead6ee8}</Project>
<Name>Sensus.iPerl.RfidCom</Name>
</ProjectReference>
<ProjectReference Include="..\..\iPerlHead\Sensus.iPerl.TestConsole\Sensus.iPerl.TestConsole.csproj">
<Project>{5025ed8b-a94f-4e58-8be0-68481b061609}</Project>
<Name>Sensus.iPerl.TestConsole</Name>
</ProjectReference>
<ProjectReference Include="..\..\NfcS5_DLL\NfcS5_DLL.csproj">
<Project>{5954d496-caab-4f7a-bde2-bdc8f47dab19}</Project>
<Name>NfcS5_DLL</Name>
</ProjectReference>
<ProjectReference Include="..\AppDiagnostic\AppDiagnostic.csproj">
<Project>{fa9abad1-7184-4295-ade8-d44f2e3de6b2}</Project>
<Name>AppDiagnostic</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common.csproj"> <ProjectReference Include="..\Common\Common.csproj">
<Project>{c8939821-ba5c-4988-a3d0-bf53b74865c7}</Project> <Project>{c8939821-ba5c-4988-a3d0-bf53b74865c7}</Project>
<Name>Common</Name> <Name>Common</Name>
@@ -3699,10 +3656,6 @@
<Project>{0f79ca69-9dbc-41f3-a6fc-5a2937365343}</Project> <Project>{0f79ca69-9dbc-41f3-a6fc-5a2937365343}</Project>
<Name>SchematicDrawing</Name> <Name>SchematicDrawing</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SharedComponents\SharedComponents.csproj">
<Project>{8f942729-f454-4c99-ba6c-746962065ae3}</Project>
<Name>SharedComponents</Name>
</ProjectReference>
<ProjectReference Include="..\SharedDatabase\SharedDatabase.csproj"> <ProjectReference Include="..\SharedDatabase\SharedDatabase.csproj">
<Project>{211b5e3f-9996-48a7-abde-c878dd2d71c2}</Project> <Project>{211b5e3f-9996-48a7-abde-c878dd2d71c2}</Project>
<Name>SharedDatabase</Name> <Name>SharedDatabase</Name>
@@ -3712,7 +3665,9 @@
<Name>Results</Name> <Name>Results</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup>
<Folder Include="Rig\Modbus\Meret\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
-3
View File
@@ -10,7 +10,4 @@
<FallbackCulture>en-US</FallbackCulture> <FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles> <VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
</Project> </Project>
+197 -214
View File
@@ -17,27 +17,26 @@ using TBF.UI.Shared;
namespace TBF.UI.Bench.Paths namespace TBF.UI.Bench.Paths
{ {
public class PathsOutputCtrl : BaseWithListViewEx<Config.Entities.OutputPath>, ITabWithListViewEx public class PathsOutputCtrl : BaseWithListViewEx<Config.Entities.OutputPath>, ITabWithListViewEx
{ {
static readonly ILog log = LogManager.GetLogger(typeof(PathsOutputCtrl)); static readonly ILog log = LogManager.GetLogger(typeof(PathsOutputCtrl));
/// <summary> /// <summary>
/// Fixed ListViewEx columns /// Fixed ListViewEx columns
/// </summary> /// </summary>
enum Column enum Column
{ {
Name, Name,
Qfrom, Qfrom,
Qto, Qto,
FlowUnit, FlowUnit,
Selector, Selector,
RefFlowmtr, RefFlowmtr,
RegulValve, RegulValve,
RegulMinStep, PidCoef,
PidCoef, Div,
Div, Tdiv,
Tdiv, Scale,
Scale,
StartValve1, StartValve1,
InvertSV1, InvertSV1,
StartValve2, StartValve2,
@@ -47,28 +46,28 @@ namespace TBF.UI.Bench.Paths
InvertSV3, InvertSV3,
LagSV3, LagSV3,
FixedColumnsCount, FixedColumnsCount,
} }
readonly int fixedColumnsCount = (int)Column.FixedColumnsCount; readonly int fixedColumnsCount = (int)Column.FixedColumnsCount;
int valvescount; int valvescount;
int regulValvesCount; int regulValvesCount;
PathsDlg parent; PathsDlg parent;
Control parentControl; Control parentControl;
Control[] editors; Control[] editors;
public PathsOutputCtrl() public PathsOutputCtrl()
: base() : base()
{ {
FixedRowsCount = 1; FixedRowsCount = 1;
} }
public void Initialize(PathsDlg parent, Control parentControl) public void Initialize(PathsDlg parent, Control parentControl)
{ {
this.parent = parent; this.parent = parent;
this.parentControl = parentControl; this.parentControl = parentControl;
/// Load the paths /// Load the paths
MyItems = parent.Session.QueryOver<Config.Entities.OutputPath>() MyItems = parent.Session.QueryOver<Config.Entities.OutputPath>()
.OrderBy(x => x.ItemNr).Asc .OrderBy(x => x.ItemNr).Asc
.List(); .List();
@@ -83,28 +82,27 @@ namespace TBF.UI.Bench.Paths
SubItemRightClicked += new SubItemEventHandler(listViewEx_SubItemRightClicked); SubItemRightClicked += new SubItemEventHandler(listViewEx_SubItemRightClicked);
SubItemEndEditing += new SubItemEndEditingEventHandler(listViewEx_SubItemEndEditing); SubItemEndEditing += new SubItemEndEditingEventHandler(listViewEx_SubItemEndEditing);
/// ListViewEx columns /// ListViewEx columns
TBF.LocalSettings ls = Program.LocalSettings; TBF.LocalSettings ls = Program.LocalSettings;
Columns.Add(Strings.Name, (ls.OutputColumnCount > 0) ? ls.OutputColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.Name, (ls.OutputColumnCount > 0) ? ls.OutputColumnWidths[0] : 60 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.Q_from, (ls.OutputColumnCount > 1) ? ls.OutputColumnWidths[1] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.Q_from, (ls.OutputColumnCount > 1) ? ls.OutputColumnWidths[1] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.Q_to, (ls.OutputColumnCount > 2) ? ls.OutputColumnWidths[2] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.Q_to, (ls.OutputColumnCount > 2) ? ls.OutputColumnWidths[2] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add("Unit", (ls.OutputColumnCount > 3) ? ls.OutputColumnWidths[3] : 50 * parent.Dpi / Constants.Dpi100pct); Columns.Add("Unit", (ls.OutputColumnCount > 3) ? ls.OutputColumnWidths[3] : 50 * parent.Dpi / Constants.Dpi100pct);
Columns.Add("Selector", (ls.OutputColumnCount > 4) ? ls.OutputColumnWidths[4] : 60 * parent.Dpi / Constants.Dpi100pct); Columns.Add("Selector", (ls.OutputColumnCount > 4) ? ls.OutputColumnWidths[4] : 60 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.Flowmeter, (ls.OutputColumnCount > 5) ? ls.OutputColumnWidths[5] : 85 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.Flowmeter, (ls.OutputColumnCount > 5) ? ls.OutputColumnWidths[5] : 85 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.Reg_valve, (ls.OutputColumnCount > 6) ? ls.OutputColumnWidths[6] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.Reg_valve, (ls.OutputColumnCount > 6) ? ls.OutputColumnWidths[6] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.RegulMinStep, (ls.OutputColumnCount > 7) ? ls.OutputColumnWidths[7] : 50 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.PID, (ls.OutputColumnCount > 7) ? ls.OutputColumnWidths[7] : 50 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.PID, (ls.OutputColumnCount > 7) ? ls.OutputColumnWidths[7] : 50 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.Diverter, (ls.OutputColumnCount > 8) ? ls.OutputColumnWidths[8] : 60 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.Diverter, (ls.OutputColumnCount > 8) ? ls.OutputColumnWidths[8] : 60 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.T_div, (ls.OutputColumnCount > 9) ? ls.OutputColumnWidths[9] : 70 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.T_div, (ls.OutputColumnCount > 9) ? ls.OutputColumnWidths[9] : 70 * parent.Dpi / Constants.Dpi100pct); Columns.Add(Strings.Balance, (ls.OutputColumnCount > 10) ? ls.OutputColumnWidths[10] : 50 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(Strings.Balance, (ls.OutputColumnCount > 10) ? ls.OutputColumnWidths[10] : 50 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(string.Format("{0} 1", Strings.StartValve), (ls.OutputColumnCount > 11) ? ls.OutputColumnWidths[11] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(string.Format("{0} 1", Strings.StartValve), (ls.OutputColumnCount > 11) ? ls.OutputColumnWidths[11] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(string.Format("Inv. SV1"), (ls.OutputColumnCount > 12) ? ls.OutputColumnWidths[12] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(string.Format("Inv. SV1"), (ls.OutputColumnCount > 12) ? ls.OutputColumnWidths[12] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(string.Format("{0} 2", Strings.StartValve), (ls.OutputColumnCount > 13) ? ls.OutputColumnWidths[13] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(string.Format("{0} 2", Strings.StartValve), (ls.OutputColumnCount > 13) ? ls.OutputColumnWidths[13] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(string.Format("Inv.SV2"), (ls.OutputColumnCount > 14) ? ls.OutputColumnWidths[14] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(string.Format("Inv.SV2"), (ls.OutputColumnCount > 14) ? ls.OutputColumnWidths[14] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(string.Format("Lag SV2"), (ls.OutputColumnCount > 15) ? ls.OutputColumnWidths[15] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(string.Format("Lag SV2"), (ls.OutputColumnCount > 15) ? ls.OutputColumnWidths[15] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(string.Format("{0} 3", Strings.StartValve), (ls.OutputColumnCount > 16) ? ls.OutputColumnWidths[16] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(string.Format("{0} 3", Strings.StartValve), (ls.OutputColumnCount > 16) ? ls.OutputColumnWidths[16] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(string.Format("Inv.SV3"), (ls.OutputColumnCount > 17) ? ls.OutputColumnWidths[17] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(string.Format("Inv.SV3"), (ls.OutputColumnCount > 17) ? ls.OutputColumnWidths[17] : 80 * parent.Dpi / Constants.Dpi100pct);
Columns.Add(string.Format("Lag SV3"), (ls.OutputColumnCount > 18) ? ls.OutputColumnWidths[18] : 80 * parent.Dpi / Constants.Dpi100pct); Columns.Add(string.Format("Lag SV3"), (ls.OutputColumnCount > 18) ? ls.OutputColumnWidths[18] : 80 * parent.Dpi / Constants.Dpi100pct);
valvescount = 0; valvescount = 0;
regulValvesCount = 0; regulValvesCount = 0;
@@ -126,13 +124,12 @@ namespace TBF.UI.Bench.Paths
regulValvesCount++; regulValvesCount++;
} }
/// Prepare fixed columns combo boxes /// Prepare fixed columns combo boxes
ComboBox flowMeterComboBox = new ComboBox(); ComboBox flowMeterComboBox = new ComboBox();
ComboBox regulValveComboBox = new ComboBox(); ComboBox regulValveComboBox = new ComboBox();
ComboBox RegulMinStepComboBox = new ComboBox();
ComboBox diverterComboBox = new ComboBox(); ComboBox diverterComboBox = new ComboBox();
ComboBox tempMeterDivComboBox = new ComboBox(); ComboBox tempMeterDivComboBox = new ComboBox();
ComboBox scaleComboBox = new ComboBox(); ComboBox scaleComboBox = new ComboBox();
ComboBox startValve1ComboBox = new ComboBox(); ComboBox startValve1ComboBox = new ComboBox();
ComboBox invertSV1ComboBox = new ComboBox(); ComboBox invertSV1ComboBox = new ComboBox();
ComboBox startValve2ComboBox = new ComboBox(); ComboBox startValve2ComboBox = new ComboBox();
@@ -143,10 +140,9 @@ namespace TBF.UI.Bench.Paths
TextBox lagSV3TextBox = new TextBox(); TextBox lagSV3TextBox = new TextBox();
flowMeterComboBox.Items.Add("---"); flowMeterComboBox.Items.Add("---");
regulValveComboBox.Items.Add("---"); regulValveComboBox.Items.Add("---");
RegulMinStepComboBox.Items.Add("---");
diverterComboBox.Items.Add("---"); diverterComboBox.Items.Add("---");
tempMeterDivComboBox.Items.Add("---"); tempMeterDivComboBox.Items.Add("---");
scaleComboBox.Items.Add("---"); scaleComboBox.Items.Add("---");
startValve1ComboBox.Items.Add("---"); startValve1ComboBox.Items.Add("---");
invertSV1ComboBox.Items.Add(Strings.no); invertSV1ComboBox.Items.Add(Strings.no);
invertSV1ComboBox.Items.Add(Strings.yes); invertSV1ComboBox.Items.Add(Strings.yes);
@@ -157,10 +153,10 @@ namespace TBF.UI.Bench.Paths
invertSV3ComboBox.Items.Add(Strings.no); invertSV3ComboBox.Items.Add(Strings.no);
invertSV3ComboBox.Items.Add(Strings.yes); invertSV3ComboBox.Items.Add(Strings.yes);
foreach (var cmpnt in parent.TbfComponents) foreach (var cmpnt in parent.TbfComponents)
{ {
if (cmpnt is IFlowMeter) flowMeterComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is IFlowMeter) flowMeterComboBox.Items.Add(cmpnt.Cfg.Name);
if (cmpnt is IRegValve) regulValveComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is IRegValve) regulValveComboBox.Items.Add(cmpnt.Cfg.Name);
if (cmpnt is IDiverter) diverterComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is IDiverter) diverterComboBox.Items.Add(cmpnt.Cfg.Name);
if (cmpnt is ITempMeter) tempMeterDivComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is ITempMeter) tempMeterDivComboBox.Items.Add(cmpnt.Cfg.Name);
if (cmpnt is IScaleOrTank) scaleComboBox.Items.Add(cmpnt.Cfg.Name); if (cmpnt is IScaleOrTank) scaleComboBox.Items.Add(cmpnt.Cfg.Name);
if (cmpnt is IValve && (cmpnt as IValve).CoupledTo == null) if (cmpnt is IValve && (cmpnt as IValve).CoupledTo == null)
@@ -169,43 +165,42 @@ namespace TBF.UI.Bench.Paths
startValve2ComboBox.Items.Add(cmpnt.Cfg.Name); startValve2ComboBox.Items.Add(cmpnt.Cfg.Name);
startValve3ComboBox.Items.Add(cmpnt.Cfg.Name); startValve3ComboBox.Items.Add(cmpnt.Cfg.Name);
} }
} }
/// Flow unit /// Flow unit
var flowUnitBox = new ComboBox(); var flowUnitBox = new ComboBox();
for (Unit u = 0; u < Unit.Count; u++) if (Units.IsFlow(u)) flowUnitBox.Items.Add(u.ToDescription()); for (Unit u = 0; u < Unit.Count; u++) if (Units.IsFlow(u)) flowUnitBox.Items.Add(u.ToDescription());
editors = new Control[fixedColumnsCount + valvescount + regulValvesCount]; editors = new Control[fixedColumnsCount + valvescount + regulValvesCount];
/// ///
editors[(int)Column.Name] = new TextBox(); /// Name editors[(int)Column.Name] = new TextBox(); /// Name
editors[(int)Column.Qfrom] = new TextBox(); /// Q_from editors[(int)Column.Qfrom] = new TextBox(); /// Q_from
editors[(int)Column.Qto] = new TextBox(); /// Q_to editors[(int)Column.Qto] = new TextBox(); /// Q_to
editors[(int)Column.FlowUnit] = flowUnitBox; /// Flow unit editors[(int)Column.FlowUnit] = flowUnitBox; /// Flow unit
editors[(int)Column.Selector] = new TextBox(); /// Selector editors[(int)Column.Selector] = new TextBox(); /// Selector
editors[(int)Column.RefFlowmtr] = flowMeterComboBox; editors[(int)Column.RefFlowmtr] = flowMeterComboBox;
editors[(int)Column.RegulValve] = regulValveComboBox; editors[(int)Column.RegulValve] = regulValveComboBox;
editors[(int)Column.RegulMinStep] = RegulMinStepComboBox; editors[(int)Column.PidCoef] = new TextBox(); /// PID
editors[(int)Column.PidCoef] = new TextBox(); /// PID editors[(int)Column.Div] = diverterComboBox;
editors[(int)Column.Div] = diverterComboBox; editors[(int)Column.Tdiv] = tempMeterDivComboBox;
editors[(int)Column.Tdiv] = tempMeterDivComboBox; editors[(int)Column.Scale] = scaleComboBox;
editors[(int)Column.Scale] = scaleComboBox;
editors[(int)Column.StartValve1] = startValve1ComboBox; editors[(int)Column.StartValve1] = startValve1ComboBox;
editors[(int)Column.InvertSV1] = invertSV1ComboBox; editors[(int)Column.InvertSV1] = invertSV1ComboBox;
editors[(int)Column.StartValve2] = startValve2ComboBox; editors[(int)Column.StartValve2] = startValve2ComboBox;
editors[(int)Column.InvertSV2] = invertSV2ComboBox; editors[(int)Column.InvertSV2] = invertSV2ComboBox;
editors[(int)Column.LagSV2] = lagSV2TextBox; editors[(int)Column.LagSV2] = lagSV2TextBox;
editors[(int)Column.StartValve3] = startValve3ComboBox; editors[(int)Column.StartValve3] = startValve3ComboBox;
editors[(int)Column.InvertSV3] = invertSV3ComboBox; editors[(int)Column.InvertSV3] = invertSV3ComboBox;
editors[(int)Column.LagSV3] = lagSV3TextBox; editors[(int)Column.LagSV3] = lagSV3TextBox;
/// Prepare valve combo-boxes (max. 64 valves) /// Prepare valve combo-boxes (max. 64 valves)
for (int i = 0; i < valvescount; i++) for (int i = 0; i < valvescount; i++)
{ {
ComboBox cb = new ComboBox(); ComboBox cb = new ComboBox();
cb.Items.Add("---"); cb.Items.Add("---");
cb.Items.Add(Strings.open); cb.Items.Add(Strings.open);
cb.Items.Add(Strings.close); cb.Items.Add(Strings.close);
editors[fixedColumnsCount + i] = cb; editors[fixedColumnsCount + i] = cb;
} }
/// Prepare regul. valve combo-boxes /// Prepare regul. valve combo-boxes
for (int i = 0; i < regulValvesCount; i++) for (int i = 0; i < regulValvesCount; i++)
{ {
@@ -225,29 +220,21 @@ namespace TBF.UI.Bench.Paths
parent.Controls.Add(editors[i]); parent.Controls.Add(editors[i]);
} }
RegulMinStepComboBox.Items.Add("0"); base.RedrawAll();
RegulMinStepComboBox.Items.Add("50"); }
RegulMinStepComboBox.Items.Add("100");
RegulMinStepComboBox.Items.Add("150");
RegulMinStepComboBox.Items.Add("200");
RegulMinStepComboBox.Items.Add("250");
RegulMinStepComboBox.Items.Add("300");
base.RedrawAll();
}
void listViewEx_SubItemClicked(object sender, SubItemEventArgs e) void listViewEx_SubItemClicked(object sender, SubItemEventArgs e)
{ {
if (e.SubItem != (int)Column.FlowUnit && (!Unlocked || e.SubItem >= editors.Length)) return; if (e.SubItem != (int)Column.FlowUnit && (!Unlocked || e.SubItem >= editors.Length)) return;
if ((e.Item.Tag is IHasItemNr) && if ((e.Item.Tag is IHasItemNr) &&
((e.Item.Tag as IHasItemNr).ItemNr < FixedRowsCount) && ((e.Item.Tag as IHasItemNr).ItemNr < FixedRowsCount) &&
(e.SubItem < fixedColumnsCount)) (e.SubItem < fixedColumnsCount))
{ {
return; return;
} }
StartEditing(editors[e.SubItem], e.Item, e.SubItem); StartEditing(editors[e.SubItem], e.Item, e.SubItem);
} }
void listViewEx_SubItemRightClicked(object sender, SubItemEventArgs e) void listViewEx_SubItemRightClicked(object sender, SubItemEventArgs e)
{ {
@@ -278,7 +265,7 @@ namespace TBF.UI.Bench.Paths
} }
void listViewEx_SubItemEndEditing(object sender, SubItemEndEditingEventArgs e) void listViewEx_SubItemEndEditing(object sender, SubItemEndEditingEventArgs e)
{ {
var entity = e.Item.Tag as Config.Entities.OutputPath; var entity = e.Item.Tag as Config.Entities.OutputPath;
double ddummy; double ddummy;
@@ -345,12 +332,12 @@ namespace TBF.UI.Bench.Paths
item.SubItems[ix].Text = Units.ConvertTo(newUnit, entity.QtoTextChngd ? flowM3ph : entity.Qto).ToString(); item.SubItems[ix].Text = Units.ConvertTo(newUnit, entity.QtoTextChngd ? flowM3ph : entity.Qto).ToString();
} }
public override void DrawOne(object myItem) public override void DrawOne(object myItem)
{ {
Config.Entities.OutputPath entity = (Config.Entities.OutputPath)myItem; Config.Entities.OutputPath entity =(Config.Entities.OutputPath)myItem;
Rig.OutputPath path = new Rig.OutputPath(entity, parent.TbfComponents); Rig.OutputPath path = new Rig.OutputPath(entity, parent.TbfComponents);
ListViewItem lvi = new ListViewItem(entity.Name); ListViewItem lvi = new ListViewItem(entity.Name);
lvi.UseItemStyleForSubItems = false; lvi.UseItemStyleForSubItems = false;
lvi.SubItems.Add(Units.ConvertTo(entity.FlowUnit, path.Qfrom).ToString()); /// Q_from lvi.SubItems.Add(Units.ConvertTo(entity.FlowUnit, path.Qfrom).ToString()); /// Q_from
@@ -359,11 +346,10 @@ namespace TBF.UI.Bench.Paths
lvi.SubItems.Add(path.Selector); lvi.SubItems.Add(path.Selector);
lvi.SubItems.Add((path.FlowMeter != null) ? path.FlowMeter.Cfg.Name : "---"); lvi.SubItems.Add((path.FlowMeter != null) ? path.FlowMeter.Cfg.Name : "---");
lvi.SubItems.Add((path.RegValve != null) ? path.RegValve.Cfg.Name : "---"); lvi.SubItems.Add((path.RegValve != null) ? path.RegValve.Cfg.Name : "---");
lvi.SubItems.Add((path.RegValve != null) ? (path.RegulMinStep * 50).ToString() : "---"); lvi.SubItems.Add(path.PidCoef.ToString("F1"));
lvi.SubItems.Add(path.PidCoef.ToString("F1"));
lvi.SubItems.Add((path.Diverter != null) ? path.Diverter.Cfg.Name : "---"); lvi.SubItems.Add((path.Diverter != null) ? path.Diverter.Cfg.Name : "---");
lvi.SubItems.Add((path.TempMtrDiv != null) ? path.TempMtrDiv.Cfg.Name : "---"); lvi.SubItems.Add((path.TempMtrDiv != null) ? path.TempMtrDiv.Cfg.Name : "---");
lvi.SubItems.Add((path.Scale != null) ? path.Scale.Cfg.Name : "---"); lvi.SubItems.Add((path.Scale != null) ? path.Scale.Cfg.Name : "---");
lvi.SubItems.Add((path.StartValve1 != null) ? path.StartValve1.Cfg.Name : "---"); lvi.SubItems.Add((path.StartValve1 != null) ? path.StartValve1.Cfg.Name : "---");
@@ -375,28 +361,28 @@ namespace TBF.UI.Bench.Paths
lvi.SubItems.Add(path.InvertSV3 ? Strings.yes : Strings.no); lvi.SubItems.Add(path.InvertSV3 ? Strings.yes : Strings.no);
lvi.SubItems.Add(path.LagSV3.ToString()); lvi.SubItems.Add(path.LagSV3.ToString());
foreach (var valve in parent.Valves) foreach (var valve in parent.Valves)
{ {
int subItemNr = lvi.SubItems.Count; int subItemNr = lvi.SubItems.Count;
if (valve.Category == ValveCategory.Output) if (valve.Category == ValveCategory.Output)
{ {
if (path.ValvesOpen != null && path.ValvesOpen.Contains(valve)) if (path.ValvesOpen != null && path.ValvesOpen.Contains(valve))
{ {
lvi.SubItems.Add(Strings.open); lvi.SubItems.Add(Strings.open);
lvi.SubItems[subItemNr].BackColor = Color.LightGray; lvi.SubItems[subItemNr].BackColor = Color.LightGray;
} }
else if (path.ValvesClose != null && path.ValvesClose.Contains(valve)) else if (path.ValvesClose != null && path.ValvesClose.Contains(valve))
{ {
lvi.SubItems.Add(Strings.close); lvi.SubItems.Add(Strings.close);
lvi.SubItems[subItemNr].BackColor = Color.White; lvi.SubItems[subItemNr].BackColor = Color.White;
} }
else else
{ {
lvi.SubItems.Add("---"); lvi.SubItems.Add("---");
lvi.SubItems[subItemNr].BackColor = Color.White; lvi.SubItems[subItemNr].BackColor = Color.White;
} }
} }
} }
foreach (var rvp in path.RegVPositions) foreach (var rvp in path.RegVPositions)
{ {
@@ -414,39 +400,36 @@ namespace TBF.UI.Bench.Paths
} }
} }
lvi.Tag = entity; lvi.Tag = entity;
Items.Add(lvi); Items.Add(lvi);
} }
public override void UpdateOne(ListViewItem lvi, object myItem) public override void UpdateOne(ListViewItem lvi, object myItem)
{ {
Config.Entities.OutputPath entity = (Config.Entities.OutputPath)myItem; Config.Entities.OutputPath entity = (Config.Entities.OutputPath)myItem;
entity.Name = lvi.Text; entity.Name = lvi.Text;
double Qfrom; double Qfrom;
bool allOk = Utils.TryParseUDouble(lvi.SubItems[(int)Column.Qfrom].Text, out Qfrom); bool allOk = Utils.TryParseUDouble(lvi.SubItems[(int)Column.Qfrom].Text, out Qfrom);
entity.Qfrom = Units.ConvertFrom(entity.FlowUnit, Qfrom); entity.Qfrom = Units.ConvertFrom(entity.FlowUnit, Qfrom);
double Qto; double Qto;
allOk &= Utils.TryParseUDouble(lvi.SubItems[(int)Column.Qto].Text, out Qto); allOk &= Utils.TryParseUDouble(lvi.SubItems[(int)Column.Qto].Text, out Qto);
entity.Qto = Units.ConvertFrom(entity.FlowUnit, Qto); entity.Qto = Units.ConvertFrom(entity.FlowUnit, Qto);
entity.Selector = lvi.SubItems[(int)Column.Selector].Text; entity.Selector = lvi.SubItems[(int)Column.Selector].Text;
entity.FlowMeter = lvi.SubItems[(int)Column.RefFlowmtr].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RefFlowmtr].Text; entity.FlowMeter = lvi.SubItems[(int)Column.RefFlowmtr].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RefFlowmtr].Text;
entity.RegValve = lvi.SubItems[(int)Column.RegulValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RegulValve].Text; entity.RegValve = lvi.SubItems[(int)Column.RegulValve].Text.Equals("---") ? null : lvi.SubItems[(int)Column.RegulValve].Text;
int val;
int.TryParse(lvi.SubItems[(int)Column.RegulMinStep].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)Column.RegulMinStep].Text, out val);
entity.RegulMinStep = val / 50;
float pid; float pid;
allOk &= Utils.TryParseSFloat(lvi.SubItems[(int)Column.PidCoef].Text, out pid); allOk &= Utils.TryParseSFloat(lvi.SubItems[(int)Column.PidCoef].Text, out pid);
entity.PidCoef = pid; entity.PidCoef = pid;
entity.Diverter = lvi.SubItems[(int)Column.Div].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Div].Text; entity.Diverter = lvi.SubItems[(int)Column.Div].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Div].Text;
entity.TempMtrDiv = lvi.SubItems[(int)Column.Tdiv].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Tdiv].Text; entity.TempMtrDiv = lvi.SubItems[(int)Column.Tdiv].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Tdiv].Text;
entity.Scale = lvi.SubItems[(int)Column.Scale].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Scale].Text; entity.Scale = lvi.SubItems[(int)Column.Scale].Text.Equals("---") ? null : lvi.SubItems[(int)Column.Scale].Text;
string sv1 = lvi.SubItems[(int)Column.StartValve1].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)Column.StartValve1].Text; string sv1 = lvi.SubItems[(int)Column.StartValve1].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)Column.StartValve1].Text;
bool invertSV1 = lvi.SubItems[(int)Column.InvertSV1].Text.Equals(Strings.yes); bool invertSV1 = lvi.SubItems[(int)Column.InvertSV1].Text.Equals(Strings.yes);
@@ -461,29 +444,29 @@ namespace TBF.UI.Bench.Paths
/// ///
entity.StartValve = string.Format("{0}~{1}~{2}~{3}~{4}~{5}~{6}~{7}", sv1, (invertSV1 ? "i" : "n"), sv2, (invertSV2 ? "i" : "n"), lagSV2, sv3, (invertSV3 ? "i" : "n"), lagSV3); entity.StartValve = string.Format("{0}~{1}~{2}~{3}~{4}~{5}~{6}~{7}", sv1, (invertSV1 ? "i" : "n"), sv2, (invertSV2 ? "i" : "n"), lagSV2, sv3, (invertSV3 ? "i" : "n"), lagSV3);
string valvesOpen = string.Empty; string valvesOpen = string.Empty;
string valvesClose = string.Empty; string valvesClose = string.Empty;
int k = 0; int k = 0;
foreach (var valve in parent.Valves) foreach (var valve in parent.Valves)
{ {
if (valve.Category == ValveCategory.Output) if (valve.Category == ValveCategory.Output)
{ {
string text = lvi.SubItems[fixedColumnsCount + k].Text; string text = lvi.SubItems[fixedColumnsCount + k].Text;
if (text.Equals(Strings.open)) if (text.Equals(Strings.open))
{ {
if (valvesOpen != string.Empty) valvesOpen += ";"; if (valvesOpen != string.Empty) valvesOpen += ";";
valvesOpen += valve.Cfg.Name; valvesOpen += valve.Cfg.Name;
} }
if (text.Equals(Strings.close)) if (text.Equals(Strings.close))
{ {
if (valvesClose != string.Empty) valvesClose += ";"; if (valvesClose != string.Empty) valvesClose += ";";
valvesClose += valve.Cfg.Name; valvesClose += valve.Cfg.Name;
} }
k++; k++;
} }
} }
entity.ValvesOpen = valvesOpen; entity.ValvesOpen = valvesOpen;
entity.ValvesClose = valvesClose; entity.ValvesClose = valvesClose;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (int i = 0; i < regulValvesCount; i++) for (int i = 0; i < regulValvesCount; i++)
@@ -504,47 +487,47 @@ namespace TBF.UI.Bench.Paths
} }
} }
entity.RegVPositions = sb.ToString(); entity.RegVPositions = sb.ToString();
} }
public void AddOne() public void AddOne()
{ {
Config.Entities.OutputPath entity; Config.Entities.OutputPath entity;
if (MyItems.Count < FixedRowsCount) if (MyItems.Count < FixedRowsCount)
{ {
entity = new Config.Entities.OutputPath(Strings._none_, MyItems.Count); entity = new Config.Entities.OutputPath(Strings._none_, MyItems.Count);
} }
else else
{ {
/// Find an unused test name /// Find an unused test name
string newName; string newName;
for (int nameId = 1; true; nameId++) for (int nameId = 1; true; nameId++)
{ {
newName = Strings.New_output_path_name + nameId.ToString(); newName = Strings.New_output_path_name + nameId.ToString();
bool notUsed = true; bool notUsed = true;
foreach (var t in MyItems) if (t.Name.Equals(newName)) notUsed = false; foreach (var t in MyItems) if (t.Name.Equals(newName)) notUsed = false;
if (notUsed) break; if (notUsed) break;
} }
entity = new Config.Entities.OutputPath(newName, MyItems.Count); entity = new Config.Entities.OutputPath(newName, MyItems.Count);
} }
base.AddOne(entity); base.AddOne(entity);
} }
public new void RemoveSelected() public new void RemoveSelected()
{ {
bool lastOneRemoved = base.RemoveSelected(); bool lastOneRemoved = base.RemoveSelected();
if (lastOneRemoved && parent != null) if (lastOneRemoved && parent != null)
{ {
parent.UpdateButtonStates(SharedButtons.SelectedItemPos.None); parent.UpdateButtonStates(SharedButtons.SelectedItemPos.None);
} }
} }
public string GetWarningsBeforeSaving(ref Dictionary<string, string> renmInfo) public string GetWarningsBeforeSaving(ref Dictionary<string, string> renmInfo)
{ {
base.OkBtnClicked(); /// = UpdateAll() base.OkBtnClicked(); /// = UpdateAll()
string warnings = string.Empty; string warnings = string.Empty;
foreach (var entity in ToBeRemovedItems) foreach (var entity in ToBeRemovedItems)
{ {
@@ -570,30 +553,30 @@ namespace TBF.UI.Bench.Paths
if (occurances > 0) if (occurances > 0)
{ {
warnings += string.Format(Strings._0_path_1_used_by_2_tests_will_be_renamed_to_3_4, Strings.OutputTabPageTitle, entity.OriName, occurances, entity.Name, Environment.NewLine); warnings += string.Format(Strings._0_path_1_used_by_2_tests_will_be_renamed_to_3_4, Strings.OutputTabPageTitle, entity.OriName, occurances, entity.Name, Environment.NewLine);
renmInfo.Add(entity.OriName, entity.Name); renmInfo.Add(entity.OriName, entity.Name);
} }
} }
} }
return warnings; return warnings;
} }
public void UpdateRelatedItems(Dictionary<string, string> renameInfo) public void UpdateRelatedItems(Dictionary<string, string> renameInfo)
{ {
foreach (var ri in renameInfo) foreach (var ri in renameInfo)
{ {
var tests = parent.Session.QueryOver<Config.Entities.Test>() var tests = parent.Session.QueryOver<Config.Entities.Test>()
.Where(x => x.OutputPath == ri.Key) .Where(x => x.OutputPath == ri.Key)
.List(); .List();
foreach (var t in tests) foreach (var t in tests)
{ {
t.OutputPath = ri.Value; t.OutputPath = ri.Value;
parent.Session.Update(t); parent.Session.Update(t);
} }
} }
} }
/// <summary> /// <summary>
/// Update the entities and save them to the database /// Update the entities and save them to the database
@@ -605,12 +588,12 @@ namespace TBF.UI.Bench.Paths
/// Update the database /// Update the database
foreach (var entity in ToBeRemovedItems) foreach (var entity in ToBeRemovedItems)
{ {
parent.Session.Delete(entity); parent.Session.Delete(entity);
} }
foreach (var entity in MyItems) foreach (var entity in MyItems)
{ {
parent.Session.SaveOrUpdate(entity); parent.Session.SaveOrUpdate(entity);
} }
SaveUISettings(); SaveUISettings();
} }
@@ -28,11 +28,11 @@ namespace TBF.UI.Bench.Uncertainties
/// SharedDlgButtons configuration /// SharedDlgButtons configuration
sharedButtons.ParentForm = this; sharedButtons.ParentForm = this;
//#if LANG_PL #if LANG_PL
// sharedButtons.RequiredGroupMembership = new GID[] { GID.MetrologicalAuthority }; sharedButtons.RequiredGroupMembership = new GID[] { GID.MetrologicalAuthority };
//#else #else
sharedButtons.RequiredGroupMembership = new GID[] { GID.Metrologists, GID.MetrologicalAuthority }; sharedButtons.RequiredGroupMembership = new GID[] { GID.Metrologists, GID.MetrologicalAuthority };
//#endif #endif
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove; sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove;
sharedButtons.Unlocked += unlockButton_Click; sharedButtons.Unlocked += unlockButton_Click;
sharedButtons.OKClicked += okButton_Click; sharedButtons.OKClicked += okButton_Click;
+2 -10
View File
@@ -91,7 +91,6 @@ namespace TBF.UI
this.homeTSMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.homeTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.eventLogsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.eventLogsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.settingsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.appDiagnosticMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.usersTSMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.usersTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.languageTSMItem = new System.Windows.Forms.ToolStripMenuItem(); this.languageTSMItem = new System.Windows.Forms.ToolStripMenuItem();
this.databaseSettingsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.databaseSettingsTSMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -565,7 +564,6 @@ namespace TBF.UI
// settingsTSMenuItem // settingsTSMenuItem
// //
this.settingsTSMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.settingsTSMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.appDiagnosticMenuItem,
this.usersTSMenuItem, this.usersTSMenuItem,
this.languageTSMItem, this.languageTSMItem,
this.databaseSettingsTSMenuItem, this.databaseSettingsTSMenuItem,
@@ -577,12 +575,6 @@ namespace TBF.UI
this.settingsTSMenuItem.Name = "settingsTSMenuItem"; this.settingsTSMenuItem.Name = "settingsTSMenuItem";
resources.ApplyResources(this.settingsTSMenuItem, "settingsTSMenuItem"); resources.ApplyResources(this.settingsTSMenuItem, "settingsTSMenuItem");
// //
// appDiagnosticMenuItem
//
this.appDiagnosticMenuItem.Name = "appDiagnosticMenuItem";
resources.ApplyResources(this.appDiagnosticMenuItem, "appDiagnosticMenuItem");
this.appDiagnosticMenuItem.Click += new System.EventHandler(this.appDiagnosticMenuItem_Click);
//
// usersTSMenuItem // usersTSMenuItem
// //
this.usersTSMenuItem.Name = "usersTSMenuItem"; this.usersTSMenuItem.Name = "usersTSMenuItem";
@@ -660,6 +652,7 @@ namespace TBF.UI
// //
// mainMenuStrip // mainMenuStrip
// //
this.mainMenuStrip.GripMargin = new System.Windows.Forms.Padding(2, 2, 0, 2);
this.mainMenuStrip.ImageScalingSize = new System.Drawing.Size(24, 24); this.mainMenuStrip.ImageScalingSize = new System.Drawing.Size(24, 24);
this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.benchTSMenuItem, this.benchTSMenuItem,
@@ -828,8 +821,7 @@ namespace TBF.UI
private System.Windows.Forms.SplitContainer splitContainer1; private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer topHorizontalSplitContainer; private System.Windows.Forms.SplitContainer topHorizontalSplitContainer;
private System.Windows.Forms.ToolStripMenuItem upgradeTSMenuItem; private System.Windows.Forms.ToolStripMenuItem upgradeTSMenuItem;
private System.Windows.Forms.ToolStripMenuItem appDiagnosticMenuItem; private System.Windows.Forms.TabPage graphsTabPage;
private System.Windows.Forms.TabPage graphsTabPage;
private TBF.UI.Graphs.GraphsTabPageCtrl graphsTabPageCtrl; private TBF.UI.Graphs.GraphsTabPageCtrl graphsTabPageCtrl;
private System.Windows.Forms.ToolStripMenuItem optoHeadsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem optoHeadsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem clearCountersToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem clearCountersToolStripMenuItem;
+1 -50
View File
@@ -17,9 +17,6 @@ using SharedDatabase;
using TBF.Resources; using TBF.Resources;
using TBF.UiBridge; using TBF.UiBridge;
using TBF.UI.Shared; using TBF.UI.Shared;
using AppDiagnostic;
using SharedComponents;
using System.Diagnostics;
namespace TBF.UI namespace TBF.UI
{ {
@@ -255,8 +252,7 @@ namespace TBF.UI
backUpResultsTSMItem.Text = Strings.Results; backUpResultsTSMItem.Text = Strings.Results;
passwdTSMItem.Text = Strings.Password; passwdTSMItem.Text = Strings.Password;
upgradeTSMenuItem.Text = Strings.Upgrade_DB; upgradeTSMenuItem.Text = Strings.Upgrade_DB;
appDiagnosticMenuItem.Text = Strings.Application_Diagnostic; optoHeadsToolStripMenuItem.Text = Strings.Optical_heads;
optoHeadsToolStripMenuItem.Text = Strings.Optical_heads;
clearCountersToolStripMenuItem.Text = Strings.Clear_counters; clearCountersToolStripMenuItem.Text = Strings.Clear_counters;
helpTSMenuItem.Text = Strings.Help; helpTSMenuItem.Text = Strings.Help;
aboutTSMenuItem.Text = Strings.About; aboutTSMenuItem.Text = Strings.About;
@@ -478,9 +474,6 @@ namespace TBF.UI
System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.Exclamation); System.Windows.Forms.MessageBoxIcon.Exclamation);
} }
rightHorizSplitContainer.SplitterDistance = rightHorizSplitContainer.Height / 3;// - BenchControlPanel.Height;
topVerticalSplitContainer.SplitterDistance = topVerticalSplitContainer.Width / 2;
} }
/// <summary> /// <summary>
@@ -682,7 +675,6 @@ namespace TBF.UI
CurrentUser.IsMemberOf(GID.HeadOfLab) || CurrentUser.IsMemberOf(GID.HeadOfLab) ||
CurrentUser.IsMemberOf(GID.TestingSpecialists) || CurrentUser.IsMemberOf(GID.TestingSpecialists) ||
CurrentUser.IsMemberOf(GID.Metrologists); CurrentUser.IsMemberOf(GID.Metrologists);
appDiagnosticMenuItem.Visible = CurrentUser.IsMemberOf(GID.Administrators) && CurrentUser.IsPowerUser();
} }
public void UpdateStatusP(string statusPStr) public void UpdateStatusP(string statusPStr)
@@ -1155,43 +1147,6 @@ namespace TBF.UI
new TBF.UI.Settings.UpgradeSelectionDlg().ShowDialog(); new TBF.UI.Settings.UpgradeSelectionDlg().ShowDialog();
} }
private void appDiagnosticMenuItem_Click(object sender, EventArgs e)
{
/*diagApi = new DiagApi(liveLogCache);
//diagApi.AddLog("ahoj, toto je prvy log");
ILog loger = LogManager.GetLogger("logCache");
log.Debug("ahoj, ideme");*/
LiveLogCache.Instance.AddLog("=== Live diagnostic entry ===");
DiagApi liveDiagApi = new DiagApi();
/*try
{
// Predpokladme, e ApplicationDiagnostic.exe je v rovnakom adresri ako hlavn aplikcia
string exePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "AppDiagnostic.exe");
if (File.Exists(exePath))
{
ProcessStartInfo startInfo = new ProcessStartInfo
{
FileName = exePath,
UseShellExecute = true // Spust aplikciu ako samostatn proces
};
System.Diagnostics.Process.Start(startInfo);
}
else
{
MessageBox.Show("ApplicationDiagnostic.exe not found.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception ex)
{
MessageBox.Show($"Failed to start ApplicationDiagnostic: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}*/
}
private void optoHeadsToolStripMenuItem_Click(object sender, EventArgs e) private void optoHeadsToolStripMenuItem_Click(object sender, EventArgs e)
{ {
new Rig.TestMethods.iPerlCommunication.iPerlCommunicationForm(true).ShowDialog(); new Rig.TestMethods.iPerlCommunication.iPerlCommunicationForm(true).ShowDialog();
@@ -1407,9 +1362,5 @@ namespace TBF.UI
return; return;
} }
} }
protected override void OnFormClosing(FormClosingEventArgs e)
{
base.OnFormClosing(e);
}
} }
} }
-3
View File
@@ -383,7 +383,4 @@
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>Test Bench Framework</value> <value>Test Bench Framework</value>
</data> </data>
<data name="rightHorizSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 644</value>
</data>
</root> </root>
+217 -115
View File
@@ -125,6 +125,9 @@
<data name="topVerticalSplitContainer.Location" type="System.Drawing.Point, System.Drawing"> <data name="topVerticalSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="topVerticalSplitContainer.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="messageLabel.AutoSize" type="System.Boolean, mscorlib"> <data name="messageLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@@ -136,10 +139,13 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="messageLabel.Location" type="System.Drawing.Point, System.Drawing"> <data name="messageLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 68</value> <value>9, 105</value>
</data>
<data name="messageLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 0, 4, 0</value>
</data> </data>
<data name="messageLabel.Size" type="System.Drawing.Size, System.Drawing"> <data name="messageLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 25</value> <value>0, 38</value>
</data> </data>
<data name="messageLabel.TabIndex" type="System.Int32, mscorlib"> <data name="messageLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value> <value>1</value>
@@ -166,10 +172,13 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="activityLabel.Location" type="System.Drawing.Point, System.Drawing"> <data name="activityLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 28</value> <value>9, 43</value>
</data>
<data name="activityLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 0, 4, 0</value>
</data> </data>
<data name="activityLabel.Size" type="System.Drawing.Size, System.Drawing"> <data name="activityLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 25</value> <value>0, 38</value>
</data> </data>
<data name="activityLabel.TabIndex" type="System.Int32, mscorlib"> <data name="activityLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -193,10 +202,16 @@
<value>Verdana, 12pt</value> <value>Verdana, 12pt</value>
</data> </data>
<data name="activityGroupBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="activityGroupBox.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 5</value> <value>8, 8</value>
</data>
<data name="activityGroupBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="activityGroupBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data> </data>
<data name="activityGroupBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="activityGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>334, 115</value> <value>540, 112</value>
</data> </data>
<data name="activityGroupBox.TabIndex" type="System.Int32, mscorlib"> <data name="activityGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>18</value> <value>18</value>
@@ -217,7 +232,7 @@
<value>0</value> <value>0</value>
</data> </data>
<data name="topVerticalSplitContainer.Panel1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="topVerticalSplitContainer.Panel1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 0, 0</value> <value>8, 8, 0, 0</value>
</data> </data>
<data name="&gt;&gt;topVerticalSplitContainer.Panel1.Name" xml:space="preserve"> <data name="&gt;&gt;topVerticalSplitContainer.Panel1.Name" xml:space="preserve">
<value>topVerticalSplitContainer.Panel1</value> <value>topVerticalSplitContainer.Panel1</value>
@@ -238,7 +253,10 @@
<value>True</value> <value>True</value>
</data> </data>
<data name="topHorizontalSplitContainer.Location" type="System.Drawing.Point, System.Drawing"> <data name="topHorizontalSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 5</value> <value>8, 8</value>
</data>
<data name="topHorizontalSplitContainer.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data> </data>
<data name="topHorizontalSplitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms"> <data name="topHorizontalSplitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value> <value>Horizontal</value>
@@ -252,6 +270,9 @@
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing"> <data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="splitContainer1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="splitContainer2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="splitContainer2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
</data> </data>
@@ -259,7 +280,10 @@
<value>True</value> <value>True</value>
</data> </data>
<data name="splitContainer2.Location" type="System.Drawing.Point, System.Drawing"> <data name="splitContainer2.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 23</value> <value>20, 35</value>
</data>
<data name="splitContainer2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data> </data>
<data name="procedureComboBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="procedureComboBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@@ -274,10 +298,10 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="procedureComboBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="procedureComboBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>23, 3, 3, 3</value> <value>34, 5, 4, 5</value>
</data> </data>
<data name="procedureComboBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="procedureComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>360, 33</value> <value>758, 46</value>
</data> </data>
<data name="procedureComboBox.TabIndex" type="System.Int32, mscorlib"> <data name="procedureComboBox.TabIndex" type="System.Int32, mscorlib">
<value>6</value> <value>6</value>
@@ -313,10 +337,13 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="reloadProceduresButton.Location" type="System.Drawing.Point, System.Drawing"> <data name="reloadProceduresButton.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value> <value>4, 0</value>
</data>
<data name="reloadProceduresButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data> </data>
<data name="reloadProceduresButton.Size" type="System.Drawing.Size, System.Drawing"> <data name="reloadProceduresButton.Size" type="System.Drawing.Size, System.Drawing">
<value>35, 33</value> <value>52, 51</value>
</data> </data>
<data name="reloadProceduresButton.TabIndex" type="System.Int32, mscorlib"> <data name="reloadProceduresButton.TabIndex" type="System.Int32, mscorlib">
<value>1</value> <value>1</value>
@@ -349,13 +376,13 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="splitContainer2.Size" type="System.Drawing.Size, System.Drawing"> <data name="splitContainer2.Size" type="System.Drawing.Size, System.Drawing">
<value>386, 39</value> <value>785, 25</value>
</data> </data>
<data name="splitContainer2.SplitterDistance" type="System.Int32, mscorlib"> <data name="splitContainer2.SplitterDistance" type="System.Int32, mscorlib">
<value>360</value> <value>758</value>
</data> </data>
<data name="splitContainer2.SplitterWidth" type="System.Int32, mscorlib"> <data name="splitContainer2.SplitterWidth" type="System.Int32, mscorlib">
<value>1</value> <value>2</value>
</data> </data>
<data name="splitContainer2.TabIndex" type="System.Int32, mscorlib"> <data name="splitContainer2.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -381,11 +408,14 @@
<data name="procedureGroupBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="procedureGroupBox.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="procedureGroupBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="procedureGroupBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="procedureGroupBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>13, 3, 13, 3</value> <value>20, 5, 20, 5</value>
</data> </data>
<data name="procedureGroupBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="procedureGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>412, 65</value> <value>825, 65</value>
</data> </data>
<data name="procedureGroupBox.TabIndex" type="System.Int32, mscorlib"> <data name="procedureGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>17</value> <value>17</value>
@@ -421,10 +451,13 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="mainProgressBar.Location" type="System.Drawing.Point, System.Drawing"> <data name="mainProgressBar.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 23</value> <value>9, 35</value>
</data>
<data name="mainProgressBar.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data> </data>
<data name="mainProgressBar.Size" type="System.Drawing.Size, System.Drawing"> <data name="mainProgressBar.Size" type="System.Drawing.Size, System.Drawing">
<value>237, 33</value> <value>356, 51</value>
</data> </data>
<data name="mainProgressBar.TabIndex" type="System.Int32, mscorlib"> <data name="mainProgressBar.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -450,8 +483,14 @@
<data name="progressGroupBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="progressGroupBox.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="progressGroupBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="progressGroupBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="progressGroupBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="progressGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>254, 65</value> <value>252, 65</value>
</data> </data>
<data name="progressGroupBox.TabIndex" type="System.Int32, mscorlib"> <data name="progressGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>19</value> <value>19</value>
@@ -484,10 +523,13 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing"> <data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>670, 65</value> <value>1083, 65</value>
</data> </data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib"> <data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>412</value> <value>825</value>
</data>
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
<value>6</value>
</data> </data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib"> <data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -523,10 +565,13 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="descriptionLabel.Location" type="System.Drawing.Point, System.Drawing"> <data name="descriptionLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 15</value> <value>12, 23</value>
</data>
<data name="descriptionLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 0, 4, 0</value>
</data> </data>
<data name="descriptionLabel.Size" type="System.Drawing.Size, System.Drawing"> <data name="descriptionLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 13</value> <value>0, 20</value>
</data> </data>
<data name="descriptionLabel.TabIndex" type="System.Int32, mscorlib"> <data name="descriptionLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -549,8 +594,14 @@
<data name="descriptionGroupBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="descriptionGroupBox.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="descriptionGroupBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="descriptionGroupBox.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="descriptionGroupBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="descriptionGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>670, 46</value> <value>1083, 41</value>
</data> </data>
<data name="descriptionGroupBox.TabIndex" type="System.Int32, mscorlib"> <data name="descriptionGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>20</value> <value>20</value>
@@ -580,11 +631,14 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="topHorizontalSplitContainer.Size" type="System.Drawing.Size, System.Drawing"> <data name="topHorizontalSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
<value>670, 115</value> <value>1083, 112</value>
</data> </data>
<data name="topHorizontalSplitContainer.SplitterDistance" type="System.Int32, mscorlib"> <data name="topHorizontalSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
<value>65</value> <value>65</value>
</data> </data>
<data name="topHorizontalSplitContainer.SplitterWidth" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="topHorizontalSplitContainer.TabIndex" type="System.Int32, mscorlib"> <data name="topHorizontalSplitContainer.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
@@ -601,7 +655,7 @@
<value>0</value> <value>0</value>
</data> </data>
<data name="topVerticalSplitContainer.Panel2.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="topVerticalSplitContainer.Panel2.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 0, 0</value> <value>8, 8, 0, 0</value>
</data> </data>
<data name="&gt;&gt;topVerticalSplitContainer.Panel2.Name" xml:space="preserve"> <data name="&gt;&gt;topVerticalSplitContainer.Panel2.Name" xml:space="preserve">
<value>topVerticalSplitContainer.Panel2</value> <value>topVerticalSplitContainer.Panel2</value>
@@ -616,10 +670,13 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="topVerticalSplitContainer.Size" type="System.Drawing.Size, System.Drawing"> <data name="topVerticalSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
<value>1018, 120</value> <value>1645, 120</value>
</data> </data>
<data name="topVerticalSplitContainer.SplitterDistance" type="System.Int32, mscorlib"> <data name="topVerticalSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
<value>339</value> <value>548</value>
</data>
<data name="topVerticalSplitContainer.SplitterWidth" type="System.Int32, mscorlib">
<value>6</value>
</data> </data>
<data name="topVerticalSplitContainer.TabIndex" type="System.Int32, mscorlib"> <data name="topVerticalSplitContainer.TabIndex" type="System.Int32, mscorlib">
<value>21</value> <value>21</value>
@@ -643,7 +700,10 @@
<value>True</value> <value>True</value>
</data> </data>
<data name="verticalSplitContainer.Location" type="System.Drawing.Point, System.Drawing"> <data name="verticalSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 24</value> <value>0, 35</value>
</data>
<data name="verticalSplitContainer.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data> </data>
<data name="horizontalSplitContainer.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="horizontalSplitContainer.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@@ -654,6 +714,9 @@
<data name="horizontalSplitContainer.Location" type="System.Drawing.Point, System.Drawing"> <data name="horizontalSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="horizontalSplitContainer.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="horizontalSplitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms"> <data name="horizontalSplitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value> <value>Horizontal</value>
</data> </data>
@@ -675,8 +738,11 @@
<data name="drawingCtrl.Location" type="System.Drawing.Point, System.Drawing"> <data name="drawingCtrl.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="drawingCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="drawingCtrl.Size" type="System.Drawing.Size, System.Drawing"> <data name="drawingCtrl.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1637, 979</value>
</data> </data>
<data name="drawingCtrl.TabIndex" type="System.Int32, mscorlib"> <data name="drawingCtrl.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -696,8 +762,11 @@
<data name="homeTabPage.Location" type="System.Drawing.Point, System.Drawing"> <data name="homeTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 5</value> <value>4, 5</value>
</data> </data>
<data name="homeTabPage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="homeTabPage.Size" type="System.Drawing.Size, System.Drawing"> <data name="homeTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1637, 979</value>
</data> </data>
<data name="homeTabPage.TabIndex" type="System.Int32, mscorlib"> <data name="homeTabPage.TabIndex" type="System.Int32, mscorlib">
<value>29</value> <value>29</value>
@@ -727,10 +796,10 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="processTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="processTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value> <value>6, 6, 6, 6</value>
</data> </data>
<data name="processTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing"> <data name="processTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="processTabPageCtrl.TabIndex" type="System.Int32, mscorlib"> <data name="processTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
<value>1</value> <value>1</value>
@@ -739,7 +808,7 @@
<value>processTabPageCtrl</value> <value>processTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;processTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;processTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.Process.ProcessTabPageCtrl, TBF, Version=3.9.2144.1, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.Process.ProcessTabPageCtrl, TBF, Version=3.9.2139.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;processTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;processTabPageCtrl.Parent" xml:space="preserve">
<value>processTabPage</value> <value>processTabPage</value>
@@ -750,8 +819,11 @@
<data name="processTabPage.Location" type="System.Drawing.Point, System.Drawing"> <data name="processTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 5</value> <value>4, 5</value>
</data> </data>
<data name="processTabPage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="processTabPage.Size" type="System.Drawing.Size, System.Drawing"> <data name="processTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="processTabPage.TabIndex" type="System.Int32, mscorlib"> <data name="processTabPage.TabIndex" type="System.Int32, mscorlib">
<value>30</value> <value>30</value>
@@ -774,8 +846,11 @@
<data name="insertTabPage.Location" type="System.Drawing.Point, System.Drawing"> <data name="insertTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 5</value> <value>4, 5</value>
</data> </data>
<data name="insertTabPage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="insertTabPage.Size" type="System.Drawing.Size, System.Drawing"> <data name="insertTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="insertTabPage.TabIndex" type="System.Int32, mscorlib"> <data name="insertTabPage.TabIndex" type="System.Int32, mscorlib">
<value>22</value> <value>22</value>
@@ -805,10 +880,10 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="resultsTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="resultsTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value> <value>6, 6, 6, 6</value>
</data> </data>
<data name="resultsTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing"> <data name="resultsTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="resultsTabPageCtrl.TabIndex" type="System.Int32, mscorlib"> <data name="resultsTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -817,7 +892,7 @@
<value>resultsTabPageCtrl</value> <value>resultsTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;resultsTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;resultsTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=3.9.2144.1, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=3.9.2139.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;resultsTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;resultsTabPageCtrl.Parent" xml:space="preserve">
<value>resultsTabPage</value> <value>resultsTabPage</value>
@@ -828,8 +903,11 @@
<data name="resultsTabPage.Location" type="System.Drawing.Point, System.Drawing"> <data name="resultsTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 5</value> <value>4, 5</value>
</data> </data>
<data name="resultsTabPage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="resultsTabPage.Size" type="System.Drawing.Size, System.Drawing"> <data name="resultsTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="resultsTabPage.TabIndex" type="System.Int32, mscorlib"> <data name="resultsTabPage.TabIndex" type="System.Int32, mscorlib">
<value>15</value> <value>15</value>
@@ -859,10 +937,10 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="graphsTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="graphsTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value> <value>8, 8, 8, 8</value>
</data> </data>
<data name="graphsTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing"> <data name="graphsTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="graphsTabPageCtrl.TabIndex" type="System.Int32, mscorlib"> <data name="graphsTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -871,7 +949,7 @@
<value>graphsTabPageCtrl</value> <value>graphsTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;graphsTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;graphsTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=3.9.2144.1, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=3.9.2139.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;graphsTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;graphsTabPageCtrl.Parent" xml:space="preserve">
<value>graphsTabPage</value> <value>graphsTabPage</value>
@@ -882,8 +960,11 @@
<data name="graphsTabPage.Location" type="System.Drawing.Point, System.Drawing"> <data name="graphsTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 5</value> <value>4, 5</value>
</data> </data>
<data name="graphsTabPage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="graphsTabPage.Size" type="System.Drawing.Size, System.Drawing"> <data name="graphsTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="graphsTabPage.TabIndex" type="System.Int32, mscorlib"> <data name="graphsTabPage.TabIndex" type="System.Int32, mscorlib">
<value>32</value> <value>32</value>
@@ -913,10 +994,10 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="eventLogsTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="eventLogsTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value> <value>6, 6, 6, 6</value>
</data> </data>
<data name="eventLogsTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing"> <data name="eventLogsTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="eventLogsTabPageCtrl.TabIndex" type="System.Int32, mscorlib"> <data name="eventLogsTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -925,7 +1006,7 @@
<value>eventLogsTabPageCtrl</value> <value>eventLogsTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;eventLogsTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;eventLogsTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=3.9.2144.1, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=3.9.2139.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;eventLogsTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;eventLogsTabPageCtrl.Parent" xml:space="preserve">
<value>eventLogsTabPage</value> <value>eventLogsTabPage</value>
@@ -936,8 +1017,11 @@
<data name="eventLogsTabPage.Location" type="System.Drawing.Point, System.Drawing"> <data name="eventLogsTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 5</value> <value>4, 5</value>
</data> </data>
<data name="eventLogsTabPage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="eventLogsTabPage.Size" type="System.Drawing.Size, System.Drawing"> <data name="eventLogsTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="eventLogsTabPage.TabIndex" type="System.Int32, mscorlib"> <data name="eventLogsTabPage.TabIndex" type="System.Int32, mscorlib">
<value>21</value> <value>21</value>
@@ -967,10 +1051,10 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="calendarTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="calendarTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value> <value>8, 8, 8, 8</value>
</data> </data>
<data name="calendarTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing"> <data name="calendarTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="calendarTabPageCtrl.TabIndex" type="System.Int32, mscorlib"> <data name="calendarTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -979,7 +1063,7 @@
<value>calendarTabPageCtrl</value> <value>calendarTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;calendarTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;calendarTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=3.9.2144.1, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=3.9.2139.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;calendarTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;calendarTabPageCtrl.Parent" xml:space="preserve">
<value>calendarTabPage</value> <value>calendarTabPage</value>
@@ -990,8 +1074,11 @@
<data name="calendarTabPage.Location" type="System.Drawing.Point, System.Drawing"> <data name="calendarTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 5</value> <value>4, 5</value>
</data> </data>
<data name="calendarTabPage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="calendarTabPage.Size" type="System.Drawing.Size, System.Drawing"> <data name="calendarTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="calendarTabPage.TabIndex" type="System.Int32, mscorlib"> <data name="calendarTabPage.TabIndex" type="System.Int32, mscorlib">
<value>33</value> <value>33</value>
@@ -1021,10 +1108,10 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="picturesTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="picturesTabPageCtrl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value> <value>8, 8, 8, 8</value>
</data> </data>
<data name="picturesTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing"> <data name="picturesTabPageCtrl.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="picturesTabPageCtrl.TabIndex" type="System.Int32, mscorlib"> <data name="picturesTabPageCtrl.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -1033,7 +1120,7 @@
<value>picturesTabPageCtrl</value> <value>picturesTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;picturesTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;picturesTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=3.9.2144.1, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=3.9.2139.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;picturesTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;picturesTabPageCtrl.Parent" xml:space="preserve">
<value>picturesTabPage</value> <value>picturesTabPage</value>
@@ -1044,8 +1131,11 @@
<data name="picturesTabPage.Location" type="System.Drawing.Point, System.Drawing"> <data name="picturesTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 5</value> <value>4, 5</value>
</data> </data>
<data name="picturesTabPage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="picturesTabPage.Size" type="System.Drawing.Size, System.Drawing"> <data name="picturesTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>1010, 511</value> <value>1522, 900</value>
</data> </data>
<data name="picturesTabPage.TabIndex" type="System.Int32, mscorlib"> <data name="picturesTabPage.TabIndex" type="System.Int32, mscorlib">
<value>31</value> <value>31</value>
@@ -1074,8 +1164,11 @@
<data name="mainTabControl.Location" type="System.Drawing.Point, System.Drawing"> <data name="mainTabControl.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="mainTabControl.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="mainTabControl.Size" type="System.Drawing.Size, System.Drawing"> <data name="mainTabControl.Size" type="System.Drawing.Size, System.Drawing">
<value>1018, 520</value> <value>1645, 988</value>
</data> </data>
<data name="mainTabControl.TabIndex" type="System.Int32, mscorlib"> <data name="mainTabControl.TabIndex" type="System.Int32, mscorlib">
<value>1</value> <value>1</value>
@@ -1105,11 +1198,14 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="horizontalSplitContainer.Size" type="System.Drawing.Size, System.Drawing"> <data name="horizontalSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
<value>1018, 644</value> <value>1645, 1114</value>
</data> </data>
<data name="horizontalSplitContainer.SplitterDistance" type="System.Int32, mscorlib"> <data name="horizontalSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
<value>120</value> <value>120</value>
</data> </data>
<data name="horizontalSplitContainer.SplitterWidth" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="horizontalSplitContainer.TabIndex" type="System.Int32, mscorlib"> <data name="horizontalSplitContainer.TabIndex" type="System.Int32, mscorlib">
<value>2</value> <value>2</value>
</data> </data>
@@ -1143,6 +1239,9 @@
<data name="rightHorizSplitContainer.Location" type="System.Drawing.Point, System.Drawing"> <data name="rightHorizSplitContainer.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="rightHorizSplitContainer.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="rightHorizSplitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms"> <data name="rightHorizSplitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value> <value>Horizontal</value>
</data> </data>
@@ -1158,8 +1257,11 @@
<data name="progressFlowLayoutPanel.Location" type="System.Drawing.Point, System.Drawing"> <data name="progressFlowLayoutPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="progressFlowLayoutPanel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data>
<data name="progressFlowLayoutPanel.Size" type="System.Drawing.Size, System.Drawing"> <data name="progressFlowLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 240</value> <value>230, 240</value>
</data> </data>
<data name="progressFlowLayoutPanel.TabIndex" type="System.Int32, mscorlib"> <data name="progressFlowLayoutPanel.TabIndex" type="System.Int32, mscorlib">
<value>1</value> <value>1</value>
@@ -1204,11 +1306,14 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="rightHorizSplitContainer.Size" type="System.Drawing.Size, System.Drawing"> <data name="rightHorizSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 644</value> <value>230, 1114</value>
</data> </data>
<data name="rightHorizSplitContainer.SplitterDistance" type="System.Int32, mscorlib"> <data name="rightHorizSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
<value>240</value> <value>240</value>
</data> </data>
<data name="rightHorizSplitContainer.SplitterWidth" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="rightHorizSplitContainer.TabIndex" type="System.Int32, mscorlib"> <data name="rightHorizSplitContainer.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
@@ -1237,10 +1342,13 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="verticalSplitContainer.Size" type="System.Drawing.Size, System.Drawing"> <data name="verticalSplitContainer.Size" type="System.Drawing.Size, System.Drawing">
<value>1254, 644</value> <value>1881, 1114</value>
</data> </data>
<data name="verticalSplitContainer.SplitterDistance" type="System.Int32, mscorlib"> <data name="verticalSplitContainer.SplitterDistance" type="System.Int32, mscorlib">
<value>1018</value> <value>1645</value>
</data>
<data name="verticalSplitContainer.SplitterWidth" type="System.Int32, mscorlib">
<value>6</value>
</data> </data>
<data name="verticalSplitContainer.TabIndex" type="System.Int32, mscorlib"> <data name="verticalSplitContainer.TabIndex" type="System.Int32, mscorlib">
<value>3</value> <value>3</value>
@@ -1276,22 +1384,25 @@
<value>152, 17</value> <value>152, 17</value>
</metadata> </metadata>
<data name="userInfoStatusLabel.Size" type="System.Drawing.Size, System.Drawing"> <data name="userInfoStatusLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 17</value> <value>0, 15</value>
</data> </data>
<data name="statusPStatusLabel.Size" type="System.Drawing.Size, System.Drawing"> <data name="statusPStatusLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 17</value> <value>0, 15</value>
</data> </data>
<data name="routeStatusLabel.Size" type="System.Drawing.Size, System.Drawing"> <data name="routeStatusLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 17</value> <value>0, 15</value>
</data> </data>
<data name="activityStatusLabel.Size" type="System.Drawing.Size, System.Drawing"> <data name="activityStatusLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 17</value> <value>0, 15</value>
</data> </data>
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing"> <data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 668</value> <value>0, 1149</value>
</data>
<data name="statusStrip1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 0, 21, 0</value>
</data> </data>
<data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing"> <data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>1254, 22</value> <value>1881, 22</value>
</data> </data>
<data name="statusStrip1.TabIndex" type="System.Int32, mscorlib"> <data name="statusStrip1.TabIndex" type="System.Int32, mscorlib">
<value>2</value> <value>2</value>
@@ -1312,151 +1423,148 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="benchComponentsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="benchComponentsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 22</value> <value>296, 34</value>
</data> </data>
<data name="benchComponentsTSMenuItem.Text" xml:space="preserve"> <data name="benchComponentsTSMenuItem.Text" xml:space="preserve">
<value>Components</value> <value>Components</value>
</data> </data>
<data name="benchPathsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="benchPathsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 22</value> <value>296, 34</value>
</data> </data>
<data name="benchPathsTSMenuItem.Text" xml:space="preserve"> <data name="benchPathsTSMenuItem.Text" xml:space="preserve">
<value>Paths</value> <value>Paths</value>
</data> </data>
<data name="benchTransitionsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="benchTransitionsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 22</value> <value>296, 34</value>
</data> </data>
<data name="benchTransitionsToolStripMenuItem.Text" xml:space="preserve"> <data name="benchTransitionsToolStripMenuItem.Text" xml:space="preserve">
<value>Transitions</value> <value>Transitions</value>
</data> </data>
<data name="benchMetrologyTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="benchMetrologyTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 22</value> <value>296, 34</value>
</data> </data>
<data name="benchMetrologyTSMenuItem.Text" xml:space="preserve"> <data name="benchMetrologyTSMenuItem.Text" xml:space="preserve">
<value>Metrology</value> <value>Metrology</value>
</data> </data>
<data name="benchUncertaintyTSMItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="benchUncertaintyTSMItem.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 22</value> <value>296, 34</value>
</data> </data>
<data name="benchUncertaintyTSMItem.Text" xml:space="preserve"> <data name="benchUncertaintyTSMItem.Text" xml:space="preserve">
<value>Uncertainty</value> <value>Uncertainty</value>
</data> </data>
<data name="benchTestProfilesTSMItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="benchTestProfilesTSMItem.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 22</value> <value>296, 34</value>
</data> </data>
<data name="benchTestProfilesTSMItem.Text" xml:space="preserve"> <data name="benchTestProfilesTSMItem.Text" xml:space="preserve">
<value>Test profiles</value> <value>Test profiles</value>
</data> </data>
<data name="editSchDrawingTSMItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="editSchDrawingTSMItem.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 22</value> <value>296, 34</value>
</data> </data>
<data name="editSchDrawingTSMItem.Text" xml:space="preserve"> <data name="editSchDrawingTSMItem.Text" xml:space="preserve">
<value>Edit schematic drawing</value> <value>Edit schematic drawing</value>
</data> </data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing"> <data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 6</value> <value>293, 6</value>
</data> </data>
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 22</value> <value>296, 34</value>
</data> </data>
<data name="exitToolStripMenuItem.Text" xml:space="preserve"> <data name="exitToolStripMenuItem.Text" xml:space="preserve">
<value>Exit</value> <value>Exit</value>
</data> </data>
<data name="benchTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="benchTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 22</value> <value>75, 29</value>
</data> </data>
<data name="benchTSMenuItem.Text" xml:space="preserve"> <data name="benchTSMenuItem.Text" xml:space="preserve">
<value>Bench</value> <value>Bench</value>
</data> </data>
<data name="homeTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="homeTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 22</value> <value>77, 29</value>
</data> </data>
<data name="homeTSMenuItem.Text" xml:space="preserve"> <data name="homeTSMenuItem.Text" xml:space="preserve">
<value>Home</value> <value>Home</value>
</data> </data>
<data name="eventLogsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="eventLogsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>73, 22</value> <value>110, 29</value>
</data> </data>
<data name="eventLogsTSMenuItem.Text" xml:space="preserve"> <data name="eventLogsTSMenuItem.Text" xml:space="preserve">
<value>Event logs</value> <value>Event logs</value>
</data> </data>
<data name="appDiagnosticMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value>
</data>
<data name="usersTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="usersTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value> <value>226, 34</value>
</data> </data>
<data name="usersTSMenuItem.Text" xml:space="preserve"> <data name="usersTSMenuItem.Text" xml:space="preserve">
<value>Users</value> <value>Users</value>
</data> </data>
<data name="languageTSMItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="languageTSMItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value> <value>226, 34</value>
</data> </data>
<data name="languageTSMItem.Text" xml:space="preserve"> <data name="languageTSMItem.Text" xml:space="preserve">
<value>Language</value> <value>Language</value>
</data> </data>
<data name="databaseSettingsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="databaseSettingsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value> <value>226, 34</value>
</data> </data>
<data name="databaseSettingsTSMenuItem.Text" xml:space="preserve"> <data name="databaseSettingsTSMenuItem.Text" xml:space="preserve">
<value>Profiles</value> <value>Profiles</value>
</data> </data>
<data name="backUpConfigTSMItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="backUpConfigTSMItem.Size" type="System.Drawing.Size, System.Drawing">
<value>148, 22</value> <value>223, 34</value>
</data> </data>
<data name="backUpConfigTSMItem.Text" xml:space="preserve"> <data name="backUpConfigTSMItem.Text" xml:space="preserve">
<value>Configuration</value> <value>Configuration</value>
</data> </data>
<data name="backUpResultsTSMItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="backUpResultsTSMItem.Size" type="System.Drawing.Size, System.Drawing">
<value>148, 22</value> <value>223, 34</value>
</data> </data>
<data name="backUpResultsTSMItem.Text" xml:space="preserve"> <data name="backUpResultsTSMItem.Text" xml:space="preserve">
<value>Test results</value> <value>Test results</value>
</data> </data>
<data name="backUpTSMItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="backUpTSMItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value> <value>226, 34</value>
</data> </data>
<data name="backUpTSMItem.Text" xml:space="preserve"> <data name="backUpTSMItem.Text" xml:space="preserve">
<value>Back up</value> <value>Back up</value>
</data> </data>
<data name="passwdTSMItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="passwdTSMItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value> <value>226, 34</value>
</data> </data>
<data name="passwdTSMItem.Text" xml:space="preserve"> <data name="passwdTSMItem.Text" xml:space="preserve">
<value>Password</value> <value>Password</value>
</data> </data>
<data name="upgradeTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="upgradeTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value> <value>226, 34</value>
</data> </data>
<data name="upgradeTSMenuItem.Text" xml:space="preserve"> <data name="upgradeTSMenuItem.Text" xml:space="preserve">
<value>Upgrade</value> <value>Upgrade</value>
</data> </data>
<data name="optoHeadsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="optoHeadsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value> <value>226, 34</value>
</data> </data>
<data name="optoHeadsToolStripMenuItem.Text" xml:space="preserve"> <data name="optoHeadsToolStripMenuItem.Text" xml:space="preserve">
<value>Optical heads</value> <value>Optical heads</value>
</data> </data>
<data name="clearCountersToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="clearCountersToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 22</value> <value>226, 34</value>
</data> </data>
<data name="clearCountersToolStripMenuItem.Text" xml:space="preserve"> <data name="clearCountersToolStripMenuItem.Text" xml:space="preserve">
<value>Clear counters</value> <value>Clear counters</value>
</data> </data>
<data name="settingsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="settingsTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 22</value> <value>92, 29</value>
</data> </data>
<data name="settingsTSMenuItem.Text" xml:space="preserve"> <data name="settingsTSMenuItem.Text" xml:space="preserve">
<value>Settings</value> <value>Settings</value>
</data> </data>
<data name="aboutTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="aboutTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 22</value> <value>164, 34</value>
</data> </data>
<data name="aboutTSMenuItem.Text" xml:space="preserve"> <data name="aboutTSMenuItem.Text" xml:space="preserve">
<value>About</value> <value>About</value>
</data> </data>
<data name="helpTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="helpTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>44, 22</value> <value>65, 29</value>
</data> </data>
<data name="helpTSMenuItem.Text" xml:space="preserve"> <data name="helpTSMenuItem.Text" xml:space="preserve">
<value>Help</value> <value>Help</value>
@@ -1465,31 +1573,31 @@
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<data name="proceduresToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="proceduresToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>78, 22</value> <value>116, 29</value>
</data> </data>
<data name="proceduresToolStripMenuItem.Text" xml:space="preserve"> <data name="proceduresToolStripMenuItem.Text" xml:space="preserve">
<value>Procedures</value> <value>Procedures</value>
</data> </data>
<data name="processToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="processToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 22</value> <value>88, 29</value>
</data> </data>
<data name="processToolStripMenuItem.Text" xml:space="preserve"> <data name="processToolStripMenuItem.Text" xml:space="preserve">
<value>Process</value> <value>Process</value>
</data> </data>
<data name="resultsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="resultsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 22</value> <value>83, 29</value>
</data> </data>
<data name="resultsToolStripMenuItem.Text" xml:space="preserve"> <data name="resultsToolStripMenuItem.Text" xml:space="preserve">
<value>Results</value> <value>Results</value>
</data> </data>
<data name="graphsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="graphsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 22</value> <value>84, 29</value>
</data> </data>
<data name="graphsToolStripMenuItem.Text" xml:space="preserve"> <data name="graphsToolStripMenuItem.Text" xml:space="preserve">
<value>Graphs</value> <value>Graphs</value>
</data> </data>
<data name="calendarTSMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="calendarTSMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 22</value> <value>97, 29</value>
</data> </data>
<data name="calendarTSMenuItem.Text" xml:space="preserve"> <data name="calendarTSMenuItem.Text" xml:space="preserve">
<value>Calendar</value> <value>Calendar</value>
@@ -1497,11 +1605,8 @@
<data name="mainMenuStrip.Location" type="System.Drawing.Point, System.Drawing"> <data name="mainMenuStrip.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="mainMenuStrip.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 1, 0, 1</value>
</data>
<data name="mainMenuStrip.Size" type="System.Drawing.Size, System.Drawing"> <data name="mainMenuStrip.Size" type="System.Drawing.Size, System.Drawing">
<value>1254, 24</value> <value>1881, 35</value>
</data> </data>
<data name="mainMenuStrip.TabIndex" type="System.Int32, mscorlib"> <data name="mainMenuStrip.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -1525,10 +1630,13 @@
<value>True</value> <value>True</value>
</metadata> </metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value> <value>9, 20</value>
</data> </data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>1254, 690</value> <value>1881, 1171</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 5, 4, 5</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>Test Bench Framework</value> <value>Test Bench Framework</value>
@@ -1635,12 +1743,6 @@
<data name="&gt;&gt;settingsTSMenuItem.Type" xml:space="preserve"> <data name="&gt;&gt;settingsTSMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;appDiagnosticMenuItem.Name" xml:space="preserve">
<value>appDiagnosticMenuItem</value>
</data>
<data name="&gt;&gt;appDiagnosticMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;usersTSMenuItem.Name" xml:space="preserve"> <data name="&gt;&gt;usersTSMenuItem.Name" xml:space="preserve">
<value>usersTSMenuItem</value> <value>usersTSMenuItem</value>
</data> </data>
+5 -5
View File
@@ -87,13 +87,13 @@ namespace TBF.UI.Procedures
/// SharedDlgButtons configuration /// SharedDlgButtons configuration
sharedButtons.ParentForm = parentForm; sharedButtons.ParentForm = parentForm;
//#if LANG_PL #if LANG_PL
sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.WaterMeterAuthority } sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.WaterMeterAuthority }
: new GID[] { GID.TestingSpecialists, GID.Metrologists, GID.WaterMeterAuthority }; : new GID[] { GID.TestingSpecialists, GID.Metrologists, GID.WaterMeterAuthority };
//#else #else
// sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.Metrologists } sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.Metrologists }
// : new GID[] { GID.TestingSpecialists, GID.Metrologists }; : new GID[] { GID.TestingSpecialists, GID.Metrologists };
//#endif #endif
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | sharedButtons.OptionalButtons = SharedButtons.Buttons.Add |
SharedButtons.Buttons.Remove | SharedButtons.Buttons.Remove |
SharedButtons.Buttons.Up | SharedButtons.Buttons.Up |
+1 -41
View File
@@ -14,22 +14,6 @@
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>C:\tbf_deploy\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@@ -55,18 +39,6 @@
<PropertyGroup> <PropertyGroup>
<StartupObject>Workplace.Program</StartupObject> <StartupObject>Workplace.Program</StartupObject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>0C1DEA4DC362ABEC19575CCB5AD47FEDF4B135C1</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>Workplace_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath> <HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
@@ -275,7 +247,6 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<None Include="Workplace_TemporaryKey.pfx" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Common\Common.csproj"> <ProjectReference Include="..\Common\Common.csproj">
@@ -302,18 +273,7 @@
<ItemGroup> <ItemGroup>
<None Include="Resources\Barcode.png" /> <None Include="Resources\Barcode.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup />
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Picures\datamatrix-54x54.png" /> <None Include="Picures\datamatrix-54x54.png" />
<Content Include="SampleConfig\log4netConfig.xml"> <Content Include="SampleConfig\log4netConfig.xml">