Compare commits
188
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1dca2be892 | ||
|
|
b8a51409ab | ||
|
|
cebaab8e8b | ||
|
|
76bef24456 | ||
|
|
871b95891d | ||
|
|
f5ddde647a | ||
|
|
d4de7db70d | ||
|
|
ad858266d5 | ||
|
|
8772004e8e | ||
|
|
aec3519ec9 | ||
|
|
20bbbc7741 | ||
|
|
5ee93200ed | ||
|
|
981c399e65 | ||
|
|
96429a8c7a | ||
|
|
e1fc3e7b82 | ||
|
|
498115637a | ||
|
|
2322a145f6 | ||
|
|
53bab003bf | ||
|
|
97fc922321 | ||
|
|
8c32d64f35 | ||
|
|
1dfbf12f46 | ||
|
|
0f9256325c | ||
|
|
93c6ba5e74 | ||
|
|
2d3e14fc6c | ||
|
|
3ad842b02a | ||
|
|
14cfb65b6b | ||
|
|
cd926f559d | ||
|
|
cafa247279 | ||
|
|
e411b80fdc | ||
|
|
ae5e680e35 | ||
|
|
db684afd84 | ||
|
|
dc2ab14412 | ||
|
|
9e28ca5df3 | ||
|
|
dcfc12a849 | ||
|
|
ad3f9b53ad | ||
|
|
e7e0937ae5 | ||
|
|
0325b0214b | ||
|
|
6d616ca4cc | ||
|
|
a2620870ad | ||
|
|
a9ab29fcbb | ||
|
|
65f2c4d4a5 | ||
|
|
2ba5c8277d | ||
|
|
28f3b3f323 | ||
|
|
607dbaacb1 | ||
|
|
656bd36a1d | ||
|
|
1b83bd22b9 | ||
|
|
54eba8509e | ||
|
|
996b88cb2e | ||
|
|
441d950e94 | ||
|
|
59c2afe0e8 | ||
|
|
441cf91ff6 | ||
|
|
41a1b3323f | ||
|
|
4e31493cc8 | ||
|
|
8abe8df823 | ||
|
|
39af5d29c6 | ||
|
|
52d073cb8c | ||
|
|
65a6854cc0 | ||
|
|
ec540bcf20 | ||
|
|
4e9748f4dc | ||
|
|
82da9bc2e7 | ||
|
|
4cc9715f57 | ||
|
|
75f72cb04e | ||
|
|
3d58b8baf2 | ||
|
|
0c2839e6c9 | ||
|
|
0df833ca8a | ||
|
|
82988ce74f | ||
|
|
32fbb2964e | ||
|
|
38d7562bb3 | ||
|
|
a8dd8d98cb | ||
|
|
615383f924 | ||
|
|
25fa494b7b | ||
|
|
8b321e36db | ||
|
|
3822c6f5ab | ||
|
|
21a329b1d3 | ||
|
|
8d669d9f54 | ||
|
|
9a905c6111 | ||
|
|
239bcddfa2 | ||
|
|
cd5e20a3f4 | ||
|
|
518e87e4f1 | ||
|
|
6cd0be4c17 | ||
|
|
04db65f01f | ||
|
|
aa63fe2cb4 | ||
|
|
0593e3484c | ||
|
|
80bb277386 | ||
|
|
ec22661e87 | ||
|
|
80cdc2fb95 | ||
|
|
bfedd4d11b | ||
|
|
f58831f916 | ||
|
|
328d6b7fa7 | ||
|
|
98105cbf21 | ||
|
|
c9c57db7c1 | ||
|
|
7d4f1b2a44 | ||
|
|
7b7d1994c7 | ||
|
|
8b438d8d76 | ||
|
|
7a510a98ad | ||
|
|
66034de880 | ||
|
|
b9ca3e6beb | ||
|
|
9ad0872854 | ||
|
|
e6933922cd | ||
|
|
d6d6d88e20 | ||
|
|
8974d93877 | ||
|
|
7e6bef9008 | ||
|
|
1e2711a616 | ||
|
|
fd81675168 | ||
|
|
3dc347c66a | ||
|
|
8a8f4fa563 | ||
|
|
ed3fc330ab | ||
|
|
9fa025caa4 | ||
|
|
b54f938bd5 | ||
|
|
4efba80fc6 | ||
|
|
c3eab4820f | ||
|
|
a5bb127a1e | ||
|
|
ae1ed99c9f | ||
|
|
fa36932fbc | ||
|
|
9ac3dd07b9 | ||
|
|
4ca28941d0 | ||
|
|
4b2e207ddf | ||
|
|
88055f1c84 | ||
|
|
2f68a9444a | ||
|
|
0ccd711b0f | ||
|
|
63a6cb7afe | ||
|
|
d9fc5482db | ||
|
|
4f06438371 | ||
|
|
5afb5f2419 | ||
|
|
9f467a23b4 | ||
|
|
76dd46b30c | ||
|
|
0c1ddecaf1 | ||
|
|
d36d4733ca | ||
|
|
18dac8fb72 | ||
|
|
fb1db6df1c | ||
|
|
3fb487b67b | ||
|
|
2e1d497aad | ||
|
|
754bd14342 | ||
|
|
c4026c87ce | ||
|
|
e6b8454a94 | ||
|
|
98f68d6b45 | ||
|
|
5ef1bcbdb6 | ||
|
|
7846239be9 | ||
|
|
f8e2d6c86b | ||
|
|
b06f4a5781 | ||
|
|
968faf9200 | ||
|
|
62ceb13385 | ||
|
|
bed0046618 | ||
|
|
8a2287c685 | ||
|
|
3c85440d34 | ||
|
|
7ed21ff08c | ||
|
|
df42ec3d3a | ||
|
|
35b62520c9 | ||
|
|
e6936dc10e | ||
|
|
d5904fe9fa | ||
|
|
20d8fbc389 | ||
|
|
70ccb8b4d8 | ||
|
|
175571072f | ||
|
|
b0e25a35fb | ||
|
|
08e7041bcf | ||
|
|
b58ebcd7a7 | ||
|
|
8eb2472171 | ||
|
|
f73d89f41b | ||
|
|
95848197c5 | ||
|
|
442ac6969f | ||
|
|
3fb2c0aeff | ||
|
|
8ed99092ff | ||
|
|
f393709944 | ||
|
|
527da6bcc5 | ||
|
|
17940d453c | ||
|
|
8d623ae8fa | ||
|
|
c9d3480c58 | ||
|
|
e133b68472 | ||
|
|
9ecfe1e10e | ||
|
|
3a38ca6b61 | ||
|
|
62cb5cdba7 | ||
|
|
1cb0345b37 | ||
|
|
b3e6a3f157 | ||
|
|
6ed831c968 | ||
|
|
3f1d992879 | ||
|
|
c076ebce6f | ||
|
|
56e006318f | ||
|
|
4867b031b9 | ||
|
|
548973cf11 | ||
|
|
9c575d7fbf | ||
|
|
feefbeb5b4 | ||
|
|
a4d8081b73 | ||
|
|
467e51374d | ||
|
|
ec27a5843b | ||
|
|
a6a87cccae | ||
|
|
1d7a2e4a0c | ||
|
|
9ac237a377 | ||
|
|
74d5688936 |
@@ -4,6 +4,8 @@ DeviceTest/bin/
|
||||
DeviceTest/obj/
|
||||
Dirichlet.Numerics/bin
|
||||
Dirichlet.Numerics/obj
|
||||
GraphLib/bin
|
||||
GraphLib/obj
|
||||
Results/bin/
|
||||
Results/obj/
|
||||
ResultsBrowser/bin/
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;RUM_MOB;LANG_RO</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -28,7 +28,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;RUM_MOB;LANG_RO</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
+8
-2
@@ -32,12 +32,18 @@ namespace Config
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 1;
|
||||
#elif TORUN_PT50_2015 || CEVAK_PT40_272 || MURES_PT40 || FUZHOU_40 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50
|
||||
#elif TORUN_PT50_2015 || CEVAK_PT40_272 || MURES_PT40 || FUZHOU_40 || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || KRAKOW_50
|
||||
public const int WMsCount = 20;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif RUM_MOB
|
||||
public const int WMsCount = 8;
|
||||
public const int LineSize = 8;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif TURA_IPERL
|
||||
public const int WMsCount = 40;
|
||||
public const int LineSize = 20;
|
||||
@@ -70,7 +76,7 @@ namespace Config
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#endif
|
||||
|
||||
///
|
||||
///
|
||||
/// Database related: This object reference is set after a successful user login
|
||||
///
|
||||
public static DatabaseSettings CurrentBench;
|
||||
|
||||
@@ -56,8 +56,12 @@ namespace Config.Entities
|
||||
[Description("Vodoměry")] Single,
|
||||
[Description("Kombinované vodoměry")] Combined,
|
||||
[Description("Měřiče tepla")] HeatMeter,
|
||||
#elif LANG_RU
|
||||
[Description("Счетчик")] Single,
|
||||
[Description("Комбинированный счетчик")] Combined,
|
||||
[Description("Счетчик тепла")] HeatMeter,
|
||||
#else
|
||||
[Description("Water meters")] Single,
|
||||
[Description("Water meters")] Single,
|
||||
[Description("Compound water meters")] Combined,
|
||||
[Description("Heat meters")] HeatMeter,
|
||||
#endif
|
||||
@@ -84,14 +88,13 @@ namespace Config.Entities
|
||||
|
||||
public enum Mounting
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
#if LANG_DE
|
||||
[Description("")] NotSpecified,
|
||||
[Description("H")] H, /// horizontal
|
||||
[Description("V")] V, /// vertical
|
||||
[Description("STR")] S, /// standrohre
|
||||
[Description("F")] F, /// fall
|
||||
[Description("H")] H, /// horizontal
|
||||
[Description("V")] V, /// vertical
|
||||
[Description("STR")] S, /// standrohre
|
||||
[Description("F")] F, /// fall
|
||||
#else
|
||||
[Description("")] NotSpecified,
|
||||
[Description("H")] H, /// horizontal
|
||||
[Description("V")] V, /// vertical
|
||||
[Description("S")] S, /// steig
|
||||
@@ -370,4 +373,48 @@ namespace Config.Entities
|
||||
#endif
|
||||
Count
|
||||
}
|
||||
|
||||
public enum ImageRotation
|
||||
{
|
||||
[Description("0 deg")] None,
|
||||
[Description("90 deg")] Deg90,
|
||||
[Description("180 deg")] Deg180,
|
||||
[Description("270 deg")] Deg270,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum CameraDisplayResolution
|
||||
{
|
||||
Small,
|
||||
Medium,
|
||||
Large,
|
||||
// FullScreen,
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum ErrorFlagsMode : sbyte
|
||||
{
|
||||
#if LANG_DE
|
||||
[Description("aus")] Off,
|
||||
[Description("info")] Info,
|
||||
[Description("ein")] On,
|
||||
#elif LANG_CS
|
||||
[Description("vypnuto")] Off,
|
||||
[Description("info")] Info,
|
||||
[Description("zapnuto")] On,
|
||||
#elif LANG_RU
|
||||
[Description("выкл")] Off,
|
||||
[Description("инфо")] Info,
|
||||
[Description("вкл")] On,
|
||||
#elif LANG_PL
|
||||
[Description("nie")] Off,
|
||||
[Description("info")] Info,
|
||||
[Description("tak")] On,
|
||||
#else // LANG_EN
|
||||
[Description("off")] Off,
|
||||
[Description("info")] Info,
|
||||
[Description("on")] On,
|
||||
#endif
|
||||
Count
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,10 +28,9 @@ namespace Config.Entities
|
||||
public virtual int Revision { get; set; }
|
||||
public virtual int PredecessorId { get; set; }
|
||||
public virtual bool ObtainedByCopy { get; set; } /// Initial version of this procedure was a copy of another procedure
|
||||
///
|
||||
///
|
||||
public virtual MetersKind MetersKind { get; set; } /// single / compound / heat meters
|
||||
public virtual string Watermeters { get; set; } /// Water meter name or Id
|
||||
public virtual string ProtocolTitle { get; set; } /// Title of the printed and saved protocol
|
||||
public virtual bool Protected { get; set; } /// true = procedure cannot be changed by a testing specialist
|
||||
public virtual bool MustBeComplete { get; set; } /// true = procedure can be finished just when all tests were finished
|
||||
public virtual bool ManualCtrlDisabled { get; set; } /// true = manual control of valves, etc. is disabled
|
||||
@@ -42,6 +41,9 @@ namespace Config.Entities
|
||||
public virtual string TransitionStart { get; set; }
|
||||
public virtual string TransitionEnd { get; set; }
|
||||
|
||||
public virtual string AltProcName { get; set; } /// Alternative procedure name (null or string.Empty = no alt. procedure)
|
||||
public virtual int AltProcPeriod { get; set; } /// Period of alternative procedures (0 = no alt. procedure)
|
||||
|
||||
public virtual IList<ComponentProcedure> MoreParams { get; set; }
|
||||
public virtual IList<Test> Tests { get; set; }
|
||||
|
||||
@@ -60,7 +62,9 @@ namespace Config.Entities
|
||||
LastChgUser = CreationUser;
|
||||
LastChgTime = CreationTime;
|
||||
MetersKind = Entities.MetersKind.Single;
|
||||
ProtocolTitle = "Watermeter test protocol";
|
||||
Watermeters = string.Empty;
|
||||
Description = string.Empty;
|
||||
LongDescription = string.Empty;
|
||||
}
|
||||
|
||||
public Procedure(string name, int itemNr)
|
||||
@@ -90,7 +94,6 @@ namespace Config.Entities
|
||||
|
||||
result.MetersKind = MetersKind;
|
||||
result.Watermeters = Watermeters;
|
||||
result.ProtocolTitle = ProtocolTitle;
|
||||
result.Protected = Protected;
|
||||
result.MustBeComplete = MustBeComplete;
|
||||
result.ManualCtrlDisabled = ManualCtrlDisabled;
|
||||
@@ -117,7 +120,6 @@ namespace Config.Entities
|
||||
output.WriteLine(LastChgTime.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(MetersKind.ToString());
|
||||
output.WriteLine(Watermeters);
|
||||
output.WriteLine(ProtocolTitle);
|
||||
output.WriteLine(Protected.ToString());
|
||||
output.WriteLine(MustBeComplete.ToString());
|
||||
output.WriteLine(ManualCtrlDisabled.ToString());
|
||||
@@ -150,7 +152,6 @@ namespace Config.Entities
|
||||
string line = input.ReadLine();
|
||||
result.MetersKind = line.Equals(MetersKind.Single.ToString()) ? MetersKind.Single : (line.Equals(MetersKind.Combined.ToString()) ? MetersKind.Combined : MetersKind.HeatMeter);
|
||||
result.Watermeters = input.ReadLine();
|
||||
result.ProtocolTitle = input.ReadLine();
|
||||
result.Protected = bool.Parse(input.ReadLine());
|
||||
result.MustBeComplete = bool.Parse(input.ReadLine());
|
||||
result.ManualCtrlDisabled = bool.Parse(input.ReadLine());
|
||||
@@ -196,7 +197,6 @@ namespace Config.Entities
|
||||
ln = inp.ReadLine(); /// skip LastChgTime
|
||||
ln = inp.ReadLine(); if (ln != MetersKind.ToString()) { diff.AppendFormat(fmt, "MetersKind", MetersKind, ln); };
|
||||
ln = inp.ReadLine(); if (ln != Watermeters) { diff.AppendFormat(fmt, "Watermeters", Watermeters, ln); };
|
||||
ln = inp.ReadLine(); if (ln != ProtocolTitle) { diff.AppendFormat(fmt, "ProtocolTitle", ProtocolTitle, ln); };
|
||||
|
||||
ln = inp.ReadLine(); if (ln != Protected.ToString()) { diff.AppendFormat(fmt, "Protected", Protected, ln); };
|
||||
ln = inp.ReadLine(); if (ln != MustBeComplete.ToString()) { diff.AppendFormat(fmt, "MustBeComplete", MustBeComplete, ln); };
|
||||
|
||||
+55
-6
@@ -25,8 +25,8 @@ namespace Config.Entities
|
||||
public virtual float Volume { get; set; } /// Test volume (target) in [l]
|
||||
public virtual float TstTime { get; set; } /// Test time (estimate) in [s]
|
||||
public virtual string Method { get; set; }
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] (usually < 0)
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] (usually > 0)
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] (usually < 0) or 1=class1, 2=class2, 3=class3
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] (usually > 0) or -Qn in m3/h
|
||||
public virtual float Uncertainty { get; set; } /// int [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual int Repeats { get; set; }
|
||||
public virtual bool DoDraining { get; set; }
|
||||
@@ -115,6 +115,10 @@ namespace Config.Entities
|
||||
result.Qto = Qto;
|
||||
result.Volume = Volume;
|
||||
result.TstTime = TstTime;
|
||||
result.Method = Method;
|
||||
result.ErrLimLo = ErrLimLo;
|
||||
result.ErrLimHi = ErrLimHi;
|
||||
result.Uncertainty = Uncertainty;
|
||||
result.Repeats = Repeats;
|
||||
result.DoDraining = DoDraining;
|
||||
result.DoZeroing = DoZeroing;
|
||||
@@ -129,10 +133,6 @@ namespace Config.Entities
|
||||
result.TimeFlow2Mass = TimeFlow2Mass;
|
||||
result.TimePump2StartV = TimePump2StartV;
|
||||
result.TimeStop2Mass = TimeStop2Mass;
|
||||
result.Method = Method;
|
||||
result.ErrLimLo = ErrLimLo;
|
||||
result.ErrLimHi = ErrLimHi;
|
||||
result.Uncertainty = Uncertainty;
|
||||
result.TolerRed = TolerRed;
|
||||
result.RedType = RedType;
|
||||
result.FeedingPath = FeedingPath;
|
||||
@@ -301,6 +301,55 @@ namespace Config.Entities
|
||||
return diff.ToString();
|
||||
}
|
||||
|
||||
public virtual float GetErrLimLo(float flow)
|
||||
{
|
||||
if (ErrLimLo <= ErrLimHi)
|
||||
{
|
||||
return ErrLimLo; /// Error limit of a water meter
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Metrological class and nominal flow of a heat meter
|
||||
int metrClass = (int)Math.Round(ErrLimLo);
|
||||
float Qp = Math.Abs(ErrLimHi);
|
||||
float Q = Math.Max(flow, 0.00001f); /// to avoid division by zero
|
||||
|
||||
/// Calculate the error limit of a heat meter
|
||||
switch (metrClass)
|
||||
{
|
||||
default:
|
||||
case 1: return -Math.Min(3.5f, 1.0f + 0.01f * Qp / Q);
|
||||
case 2: return -Math.Min(5.0f, 2.0f + 0.02f * Qp / Q);
|
||||
case 3: return -Math.Min(5.0f, 3.0f + 0.05f * Qp / Q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual float GetErrLimHi(float flow)
|
||||
{
|
||||
if (ErrLimLo <= ErrLimHi)
|
||||
{
|
||||
return ErrLimHi; /// Error limit of a water meter
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Metrological class and nominal flow of a heat meter
|
||||
int metrClass = (int)Math.Round(ErrLimLo);
|
||||
float Qp = Math.Abs(ErrLimHi);
|
||||
float Q = Math.Max(flow, 0.00001f); /// to avoid division by zero
|
||||
|
||||
/// Calculate the error limit of a heat meter
|
||||
switch (metrClass)
|
||||
{
|
||||
default:
|
||||
case 1: return +Math.Min(3.5f, 1.0f + 0.01f * Qp / Q);
|
||||
case 2: return +Math.Min(5.0f, 2.0f + 0.02f * Qp / Q);
|
||||
case 3: return +Math.Min(5.0f, 3.0f + 0.05f * Qp / Q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string partStr = (Part > 0) ? string.Format(", part {0}", Part) : string.Empty;
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace Config.Mappings
|
||||
|
||||
Map(x => x.MetersKind);
|
||||
Map(x => x.Watermeters);
|
||||
Map(x => x.ProtocolTitle);
|
||||
Map(x => x.Protected);
|
||||
Map(x => x.MustBeComplete);
|
||||
Map(x => x.ManualCtrlDisabled);
|
||||
@@ -38,6 +37,10 @@ namespace Config.Mappings
|
||||
Map(x => x.ResultsWriter);
|
||||
Map(x => x.TransitionStart);
|
||||
Map(x => x.TransitionEnd);
|
||||
|
||||
Map(x => x.AltProcName);
|
||||
Map(x => x.AltProcPeriod);
|
||||
|
||||
////Map(x => x.MetrologicalClass);
|
||||
////HasOne(x => x.WMType);
|
||||
HasMany(x => x.MoreParams)
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.14.595.0")]
|
||||
[assembly: AssemblyFileVersion("2.14.595.0")]
|
||||
[assembly: AssemblyVersion("2.17.742.0")]
|
||||
[assembly: AssemblyFileVersion("2.17.742.0")]
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2016-2017 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Reflection;
|
||||
@@ -12,6 +12,7 @@ namespace Config
|
||||
[Description("---")] None,
|
||||
|
||||
[Description("l")] l, /// * 1 liter
|
||||
[Description("dm3")] dm3, /// 1 dm3 = 1 liter
|
||||
[Description("m3")] m3, /// 1000 l
|
||||
[Description("gal(UK)")] gal_UK, /// 1 gal(UK) = 4.54609 l
|
||||
[Description("gal(US)")] gal_US, /// 1 gal(US) = 3.78541178 l
|
||||
@@ -178,6 +179,7 @@ namespace Config
|
||||
switch (units)
|
||||
{
|
||||
case Unit.l:
|
||||
case Unit.dm3:
|
||||
case Unit.m3:
|
||||
case Unit.gal_UK:
|
||||
case Unit.gal_US:
|
||||
@@ -269,6 +271,7 @@ namespace Config
|
||||
switch (units)
|
||||
{
|
||||
/// Volume: internal representation in l
|
||||
case Unit.dm3:
|
||||
case Unit.l: return v; /// 1 liter
|
||||
case Unit.m3: return 0.001 * v; /// 1 m3 = 1000 l
|
||||
case Unit.gal_UK: return 0.21996925 * v; /// 1 gal(UK) = 4.54609 l
|
||||
@@ -335,6 +338,7 @@ namespace Config
|
||||
switch (units)
|
||||
{
|
||||
/// Volume: internal representation in l
|
||||
case Unit.dm3:
|
||||
case Unit.l: return v; /// 1 liter
|
||||
case Unit.m3: return 1000 * v; /// 1000 l
|
||||
case Unit.gal_UK: return 4.54609 * v; /// 1 gal(UK) = 4.54609 l
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
|
||||
|
||||
/* Copyright (c) 2008-2014 DI Zimmermann Stephan (stefan.zimmermann@tele2.at)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
namespace GraphLib
|
||||
{
|
||||
public class BackBuffer
|
||||
{
|
||||
private Graphics graphics;
|
||||
private Bitmap memoryBitmap;
|
||||
private int width;
|
||||
private int height;
|
||||
|
||||
public BackBuffer()
|
||||
{
|
||||
width = 0;
|
||||
height = 0;
|
||||
}
|
||||
|
||||
public bool Init(Graphics g, int width, int height)
|
||||
{
|
||||
if (memoryBitmap != null)
|
||||
{
|
||||
memoryBitmap.Dispose();
|
||||
memoryBitmap = null;
|
||||
}
|
||||
|
||||
if (graphics != null)
|
||||
{
|
||||
graphics.Dispose();
|
||||
graphics = null;
|
||||
}
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return false;
|
||||
|
||||
if ((width != this.width) || (height != this.height) || graphics == null)
|
||||
{
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
||||
memoryBitmap = new Bitmap(width, height);
|
||||
graphics = Graphics.FromImage(memoryBitmap);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Render(Graphics g)
|
||||
{
|
||||
if (memoryBitmap != null)
|
||||
{
|
||||
g.DrawImage(memoryBitmap,
|
||||
new Rectangle(0, 0, width, height),
|
||||
0, 0, width, height,
|
||||
GraphicsUnit.Pixel);
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanDoubleBuffer() { return graphics != null; }
|
||||
|
||||
public Graphics Graphics { get { return graphics; } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
|
||||
/* Copyright (c) 2008-2014 DI Zimmermann Stephan (stefan.zimmermann@tele2.at)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace GraphLib
|
||||
{
|
||||
public class DataSource
|
||||
{
|
||||
public delegate String OnDrawXAxisLabelEvent(DataSource src, int idx);
|
||||
public delegate String OnDrawYAxisLabelEvent(DataSource src, float value);
|
||||
|
||||
public OnDrawXAxisLabelEvent OnRenderXAxisLabel = null;
|
||||
public OnDrawYAxisLabelEvent OnRenderYAxisLabel = null;
|
||||
|
||||
private PointF[] samples = null;
|
||||
private int length = 0;
|
||||
|
||||
private String name = String.Empty;
|
||||
private int downSample = 1;
|
||||
private Color color = Color.Black;
|
||||
|
||||
public float VisibleDataRange_X = 0;
|
||||
public float DY = 0;
|
||||
public float YD0 = -200;
|
||||
public float YD1 = 200;
|
||||
public float Cur_YD0 = -200;
|
||||
public float Cur_YD1 = 200;
|
||||
|
||||
public float grid_distance_y = 200; // grid distance in units ( draw a horizontal line every 200 units )
|
||||
|
||||
public float off_Y = 0;
|
||||
public float grid_off_y = 0;
|
||||
|
||||
public bool yFlip = true;
|
||||
|
||||
public bool Active = true;
|
||||
|
||||
public float XAutoScaleOffset = 100;
|
||||
|
||||
public float CurGraphHeight = 1.0f;
|
||||
|
||||
public float CurGraphWidth = 1.0f;
|
||||
|
||||
private bool autoScaleY = false;
|
||||
private bool autoScaleX = false;
|
||||
|
||||
|
||||
public bool AutoScaleY
|
||||
{
|
||||
get { return autoScaleY; }
|
||||
set { autoScaleY = value; }
|
||||
}
|
||||
|
||||
public bool AutoScaleX
|
||||
{
|
||||
get { return autoScaleX; }
|
||||
set { autoScaleX = value; }
|
||||
}
|
||||
|
||||
public PointF[] Samples
|
||||
{
|
||||
get { return samples; }
|
||||
set
|
||||
{
|
||||
samples = value;
|
||||
length = samples.Length;
|
||||
}
|
||||
}
|
||||
|
||||
public float XMin
|
||||
{
|
||||
get
|
||||
{
|
||||
float x_min = float.MaxValue;
|
||||
if (samples != null && samples.Length > 0)
|
||||
{
|
||||
foreach (PointF p in samples) if (p.X < x_min) x_min=p.X;
|
||||
}
|
||||
return x_min;
|
||||
}
|
||||
}
|
||||
|
||||
public float XMax
|
||||
{
|
||||
get
|
||||
{
|
||||
float x_max = float.MinValue;
|
||||
if (samples != null && samples.Length > 0)
|
||||
{
|
||||
foreach (PointF p in samples) if (p.X > x_max) x_max = p.X;
|
||||
}
|
||||
return x_max;
|
||||
}
|
||||
}
|
||||
|
||||
public float YMin
|
||||
{
|
||||
get
|
||||
{
|
||||
float y_min = float.MaxValue;
|
||||
if (samples != null && samples.Length > 0)
|
||||
{
|
||||
foreach (PointF p in samples) if (p.Y < y_min) y_min = p.Y;
|
||||
}
|
||||
return y_min;
|
||||
}
|
||||
}
|
||||
|
||||
public float YMax
|
||||
{
|
||||
get
|
||||
{
|
||||
float y_max = float.MinValue;
|
||||
if (samples.Length > 0)
|
||||
{
|
||||
foreach (PointF p in samples) if (p.Y > y_max) y_max = p.Y;
|
||||
}
|
||||
return y_max;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDisplayRangeY(float y_start, float y_end)
|
||||
{
|
||||
YD0 = y_start;
|
||||
YD1 = y_end;
|
||||
}
|
||||
|
||||
public void SetGridDistanceY(float grid_dist_y_units)
|
||||
{
|
||||
grid_distance_y = grid_dist_y_units;
|
||||
}
|
||||
|
||||
public void SetGridOriginY(float off_y)
|
||||
{
|
||||
grid_off_y = off_y;
|
||||
}
|
||||
|
||||
[Category("Properties")] // Take this out, and you will soon have problems with serialization;
|
||||
[DefaultValue(typeof(string), "")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public String Name
|
||||
{
|
||||
get { return name; }
|
||||
set { name = value; }
|
||||
}
|
||||
|
||||
[Category("Properties")] // Take this out, and you will soon have problems with serialization;
|
||||
[DefaultValue(typeof(Color), "")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public Color GraphColor
|
||||
{
|
||||
get { return color; }
|
||||
set { color = value; }
|
||||
}
|
||||
|
||||
[Category("Properties")] // Take this out, and you will soon have problems with serialization;
|
||||
[DefaultValue(typeof(int), "0")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public int Length
|
||||
{
|
||||
get { return length; }
|
||||
set
|
||||
{
|
||||
length = value;
|
||||
if (length != 0)
|
||||
{
|
||||
samples = new PointF[length];
|
||||
}
|
||||
else
|
||||
{
|
||||
// length is 0
|
||||
if (samples != null)
|
||||
{
|
||||
samples = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Category("Properties")] // Take this out, and you will soon have problems with serialization;
|
||||
[DefaultValue(typeof(int), "1")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public int Downsampling
|
||||
{
|
||||
get { return downSample; }
|
||||
set { downSample = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ClassLibrary1</RootNamespace>
|
||||
<AssemblyName>GraphLib</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="PlotterGraphPaneEx.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PlotterGraphPaneEx.Designer.cs">
|
||||
<DependentUpon>PlotterGraphPaneEx.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PlotterDisplayEx.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PlotterDisplayEx.designer.cs">
|
||||
<DependentUpon>PlotterDisplayEx.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BackBuffer.cs" />
|
||||
<Compile Include="PlotterGraphSelectCurvesForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PlotterGraphSelectCurvesForm.Designer.cs">
|
||||
<DependentUpon>PlotterGraphSelectCurvesForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataSource.cs" />
|
||||
<Compile Include="PrintPreviewForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PrintPreviewForm.Designer.cs">
|
||||
<DependentUpon>PrintPreviewForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PrecisionTimer.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="PlotterGraphPaneEx.resx">
|
||||
<DependentUpon>PlotterGraphPaneEx.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PlotterDisplayEx.resx">
|
||||
<DependentUpon>PlotterDisplayEx.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PlotterGraphSelectCurvesForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>PlotterGraphSelectCurvesForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PrintPreviewForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>PrintPreviewForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphLib", "GraphLib.csproj", "{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,397 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
|
||||
/* Copyright (c) 2008-2014 DI Zimmermann Stephan (stefan.zimmermann@tele2.at)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
namespace GraphLib
|
||||
{
|
||||
public partial class PlotterDisplayEx : UserControl
|
||||
{
|
||||
#region MEMBERS
|
||||
|
||||
delegate void InvokeVoidFuncDelegate();
|
||||
|
||||
PlotterGraphSelectCurvesForm GraphPropertiesForm = null;
|
||||
PrintPreviewForm printPreviewForm = null;
|
||||
|
||||
private PrecisionTimer.Timer mTimer = null;
|
||||
private float play_speed = 0.5f;
|
||||
private float play_speed_max = 10f;
|
||||
private float play_speed_min = 0.5f;
|
||||
|
||||
private bool paused = false;
|
||||
private bool isRunning = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTOR
|
||||
|
||||
public PlotterDisplayEx()
|
||||
{
|
||||
InitializeComponent();
|
||||
mTimer = new PrecisionTimer.Timer();
|
||||
mTimer.Period = 50; // 20 fps
|
||||
mTimer.Tick += new EventHandler(OnTimerTick);
|
||||
play_speed = 0.5f; // 20x10 = 200 values per second == sample frequency
|
||||
mTimer.Start();
|
||||
isRunning = false;
|
||||
}
|
||||
|
||||
void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
|
||||
{
|
||||
String text = e.ClickedItem.Text;
|
||||
foreach (DataSource s in gPane.Sources)
|
||||
{
|
||||
if (s.Name == text)
|
||||
{
|
||||
s.Active ^= true;
|
||||
gPane.Invalidate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PROPERTIES
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
||||
[Editor(typeof(System.ComponentModel.Design.CollectionEditor),
|
||||
typeof(System.Drawing.Design.UITypeEditor))]
|
||||
public IList<DataSource> DataSources
|
||||
{
|
||||
get { return gPane.Sources; }
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
||||
[Editor(typeof(System.ComponentModel.Design.CollectionEditor),
|
||||
typeof(System.Drawing.Design.UITypeEditor))]
|
||||
public PlotterGraphPaneEx.LayoutMode PanelLayout
|
||||
{
|
||||
get { return gPane.layout; }
|
||||
set { gPane.layout = value; }
|
||||
}
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
||||
[Editor(typeof(System.ComponentModel.Design.CollectionEditor),
|
||||
typeof(System.Drawing.Design.UITypeEditor))]
|
||||
public SmoothingMode Smoothing
|
||||
{
|
||||
get { return gPane.smoothing; }
|
||||
set { gPane.smoothing = value; }
|
||||
}
|
||||
|
||||
[Category("Playback")]
|
||||
[DefaultValue(typeof(bool), "true")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public bool ShowMovingGrid
|
||||
{
|
||||
get { return gPane.hasMovingGrid; }
|
||||
set { gPane.hasMovingGrid = value; }
|
||||
}
|
||||
|
||||
|
||||
[Category("Properties")]
|
||||
[DefaultValue(typeof(Color), "")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public Color BackgroundColorTop
|
||||
{
|
||||
get { return gPane.BgndColorTop; }
|
||||
set { gPane.BgndColorTop = value; }
|
||||
}
|
||||
|
||||
[Category("Properties")]
|
||||
[DefaultValue(typeof(Color), "")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public Color BackgroundColorBot
|
||||
{
|
||||
get { return gPane.BgndColorBot; }
|
||||
set { gPane.BgndColorBot = value; }
|
||||
}
|
||||
|
||||
[Category("Properties")]
|
||||
[DefaultValue(typeof(Color), "")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public Color DashedGridColor
|
||||
{
|
||||
get { return gPane.MinorGridColor; }
|
||||
set { gPane.MinorGridColor = value; }
|
||||
}
|
||||
|
||||
[Category("Properties")]
|
||||
[DefaultValue(typeof(Color), "")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public Color SolidGridColor
|
||||
{
|
||||
get { return gPane.MajorGridColor; }
|
||||
set { gPane.MajorGridColor = value; }
|
||||
}
|
||||
|
||||
|
||||
public bool DoubleBuffering
|
||||
{
|
||||
get { return gPane.useDoubleBuffer; }
|
||||
set { gPane.useDoubleBuffer = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC METHODS
|
||||
|
||||
public void SetDisplayRangeX(float x_start, float x_end )
|
||||
{
|
||||
gPane.XD0 = x_start;
|
||||
gPane.XD1 = x_end;
|
||||
gPane.CurXD0 = gPane.XD0;
|
||||
gPane.CurXD1 = gPane.XD1;
|
||||
}
|
||||
|
||||
public void SetGridDistanceX(float grid_dist_x_samples)
|
||||
{
|
||||
gPane.grid_distance_x = grid_dist_x_samples;
|
||||
}
|
||||
|
||||
public void SetGridOriginX(float off_x)
|
||||
{
|
||||
gPane.grid_off_x = off_x;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region PRIVATE METHODS
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
paused = true;
|
||||
|
||||
if (mTimer.IsRunning)
|
||||
{
|
||||
mTimer.Stop();
|
||||
mTimer.Dispose();
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (isRunning == false && paused == false)
|
||||
{
|
||||
gPane.starting_idx = 0;
|
||||
paused = false;
|
||||
isRunning = true;
|
||||
// mTimer.Start();
|
||||
tb1.Buttons[0].ImageIndex = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (paused == false)
|
||||
{
|
||||
//mTimer.Stop();
|
||||
paused = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// mTimer.Start();
|
||||
paused = false;
|
||||
}
|
||||
|
||||
if (paused)
|
||||
{
|
||||
|
||||
tb1.Buttons[0].ImageIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
tb1.Buttons[0].ImageIndex = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
if (isRunning)
|
||||
{
|
||||
// mTimer.Stop();
|
||||
isRunning = false;
|
||||
paused = false;
|
||||
hScrollBar1.Value = 0;
|
||||
tb1.Buttons[0].ImageIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void tb1_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
|
||||
{
|
||||
bool pushed = e.Button.Pushed;
|
||||
switch (e.Button.Tag.ToString().ToLower())
|
||||
{
|
||||
case "play":
|
||||
|
||||
Start();
|
||||
|
||||
break;
|
||||
|
||||
case "stop":
|
||||
|
||||
Stop();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPlayPanelVisible()
|
||||
{
|
||||
panel1.Visible = true;
|
||||
tb1.Buttons[0].Visible = true;
|
||||
tb1.Buttons[1].Visible = true;
|
||||
}
|
||||
|
||||
private void SetPlayPanelInvisible()
|
||||
{
|
||||
panel1.Visible = false;
|
||||
tb1.Buttons[0].Visible = false;
|
||||
tb1.Buttons[1].Visible = false;
|
||||
|
||||
}
|
||||
|
||||
private void UpdateControl()
|
||||
{
|
||||
try
|
||||
{
|
||||
bool AllAutoscaled = true;
|
||||
|
||||
foreach (DataSource s in gPane.Sources)
|
||||
{
|
||||
AllAutoscaled &= s.AutoScaleX;
|
||||
}
|
||||
|
||||
|
||||
if (AllAutoscaled == true)
|
||||
{
|
||||
if (panel1.Visible == true)
|
||||
{
|
||||
this.Invoke(new MethodInvoker(SetPlayPanelInvisible));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (panel1.Visible == false)
|
||||
{
|
||||
this.Invoke(new MethodInvoker(SetPlayPanelVisible));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePlayback()
|
||||
{
|
||||
if (!paused && isRunning == true)
|
||||
{
|
||||
try
|
||||
{
|
||||
gPane.starting_idx += play_speed;
|
||||
UpdateScrollBar();
|
||||
gPane.Invalidate();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTimerTick(object sender, EventArgs e)
|
||||
{
|
||||
UpdateControl();
|
||||
|
||||
UpdatePlayback();
|
||||
}
|
||||
|
||||
private void UpdateScrollBar()
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new MethodInvoker(UpdateScrollBar));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gPane.Sources.Count > 0)
|
||||
{
|
||||
if (gPane.starting_idx > gPane.Sources[0].Length)
|
||||
{
|
||||
hScrollBar1.Value = 10000;
|
||||
}
|
||||
else if (gPane.starting_idx >= 0)
|
||||
{
|
||||
hScrollBar1.Value = 10000 * (int)gPane.starting_idx / gPane.Sources[0].Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
hScrollBar1.Value = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hScrollBar1.Value = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnScrollbarScroll(object sender, ScrollEventArgs e)
|
||||
{
|
||||
if (gPane.Sources.Count > 0)
|
||||
{
|
||||
int val = hScrollBar1.Value;
|
||||
gPane.starting_idx = (int)(gPane.Sources[0].Length * (float)val / 10000.0f);
|
||||
gPane.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void selectGraphsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GraphPropertiesForm == null)
|
||||
{
|
||||
GraphPropertiesForm = new PlotterGraphSelectCurvesForm();
|
||||
}
|
||||
|
||||
GraphPropertiesForm.GraphPanel = this.gPane;
|
||||
GraphPropertiesForm.Show();
|
||||
// GraphPropertiesForm.BringToFront();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+200
@@ -0,0 +1,200 @@
|
||||
namespace GraphLib
|
||||
{
|
||||
partial class PlotterDisplayEx
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PlotterDisplayEx));
|
||||
this.tb1 = new System.Windows.Forms.ToolBar();
|
||||
this.tbbSave = new System.Windows.Forms.ToolBarButton();
|
||||
this.tbbOpen = new System.Windows.Forms.ToolBarButton();
|
||||
this.imgList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.lb_Position = new System.Windows.Forms.Label();
|
||||
this.hScrollBar1 = new System.Windows.Forms.HScrollBar();
|
||||
this.gPane = new GraphLib.PlotterGraphPaneEx();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.selectGraphsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tb1
|
||||
//
|
||||
this.tb1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
|
||||
this.tb1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
|
||||
this.tbbSave,
|
||||
this.tbbOpen});
|
||||
this.tb1.ButtonSize = new System.Drawing.Size(16, 16);
|
||||
this.tb1.Divider = false;
|
||||
this.tb1.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.tb1.DropDownArrows = true;
|
||||
this.tb1.ImageList = this.imgList1;
|
||||
this.tb1.Location = new System.Drawing.Point(11, 5);
|
||||
this.tb1.Name = "tb1";
|
||||
this.tb1.ShowToolTips = true;
|
||||
this.tb1.Size = new System.Drawing.Size(80, 26);
|
||||
this.tb1.TabIndex = 1;
|
||||
this.tb1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tb1_ButtonClick);
|
||||
//
|
||||
// tbbSave
|
||||
//
|
||||
this.tbbSave.ImageIndex = 0;
|
||||
this.tbbSave.Name = "tbbSave";
|
||||
this.tbbSave.Tag = "play";
|
||||
//
|
||||
// tbbOpen
|
||||
//
|
||||
this.tbbOpen.ImageIndex = 1;
|
||||
this.tbbOpen.Name = "tbbOpen";
|
||||
this.tbbOpen.Tag = "stop";
|
||||
//
|
||||
// imgList1
|
||||
//
|
||||
this.imgList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgList1.ImageStream")));
|
||||
this.imgList1.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imgList1.Images.SetKeyName(0, "media-playback-start.png");
|
||||
this.imgList1.Images.SetKeyName(1, "media-playback-stop.png");
|
||||
this.imgList1.Images.SetKeyName(2, "media-playback-pause.png");
|
||||
this.imgList1.Images.SetKeyName(3, "printer.png");
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.splitContainer1.Panel1.Controls.Add(this.tb1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.panel1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.splitContainer1.Panel2.Controls.Add(this.gPane);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(598, 339);
|
||||
this.splitContainer1.SplitterDistance = 34;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
this.splitContainer1.TabStop = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.lb_Position);
|
||||
this.panel1.Controls.Add(this.hScrollBar1);
|
||||
this.panel1.Location = new System.Drawing.Point(99, 3);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(496, 28);
|
||||
this.panel1.TabIndex = 7;
|
||||
//
|
||||
// lb_Position
|
||||
//
|
||||
this.lb_Position.AutoSize = true;
|
||||
this.lb_Position.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.lb_Position.Location = new System.Drawing.Point(6, 8);
|
||||
this.lb_Position.Name = "lb_Position";
|
||||
this.lb_Position.Size = new System.Drawing.Size(44, 13);
|
||||
this.lb_Position.TabIndex = 3;
|
||||
this.lb_Position.Text = "Position";
|
||||
//
|
||||
// hScrollBar1
|
||||
//
|
||||
this.hScrollBar1.Location = new System.Drawing.Point(57, 10);
|
||||
this.hScrollBar1.Maximum = 10000;
|
||||
this.hScrollBar1.Name = "hScrollBar1";
|
||||
this.hScrollBar1.Size = new System.Drawing.Size(118, 10);
|
||||
this.hScrollBar1.TabIndex = 4;
|
||||
this.hScrollBar1.Scroll += new System.Windows.Forms.ScrollEventHandler(this.OnScrollbarScroll);
|
||||
//
|
||||
// gPane
|
||||
//
|
||||
this.gPane.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.gPane.Location = new System.Drawing.Point(0, 0);
|
||||
this.gPane.Name = "gPane";
|
||||
this.gPane.Size = new System.Drawing.Size(598, 301);
|
||||
this.gPane.TabIndex = 1;
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.selectGraphsToolStripMenuItem,
|
||||
this.toolStripSeparator1});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(117, 32);
|
||||
//
|
||||
// selectGraphsToolStripMenuItem
|
||||
//
|
||||
this.selectGraphsToolStripMenuItem.Name = "selectGraphsToolStripMenuItem";
|
||||
this.selectGraphsToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
|
||||
this.selectGraphsToolStripMenuItem.Text = "Options";
|
||||
this.selectGraphsToolStripMenuItem.Click += new System.EventHandler(this.selectGraphsToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(113, 6);
|
||||
//
|
||||
// PlotterDisplayEx
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "PlotterDisplayEx";
|
||||
this.Size = new System.Drawing.Size(598, 339);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ToolBar tb1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.ToolBarButton tbbSave;
|
||||
private System.Windows.Forms.ToolBarButton tbbOpen;
|
||||
private System.Windows.Forms.HScrollBar hScrollBar1;
|
||||
private PlotterGraphPaneEx gPane;
|
||||
private System.Windows.Forms.Label lb_Position;
|
||||
public System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem selectGraphsToolStripMenuItem;
|
||||
private System.Windows.Forms.ImageList imgList1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="imgList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="imgList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACI
|
||||
DgAAAk1TRnQBSQFMAgEBBAEAAQwBAAEMAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
AwABIAMAAQEBAAEgBgABIP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AKgADAQECwAABtwGV
|
||||
AVAB/QHKAZgBWgH/AcoBlwFaAf8BygGXAVoB/wHKAZcBWgH/AcoBlwFZAf8ByQGXAVkB/wHJAZcBWQH/
|
||||
AcoBmAFaAf8BtwGUAVAB/RQAAxQBHAMRARcDAgEDrAADTgGZA10B0gNNAf8BxwGVAVYB/wH5AfcB9gH/
|
||||
AfkB8QHsAf8B+QHxAesB/wH4AfAB6QH/AfcB7QHmAf8B9AHqAeEB/wHyAegB3gH/AfoB+AH2Af8BxwGU
|
||||
AVYB/wMZAf8DWAHRA0QBeggAAxUBHQFiAlgB6QM6AWEDDQESAwABASwAAxsBJgMbASYDGwEmAxsBJgMb
|
||||
ASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEmEAADGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEm
|
||||
AxsBJgMbASYDGwEmAxsBJgMbASYIAANVAf0DpwH/A7UB/wOBAf8BrwGsAaoB/wHFAcABvQH/AcUBwAG9
|
||||
Af8BxQHAAb0B/wHFAcABvQH/AcUBwAG9Af8BxQHAAb0B/wGtAaoBqAH/AyEB/wO1Af8DmwH/AxgB/wgA
|
||||
AxUBHQNNAfoBOwIrAfwDXwHgAysBQgMNARIoAAMbASYDKwH8AYACgQH/AYACgQH/AYACgQH/AYACgQH/
|
||||
AYACgQH/AYACgQH/AYACgQH/AYACgQH/AYACgQH/AxsBJhAAAxsBJgMrAfwBgAKBAf8BgAKBAf8BgAKB
|
||||
Af8DIwE0AxsBJgMrAfwBgAKBAf8BgAKBAf8BgAKBAf8DIwE0CAADZQH/A7UB/wO1Af8DlQH/A4EB/wOB
|
||||
Af8DbgH/A2MB/wNWAf8DRwH/AzgB/wM3Af8DYwH/A7UB/wO1Af8DGgH/CAADFQEdAV8CSgH7AfkB+gH5
|
||||
Af8DfwH+AV8BUwFSAfsDVQGyAx0BKgMIAQsgAAMbASYDQAH9IP8DQAH9AxsBJgMAAQEMAAMbASYDQAH9
|
||||
AfwB/QH8Bf8DQAH9AxsBJgMbASYDQAH9AfwB/QH8Bf8DQAH9AxsBJgMAAQEEAANqAf8DuwH/A7sB/wON
|
||||
Af8D1AH/A7kB/wO5Af8DuQH/A7kB/wO5Af8DuQH/A9MB/wODAf8DuwH/A7sB/wMfAf8IAAMVAR0DKwH8
|
||||
AfoC+wH/AfUC9gH/AfkC+gH/ATwBLwEuAfwBbQJRAfcDQgF2AxYBHgMFAQcYAAMbASYDQAH9BP8B1QHb
|
||||
AdgB/wHUAdsB1wH/AdQB2wHYAf8B0wHbAdcB/wHRAdkB1QH/Ac8B1wHTBf8DQAH9AxsBJgMBAQIMAAMb
|
||||
ASYDQAH9AeIB5QHkAf8B2AHfAdwB/wNAAf0DGwEmAxsBJgNAAf0D8wH/AfcB+AH3Af8DQAH9AxsBJgMB
|
||||
AQIEAANvAf8D1wH/A9cB/wOXAf8D2AH/A78B/wO/Af8DvwH/A78B/wO/Af8DvwH/A9cB/wOOAf8D1wH/
|
||||
A9cB/wM0Af8IAAMWAR4DKwH8A/sB/wHTAdoB1wH/AdoB3wHcAf8B9gH3AfYB/wHyAvMB/wE7AisB/AFg
|
||||
AlkB6wMzAVMDEgEZAwQBBRAAAxsBJgNAAf0E/wHaAeAB3QH/AdsB4QHeAf8B3QHiAeAB/wHdAeIB4AH/
|
||||
AdsB4QHeAf8B2AHeAdsF/wNAAf0DGwEmAwEBAgwAAxsBJgNAAf0B4gHmAeQB/wHcAeIB3wH/A0AB/QMb
|
||||
ASYDGwEmA0AB/QHvAfEB8AH/AfAB8wHxAf8DQAH9AxsBJgMBAQIEAANzAf8D+QH/A/kB/wOrAf8D3wH/
|
||||
A8sB/wPLAf8DywH/A8sB/wPLAf8DywH/A98B/wOjAf8D+QH/A/kB/wNWAf8IAAMWAR4DKwH8A/sB/wHf
|
||||
AeQB4QH/Ad4B4wHhAf8B3gHjAeAB/wHjAecB5QH/AfQC9QH/A38B/gGRAkAB/QNWAbYDJgE5AxABFQwA
|
||||
AxsBJgNAAf0E/wHdAeMB4AH/AeEB5gHjAf8B5AHpAecB/wHmAeoB6AH/AeUB6QHnAf8B4gHnAeQF/wNA
|
||||
Af0DGwEmAwEBAgwAAxsBJgNAAf0B5AHoAeUB/wHeAeMB4QH/A0AB/QMbASYDGwEmA0AB/QHsAe8B7gH/
|
||||
AecB6wHpAf8DQAH9AxsBJgMBAQIEAANqAfkD/AH/A/wB/wPLAf8D8gH/A/IB/wPyAf8D8gH/A/IB/wPy
|
||||
Af8D8gH/A/IB/wPGAf8D/AH/A/wB/wNwAf4IAAMWAR4DKwH8A/sB/wHqAe4B7AH/AewB7wHuAf8B7AHv
|
||||
Ae4B/wHrAe4B7QH/AekB7AHrAf8DfwH+ATsCKwH8AVgCVgG7Ax0BKgMGAQgMAAMbASYDQAH9BP8B3wHk
|
||||
AeEB/wHkAekB5gH/AeoB7QHrAf8B7gHxAe8B/wHvAfEB8AH/AewB7wHuBf8DQAH9AxsBJgMBAQIMAAMb
|
||||
ASYDQAH9AesB7QHsAf8B3QHjAeAB/wNAAf0DGwEmAxsBJgNAAf0B7QHwAe8B/wHfAeQB4QH/A0AB/QMb
|
||||
ASYDAQECBAADXQTSAf8D6AH/A3IB/wNyAf8DcgH/A3IB/wNyAf8DcgH/A3IB/wNyAf8DcgH/A3IB/wPo
|
||||
Af8DxAH/A1wB3AgAAxYBHgMrAfwD+wH/AfUC9gH/AfoB+wH6Af8D+QH/Ad0C3gH/AWoCRwH5A10B7QE6
|
||||
AjkBYAMNAREUAAMbASYDQAH9BP8B3AHiAd8B/wHkAegB5gH/AesB7gHtAf8B8gH0AfMB/wH3AvgB/wH2
|
||||
AfgB9wX/A0AB/QMbASYDAQECDAADGwEmA0AB/QHyAfQB8wH/AdoB3wHdAf8DQAH9AxsBJgMcASgDQAH9
|
||||
AfMB9QH0Af8B1gHdAdkB/wNAAf0DGwEmAwEBAgQAAy0BRQOaAf8DzAH/AccBiwFDAf8B+QH0Ae0B/wH+
|
||||
AegB2AH/Af4B6AHXAf8B/QHlAdMB/wH8AeQB0QH/AfoB4AHHAf8B+QHdAcMB/wH6AfQB7QH/AccBhQE/
|
||||
Af8DwwH/A2kB/wMtAUUIAAMWAR4DKwH8A/sB/wHwAfMB8gH/AeYC6AH/A00B+gFiAlIB9AFRAk8BpQMU
|
||||
ARwDAAEBGAADGwEmA0AB/QT/AdgB3wHcAf8B4AHlAeMB/wHoAesB6gH/Ae8B8gHwAf8B9wH4AfcB/wP9
|
||||
Bf8DQAH9AxsBJgMBAQIMAAMbASYDQAH9A/wB/wHVAdsB2AH/A0AB/QMbASYDHAEoA0AB/QP8Af8B0gHa
|
||||
AdYB/wNAAf0DGwEmAwEBAggAAzsBYwNrAfMBxQGJAUEB/wH5AfQB7wH/Af4B5wHXAf8B/QHnAdUB/wH8
|
||||
AeYB0gH/AfsB4QHMAf8B+AHcAcIB/wH2AdoBvQH/AfoB9AHvAf8BxAGDAT0B/wNdAfMDOwFjDAADFgEe
|
||||
AysB/AP7Af8BPwIzAfwDTQH6AVoCVwG9AxgBIgMCAQMgAAMbASYDQAH9IP8DQAH9AxsBJgMBAQIMAAMb
|
||||
ASYDQAH9CP8DQAH9AxsBJgMcASgDQAH9CP8DQAH9AxsBJgMBAQIMAAMHAQkBmgF9AUcC+QH0AfAB/wH8
|
||||
AeYB0wH/Af0B5wHTAf8B+wHjAc0B/wH6AeAByAH/AfUB1gG7Af8B8wHUAbUB/wH4AfQB8AH/AZkBagFH
|
||||
AfkDBwEJEAADFgEeA0AB/QFbAjIB+wFgAlwB1AMjATMDBwEKKAADGwEmAysB/AEqAS4BLAH/ASoBLgEs
|
||||
Af8BKgEuASwB/wEqAS4BLAH/ASoBLgEsAf8BKgEuASwB/wEqAS4BLAH/ASoBLgEsAf8BKgEuASwB/wMb
|
||||
ASYDAQECDAADGwEmAWMBVwFVAf4BKgEuASwB/wEqAS4BLAH/ASoBLgEsAf8DGwEmAxwBKAFjAVcBVQH+
|
||||
ASoBLgEsAf8BKgEuASwB/wEqAS4BLAH/AxsBJgMBAQIQAAGWAX0BUQH3AfkB9QHxAf8B/AHjAc8B/wH8
|
||||
AeQBzwH/AfoB4QHKAf8B+QHdAcQB/wH0AekB3wH/AfcB8gHsAf8B9QHvAekB/wGbAWABRQH7FAADFgEf
|
||||
AV4CWgHYAygBPQMNAREwAAMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEm
|
||||
AxsBJgMAAQEMAAMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMbASYDGwEmAxsBJgMA
|
||||
AQEQAAGNAW0BSQH2AfkB9QHxAf8B/AHjAc0B/wH7AeMBzQH/AfkB4AHIAf8B+AHcAcIB/wH9AfsB+AH/
|
||||
AfwB5gHNAf8B4gG2AYQB/wJUAVIBphQAAxYBHwMRARcDAgEDuAABoAF2AU0B+gH3AfIB7AH/AfgB9AHu
|
||||
Af8B+AHzAe0B/wH4AfMB7QH/AfgB8gHsAf8B8gHmAdcB/wHiAbIBcgH/AZMBcwFiAfYDBQEHFAADAwEE
|
||||
wAADOgFgAlgBVgG7AbMBfwFPAf4ByAGMAUQB/wGWAYABUQH3AZYBgAFRAfcBsAF/AUwB/gNOAZQUAAFC
|
||||
AU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/gQAB3wX/AeABBwHHBf8CAAHBAf8BwAED
|
||||
AcABAwIAAcAB/wHAAQMBwAEDAgABwAE/AcABAQHAAQECAAHAAQ8BwAEBAcABAQIAAcABAwHAAQEBwAEB
|
||||
AgABwAEBAcABAQHAAQECAAHAAQEBwAEBAcABAQIAAcABBwHAAQEBwAEBAgABwAEPAcABAQHAAQEBgAEB
|
||||
AcABPwHAAQEBwAEBAcABAwHAAf8BwAEBAcABAQHgAQcBwwH/AcABAQHAAQEB4AEHAccF/wHgAQcB3wX/
|
||||
AeABHws=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>84, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Generated
+46
@@ -0,0 +1,46 @@
|
||||
namespace GraphLib
|
||||
{
|
||||
partial class PlotterGraphPaneEx
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PlotterGraphPane
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Name = "PlotterGraphPane";
|
||||
this.Size = new System.Drawing.Size(409, 150);
|
||||
this.Load += new System.EventHandler(this.OnLoadControl);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+365
@@ -0,0 +1,365 @@
|
||||
namespace GraphLib
|
||||
{
|
||||
partial class PlotterGraphSelectCurvesForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.lb_Graphs = new System.Windows.Forms.CheckedListBox();
|
||||
this.gB_SelectedGraph = new System.Windows.Forms.GroupBox();
|
||||
this.cb_X_AutoScale = new System.Windows.Forms.CheckBox();
|
||||
this.tb_GraphName = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.cbDownSampling = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.btn_GraphColor = new System.Windows.Forms.Button();
|
||||
this.cb_Y_AutoScale = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.bt_MinorGridColor = new System.Windows.Forms.Button();
|
||||
this.bt_bg_col_bot = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.bt_MajorGridColor = new System.Windows.Forms.Button();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.bt_bg_col_top = new System.Windows.Forms.Button();
|
||||
this.btn_AutoScaleAll = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.cb_Layout = new System.Windows.Forms.ComboBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.gB_SelectedGraph.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.lb_Graphs);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.gB_SelectedGraph);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.groupBox1);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.button1);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(395, 431);
|
||||
this.splitContainer1.SplitterDistance = 171;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// lb_Graphs
|
||||
//
|
||||
this.lb_Graphs.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lb_Graphs.FormattingEnabled = true;
|
||||
this.lb_Graphs.Location = new System.Drawing.Point(0, 0);
|
||||
this.lb_Graphs.Name = "lb_Graphs";
|
||||
this.lb_Graphs.Size = new System.Drawing.Size(171, 424);
|
||||
this.lb_Graphs.TabIndex = 0;
|
||||
this.lb_Graphs.SelectedIndexChanged += new System.EventHandler(this.checkedListBox1_SelectedIndexChanged_1);
|
||||
//
|
||||
// gB_SelectedGraph
|
||||
//
|
||||
this.gB_SelectedGraph.Controls.Add(this.cb_X_AutoScale);
|
||||
this.gB_SelectedGraph.Controls.Add(this.tb_GraphName);
|
||||
this.gB_SelectedGraph.Controls.Add(this.label3);
|
||||
this.gB_SelectedGraph.Controls.Add(this.cbDownSampling);
|
||||
this.gB_SelectedGraph.Controls.Add(this.label2);
|
||||
this.gB_SelectedGraph.Controls.Add(this.btn_GraphColor);
|
||||
this.gB_SelectedGraph.Controls.Add(this.cb_Y_AutoScale);
|
||||
this.gB_SelectedGraph.Location = new System.Drawing.Point(6, 232);
|
||||
this.gB_SelectedGraph.Name = "gB_SelectedGraph";
|
||||
this.gB_SelectedGraph.Size = new System.Drawing.Size(206, 158);
|
||||
this.gB_SelectedGraph.TabIndex = 6;
|
||||
this.gB_SelectedGraph.TabStop = false;
|
||||
this.gB_SelectedGraph.Text = "Selected Graph Options";
|
||||
this.gB_SelectedGraph.Visible = false;
|
||||
//
|
||||
// cb_X_AutoScale
|
||||
//
|
||||
this.cb_X_AutoScale.AutoSize = true;
|
||||
this.cb_X_AutoScale.Location = new System.Drawing.Point(12, 102);
|
||||
this.cb_X_AutoScale.Name = "cb_X_AutoScale";
|
||||
this.cb_X_AutoScale.Size = new System.Drawing.Size(93, 17);
|
||||
this.cb_X_AutoScale.TabIndex = 8;
|
||||
this.cb_X_AutoScale.Text = "X AutoScaling";
|
||||
this.cb_X_AutoScale.UseVisualStyleBackColor = true;
|
||||
this.cb_X_AutoScale.CheckedChanged += new System.EventHandler(this.cb_X_AutoScale_CheckedChanged);
|
||||
//
|
||||
// tb_GraphName
|
||||
//
|
||||
this.tb_GraphName.Location = new System.Drawing.Point(12, 24);
|
||||
this.tb_GraphName.Name = "tb_GraphName";
|
||||
this.tb_GraphName.Size = new System.Drawing.Size(167, 20);
|
||||
this.tb_GraphName.TabIndex = 7;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(52, 133);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(76, 13);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "Downsampling";
|
||||
//
|
||||
// cbDownSampling
|
||||
//
|
||||
this.cbDownSampling.FormattingEnabled = true;
|
||||
this.cbDownSampling.Items.AddRange(new object[] {
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6"});
|
||||
this.cbDownSampling.Location = new System.Drawing.Point(7, 130);
|
||||
this.cbDownSampling.Name = "cbDownSampling";
|
||||
this.cbDownSampling.Size = new System.Drawing.Size(39, 21);
|
||||
this.cbDownSampling.TabIndex = 5;
|
||||
this.cbDownSampling.Text = "1";
|
||||
this.cbDownSampling.SelectedIndexChanged += new System.EventHandler(this.OnDownsamplingChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(57, 55);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(63, 13);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Graph Color";
|
||||
//
|
||||
// btn_GraphColor
|
||||
//
|
||||
this.btn_GraphColor.Location = new System.Drawing.Point(11, 50);
|
||||
this.btn_GraphColor.Name = "btn_GraphColor";
|
||||
this.btn_GraphColor.Size = new System.Drawing.Size(26, 23);
|
||||
this.btn_GraphColor.TabIndex = 3;
|
||||
this.btn_GraphColor.UseVisualStyleBackColor = true;
|
||||
this.btn_GraphColor.Click += new System.EventHandler(this.btn_GraphColor_Click);
|
||||
//
|
||||
// cb_Y_AutoScale
|
||||
//
|
||||
this.cb_Y_AutoScale.AutoSize = true;
|
||||
this.cb_Y_AutoScale.Location = new System.Drawing.Point(12, 79);
|
||||
this.cb_Y_AutoScale.Name = "cb_Y_AutoScale";
|
||||
this.cb_Y_AutoScale.Size = new System.Drawing.Size(93, 17);
|
||||
this.cb_Y_AutoScale.TabIndex = 2;
|
||||
this.cb_Y_AutoScale.Text = "Y AutoScaling";
|
||||
this.cb_Y_AutoScale.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.label7);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.bt_MinorGridColor);
|
||||
this.groupBox1.Controls.Add(this.bt_bg_col_bot);
|
||||
this.groupBox1.Controls.Add(this.label6);
|
||||
this.groupBox1.Controls.Add(this.bt_MajorGridColor);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Controls.Add(this.bt_bg_col_top);
|
||||
this.groupBox1.Controls.Add(this.btn_AutoScaleAll);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Controls.Add(this.cb_Layout);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 5);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(206, 221);
|
||||
this.groupBox1.TabIndex = 4;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "General Options";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(57, 194);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(82, 13);
|
||||
this.label7.TabIndex = 10;
|
||||
this.label7.Text = "Minor Grid Color";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(57, 136);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(128, 13);
|
||||
this.label5.TabIndex = 8;
|
||||
this.label5.Text = "Background Color Bottom";
|
||||
//
|
||||
// bt_MinorGridColor
|
||||
//
|
||||
this.bt_MinorGridColor.Location = new System.Drawing.Point(11, 189);
|
||||
this.bt_MinorGridColor.Name = "bt_MinorGridColor";
|
||||
this.bt_MinorGridColor.Size = new System.Drawing.Size(26, 23);
|
||||
this.bt_MinorGridColor.TabIndex = 9;
|
||||
this.bt_MinorGridColor.UseVisualStyleBackColor = true;
|
||||
this.bt_MinorGridColor.Click += new System.EventHandler(this.bt_MinorGridColor_Click);
|
||||
//
|
||||
// bt_bg_col_bot
|
||||
//
|
||||
this.bt_bg_col_bot.Location = new System.Drawing.Point(11, 131);
|
||||
this.bt_bg_col_bot.Name = "bt_bg_col_bot";
|
||||
this.bt_bg_col_bot.Size = new System.Drawing.Size(26, 23);
|
||||
this.bt_bg_col_bot.TabIndex = 7;
|
||||
this.bt_bg_col_bot.UseVisualStyleBackColor = true;
|
||||
this.bt_bg_col_bot.Click += new System.EventHandler(this.bt_bg_col_bot_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(57, 165);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(82, 13);
|
||||
this.label6.TabIndex = 8;
|
||||
this.label6.Text = "Major Grid Color";
|
||||
//
|
||||
// bt_MajorGridColor
|
||||
//
|
||||
this.bt_MajorGridColor.Location = new System.Drawing.Point(11, 160);
|
||||
this.bt_MajorGridColor.Name = "bt_MajorGridColor";
|
||||
this.bt_MajorGridColor.Size = new System.Drawing.Size(26, 23);
|
||||
this.bt_MajorGridColor.TabIndex = 7;
|
||||
this.bt_MajorGridColor.UseVisualStyleBackColor = true;
|
||||
this.bt_MajorGridColor.Click += new System.EventHandler(this.bt_MajorGridColor_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(57, 107);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(114, 13);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "Background Color Top";
|
||||
//
|
||||
// bt_bg_col_top
|
||||
//
|
||||
this.bt_bg_col_top.Location = new System.Drawing.Point(11, 102);
|
||||
this.bt_bg_col_top.Name = "bt_bg_col_top";
|
||||
this.bt_bg_col_top.Size = new System.Drawing.Size(26, 23);
|
||||
this.bt_bg_col_top.TabIndex = 5;
|
||||
this.bt_bg_col_top.UseVisualStyleBackColor = true;
|
||||
this.bt_bg_col_top.Click += new System.EventHandler(this.bt_bg_col_top_Click);
|
||||
//
|
||||
// btn_AutoScaleAll
|
||||
//
|
||||
this.btn_AutoScaleAll.Location = new System.Drawing.Point(11, 69);
|
||||
this.btn_AutoScaleAll.Name = "btn_AutoScaleAll";
|
||||
this.btn_AutoScaleAll.Size = new System.Drawing.Size(167, 25);
|
||||
this.btn_AutoScaleAll.TabIndex = 4;
|
||||
this.btn_AutoScaleAll.Text = "Auto Scale All";
|
||||
this.btn_AutoScaleAll.UseVisualStyleBackColor = true;
|
||||
this.btn_AutoScaleAll.Click += new System.EventHandler(this.OnButtonAutoScallOnClicked);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 26);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(39, 13);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Layout";
|
||||
//
|
||||
// cb_Layout
|
||||
//
|
||||
this.cb_Layout.FormattingEnabled = true;
|
||||
this.cb_Layout.Items.AddRange(new object[] {
|
||||
"Normal",
|
||||
"Stacked",
|
||||
"Tiles - Fill Vertical",
|
||||
"Tiles - Fill Horizontal",
|
||||
"Vertically"});
|
||||
this.cb_Layout.Location = new System.Drawing.Point(11, 42);
|
||||
this.cb_Layout.Name = "cb_Layout";
|
||||
this.cb_Layout.Size = new System.Drawing.Size(168, 21);
|
||||
this.cb_Layout.TabIndex = 2;
|
||||
this.cb_Layout.Text = "Select";
|
||||
this.cb_Layout.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(66, 396);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(68, 23);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "Exit";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// PlotterGraphSelectCurvesForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(395, 431);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(16, 246);
|
||||
this.Name = "PlotterGraphSelectCurvesForm";
|
||||
this.Text = "Graph Properties";
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.gB_SelectedGraph.ResumeLayout(false);
|
||||
this.gB_SelectedGraph.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.CheckedListBox lb_Graphs;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox cb_Layout;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button btn_GraphColor;
|
||||
private System.Windows.Forms.CheckBox cb_Y_AutoScale;
|
||||
private System.Windows.Forms.Button btn_AutoScaleAll;
|
||||
private System.Windows.Forms.GroupBox gB_SelectedGraph;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox cbDownSampling;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Button bt_bg_col_top;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Button bt_bg_col_bot;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Button bt_MinorGridColor;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Button bt_MajorGridColor;
|
||||
private System.Windows.Forms.TextBox tb_GraphName;
|
||||
private System.Windows.Forms.CheckBox cb_X_AutoScale;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,369 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
/* Copyright (c) 2008-2014 DI Zimmermann Stephan (stefan.zimmermann@tele2.at)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
namespace GraphLib
|
||||
{
|
||||
public partial class PlotterGraphSelectCurvesForm : Form
|
||||
{
|
||||
private int selectetGraphIndex = -1;
|
||||
|
||||
private PlotterGraphPaneEx gpane = null;
|
||||
|
||||
public PlotterGraphSelectCurvesForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
FormClosing += new FormClosingEventHandler(OnFormClosing);
|
||||
lb_Graphs.SelectedIndexChanged += new EventHandler(OnSelectedGraphIndexChanged);
|
||||
VisibleChanged += new EventHandler(OnVisibleChanged);
|
||||
tb_GraphName.TextChanged += new EventHandler(tb_GraphName_TextChanged);
|
||||
}
|
||||
|
||||
void tb_GraphName_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (selectetGraphIndex >= 0 && selectetGraphIndex < gpane.Sources.Count)
|
||||
{
|
||||
DataSource src = gpane.Sources[selectetGraphIndex];
|
||||
String Text = tb_GraphName.Text;
|
||||
|
||||
if (String.IsNullOrEmpty(Text) == false)
|
||||
{
|
||||
src.Name = Text;
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public PlotterGraphPaneEx GraphPanel
|
||||
{
|
||||
set
|
||||
{
|
||||
gpane = value;
|
||||
if (gpane != null)
|
||||
{
|
||||
this.lb_Graphs.Items.Clear();
|
||||
|
||||
foreach (DataSource s in gpane.Sources)
|
||||
{
|
||||
if (s.Active)
|
||||
{
|
||||
this.lb_Graphs.Items.Add(s.Name, CheckState.Checked);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lb_Graphs.Items.Add(s.Name, CheckState.Unchecked);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateAllCheckedState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAllCheckedState()
|
||||
{
|
||||
int AutoScaleOn = 0;
|
||||
|
||||
foreach (DataSource src in gpane.Sources)
|
||||
{
|
||||
if (src.AutoScaleY)
|
||||
{
|
||||
AutoScaleOn++;
|
||||
}
|
||||
}
|
||||
|
||||
if (AutoScaleOn == 0)
|
||||
{
|
||||
btn_AutoScaleAll.Visible = true;
|
||||
btn_AutoScaleAll.Text = "Auto Y-Scale all Graphs";
|
||||
}
|
||||
else
|
||||
{
|
||||
btn_AutoScaleAll.Visible = true;
|
||||
btn_AutoScaleAll.Text = "Normal Y-Scale all Graphs";
|
||||
}
|
||||
}
|
||||
|
||||
void OnVisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Visible == true)
|
||||
{
|
||||
selectetGraphIndex = -1;
|
||||
gB_SelectedGraph.Visible = false;
|
||||
|
||||
if (gpane != null)
|
||||
{
|
||||
UpdateAllCheckedState();
|
||||
|
||||
if (gpane.layout == PlotterGraphPaneEx.LayoutMode.NORMAL)
|
||||
{
|
||||
cb_Layout.SelectedIndex = 0;
|
||||
}
|
||||
else if (gpane.layout == PlotterGraphPaneEx.LayoutMode.STACKED)
|
||||
{
|
||||
cb_Layout.SelectedIndex = 1;
|
||||
}
|
||||
else if (gpane.layout == PlotterGraphPaneEx.LayoutMode.TILES_HOR)
|
||||
{
|
||||
cb_Layout.SelectedIndex = 2;
|
||||
}
|
||||
else if (gpane.layout == PlotterGraphPaneEx.LayoutMode.TILES_VER)
|
||||
{
|
||||
cb_Layout.SelectedIndex = 3;
|
||||
}
|
||||
else if (gpane.layout == PlotterGraphPaneEx.LayoutMode.VERTICAL_ARRANGED)
|
||||
{
|
||||
cb_Layout.SelectedIndex = 4;
|
||||
}
|
||||
|
||||
bt_bg_col_top.BackColor = gpane.BgndColorTop;
|
||||
bt_bg_col_bot.BackColor = gpane.BgndColorBot;
|
||||
bt_MajorGridColor.BackColor = gpane.MajorGridColor;
|
||||
bt_MinorGridColor.BackColor = gpane.MinorGridColor;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OnSelectedGraphIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (gpane != null)
|
||||
{
|
||||
for (int i = 0; i < gpane.Sources.Count; i++)
|
||||
{
|
||||
if (lb_Graphs.CheckedIndices.Contains(i))
|
||||
{
|
||||
gpane.Sources[i].Active = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
gpane.Sources[i].Active = false;
|
||||
}
|
||||
}
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
void OnFormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
}
|
||||
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cb_Layout.SelectedIndex == 0)
|
||||
{
|
||||
gpane.layout = PlotterGraphPaneEx.LayoutMode.NORMAL;
|
||||
}
|
||||
if (cb_Layout.SelectedIndex == 1)
|
||||
{
|
||||
gpane.layout = PlotterGraphPaneEx.LayoutMode.STACKED;
|
||||
}
|
||||
|
||||
if (cb_Layout.SelectedIndex == 2)
|
||||
{
|
||||
gpane.layout = PlotterGraphPaneEx.LayoutMode.TILES_VER;
|
||||
}
|
||||
if (cb_Layout.SelectedIndex == 3)
|
||||
{
|
||||
gpane.layout = PlotterGraphPaneEx.LayoutMode.TILES_HOR;
|
||||
}
|
||||
if (cb_Layout.SelectedIndex == 4)
|
||||
{
|
||||
gpane.layout = PlotterGraphPaneEx.LayoutMode.VERTICAL_ARRANGED;
|
||||
}
|
||||
gpane.Invalidate();
|
||||
}
|
||||
|
||||
private void checkedListBox1_SelectedIndexChanged_1(object sender, EventArgs e)
|
||||
{
|
||||
selectetGraphIndex = lb_Graphs.SelectedIndex;
|
||||
|
||||
UpdateSelectedGraphInfo();
|
||||
gB_SelectedGraph.Visible = true;
|
||||
}
|
||||
|
||||
private void UpdateSelectedGraphInfo()
|
||||
{
|
||||
if (selectetGraphIndex >= 0 && selectetGraphIndex < gpane.Sources.Count)
|
||||
{
|
||||
DataSource src = gpane.Sources[selectetGraphIndex];
|
||||
btn_GraphColor.BackColor = src.GraphColor;
|
||||
|
||||
cb_Y_AutoScale.Checked = src.AutoScaleY;
|
||||
cb_X_AutoScale.Checked = src.AutoScaleX;
|
||||
|
||||
cbDownSampling.SelectedIndex = (src.Downsampling - 1);
|
||||
tb_GraphName.Text = src.Name;
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_GraphColor_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (selectetGraphIndex >= 0 && selectetGraphIndex < gpane.Sources.Count)
|
||||
{
|
||||
DataSource src = gpane.Sources[selectetGraphIndex];
|
||||
ColorDialog d = new ColorDialog();
|
||||
if (d.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
btn_GraphColor.BackColor = d.Color;
|
||||
src.GraphColor = d.Color;
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnButtonAutoScallOnClicked(object sender, EventArgs e)
|
||||
{
|
||||
int AutoScaleOn = 0;
|
||||
|
||||
foreach (DataSource src in gpane.Sources)
|
||||
{
|
||||
if (src.AutoScaleY)
|
||||
{
|
||||
AutoScaleOn++;
|
||||
}
|
||||
}
|
||||
|
||||
if (AutoScaleOn == 0)
|
||||
{
|
||||
btn_AutoScaleAll.Text = "Normal scale for all graphs";
|
||||
foreach (DataSource src in gpane.Sources)
|
||||
{
|
||||
src.AutoScaleY = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
btn_AutoScaleAll.Text = "Auto scale for all graphs";
|
||||
foreach (DataSource src in gpane.Sources)
|
||||
{
|
||||
src.AutoScaleY = false;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateSelectedGraphInfo();
|
||||
gpane.Invalidate();
|
||||
}
|
||||
|
||||
private void OnDownsamplingChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (selectetGraphIndex >= 0 && selectetGraphIndex < gpane.Sources.Count)
|
||||
{
|
||||
DataSource src = gpane.Sources[selectetGraphIndex];
|
||||
|
||||
src.Downsampling = (cbDownSampling.SelectedIndex + 1);
|
||||
}
|
||||
|
||||
gpane.Invalidate();
|
||||
}
|
||||
|
||||
private void bt_bg_col_top_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog d = new ColorDialog();
|
||||
if (d.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
bt_bg_col_top.BackColor = d.Color;
|
||||
gpane.BgndColorTop = d.Color;
|
||||
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void bt_bg_col_bot_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog d = new ColorDialog();
|
||||
if (d.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
bt_bg_col_bot.BackColor = d.Color;
|
||||
gpane.BgndColorBot = d.Color;
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void bt_MajorGridColor_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog d = new ColorDialog();
|
||||
if (d.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
bt_MajorGridColor.BackColor = d.Color;
|
||||
gpane.MajorGridColor = d.Color;
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void bt_MinorGridColor_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog d = new ColorDialog();
|
||||
if (d.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
bt_MinorGridColor.BackColor = d.Color;
|
||||
gpane.MinorGridColor = d.Color;
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void cb_Y_AutoScale_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (selectetGraphIndex >= 0 && selectetGraphIndex < gpane.Sources.Count)
|
||||
{
|
||||
DataSource src = gpane.Sources[selectetGraphIndex];
|
||||
|
||||
src.AutoScaleY = cb_Y_AutoScale.Checked;
|
||||
|
||||
UpdateAllCheckedState();
|
||||
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void cb_X_AutoScale_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (selectetGraphIndex >= 0 && selectetGraphIndex < gpane.Sources.Count)
|
||||
{
|
||||
DataSource src = gpane.Sources[selectetGraphIndex];
|
||||
|
||||
src.AutoScaleX = cb_X_AutoScale.Checked;
|
||||
|
||||
UpdateAllCheckedState();
|
||||
|
||||
gpane.Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,490 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Based on the work of Leslie Sanford
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
namespace PrecisionTimer
|
||||
{
|
||||
public enum Mode
|
||||
{
|
||||
OneShot,
|
||||
Periodic
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct TimerCaps
|
||||
{
|
||||
public int periodMin;
|
||||
public int periodMax;
|
||||
}
|
||||
|
||||
|
||||
public sealed class Timer : IComponent
|
||||
{
|
||||
private delegate void TimeProc(int id, int msg, int user, int param1, int param2);
|
||||
|
||||
private delegate void EventRaiser(EventArgs e);
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
private static extern int timeGetDevCaps(ref TimerCaps caps,
|
||||
int sizeOfTimerCaps);
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
private static extern int timeSetEvent(int delay,
|
||||
int resolution,
|
||||
TimeProc proc,
|
||||
int user,
|
||||
int mode);
|
||||
|
||||
[DllImport("winmm.dll")]
|
||||
private static extern int timeKillEvent(int id);
|
||||
|
||||
private const int TIMERR_NOERROR = 0;
|
||||
|
||||
private int timerID;
|
||||
|
||||
private volatile Mode mode;
|
||||
|
||||
private volatile int period;
|
||||
|
||||
private volatile int resolution;
|
||||
|
||||
private TimeProc timeProcPeriodic;
|
||||
|
||||
private TimeProc timeProcOneShot;
|
||||
|
||||
private EventRaiser tickRaiser;
|
||||
|
||||
private bool running = false;
|
||||
|
||||
private volatile bool disposed = false;
|
||||
|
||||
private ISynchronizeInvoke synchronizingObject = null;
|
||||
|
||||
private ISite site = null;
|
||||
|
||||
private static TimerCaps caps;
|
||||
|
||||
public event EventHandler Started;
|
||||
|
||||
public event EventHandler Stopped;
|
||||
|
||||
public event EventHandler Tick;
|
||||
|
||||
static Timer()
|
||||
{
|
||||
// Get multimedia timer capabilities.
|
||||
timeGetDevCaps(ref caps, Marshal.SizeOf(caps));
|
||||
}
|
||||
|
||||
|
||||
public Timer(IContainer container)
|
||||
{
|
||||
|
||||
container.Add(this);
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
||||
public Timer()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
~Timer()
|
||||
{
|
||||
if(IsRunning)
|
||||
{
|
||||
// Stop and destroy timer.
|
||||
timeKillEvent(timerID);
|
||||
}
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
this.mode = Mode.Periodic;
|
||||
this.period = Capabilities.periodMin;
|
||||
this.resolution = 1;
|
||||
|
||||
running = false;
|
||||
|
||||
timeProcPeriodic = new TimeProc(TimerPeriodicEventCallback);
|
||||
timeProcOneShot = new TimeProc(TimerOneShotEventCallback);
|
||||
tickRaiser = new EventRaiser(OnTick);
|
||||
}
|
||||
|
||||
|
||||
public void Start()
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(Mode == Mode.Periodic)
|
||||
{
|
||||
timerID = timeSetEvent(Period, Resolution, timeProcPeriodic, 0, (int)Mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
timerID = timeSetEvent(Period, Resolution, timeProcOneShot, 0, (int)Mode);
|
||||
}
|
||||
|
||||
if(timerID != 0)
|
||||
{
|
||||
running = true;
|
||||
|
||||
if(SynchronizingObject != null && SynchronizingObject.InvokeRequired)
|
||||
{
|
||||
SynchronizingObject.BeginInvoke(
|
||||
new EventRaiser(OnStarted),
|
||||
new object[] { EventArgs.Empty });
|
||||
}
|
||||
else
|
||||
{
|
||||
OnStarted(EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new TimerException("Unable to start timer.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
if(!running)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int result = timeKillEvent(timerID);
|
||||
|
||||
Debug.Assert(result == TIMERR_NOERROR);
|
||||
|
||||
running = false;
|
||||
|
||||
if(SynchronizingObject != null && SynchronizingObject.InvokeRequired)
|
||||
{
|
||||
SynchronizingObject.BeginInvoke(
|
||||
new EventRaiser(OnStopped),
|
||||
new object[] { EventArgs.Empty });
|
||||
}
|
||||
else
|
||||
{
|
||||
OnStopped(EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void TimerPeriodicEventCallback(int id, int msg, int user, int param1, int param2)
|
||||
{
|
||||
if(synchronizingObject != null)
|
||||
{
|
||||
synchronizingObject.BeginInvoke(tickRaiser, new object[] { EventArgs.Empty });
|
||||
}
|
||||
else
|
||||
{
|
||||
OnTick(EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
private void TimerOneShotEventCallback(int id, int msg, int user, int param1, int param2)
|
||||
{
|
||||
if(synchronizingObject != null)
|
||||
{
|
||||
synchronizingObject.BeginInvoke(tickRaiser, new object[] { EventArgs.Empty });
|
||||
Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
OnTick(EventArgs.Empty);
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Raises the Disposed event.
|
||||
private void OnDisposed(EventArgs e)
|
||||
{
|
||||
EventHandler handler = Disposed;
|
||||
|
||||
if(handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
// Raises the Started event.
|
||||
private void OnStarted(EventArgs e)
|
||||
{
|
||||
EventHandler handler = Started;
|
||||
|
||||
if(handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
// Raises the Stopped event.
|
||||
private void OnStopped(EventArgs e)
|
||||
{
|
||||
EventHandler handler = Stopped;
|
||||
|
||||
if(handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
// Raises the Tick event.
|
||||
private void OnTick(EventArgs e)
|
||||
{
|
||||
EventHandler handler = Tick;
|
||||
|
||||
if(handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the object used to marshal event-handler calls.
|
||||
/// </summary>
|
||||
public ISynchronizeInvoke SynchronizingObject
|
||||
{
|
||||
get
|
||||
{
|
||||
#region Require
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
return synchronizingObject;
|
||||
}
|
||||
set
|
||||
{
|
||||
#region Require
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
synchronizingObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Period
|
||||
{
|
||||
get
|
||||
{
|
||||
#region Require
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
return period;
|
||||
}
|
||||
set
|
||||
{
|
||||
#region Require
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
else if(value < Capabilities.periodMin || value > Capabilities.periodMax)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Period", value,
|
||||
"Multimedia Timer period out of range.");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
period = value;
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
Stop();
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Resolution
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
return resolution;
|
||||
}
|
||||
set
|
||||
{
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
else if(value < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Resolution", value,
|
||||
"timer resolution out of range.");
|
||||
}
|
||||
|
||||
resolution = value;
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
Stop();
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Mode Mode
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
|
||||
return mode;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("Timer");
|
||||
}
|
||||
|
||||
|
||||
mode = value;
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
Stop();
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the Timer is running.
|
||||
/// </summary>
|
||||
public bool IsRunning
|
||||
{
|
||||
get
|
||||
{
|
||||
return running;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the timer capabilities.
|
||||
/// </summary>
|
||||
public static TimerCaps Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
return caps;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public event System.EventHandler Disposed;
|
||||
|
||||
public ISite Site
|
||||
{
|
||||
get
|
||||
{
|
||||
return site;
|
||||
}
|
||||
set
|
||||
{
|
||||
site = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
if(disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(IsRunning)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
disposed = true;
|
||||
|
||||
OnDisposed(EventArgs.Empty);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TimerException : ApplicationException
|
||||
{
|
||||
public TimerException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+264
@@ -0,0 +1,264 @@
|
||||
namespace GraphLib
|
||||
{
|
||||
partial class PrintPreviewForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.printPreviewCtrl = new System.Windows.Forms.PrintPreviewControl();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.rb_Unscaled = new System.Windows.Forms.RadioButton();
|
||||
this.rb_BestFit = new System.Windows.Forms.RadioButton();
|
||||
this.rb_Scale = new System.Windows.Forms.RadioButton();
|
||||
this.cb_PrintBackground = new System.Windows.Forms.CheckBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.cb_Printer = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.cb_Orientation = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.cb_PaperSize = new System.Windows.Forms.ComboBox();
|
||||
this.bt_Cancel = new System.Windows.Forms.Button();
|
||||
this.bt_print = new System.Windows.Forms.Button();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// printPreviewCtrl
|
||||
//
|
||||
this.printPreviewCtrl.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.printPreviewCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.printPreviewCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.printPreviewCtrl.Name = "printPreviewCtrl";
|
||||
this.printPreviewCtrl.Size = new System.Drawing.Size(453, 501);
|
||||
this.printPreviewCtrl.TabIndex = 1;
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.printPreviewCtrl);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.groupBox1);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.cb_PrintBackground);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label3);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.cb_Printer);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label2);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.cb_Orientation);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label1);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.cb_PaperSize);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.bt_Cancel);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.bt_print);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(681, 501);
|
||||
this.splitContainer1.SplitterDistance = 453;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.rb_Unscaled);
|
||||
this.groupBox1.Controls.Add(this.rb_BestFit);
|
||||
this.groupBox1.Controls.Add(this.rb_Scale);
|
||||
this.groupBox1.Location = new System.Drawing.Point(18, 188);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(93, 93);
|
||||
this.groupBox1.TabIndex = 12;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Scaling";
|
||||
//
|
||||
// rb_Unscaled
|
||||
//
|
||||
this.rb_Unscaled.AutoSize = true;
|
||||
this.rb_Unscaled.Location = new System.Drawing.Point(13, 19);
|
||||
this.rb_Unscaled.Name = "rb_Unscaled";
|
||||
this.rb_Unscaled.Size = new System.Drawing.Size(70, 17);
|
||||
this.rb_Unscaled.TabIndex = 8;
|
||||
this.rb_Unscaled.TabStop = true;
|
||||
this.rb_Unscaled.Text = "Unscaled";
|
||||
this.rb_Unscaled.UseVisualStyleBackColor = true;
|
||||
this.rb_Unscaled.CheckedChanged += new System.EventHandler(this.rb_Unscaled_CheckedChanged);
|
||||
//
|
||||
// rb_BestFit
|
||||
//
|
||||
this.rb_BestFit.AutoSize = true;
|
||||
this.rb_BestFit.Location = new System.Drawing.Point(13, 65);
|
||||
this.rb_BestFit.Name = "rb_BestFit";
|
||||
this.rb_BestFit.Size = new System.Drawing.Size(60, 17);
|
||||
this.rb_BestFit.TabIndex = 6;
|
||||
this.rb_BestFit.TabStop = true;
|
||||
this.rb_BestFit.Text = "Best Fit";
|
||||
this.rb_BestFit.UseVisualStyleBackColor = true;
|
||||
this.rb_BestFit.CheckedChanged += new System.EventHandler(this.rb_BestFit_CheckedChanged);
|
||||
//
|
||||
// rb_Scale
|
||||
//
|
||||
this.rb_Scale.AutoSize = true;
|
||||
this.rb_Scale.Location = new System.Drawing.Point(13, 42);
|
||||
this.rb_Scale.Name = "rb_Scale";
|
||||
this.rb_Scale.Size = new System.Drawing.Size(52, 17);
|
||||
this.rb_Scale.TabIndex = 7;
|
||||
this.rb_Scale.TabStop = true;
|
||||
this.rb_Scale.Text = "Scale";
|
||||
this.rb_Scale.UseVisualStyleBackColor = true;
|
||||
this.rb_Scale.CheckedChanged += new System.EventHandler(this.rb_Scale_CheckedChanged);
|
||||
//
|
||||
// cb_PrintBackground
|
||||
//
|
||||
this.cb_PrintBackground.AutoSize = true;
|
||||
this.cb_PrintBackground.Location = new System.Drawing.Point(22, 321);
|
||||
this.cb_PrintBackground.Name = "cb_PrintBackground";
|
||||
this.cb_PrintBackground.Size = new System.Drawing.Size(108, 17);
|
||||
this.cb_PrintBackground.TabIndex = 11;
|
||||
this.cb_PrintBackground.Text = "Print Background";
|
||||
this.cb_PrintBackground.UseVisualStyleBackColor = true;
|
||||
this.cb_PrintBackground.Visible = false;
|
||||
this.cb_PrintBackground.CheckedChanged += new System.EventHandler(this.cb_PrintBackground_CheckedChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(19, 29);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(37, 13);
|
||||
this.label3.TabIndex = 10;
|
||||
this.label3.Text = "Printer";
|
||||
//
|
||||
// cb_Printer
|
||||
//
|
||||
this.cb_Printer.FormattingEnabled = true;
|
||||
this.cb_Printer.Location = new System.Drawing.Point(18, 45);
|
||||
this.cb_Printer.Name = "cb_Printer";
|
||||
this.cb_Printer.Size = new System.Drawing.Size(195, 21);
|
||||
this.cb_Printer.TabIndex = 9;
|
||||
this.cb_Printer.SelectedIndexChanged += new System.EventHandler(this.cb_Printer_SelectedIndexChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(19, 134);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(58, 13);
|
||||
this.label2.TabIndex = 5;
|
||||
this.label2.Text = "Orientation";
|
||||
//
|
||||
// cb_Orientation
|
||||
//
|
||||
this.cb_Orientation.FormattingEnabled = true;
|
||||
this.cb_Orientation.Items.AddRange(new object[] {
|
||||
"Portrait",
|
||||
"Landscape"});
|
||||
this.cb_Orientation.Location = new System.Drawing.Point(18, 150);
|
||||
this.cb_Orientation.Name = "cb_Orientation";
|
||||
this.cb_Orientation.Size = new System.Drawing.Size(93, 21);
|
||||
this.cb_Orientation.TabIndex = 4;
|
||||
this.cb_Orientation.SelectedIndexChanged += new System.EventHandler(this.cb_Orientation_SelectedIndexChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(19, 81);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(58, 13);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Paper Size";
|
||||
//
|
||||
// cb_PaperSize
|
||||
//
|
||||
this.cb_PaperSize.FormattingEnabled = true;
|
||||
this.cb_PaperSize.Location = new System.Drawing.Point(18, 97);
|
||||
this.cb_PaperSize.Name = "cb_PaperSize";
|
||||
this.cb_PaperSize.Size = new System.Drawing.Size(93, 21);
|
||||
this.cb_PaperSize.TabIndex = 2;
|
||||
this.cb_PaperSize.SelectedIndexChanged += new System.EventHandler(this.cb_PaperSize_SelectedIndexChanged);
|
||||
//
|
||||
// bt_Cancel
|
||||
//
|
||||
this.bt_Cancel.Location = new System.Drawing.Point(118, 450);
|
||||
this.bt_Cancel.Name = "bt_Cancel";
|
||||
this.bt_Cancel.Size = new System.Drawing.Size(69, 26);
|
||||
this.bt_Cancel.TabIndex = 1;
|
||||
this.bt_Cancel.Text = "Cancel";
|
||||
this.bt_Cancel.UseVisualStyleBackColor = true;
|
||||
this.bt_Cancel.Click += new System.EventHandler(this.bt_Cancel_Click);
|
||||
//
|
||||
// bt_print
|
||||
//
|
||||
this.bt_print.Location = new System.Drawing.Point(22, 450);
|
||||
this.bt_print.Name = "bt_print";
|
||||
this.bt_print.Size = new System.Drawing.Size(69, 26);
|
||||
this.bt_print.TabIndex = 0;
|
||||
this.bt_print.Text = "Print";
|
||||
this.bt_print.UseVisualStyleBackColor = true;
|
||||
this.bt_print.Click += new System.EventHandler(this.bt_print_Click);
|
||||
//
|
||||
// PrintPreviewForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(681, 501);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.MaximumSize = new System.Drawing.Size(697, 537);
|
||||
this.MinimumSize = new System.Drawing.Size(697, 537);
|
||||
this.Name = "PrintPreviewForm";
|
||||
this.Text = "PrintPreviewForm";
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.PerformLayout();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PrintPreviewControl printPreviewCtrl;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.Button bt_Cancel;
|
||||
private System.Windows.Forms.Button bt_print;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox cb_PaperSize;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ComboBox cb_Orientation;
|
||||
private System.Windows.Forms.RadioButton rb_Scale;
|
||||
private System.Windows.Forms.RadioButton rb_BestFit;
|
||||
private System.Windows.Forms.RadioButton rb_Unscaled;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox cb_Printer;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.CheckBox cb_PrintBackground;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,336 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing.Printing;
|
||||
|
||||
namespace GraphLib
|
||||
{
|
||||
public partial class PrintPreviewForm : Form
|
||||
{
|
||||
private PrintDocument printDoc = new PrintDocument();
|
||||
private PlotterGraphPaneEx gpane = null;
|
||||
private String strDefaultPrinter = String.Empty;
|
||||
|
||||
private bool bBestScale = false;
|
||||
private bool bPageScale = false;
|
||||
private bool bUnscaled = false;
|
||||
private bool bLandscape = false;
|
||||
private int selPrinterIndex = -1;
|
||||
|
||||
public PrintPreviewForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
printPreviewCtrl.Zoom = 1;
|
||||
rb_BestFit.Checked = true;
|
||||
rb_Scale.Checked = false;
|
||||
rb_Unscaled.Checked = false;
|
||||
cb_Orientation.SelectedIndex = 0;
|
||||
printDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage);
|
||||
this.VisibleChanged += new EventHandler(OnVisibleChanged);
|
||||
FormClosing += new FormClosingEventHandler(OnFormClosing);
|
||||
}
|
||||
|
||||
void FillInInstalledPrinters()
|
||||
{
|
||||
strDefaultPrinter = printDoc.PrinterSettings.PrinterName;
|
||||
cb_Printer.Items.Clear();
|
||||
foreach (String strPrinter in PrinterSettings.InstalledPrinters)
|
||||
{
|
||||
cb_Printer.Items.Add(strPrinter);
|
||||
|
||||
if (strPrinter == strDefaultPrinter)
|
||||
{
|
||||
cb_Printer.SelectedIndex = cb_Printer.Items.IndexOf(strPrinter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnVisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Visible)
|
||||
{
|
||||
bLandscape = cb_Orientation.SelectedIndex == 1;
|
||||
|
||||
FillInInstalledPrinters();
|
||||
|
||||
FillInPaperSizes();
|
||||
|
||||
UpdateScaleRadioButtons();
|
||||
|
||||
InvalidatePrintPreview();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void OnFormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
void UpdateScaleRadioButtons()
|
||||
{
|
||||
bBestScale = rb_BestFit.Checked;
|
||||
bPageScale = rb_Scale.Checked;
|
||||
bUnscaled = rb_Unscaled.Checked;
|
||||
}
|
||||
|
||||
double AutoZoomPreview()
|
||||
{
|
||||
float zoom = 1.0f;
|
||||
float step = 0.05f;
|
||||
|
||||
float PaperWidth = printDoc.DefaultPageSettings.PaperSize.Width;
|
||||
float PaperHeight = printDoc.DefaultPageSettings.PaperSize.Height;
|
||||
|
||||
if (bLandscape)
|
||||
{
|
||||
PaperHeight = printDoc.DefaultPageSettings.PaperSize.Width * zoom;
|
||||
PaperWidth = printDoc.DefaultPageSettings.PaperSize.Height * zoom;
|
||||
}
|
||||
|
||||
while (zoom > 0.1f)
|
||||
{
|
||||
double CurW = PaperWidth * zoom;
|
||||
double CurH = PaperHeight * zoom;
|
||||
|
||||
if (splitContainer1.Panel1.Width < (CurW+10) || splitContainer1.Panel1.Height < (CurH+10))
|
||||
{
|
||||
zoom -= step;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return zoom;
|
||||
}
|
||||
|
||||
void FillInPaperSizes()
|
||||
{
|
||||
cb_PaperSize.Items.Clear();
|
||||
|
||||
foreach (PaperSize s in printDoc.PrinterSettings.PaperSizes)
|
||||
{
|
||||
cb_PaperSize.Items.Add(s.PaperName.ToString());
|
||||
}
|
||||
|
||||
if (cb_PaperSize.SelectedIndex == -1 || cb_PaperSize.SelectedIndex >= cb_PaperSize.Items.Count)
|
||||
{
|
||||
int idx = cb_PaperSize.Items.IndexOf(printDoc.DefaultPageSettings.PaperSize.PaperName);
|
||||
|
||||
if (idx >= 0 && idx < cb_PaperSize.Items.Count)
|
||||
{
|
||||
cb_PaperSize.SelectedIndex = idx;
|
||||
}
|
||||
else
|
||||
{
|
||||
cb_PaperSize.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void InvalidatePrintPreview()
|
||||
{
|
||||
printDoc.DefaultPageSettings.Landscape = bLandscape;
|
||||
printPreviewCtrl.Document = printDoc;
|
||||
printPreviewCtrl.Document.DocumentName = "Preview";
|
||||
printPreviewCtrl.Zoom = AutoZoomPreview();
|
||||
printPreviewCtrl.InvalidatePreview();
|
||||
}
|
||||
|
||||
|
||||
public PlotterGraphPaneEx GraphPanel
|
||||
{
|
||||
set
|
||||
{
|
||||
gpane = value;
|
||||
}
|
||||
}
|
||||
|
||||
private void AutoScaleDocument(ref float w, ref float h, ref float x, ref float y)
|
||||
{
|
||||
float CurGraphWidth = gpane.Width;
|
||||
float CurGraphHeight = gpane.Height;
|
||||
float CurPaperWidth = printDoc.DefaultPageSettings.PaperSize.Width;
|
||||
float CurPaperHeight = printDoc.DefaultPageSettings.PaperSize.Height;
|
||||
|
||||
if (bLandscape)
|
||||
{
|
||||
CurPaperWidth = printDoc.DefaultPageSettings.PaperSize.Height;
|
||||
CurPaperHeight = printDoc.DefaultPageSettings.PaperSize.Width;
|
||||
}
|
||||
|
||||
if (bUnscaled)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
if (bPageScale) // scale to page
|
||||
{
|
||||
CurGraphWidth = CurPaperWidth;
|
||||
CurGraphHeight = CurPaperHeight;
|
||||
}
|
||||
|
||||
if (bBestScale) // scale to best fit
|
||||
{
|
||||
float zoom = 1.0f;
|
||||
float step = 0.05f;
|
||||
|
||||
if (CurGraphWidth > (CurPaperWidth ) || CurGraphHeight > (CurPaperHeight ))
|
||||
{
|
||||
// scale down
|
||||
while ((zoom * gpane.Width > CurPaperWidth || zoom * gpane.Height > CurPaperHeight) && zoom > step)
|
||||
{
|
||||
zoom -= step;
|
||||
}
|
||||
zoom -= step;
|
||||
|
||||
}
|
||||
else if (CurGraphWidth < CurPaperWidth && CurGraphHeight < CurPaperHeight)
|
||||
{
|
||||
// scale up
|
||||
while (((zoom+step) * gpane.Width < CurPaperWidth && (zoom+step) * gpane.Height < CurPaperHeight) && zoom > step)
|
||||
{
|
||||
zoom += step;
|
||||
}
|
||||
|
||||
}
|
||||
CurGraphWidth = zoom * gpane.Width;
|
||||
CurGraphHeight = zoom * gpane.Height;
|
||||
}
|
||||
|
||||
w = CurGraphWidth;
|
||||
h = CurGraphHeight;
|
||||
|
||||
// center print
|
||||
x = (CurPaperWidth - w) / 2.0f;
|
||||
y = (CurPaperHeight - h) / 2.0f;
|
||||
}
|
||||
|
||||
private void printDoc_PrintPage(object sender, PrintPageEventArgs e)
|
||||
{
|
||||
if (gpane != null)
|
||||
{
|
||||
float x=0, y=0, w=gpane.Width, h=gpane.Height;
|
||||
|
||||
AutoScaleDocument(ref w, ref h, ref x, ref y);
|
||||
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||
//gpane.PaintControl(e.Graphics, w, h,x,y,cb_PrintBackground.Checked);
|
||||
gpane.PaintControl(e.Graphics, w, h, x, y, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void bt_print_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (printDoc != null)
|
||||
{
|
||||
printDoc.Print();
|
||||
this.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
private void bt_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
}
|
||||
|
||||
private void cb_PaperSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cb_PaperSize.SelectedIndex >= 0 && cb_PaperSize.SelectedIndex < cb_PaperSize.Items.Count)
|
||||
{
|
||||
|
||||
foreach (PaperSize s in printDoc.PrinterSettings.PaperSizes)
|
||||
{
|
||||
if (s.PaperName == (string)cb_PaperSize.Items[cb_PaperSize.SelectedIndex])
|
||||
{
|
||||
printDoc.DefaultPageSettings.PaperSize = s;
|
||||
InvalidatePrintPreview();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void rb_BestFit_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rb_BestFit.Checked)
|
||||
{
|
||||
rb_Scale.Checked = !rb_BestFit.Checked;
|
||||
rb_Unscaled.Checked = !rb_BestFit.Checked;
|
||||
}
|
||||
|
||||
UpdateScaleRadioButtons();
|
||||
InvalidatePrintPreview();
|
||||
}
|
||||
|
||||
private void rb_Scale_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rb_Scale.Checked)
|
||||
{
|
||||
rb_BestFit.Checked = !rb_Scale.Checked;
|
||||
rb_Unscaled.Checked = !rb_Scale.Checked;
|
||||
}
|
||||
|
||||
UpdateScaleRadioButtons();
|
||||
InvalidatePrintPreview();
|
||||
}
|
||||
|
||||
private void rb_Unscaled_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rb_Unscaled.Checked)
|
||||
{
|
||||
rb_Scale.Checked = !rb_Unscaled.Checked;
|
||||
rb_BestFit.Checked = !rb_Unscaled.Checked;
|
||||
}
|
||||
|
||||
UpdateScaleRadioButtons();
|
||||
InvalidatePrintPreview();
|
||||
}
|
||||
|
||||
private void cb_Printer_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
selPrinterIndex = cb_Printer.SelectedIndex;
|
||||
|
||||
if (selPrinterIndex >= 0 && selPrinterIndex < cb_Printer.Items.Count)
|
||||
{
|
||||
printDoc.PrinterSettings.PrinterName = (string)cb_Printer.Items[selPrinterIndex];
|
||||
this.Text = "Print Preview - " + printDoc.PrinterSettings.PrinterName;
|
||||
}
|
||||
|
||||
FillInPaperSizes();
|
||||
|
||||
InvalidatePrintPreview();
|
||||
}
|
||||
|
||||
private void cb_Orientation_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cb_Orientation.SelectedIndex == 0)
|
||||
{
|
||||
bLandscape = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
bLandscape = true;
|
||||
}
|
||||
|
||||
InvalidatePrintPreview();
|
||||
}
|
||||
|
||||
private void cb_PrintBackground_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
InvalidatePrintPreview();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("GraphLibrary")]
|
||||
[assembly: AssemblyDescription("Library for easy and simple graph drawing")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GraphLibrary")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2008-2014 ZIMMERMANN STEPHAN")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b23e30ac-c4b8-4863-90d0-cf0ad837c050")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.1")]
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.18408
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ClassLibrary1.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ClassLibrary1.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
|
||||
namespace GraphLib
|
||||
{
|
||||
public class Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// returns the most significant decimal digit
|
||||
/// 250 -> 100
|
||||
/// 350 -> 100
|
||||
/// 12 -> 10
|
||||
/// 5 -> 1
|
||||
/// 0.5 .> 0.1
|
||||
/// .....
|
||||
/// </summary>
|
||||
/// <param name="Value"></param>
|
||||
/// <returns></returns>
|
||||
static public float MostSignificantDigit(float Value)
|
||||
{
|
||||
float n = 1;
|
||||
|
||||
float val_abs = Math.Abs(Value);
|
||||
float sig = 1.0f * Math.Sign(Value);
|
||||
|
||||
if (val_abs > 1)
|
||||
{
|
||||
while (n < val_abs)
|
||||
{
|
||||
n *= 10.0f;
|
||||
}
|
||||
|
||||
return (float)((int)(sig * n / 10));
|
||||
}
|
||||
else // n <= 1
|
||||
{
|
||||
while (n > val_abs)
|
||||
{
|
||||
n /= 10.0f;
|
||||
}
|
||||
|
||||
return sig * n;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
-1
@@ -46,7 +46,7 @@ namespace Results
|
||||
ProcedureDescription = procedure.Description,
|
||||
WatermetersStr = procedure.Watermeters,
|
||||
ProcedureRevision = procedure.Revision,
|
||||
ProtocolTitle = procedure.ProtocolTitle,
|
||||
ProtocolTitle = string.Empty,
|
||||
StartTime = DateTime.Now,
|
||||
DensityCorr = (float)densityCorr,
|
||||
Compound = (procedure.MetersKind == Config.Entities.MetersKind.Combined),
|
||||
@@ -189,5 +189,22 @@ namespace Results
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsProduction()
|
||||
{
|
||||
for (int i = 0; i < WMPositionsCount; i++)
|
||||
{
|
||||
if (WaterMeters[i] != null)
|
||||
{
|
||||
foreach (var mtr in WaterMeters[i].MeterTestRslts)
|
||||
{
|
||||
if (mtr.TestData().Name.ToLower().Contains("adj"))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,6 +254,12 @@ namespace Results
|
||||
foreach (var cd in ComponentsList) if (cd.Id == 0) session.SaveOrUpdate(cd);
|
||||
foreach (var wd in WaterMeterDataList) if (wd.Id == 0) session.SaveOrUpdate(wd);
|
||||
|
||||
log.Debug(batch.ToString(1));
|
||||
foreach (var tstRslt in batch.TestRslts)
|
||||
{
|
||||
log.Debug(tstRslt.ToString(1));
|
||||
}
|
||||
|
||||
session.SaveOrUpdate(batch);
|
||||
|
||||
transaction.Commit();
|
||||
@@ -261,7 +267,13 @@ namespace Results
|
||||
catch (Exception exc)
|
||||
{
|
||||
transaction.Rollback();
|
||||
|
||||
log.FatalFormat("Saving results of batch #{0} into the results DB failed: {1}", batch.BatchNr, exc.Message);
|
||||
if (exc.InnerException != null && !string.IsNullOrEmpty(exc.InnerException.Message))
|
||||
{
|
||||
log.FatalFormat("Inner exception message: {0}", exc.InnerException.Message);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,18 @@ namespace Results.Entities
|
||||
TestRslts = new List<TestRslt>();
|
||||
}
|
||||
|
||||
public virtual int PassedMetersCount()
|
||||
{
|
||||
int count = 0;
|
||||
foreach (var mtr in WaterMeters) if (mtr.PassedFromTests()) count++;
|
||||
return count;
|
||||
}
|
||||
|
||||
public virtual int FailedMetersCount()
|
||||
{
|
||||
return WaterMeters.Count - PassedMetersCount();
|
||||
}
|
||||
|
||||
public virtual double AmbTempMean()
|
||||
{
|
||||
double timeSum = 0;
|
||||
@@ -95,6 +107,14 @@ namespace Results.Entities
|
||||
return (timeSum == 0) ? 0 : (sum / timeSum);
|
||||
}
|
||||
|
||||
public virtual double AmbTempStart() { return (TestRslts.Count > 0) ? TestRslts[0].AmbTempStart : 0; }
|
||||
public virtual double AmbPressStart() { return (TestRslts.Count > 0) ? TestRslts[0].AmbPressStart : 0; }
|
||||
public virtual double AmbHumiStart() { return (TestRslts.Count > 0) ? TestRslts[0].AmbHumiStart : 0; }
|
||||
|
||||
public virtual double AmbTempEnd() { return (TestRslts.Count > 0) ? TestRslts[TestRslts.Count - 1].AmbTempEnd : 0; }
|
||||
public virtual double AmbPressEnd() { return (TestRslts.Count > 0) ? TestRslts[TestRslts.Count - 1].AmbPressEnd : 0; }
|
||||
public virtual double AmbHumiEnd() { return (TestRslts.Count > 0) ? TestRslts[TestRslts.Count - 1].AmbHumiEnd : 0; }
|
||||
|
||||
public virtual double Buoyancy()
|
||||
{
|
||||
double timeSum = 0;
|
||||
@@ -126,5 +146,14 @@ namespace Results.Entities
|
||||
{
|
||||
return string.Format("Batch #{0}, Start:{1}, End:{2}, Procedure:{3}", BatchNr, StartTime, EndTime, ProcedureName);
|
||||
}
|
||||
|
||||
public virtual string ToString(int i)
|
||||
{
|
||||
return string.Format("Batch: BatchNr={0} TestBenchId={1} ProgramVersion={2} UserName={3} UserNumber={4} ProcedureName={5} ProcedureRevision={6} ProtocolTitle={7} Remark={8} DensityCorr={9} Custom2={10} Custom3={11} StartTime={12} EndTime={13} Dirty={14} RsltsSent={15} RsltsPrinted={16}",
|
||||
BatchNr, TestBenchId, ProgramVersion, UserName, UserNumber,
|
||||
ProcedureName, ProcedureRevision, ProtocolTitle, Remark, DensityCorr,
|
||||
Custom2, Custom3, StartTime, EndTime, Dirty,
|
||||
RsltsSent, RsltsPrinted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Results.Entities
|
||||
|
||||
/// Main result
|
||||
public virtual double Error { get; set; } /// [%]
|
||||
public virtual double KorrErrQ { get; set; } /// [%] not mapped to results DB, saved to Oracle DB
|
||||
public virtual bool TestDone { get; set; } /// true = test was completed
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
|
||||
@@ -40,7 +41,7 @@ namespace Results.Entities
|
||||
public virtual double DensityOut() { return TestRslt.DensityOut; }
|
||||
public virtual Components Components(){ return TestRslt.Components; }
|
||||
///
|
||||
protected virtual TestData TestData() { return TestRslt.TestData; }
|
||||
public virtual TestData TestData() { return TestRslt.TestData; }
|
||||
///
|
||||
public virtual int Repeats() { return TestData().Repeats; }
|
||||
public virtual double Qfrom() { return TestData().Qfrom; } /// [m3/h]
|
||||
@@ -77,6 +78,12 @@ namespace Results.Entities
|
||||
#if PUCHONG_PT200
|
||||
if (!Evaluate()) return Passed ? "OK|White" : "NG|White";
|
||||
else return Passed ? "OK|Green" : "NG|Red";
|
||||
#elif LANG_PL
|
||||
if (!Evaluate()) return Passed ? "+|White" : "-|White";
|
||||
else return Passed ? "+|Green" : "-|Red";
|
||||
#elif LANG_RU
|
||||
if (!Evaluate()) return Passed ? "годен|White" : "негоден|White";
|
||||
else return Passed ? "годен|Green" : "негоден|Red";
|
||||
#else
|
||||
if (!Evaluate()) return Passed ? "OK|White" : "NOK|White";
|
||||
else return Passed ? "OK|Green" : "NOK|Red";
|
||||
@@ -112,6 +119,7 @@ namespace Results.Entities
|
||||
TimestampEnd = src.TimestampEnd;
|
||||
TestTime = src.TestTime;
|
||||
Error = src.Error;
|
||||
KorrErrQ = src.KorrErrQ;
|
||||
TestDone = src.TestDone;
|
||||
Passed = src.Passed;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
@@ -39,6 +40,19 @@ namespace Results.Entities
|
||||
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
|
||||
public virtual double ErrorMaster { get; set; } /// [%]
|
||||
|
||||
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time when test starts
|
||||
public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
|
||||
public virtual float DivStart50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
|
||||
public virtual float DivStart90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
|
||||
|
||||
public virtual float DiverterEnd { get; set; } /// [s] Diverter switch time when test ends
|
||||
public virtual float DivEnd90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
|
||||
public virtual float DivEnd50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
|
||||
public virtual float DivEnd10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
|
||||
|
||||
public virtual int ErrorFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
|
||||
public virtual sbyte ErrorFlagsMd { get; set; } /// 0=off, 1=info, 2=on (evaluated in MeterTestRslt.Passed)
|
||||
|
||||
/// Main results of heat meters
|
||||
public virtual double RefEnergy { get; set; } /// [J] Joul
|
||||
|
||||
@@ -113,10 +127,59 @@ namespace Results.Entities
|
||||
public virtual double TargetVolume() { return TestData.TargetVolume; }
|
||||
public virtual double TargetTime() { return TestData.TargetTime; }
|
||||
public virtual string Method() { return TestData.Method; }
|
||||
public virtual double ErrLimLo() { return TestData.ErrLimLo; }
|
||||
public virtual double ErrLimHi() { return TestData.ErrLimHi; }
|
||||
|
||||
public virtual double ErrLimLo()
|
||||
{
|
||||
if (TestData.ErrLimLo <= TestData.ErrLimHi)
|
||||
{
|
||||
return TestData.ErrLimLo; /// Error limit of a water meter
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Metrological class and nominal flow of a heat meter
|
||||
int metrClass = (int)Math.Round(TestData.ErrLimLo);
|
||||
double Qp = Math.Abs(TestData.ErrLimHi);
|
||||
double Q = Math.Max(FlowMean, 0.00001); /// to avoid division by zero
|
||||
|
||||
/// Calculate the error limit of a heat meter
|
||||
switch (metrClass)
|
||||
{
|
||||
default:
|
||||
case 1: return -Math.Min(3.5, 1.0 + 0.01 * Qp / Q);
|
||||
case 2: return -Math.Min(5.0, 2.0 + 0.02 * Qp / Q);
|
||||
case 3: return -Math.Min(5.0, 3.0 + 0.05 * Qp / Q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual double ErrLimHi()
|
||||
{
|
||||
if (TestData.ErrLimLo <= TestData.ErrLimHi)
|
||||
{
|
||||
return TestData.ErrLimHi; /// Error limit of a water meter
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Metrological class and nominal flow of a heat meter
|
||||
int metrClass = (int)Math.Round(TestData.ErrLimLo);
|
||||
double Qp = Math.Abs(TestData.ErrLimHi);
|
||||
double Q = Math.Max(FlowMean, 0.00001); /// to avoid division by zero
|
||||
|
||||
/// Calculate the error limit of a heat meter
|
||||
switch (metrClass)
|
||||
{
|
||||
default:
|
||||
case 1: return +Math.Min(3.5, 1.0 + 0.01 * Qp / Q);
|
||||
case 2: return +Math.Min(5.0, 2.0 + 0.02 * Qp / Q);
|
||||
case 3: return +Math.Min(5.0, 3.0 + 0.05 * Qp / Q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual double Uncertainty() { return TestData.Uncertainty; }
|
||||
public virtual bool Evaluate() { return TestData.Evaluate; }
|
||||
public virtual float TempLimLo() { return TestData.TempLimLo; }
|
||||
public virtual float TempLimHi() { return TestData.TempLimHi; }
|
||||
public virtual bool Evaluate() { return TestData.Evaluate; }
|
||||
public virtual Config.Entities.Publish Publish() { return (Config.Entities.Publish)TestData.Publish; }
|
||||
|
||||
|
||||
@@ -161,6 +224,10 @@ namespace Results.Entities
|
||||
VolumeCTV = src.VolumeCTV;
|
||||
VolumeMaster = src.VolumeMaster;
|
||||
ErrorMaster = src.ErrorMaster;
|
||||
DiverterStart = src.DiverterStart;
|
||||
DiverterEnd = src.DiverterEnd;
|
||||
ErrorFlags = src.ErrorFlags;
|
||||
ErrorFlagsMd = src.ErrorFlagsMd;
|
||||
RefEnergy = src.RefEnergy;
|
||||
AmbTempMean = src.AmbTempMean;
|
||||
AmbTempStart = src.AmbTempStart;
|
||||
@@ -224,9 +291,42 @@ namespace Results.Entities
|
||||
Custom10 = src.Custom10;
|
||||
}
|
||||
|
||||
/// <summary> Wrapper </summary>
|
||||
public virtual Config.Entities.ErrorFlagsMode ErrorFlagsMode()
|
||||
{
|
||||
return (Config.Entities.ErrorFlagsMode)ErrorFlagsMd;
|
||||
}
|
||||
|
||||
/// <summary> Wrapper </summary>
|
||||
public virtual string ErrorFlagsStr()
|
||||
{
|
||||
return Utils.ErrorFlagsStr(ErrorFlags);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("batch={0}, procedure={1}, test={2}, {3} {4}", Batch.BatchNr, Batch.ProcedureName, Name(), StartTime.ToShortDateString(), StartTime.ToShortTimeString());
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string ToString(int i)
|
||||
{
|
||||
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} Buoyancy={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} ErrorFlagsMd={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
|
||||
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime,
|
||||
PulsesMaster, ConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd,
|
||||
DensityIn, DensityOut, DensityDiv, Buoyancy, FlowMass, FlowVolume,
|
||||
VolumeCTV, VolumeMaster, ErrorMaster, ErrorFlags, ErrorFlagsMd,
|
||||
AmbTempMean, AmbTempStart, AmbTempEnd, AmbTempMin, AmbTempMax,
|
||||
AmbPressMean, AmbPressStart, AmbPressEnd, AmbPressMin, AmbPressMax,
|
||||
AmbHumiMean, AmbHumiStart, AmbHumiEnd, AmbHumiMin, AmbHumiMax,
|
||||
PressUpMean, PressUpStart, PressUpEnd, PressUpMin, PressUpMax,
|
||||
PressDownMean, PressDownStart, PressDownEnd, PressDownMin, PressDownMax,
|
||||
PressDeltaMean, PressDeltaStart, PressDeltaEnd, PressDeltaMin, PressDeltaMax,
|
||||
TempUpMean, TempUpStart, TempUpEnd, TempUpMin, TempUpMax,
|
||||
TempDownMean, TempDownStart, TempDownEnd, TempDownMin, TempDownMax,
|
||||
TempDivMean, TempDivStart, TempDivEnd, TempDivMin, TempDivMax,
|
||||
FlowMean, FlowStart, FlowEnd, FlowMin, FlowMax,
|
||||
Custom1, Custom2, Custom3, Custom4, Custom5, Custom6, Custom7, Custom8, Custom9, Custom10,
|
||||
DiverterStart, DiverterEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,37 @@ using Config.Entities;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class WaterMeter
|
||||
|
||||
public enum ResultCode
|
||||
{
|
||||
None = 0,
|
||||
|
||||
Bit16 = (1 << 16),
|
||||
Bit17 = (1 << 17),
|
||||
Bit18 = (1 << 18),
|
||||
Bit19 = (1 << 19),
|
||||
RfidErrorCodeMask = (Bit16 | Bit17 | Bit18 | Bit19), /// RFID comm. err. (the first encounetered error is stored)
|
||||
|
||||
Bit20 = (1 << 20),
|
||||
Bit21 = (1 << 21),
|
||||
Bit22 = (1 << 22),
|
||||
Bit23 = (1 << 23),
|
||||
RfidErrorTestIdMask = (Bit20 | Bit21 | Bit22 | Bit23), /// RFID comm. err. (the first encounetered error is stored)
|
||||
|
||||
MissingOptoData = (1 << 24),
|
||||
OptoDataWithZeroFlow = (1 << 25),
|
||||
OptoErrorCodeMask = (MissingOptoData | OptoDataWithZeroFlow), /// Opto comm. err. (the first encounetered error is stored)
|
||||
|
||||
Bit26 = (1 << 26),
|
||||
Bit27 = (1 << 27),
|
||||
Bit28 = (1 << 28),
|
||||
Bit29 = (1 << 29),
|
||||
Bit30 = (1 << 30),
|
||||
Bit31 = (1 << 31),
|
||||
}
|
||||
|
||||
|
||||
public class WaterMeter
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string SerialNr { get; set; } /// Main s/n for compound meters, PCB Number for iPerl water meter
|
||||
@@ -18,11 +48,13 @@ namespace Results.Entities
|
||||
public virtual int WMPosition { get; set; }
|
||||
public virtual string EndState { get; set; } /// End state (of the main water meter)
|
||||
public virtual string EndStateAux { get; set; } /// End state of the auxiliary water meter
|
||||
public virtual double QRise { get; set; } /// [m3/h] detected Q_rise of a composed meter
|
||||
public virtual double QRise { get; set; } /// [m3/h] detected Q_rise of a composed meter or 'sensitivity' of a single meter
|
||||
public virtual double QFall { get; set; } /// [m3/h] detected Q_fall of a composed meter
|
||||
public virtual bool Passed { get; set; }
|
||||
public virtual int ErrorFlags { get; set; } /// bitfield : bit14=E15, bit15=E16
|
||||
public virtual bool Passed { get; set; }
|
||||
public virtual int ResultCode { get; set; }
|
||||
public virtual string Remark { get; set; }
|
||||
public virtual string ArchivePath { get; set; }
|
||||
public virtual string Remark { get; set; }
|
||||
|
||||
#if IPERL
|
||||
public virtual int SerialNrEx { get; set; } /// Aux s/n for compound meters, Serial number for iPerl water meter
|
||||
@@ -54,6 +86,7 @@ namespace Results.Entities
|
||||
public virtual string Producer() { return WaterMeterData.Producer; }
|
||||
public virtual string MetrologicalClass() { return WaterMeterData.MetrologicalClass; }
|
||||
public virtual string ApprovalInfo() { return WaterMeterData.ApprovalInfo; }
|
||||
public virtual bool NewQnames() { return WaterMeterData.NewQnames; }
|
||||
public virtual double Q4_Qmax() { return WaterMeterData.Q4_Qmax; }
|
||||
public virtual double Q3_Qn() { return WaterMeterData.Q3_Qn; }
|
||||
public virtual double Q2_Qt() { return WaterMeterData.Q2_Qt; }
|
||||
@@ -78,9 +111,39 @@ namespace Results.Entities
|
||||
public virtual MeterTestRslt LastMeterTestRslts() { return lastMeterTestRslts; }
|
||||
|
||||
|
||||
public virtual int ErrorFlagsFromTests(out ErrorFlagsMode errorFlagsMode)
|
||||
{
|
||||
int errorFlags = 0;
|
||||
ErrorFlagsMode eFlagsMode = 0; /// = ErrorFlagsMode.Off;
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if (mtr.TestDone) errorFlags |= mtr.TestRslt.ErrorFlags;
|
||||
if ((int)mtr.TestRslt.ErrorFlagsMode() > (int)eFlagsMode) eFlagsMode = mtr.TestRslt.ErrorFlagsMode();
|
||||
}
|
||||
errorFlagsMode = eFlagsMode; /// Maximum from all tests (=ErrorFlagsMode.On if at least one test is ErrorFlagsMode.On)
|
||||
return errorFlags;
|
||||
}
|
||||
|
||||
public virtual int ErrorFlagsFromTestsAndWM(out ErrorFlagsMode errorFlagsMode)
|
||||
{
|
||||
int eFlagsFromTests = ErrorFlagsFromTests(out errorFlagsMode) | ErrorFlags;
|
||||
return (errorFlagsMode != ErrorFlagsMode.Off) ? (eFlagsFromTests | ErrorFlags) : 0;
|
||||
}
|
||||
|
||||
public virtual string ErrorFlagstStr()
|
||||
{
|
||||
ErrorFlagsMode errorFlagsMode;
|
||||
return Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM(out errorFlagsMode));
|
||||
}
|
||||
|
||||
public virtual bool PassedFromTests()
|
||||
{
|
||||
ErrorFlagsMode eFlagsMode;
|
||||
int eFlags = ErrorFlagsFromTestsAndWM(out eFlagsMode);
|
||||
|
||||
bool passed = true;
|
||||
if (eFlagsMode == ErrorFlagsMode.On && eFlags != 0) passed = false;
|
||||
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if (mtr.Evaluate() && (!mtr.Passed || !mtr.TestDone))
|
||||
@@ -89,6 +152,7 @@ namespace Results.Entities
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
||||
@@ -111,6 +175,10 @@ namespace Results.Entities
|
||||
{
|
||||
#if PUCHONG_PT200
|
||||
return Passed ? "OK|Green" : "NG|Red";
|
||||
#elif LANG_PL
|
||||
return Passed ? "+|Green" : "-|Red";
|
||||
#elif LANG_RU
|
||||
return Passed ? "годен|Green" : "негоден|Red";
|
||||
#else
|
||||
return Passed ? "OK|Green" : "NOK|Red";
|
||||
#endif
|
||||
@@ -200,8 +268,10 @@ namespace Results.Entities
|
||||
EndStateAux = src.EndStateAux;
|
||||
QRise = src.QRise;
|
||||
QFall = src.QFall;
|
||||
ErrorFlags = src.ErrorFlags;
|
||||
Passed = src.Passed;
|
||||
ResultCode = src.ResultCode;
|
||||
ArchivePath = src.ArchivePath;
|
||||
Remark = src.Remark;
|
||||
#if IPERL
|
||||
SerialNrEx = src.SerialNrEx;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2017 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -17,7 +17,8 @@ namespace Results.Entities
|
||||
public virtual double DN { get; set; } /// [mm]
|
||||
public virtual double L { get; set; } /// [mm]
|
||||
public virtual Config.Entities.Mounting Mounting { get; set; } /// H / V / S / F
|
||||
|
||||
|
||||
public virtual bool NewQnames { get; set; } /// Yes = Q3... No = Qn...
|
||||
public virtual double Q4_Qmax { get; set; } /// [m3/h]
|
||||
public virtual double Q3_Qn { get; set; } /// [m3/h]
|
||||
public virtual double Q2_Qt { get; set; } /// [m3/h]
|
||||
@@ -73,6 +74,7 @@ namespace Results.Entities
|
||||
if (L != wmd.L) return false;
|
||||
if (Mounting != wmd.Mounting) return false;
|
||||
|
||||
if (NewQnames != wmd.NewQnames) return false;
|
||||
if (Q4_Qmax != wmd.Q4_Qmax) return false;
|
||||
if (Q3_Qn != wmd.Q3_Qn) return false;
|
||||
if (Q2_Qt != wmd.Q2_Qt) return false;
|
||||
|
||||
+68
-8
@@ -83,14 +83,14 @@ namespace Results
|
||||
Lite_per_pulse_Read, /// 73
|
||||
Result_code, /// 74
|
||||
Remark, /// 75
|
||||
T_Hi_mean, /// 76
|
||||
T_Hi_start, /// 77
|
||||
T_Hi_end, /// 78
|
||||
T_Hi_avg, /// 79
|
||||
T_Lo_mean, /// 80
|
||||
T_Lo_start, /// 81
|
||||
T_Lo_end, /// 82
|
||||
T_Lo_avg, /// 83
|
||||
T_Hi_mean, /// 76
|
||||
T_Hi_start, /// 77
|
||||
T_Hi_end, /// 78
|
||||
T_Hi_avg, /// 79
|
||||
T_Lo_mean, /// 80
|
||||
T_Lo_start, /// 81
|
||||
T_Lo_end, /// 82
|
||||
T_Lo_avg, /// 83
|
||||
P_delta_mean, /// 84
|
||||
P_delta_start, /// 85
|
||||
P_delta_end, /// 86
|
||||
@@ -149,6 +149,66 @@ namespace Results
|
||||
Buoyancy, /// 132
|
||||
Density_correction, /// 133
|
||||
|
||||
ErrorFlags, /// 134
|
||||
E1, /// 135
|
||||
E2, /// 136
|
||||
E3, /// 137
|
||||
E4, /// 138
|
||||
E5, /// 139
|
||||
E6, /// 140
|
||||
E7, /// 141
|
||||
E8, /// 142
|
||||
E9, /// 143
|
||||
E10, /// 144
|
||||
E11, /// 145
|
||||
E12, /// 146
|
||||
E13, /// 147
|
||||
E14, /// 148
|
||||
E15, /// 149
|
||||
E16, /// 150
|
||||
|
||||
Table_row_nr, /// 151
|
||||
Table_column_nr, /// 152
|
||||
WMRemark, /// 153
|
||||
|
||||
User_description, /// 154
|
||||
Legalizator, /// 155
|
||||
|
||||
Passed_meters_count, /// 156
|
||||
Failed_meters_count, /// 157
|
||||
Passed_seals_count, /// 158
|
||||
|
||||
Diverter_start_time, /// 159
|
||||
Diverter_end_time, /// 160
|
||||
Q_sensitivity, /// 161
|
||||
|
||||
Q_ref_min, /// 162
|
||||
Q_ref_max, /// 163
|
||||
Q_ref_start, /// 164
|
||||
Q_ref_end, /// 165
|
||||
|
||||
Amb_temp_start_end, /// 166
|
||||
Amb_press_start_end, /// 167
|
||||
Amb_humi_start_end, /// 168
|
||||
|
||||
ResultOrErrorFlags, /// 169, PL specific result
|
||||
|
||||
T_up_min,
|
||||
T_up_max,
|
||||
T_down_min,
|
||||
T_down_max,
|
||||
T_div_min,
|
||||
T_div_max,
|
||||
P_up_min,
|
||||
P_up_max,
|
||||
P_down_min,
|
||||
P_down_max,
|
||||
P_delta_min,
|
||||
P_delta_max,
|
||||
|
||||
T_rho_0,
|
||||
Rho_Wa_calc,
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,10 @@ namespace Results.Mappings
|
||||
Map(x => x.VolumeCTV);
|
||||
Map(x => x.VolumeMaster);
|
||||
Map(x => x.ErrorMaster);
|
||||
Map(x => x.DiverterStart);
|
||||
Map(x => x.DiverterEnd);
|
||||
Map(x => x.ErrorFlags);
|
||||
Map(x => x.ErrorFlagsMd);
|
||||
#if HEAT_METERS
|
||||
Map(x => x.RefEnergy);
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2017 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
@@ -18,6 +18,9 @@ namespace Results.Mappings
|
||||
Map(x => x.L);
|
||||
Map(x => x.Mounting);
|
||||
|
||||
#if MUNICH && LANG_DE
|
||||
Map(x => x.NewQnames);
|
||||
#endif
|
||||
Map(x => x.Q4_Qmax);
|
||||
Map(x => x.Q3_Qn);
|
||||
Map(x => x.Q2_Qt);
|
||||
|
||||
@@ -20,9 +20,11 @@ namespace Results.Mappings
|
||||
Map(x => x.EndStateAux);
|
||||
Map(x => x.QRise);
|
||||
Map(x => x.QFall);
|
||||
Map(x => x.ErrorFlags);
|
||||
Map(x => x.Passed);
|
||||
Map(x => x.ResultCode);
|
||||
Map(x => x.Remark)
|
||||
Map(x => x.ArchivePath);
|
||||
Map(x => x.Remark)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(2000)");
|
||||
#if IPERL
|
||||
|
||||
@@ -85,9 +85,9 @@ namespace Results.Output.Printers.Enhanced
|
||||
footer = string.IsNullOrEmpty(cfg.Footer) ? string.Empty : cfg.Footer.Replace("~", Environment.NewLine);
|
||||
|
||||
/// Initialize fonts
|
||||
titleFont = new Font(cfg.TitFntFml, cfg.TitFntSz, (FontStyle)cfg.TitFntSty);
|
||||
headerFont = new Font(cfg.HdrFntFml, cfg.HdrFntSz, (FontStyle)cfg.HdrFntSty);
|
||||
font = new Font(cfg.BodyFntFml, cfg.BodyFntSz, (FontStyle)cfg.BodyFntSty);
|
||||
titleFont = new Font((cfg.TitFntFml != null ? cfg.TitFntFml : "Arial"), (cfg.TitFntSz > 0 ? cfg.TitFntSz : 10), (FontStyle)cfg.TitFntSty);
|
||||
headerFont = new Font((cfg.HdrFntFml != null ? cfg.HdrFntFml : "Arial"), (cfg.HdrFntSz > 0 ? cfg.HdrFntSz : 10), (FontStyle)cfg.HdrFntSty);
|
||||
font = new Font((cfg.BodyFntFml != null ? cfg.BodyFntFml : "Arial"), (cfg.BodyFntSz > 0 ? cfg.BodyFntSz : 10), (FontStyle)cfg.BodyFntSty);
|
||||
|
||||
/// Set print area size and margins (in dots using 100 dpi)
|
||||
DefaultPageSettings.Landscape = (cfg.PageOrientation == PageOrientation.Landscape);
|
||||
@@ -216,7 +216,8 @@ namespace Results.Output.Printers.Enhanced
|
||||
for (int wmNr = nextWMNr; wmNr < Math.Min(nextWMNr + nrWMsOnPage, batch.WaterMeters.Count); wmNr++) /// wmNr is 0-based
|
||||
{
|
||||
int wmPosition = true ? batch.WaterMeters[wmNr].WMPosition : (wmNr + 1);
|
||||
nextWmTop += PrintWM(e, batch.WaterMeters[wmNr], wmPosition, nextWmTop);
|
||||
int sectionHght = PrintWM(e, batch.WaterMeters[wmNr], wmPosition, nextWmTop);
|
||||
nextWmTop += sectionHght;
|
||||
}
|
||||
|
||||
nextWMNr += nrWMsOnPage;
|
||||
@@ -296,9 +297,12 @@ namespace Results.Output.Printers.Enhanced
|
||||
{
|
||||
if ((mtr != null) && (mtr.Publish() == Config.Entities.Publish.Always))
|
||||
{
|
||||
testsCount++;
|
||||
for (int i = 0; i < testItems.Count; i++)
|
||||
WMeterRsltItemSpec.TableRowNr = ++testsCount;
|
||||
|
||||
for (int i = 0; i < testItems.Count; i++)
|
||||
{
|
||||
WMeterRsltItemSpec.TableColumnNr = i + 1;
|
||||
|
||||
string itemText = testItems[i].Print(wm, mtr.Name());
|
||||
|
||||
/// Strip color information
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace Results.Output.Printers.Munich
|
||||
{
|
||||
public class MunichPrintDocument : PrintDocument
|
||||
{
|
||||
const string FontFamilyName = "Arial"; //"Times New Roman";
|
||||
const string FontFamilyName = "Arial"; ///"Times New Roman";
|
||||
|
||||
const int SpacingOne = 18;
|
||||
const int SpacingOneAndHalf = (3 * SpacingOne) / 2;
|
||||
const int SpacingOneAndHalf = 24; /// was 27 before
|
||||
const int TitleX = 240;
|
||||
const int TitleY = 180; /// Depends on the size of the header
|
||||
const int FirstLineNr = 14; /// Depends on the size of the header
|
||||
@@ -38,10 +38,11 @@ namespace Results.Output.Printers.Munich
|
||||
readonly int resultsCount;
|
||||
readonly bool compound; /// true when MetersKind is MetersKind.Combined
|
||||
|
||||
readonly int secondTableOffset; /// Calculated in the constructor
|
||||
|
||||
/// Top coordinate of the table
|
||||
int top;
|
||||
int nrPages;
|
||||
int pageNr;
|
||||
int firstTblTop;
|
||||
int secondTblTop;
|
||||
|
||||
/// <summary>
|
||||
/// Property variable for the Font the user wishes to use
|
||||
@@ -85,7 +86,8 @@ namespace Results.Output.Printers.Munich
|
||||
int resultsCount = wm.MeterTestRslts.Count;
|
||||
if (compound) resultsCount /= 3;
|
||||
|
||||
secondTableOffset = (resultsCount + 2) * SpacingOneAndHalf;
|
||||
pageNr = 1;
|
||||
nrPages = (compound ? (resultsCount > 7) : (resultsCount > 9)) ? 2 : 1;
|
||||
|
||||
DefaultPageSettings.Landscape = (pageOrientation == PageOrientation.Landscape);
|
||||
}
|
||||
@@ -138,219 +140,279 @@ namespace Results.Output.Printers.Munich
|
||||
/// Use the StringFormat class for the text layout of our document
|
||||
StringFormat format = new StringFormat(StringFormatFlags.LineLimit);
|
||||
|
||||
RectangleF printArea = new RectangleF(TitleX, TitleY, 667, 50);
|
||||
e.Graphics.DrawString(wm.Batch.ProtocolTitle, this.fontTitle, Brushes.Black, printArea);
|
||||
|
||||
int lineNr = FirstLineNr;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, docVersion);
|
||||
lineNr++;
|
||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Prüfstand Nr :");
|
||||
PrintBoldAt(e, Tab2, lineNr * SpacingOne, wm.BenchId().ToString());
|
||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Datum :");
|
||||
PrintBoldAt(e, Tab4, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Zählertyp :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, zaehlertyp);
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Eichjahr :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.YearOfProduction.ToString());
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Prüfvorlage :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, pruefvorlage);
|
||||
lineNr += 2;
|
||||
|
||||
if (compound)
|
||||
if (pageNr == 1)
|
||||
{
|
||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Hauptzahler");
|
||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Nebenzahler");
|
||||
RectangleF printArea = new RectangleF(TitleX, TitleY, 667, 50);
|
||||
e.Graphics.DrawString(wm.Batch.ProtocolTitle, this.fontTitle, Brushes.Black, printArea);
|
||||
|
||||
///
|
||||
/// Common
|
||||
///
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, docVersion);
|
||||
lineNr++;
|
||||
}
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Hersteller :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Producer());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Hersteller :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ProducerAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Seriennummer :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.SerialNr);
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Seriennummer :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.SerialNrAux);
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qn :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Q3_Qn().ToString());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Qn :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.Q3_Qn_Aux().ToString());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Zulassungszeichen :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.ApprovalInfo());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Zulassungszeichen :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ApprovalInfoAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Metr. klasse :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.MetrologicalClass());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Metr. klasse :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.MetrologicalClassAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Stand :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.EndState);
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Stand :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.EndStateAux);
|
||||
|
||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Prüfstand Nr :");
|
||||
PrintBoldAt(e, Tab2, lineNr * SpacingOne, wm.BenchId().ToString());
|
||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Datum :");
|
||||
PrintBoldAt(e, Tab4, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Zählertyp :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, zaehlertyp);
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Eichjahr :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.YearOfProduction.ToString());
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Prüfvorlage :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, pruefvorlage);
|
||||
lineNr += 2;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Umschaltpunkte :");
|
||||
|
||||
if (compound)
|
||||
{
|
||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Hauptzahler");
|
||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Nebenzahler");
|
||||
lineNr++;
|
||||
}
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Hersteller :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Producer());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Hersteller :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ProducerAux());
|
||||
}
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qsteig");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QRise).ToString("F1") + " l/h");
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Seriennummer :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.SerialNr);
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Seriennummer :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.SerialNrAux);
|
||||
}
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qfall");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QFall).ToString("F1") + " l/h");
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, wm.NewQnames() ? "Q3 :" : "Qn :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Q3_Qn().ToString());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, wm.NewQnames() ? "Q3 :" : "Qn :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.Q3_Qn_Aux().ToString());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Zulassungszeichen :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.ApprovalInfo());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Zulassungszeichen :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ApprovalInfoAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Metr. klasse :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.MetrologicalClass());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Metr. klasse :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.MetrologicalClassAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Stand :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.EndState);
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Stand :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.EndStateAux);
|
||||
|
||||
lineNr += 2;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Umschaltpunkte :");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qsteig");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QRise).ToString("F1") + " l/h");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qfall");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QFall).ToString("F1") + " l/h");
|
||||
}
|
||||
|
||||
lineNr += 2;
|
||||
firstTblTop = SpacingOne * lineNr;
|
||||
|
||||
///
|
||||
/// Table 1
|
||||
///
|
||||
PrintTableOne(e, firstTblTop);
|
||||
DrawTableFrame(e, resultsCount + 1, firstTblTop);
|
||||
}
|
||||
|
||||
lineNr += 2;
|
||||
top = SpacingOne * lineNr;
|
||||
|
||||
PrintTable(e);
|
||||
DrawTable(e);
|
||||
if (pageNr == nrPages)
|
||||
{
|
||||
if (pageNr == 1)
|
||||
{
|
||||
secondTblTop = firstTblTop + (resultsCount + 2) * SpacingOneAndHalf;
|
||||
lineNr += ((resultsCount + 2) * SpacingOneAndHalf * 2) / SpacingOne;
|
||||
}
|
||||
else
|
||||
{
|
||||
lineNr -= 3;
|
||||
|
||||
lineNr += (secondTableOffset * 2) / SpacingOne;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Temperatur");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbTempMean().ToString("F1") + " \x00b0C");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Feuchtigkeit");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbHumiMean().ToString("F0") + " %");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Luftdruck");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, Config.Units.ConvertTo(Config.Unit.mbar, wm.Batch.AmbPressMean()).ToString("F0") + " mbar");
|
||||
if (compound)
|
||||
{
|
||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Hauptzahler");
|
||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Nebenzahler");
|
||||
lineNr++;
|
||||
}
|
||||
|
||||
lineNr++;
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
||||
lineNr ++;
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Datum");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, "Unterschrift");
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Hersteller :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Producer());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Hersteller :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ProducerAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Seriennummer :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.SerialNr);
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Seriennummer :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.SerialNrAux);
|
||||
}
|
||||
lineNr += ((resultsCount + 2) * SpacingOneAndHalf) / SpacingOne + 2;
|
||||
|
||||
secondTblTop = TitleY + (compound ? 5 : 4) * SpacingOne;
|
||||
}
|
||||
|
||||
///
|
||||
/// Table 2
|
||||
///
|
||||
PrintTableTwo(e, secondTblTop);
|
||||
DrawTableFrame(e, resultsCount + 1, secondTblTop);
|
||||
|
||||
///
|
||||
/// Footer
|
||||
///
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Temperatur");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbTempMean().ToString("F1") + " \x00b0C");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Feuchtigkeit");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbHumiMean().ToString("F0") + " %");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Luftdruck");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, Config.Units.ConvertTo(Config.Unit.mbar, wm.Batch.AmbPressMean()).ToString("F0") + " mbar");
|
||||
|
||||
lineNr++;
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
||||
lineNr++;
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Datum");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, "Unterschrift");
|
||||
}
|
||||
|
||||
e.HasMorePages = (pageNr != nrPages);
|
||||
pageNr++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Print table texts.
|
||||
/// </summary>
|
||||
void PrintTable(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
void PrintTableOne(System.Drawing.Printing.PrintPageEventArgs e, int tblTop)
|
||||
{
|
||||
PrintAt(e, FromTest(-1, -1), "Prüflauf");
|
||||
PrintAt(e, FromTest(-1, 0), "Q [l/h]");
|
||||
PrintAt(e, FromTest(-1, 1), "Prüf-Vol.[l]");
|
||||
PrintAt(e, FromTest(-1, 2), compound ? "HZ-Vol.[l]" : "Z-Vol.[l]");
|
||||
PrintAt(e, FromTest(-1, 3), compound ? "NZ-Vol.[l]" : "-");
|
||||
PrintAt(e, FromTest(-1, 4), "Fehler [%]");
|
||||
PrintAt(e, FromTest(-1, 5), "Ergebnis");
|
||||
PrintAt(e, GetTabItemPos(0, 0, tblTop), "Prüflauf");
|
||||
PrintAt(e, GetTabItemPos(0, 1, tblTop), "Q [l/h]");
|
||||
PrintAt(e, GetTabItemPos(0, 2, tblTop), "Prüf-Vol.[l]");
|
||||
PrintAt(e, GetTabItemPos(0, 3, tblTop), compound ? "HZ-Vol.[l]" : "Z-Vol.[l]");
|
||||
PrintAt(e, GetTabItemPos(0, 4, tblTop), compound ? "NZ-Vol.[l]" : "-");
|
||||
PrintAt(e, GetTabItemPos(0, 5, tblTop), "Fehler [%]");
|
||||
PrintAt(e, GetTabItemPos(0, 6, tblTop), "Ergebnis");
|
||||
|
||||
PrintAt(e, FromTest(-1, 6), "Q [l/h]");
|
||||
PrintAt(e, FromTest(-1, 7), "Temperatur");
|
||||
PrintAt(e, FromTest(-1, 8), "Dichte");
|
||||
PrintAt(e, FromTest(-1, 9), "Prüfzeit");
|
||||
PrintAt(e, FromTest(-1, 10), "Druck Eing.");
|
||||
PrintAt(e, FromTest(-1, 11), "Druck Ausg.");
|
||||
|
||||
int rowCnt = 0;
|
||||
int rowCnt = 1;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if (!compound || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
|
||||
{
|
||||
Point p = FromTest(rowCnt, -1);
|
||||
PrintAt(e, p.X, p.Y, mtr.Name());
|
||||
PrintAt(e, p.X, p.Y + (resultsCount + 2) * SpacingOneAndHalf, mtr.Name());
|
||||
|
||||
PrintAt(e, FromTest(rowCnt, 0), mtr.TestRslt.FlowMass.ToString("F1"));
|
||||
PrintAt(e, FromTest(rowCnt, 1), mtr.TestRslt.VolumeCTV.ToString("F2"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 0, tblTop), mtr.Name());
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 1, tblTop), mtr.TestRslt.FlowMass.ToString("F1"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 2, tblTop), mtr.TestRslt.VolumeCTV.ToString("F2"));
|
||||
if (compound)
|
||||
{
|
||||
Results.Entities.MeterTestRslt mainMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundAux);
|
||||
|
||||
PrintAt(e, FromTest(rowCnt, 2), mainMtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 3), auxMtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 4), mtr.Error.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 5), mtr.Passed ? "iO" : "NiO");
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 3, tblTop), mainMtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 4, tblTop), auxMtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 5, tblTop), mtr.Error.ToString("F2"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 6, tblTop), mtr.Passed ? "iO" : "NiO");
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintAt(e, FromTest(rowCnt, 2), mtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 3), "-");
|
||||
PrintAt(e, FromTest(rowCnt, 4), mtr.Error.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 5), mtr.Passed ? "iO" : "NiO");
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 3, tblTop), mtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 4, tblTop), "-");
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 5, tblTop), mtr.Error.ToString("F2"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 6, tblTop), mtr.Passed ? "iO" : "NiO");
|
||||
}
|
||||
PrintAt(e, FromTest(rowCnt, 6), mtr.TestRslt.FlowMass.ToString("F1"));
|
||||
PrintAt(e, FromTest(rowCnt, 7), mtr.TestRslt.TempDownMean.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 8), mtr.TestRslt.DensityDiv.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 9), mtr.TestTime.ToString("F1"));
|
||||
PrintAt(e, FromTest(rowCnt, 10), Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressUpMean).ToString("F3"));
|
||||
PrintAt(e, FromTest(rowCnt, 11), Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressDownMean).ToString("F3"));
|
||||
|
||||
rowCnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PrintTableTwo(System.Drawing.Printing.PrintPageEventArgs e, int tblTop)
|
||||
{
|
||||
PrintAt(e, GetTabItemPos(0, 1, tblTop), "Q [l/h]");
|
||||
PrintAt(e, GetTabItemPos(0, 2, tblTop), "Temperatur");
|
||||
PrintAt(e, GetTabItemPos(0, 3, tblTop), "Dichte");
|
||||
PrintAt(e, GetTabItemPos(0, 4, tblTop), "Prüfzeit");
|
||||
PrintAt(e, GetTabItemPos(0, 5, tblTop), "Druck Eing.");
|
||||
PrintAt(e, GetTabItemPos(0, 6, tblTop), "Druck Ausg.");
|
||||
|
||||
int rowCnt = 1;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if (!compound || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
|
||||
{
|
||||
Point p = GetTabItemPos(rowCnt, 0, tblTop);
|
||||
PrintAt(e, p.X, p.Y, mtr.Name());
|
||||
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 1, tblTop), mtr.TestRslt.FlowMass.ToString("F1"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 2, tblTop), mtr.TestRslt.TempDownMean.ToString("F2"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 3, tblTop), mtr.TestRslt.DensityDiv.ToString("F2"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 4, tblTop), mtr.TestTime.ToString("F1"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 5, tblTop), Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressUpMean).ToString("F3"));
|
||||
PrintAt(e, GetTabItemPos(rowCnt, 6, tblTop), Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressDownMean).ToString("F3"));
|
||||
|
||||
rowCnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw table lines.
|
||||
/// </summary>
|
||||
void DrawTable(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
void DrawTableFrame(System.Drawing.Printing.PrintPageEventArgs e, int rowsCount, int tblTop)
|
||||
{
|
||||
int mid = top + SpacingOneAndHalf;
|
||||
int bot = top + (resultsCount + 1) * SpacingOneAndHalf;
|
||||
|
||||
int top2 = top + secondTableOffset;
|
||||
int mid2 = mid + secondTableOffset;
|
||||
int bot2 = bot + secondTableOffset;
|
||||
int t = tblTop;
|
||||
int m = tblTop + SpacingOneAndHalf;
|
||||
int b = tblTop + rowsCount * SpacingOneAndHalf;
|
||||
|
||||
// Horizontal lines
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, top), new Point(747, top));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, mid), new Point(747, mid));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, bot), new Point(747, bot));
|
||||
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, top2), new Point(747, top2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, mid2), new Point(747, mid2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, bot2), new Point(747, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, t), new Point(747, t));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, m), new Point(747, m));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, b), new Point(747, b));
|
||||
|
||||
// Vertical lines
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point( 80, top), new Point( 80, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(267, top), new Point(267, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(347, top), new Point(347, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(427, top), new Point(427, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(507, top), new Point(507, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(587, top), new Point(587, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(667, top), new Point(667, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(747, top), new Point(747, bot));
|
||||
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point( 80, top2), new Point( 80, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(267, top2), new Point(267, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(347, top2), new Point(347, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(427, top2), new Point(427, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(507, top2), new Point(507, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(587, top2), new Point(587, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(667, top2), new Point(667, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(747, top2), new Point(747, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point( 80, t), new Point( 80, b));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(267, t), new Point(267, b));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(347, t), new Point(347, b));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(427, t), new Point(427, b));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(507, t), new Point(507, b));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(587, t), new Point(587, b));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(667, t), new Point(667, b));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(747, t), new Point(747, b));
|
||||
}
|
||||
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
|
||||
{
|
||||
PrintAt(e, p.X, p.Y, text);
|
||||
@@ -373,16 +435,16 @@ namespace Results.Output.Printers.Munich
|
||||
e.Graphics.DrawString(text, this.boldFont, Brushes.Black, printArea);
|
||||
}
|
||||
|
||||
Point FromTest(int testNr, int parNr)
|
||||
/// <summary>
|
||||
/// Get text position form a number of the test and a number of the parameter.
|
||||
/// </summary>
|
||||
/// <param name="row"></param>
|
||||
/// <param name="column">Table column (0-based)</param>
|
||||
/// <returns></returns>
|
||||
Point GetTabItemPos(int row, int column, int tblTop)
|
||||
{
|
||||
const int NrParamsInOneTableRow = 6;
|
||||
|
||||
int x = 267 + (parNr % NrParamsInOneTableRow) * 80 + MarginLeft;
|
||||
int y = top + SpacingOneAndHalf + MarginTop + testNr * SpacingOneAndHalf
|
||||
+ ((parNr >= NrParamsInOneTableRow) ? secondTableOffset : 0);
|
||||
|
||||
if (parNr < 0) x = 80 + MarginLeft; /// When parNr == -1 return the left column x coordinate
|
||||
|
||||
int x = MarginLeft + ((column == 0) ? 80 : 187) + column * 80; /// leftmost column is wider
|
||||
int y = MarginTop + tblTop + (row * SpacingOneAndHalf) - 2;
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,461 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using Config.Entities;
|
||||
using Results.Resources;
|
||||
|
||||
namespace Results.Output.Printers.OnePerMeter
|
||||
{
|
||||
public class OnePerMeterPrintDocument : PrintDocument
|
||||
{
|
||||
const float GapBetweenTableColumns = 10;
|
||||
const float GapBetweenCommonColumns = 10;
|
||||
|
||||
/// Size of the printed area without margins, after taking into account 'pageOrientation'
|
||||
readonly int printHeight;
|
||||
readonly int printWidth;
|
||||
|
||||
readonly int topMargin;
|
||||
readonly int bottomMargin;
|
||||
readonly int leftMargin;
|
||||
readonly int TitleX;
|
||||
readonly int TitleY; /// Depends on the size of the header
|
||||
|
||||
readonly int spacingOne;
|
||||
readonly int spacingOne4Header;
|
||||
|
||||
float commonTop; /// = TitleY + 60
|
||||
float bodyTop; /// = HdrTop + 160
|
||||
///
|
||||
float titleHeight;
|
||||
float commonHeight;
|
||||
|
||||
/// <summary>
|
||||
/// Property variable for the Font the user wishes to use
|
||||
/// </summary>
|
||||
Font font;
|
||||
Font headerFont;
|
||||
Font titleFont;
|
||||
|
||||
///
|
||||
/// Data to print
|
||||
///
|
||||
Results.Entities.Batch batch;
|
||||
OnePerMeterPrinterCfg cfg;
|
||||
Results.Entities.WaterMeter wm;
|
||||
|
||||
///
|
||||
/// Items to print
|
||||
///
|
||||
string header;
|
||||
IList<WMeterRsltItemSpec> commonItems;
|
||||
IList<WMeterRsltItemSpec> testItems;
|
||||
IList<WMeterRsltItemSpec> testItems2;
|
||||
string footer;
|
||||
|
||||
int nrPages;
|
||||
int pageNr; /// Page number to be printed at the bottom of the page
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public OnePerMeterPrintDocument(Results.Entities.Batch batch, OnePerMeterPrinterCfg cfg, Results.Entities.WaterMeter wm)
|
||||
{
|
||||
this.batch = batch;
|
||||
this.cfg = cfg;
|
||||
this.wm = wm;
|
||||
|
||||
topMargin = cfg.TopMargin;
|
||||
bottomMargin = cfg.BottomMargin;
|
||||
leftMargin = cfg.LeftMargin;
|
||||
|
||||
header = string.IsNullOrEmpty(cfg.Header) ? string.Empty : cfg.Header.Replace("~", Environment.NewLine);
|
||||
commonItems = Results.WMeterRsltItemSpec.FromStrArray(cfg.CommonItems);
|
||||
testItems = Results.WMeterRsltItemSpec.FromStrArray(cfg.TestItems); /// TestID info will be overwritten later on
|
||||
testItems2 = Results.WMeterRsltItemSpec.FromStrArray(cfg.TestItems2); /// TestID info will be overwritten later on
|
||||
footer = string.IsNullOrEmpty(cfg.Footer) ? string.Empty : cfg.Footer.Replace("~", Environment.NewLine);
|
||||
|
||||
/// Initialize fonts
|
||||
titleFont = new Font((cfg.TitFntFml != null ? cfg.TitFntFml : "Arial"), (cfg.TitFntSz > 0 ? cfg.TitFntSz : 10), (FontStyle)cfg.TitFntSty);
|
||||
headerFont = new Font((cfg.HdrFntFml != null ? cfg.HdrFntFml : "Arial"), (cfg.HdrFntSz > 0 ? cfg.HdrFntSz : 10), (FontStyle)cfg.HdrFntSty);
|
||||
font = new Font((cfg.BodyFntFml != null ? cfg.BodyFntFml : "Arial"), (cfg.BodyFntSz > 0 ? cfg.BodyFntSz : 10), (FontStyle)cfg.BodyFntSty);
|
||||
|
||||
/// Set print area size and margins (in dots using 100 dpi)
|
||||
DefaultPageSettings.Landscape = (cfg.PageOrientation == PageOrientation.Landscape);
|
||||
///
|
||||
if (DefaultPageSettings.Landscape)
|
||||
{
|
||||
printHeight = base.DefaultPageSettings.PaperSize.Width - topMargin - bottomMargin;
|
||||
printWidth = base.DefaultPageSettings.PaperSize.Height - leftMargin - leftMargin;
|
||||
}
|
||||
else
|
||||
{
|
||||
printHeight = base.DefaultPageSettings.PaperSize.Height - topMargin - bottomMargin;
|
||||
printWidth = base.DefaultPageSettings.PaperSize.Width - leftMargin - leftMargin;
|
||||
}
|
||||
|
||||
spacingOne = System.Windows.Forms.TextRenderer.MeasureText("Abcgq", font).Height;
|
||||
spacingOne4Header = System.Windows.Forms.TextRenderer.MeasureText("Abcgq", headerFont).Height;
|
||||
|
||||
/// Prepare document outline
|
||||
TitleX = cfg.LeftMargin;
|
||||
TitleY = cfg.TopMargin;
|
||||
|
||||
pageNr = 1;
|
||||
nrPages = (testItems2.Count != 0) ? 2 : 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default onbeginPrint method of the PrintDocument Object
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks></remarks>
|
||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
base.OnBeginPrint(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default OnPrintPage method of the PrintDocument.
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks>This provides the print logic for our document</remarks>
|
||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
/// Run base code
|
||||
base.OnPrintPage(e);
|
||||
|
||||
if (pageNr == 1)
|
||||
{
|
||||
titleHeight = System.Windows.Forms.TextRenderer.MeasureText(header, titleFont).Height;
|
||||
commonTop = TitleY + titleHeight + spacingOne4Header;
|
||||
|
||||
commonHeight = commonItems.Count * spacingOne;
|
||||
bodyTop = commonTop + commonHeight + spacingOne4Header;
|
||||
}
|
||||
|
||||
if (File.Exists("C:\\TBF\\header.png"))
|
||||
{
|
||||
Image img = Image.FromFile("C:\\TBF\\header.png");
|
||||
e.Graphics.DrawImage(new Bitmap(img), new Rectangle(0, 0, 827, 1169));
|
||||
}
|
||||
|
||||
/// Use the StringFormat class for the text layout of our document
|
||||
StringFormat format = new StringFormat(StringFormatFlags.LineLimit);
|
||||
|
||||
if (pageNr == 1)
|
||||
{
|
||||
///
|
||||
/// Title
|
||||
///
|
||||
RectangleF printArea = new RectangleF(TitleX, TitleY, printWidth, titleHeight);
|
||||
e.Graphics.DrawString(header, titleFont, Brushes.Black, printArea);
|
||||
|
||||
///
|
||||
/// Common items
|
||||
///
|
||||
string[] leftColumn = new string[commonItems.Count];
|
||||
string[] rightColumn = new string[commonItems.Count];
|
||||
|
||||
int cnt = 0;
|
||||
foreach (var v in commonItems)
|
||||
{
|
||||
leftColumn[cnt] = v.Caption;
|
||||
rightColumn[cnt] = (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
/// Determine left column width
|
||||
float maxWidth = 0;
|
||||
foreach (var str in leftColumn)
|
||||
{
|
||||
float width = e.Graphics.MeasureString(str, font).Width;
|
||||
if (width > maxWidth) maxWidth = width;
|
||||
}
|
||||
|
||||
/// Write aligned columns
|
||||
for (int i = 0; i < Math.Min(leftColumn.Length, rightColumn.Length); i++)
|
||||
{
|
||||
PrintAt(e, leftMargin, commonTop + spacingOne * i, maxWidth, leftColumn[i], font, Alignment.Left);
|
||||
PrintAt(e, leftMargin + maxWidth + GapBetweenCommonColumns, commonTop + spacingOne * i, 0, rightColumn[i], font, Alignment.Left);
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Body
|
||||
///
|
||||
if (pageNr == 1)
|
||||
{
|
||||
string[] tableHeader;
|
||||
IList<string[]> tableRows;
|
||||
Alignment[] itemAlignment;
|
||||
|
||||
///
|
||||
/// Prepare table content: tableHeader + tableRows + itemAlignment
|
||||
///
|
||||
if (cfg.TestsAreRows)
|
||||
{
|
||||
GetContentTestsAreRows(wm, testItems, out tableHeader, out tableRows, out itemAlignment);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetContentTestsAreColumns(wm, testItems, out tableHeader, out tableRows, out itemAlignment);
|
||||
}
|
||||
|
||||
DrawTable(e, (float)leftMargin, bodyTop, tableHeader, tableRows, itemAlignment);
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] tableHeader;
|
||||
IList<string[]> tableRows;
|
||||
Alignment[] itemAlignment;
|
||||
|
||||
///
|
||||
/// Prepare table content: tableHeader + tableRows + itemAlignment
|
||||
///
|
||||
if (cfg.TestsAreRows2)
|
||||
{
|
||||
GetContentTestsAreRows(wm, testItems2, out tableHeader, out tableRows, out itemAlignment);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetContentTestsAreColumns(wm, testItems2, out tableHeader, out tableRows, out itemAlignment);
|
||||
}
|
||||
|
||||
DrawTable(e, (float)leftMargin, (float)topMargin, tableHeader, tableRows, itemAlignment);
|
||||
}
|
||||
|
||||
if (pageNr == nrPages)
|
||||
{
|
||||
///
|
||||
/// Footer on the last page
|
||||
///
|
||||
float footerWidth = e.Graphics.MeasureString(footer, font).Width;
|
||||
PrintAt(e, leftMargin, topMargin + printHeight - 2 * spacingOne, 0, footer, font, Alignment.Left);
|
||||
}
|
||||
|
||||
///
|
||||
/// Page number on each page
|
||||
///
|
||||
string pageNrText = string.Format("{0} {1}/{2}", Strings.Page, pageNr, nrPages);
|
||||
float pageNrWidth = e.Graphics.MeasureString(pageNrText, font).Width;
|
||||
PrintAt(e, leftMargin + (printWidth - pageNrWidth) / 2, topMargin + printHeight - spacingOne, 0, pageNrText, font, Alignment.Left);
|
||||
|
||||
e.HasMorePages = !(pageNr == nrPages);
|
||||
|
||||
pageNr++;
|
||||
}
|
||||
|
||||
|
||||
void GetContentTestsAreRows(Results.Entities.WaterMeter wm, IList<WMeterRsltItemSpec> items, out string[] tableHeader, out IList<string[]> tableRows, out Alignment[] itemAlignment)
|
||||
{
|
||||
int tableColumnsCount = items.Count;
|
||||
|
||||
tableRows = new List<string[]>();
|
||||
tableHeader = new string[tableColumnsCount];
|
||||
itemAlignment = new Alignment[tableColumnsCount];
|
||||
|
||||
for (int i = 0; i < tableColumnsCount; i++)
|
||||
{
|
||||
tableHeader[i] = items[i].Caption;
|
||||
itemAlignment[i] = items[i].Alignment;
|
||||
}
|
||||
|
||||
WMeterRsltItemSpec.TableRowNr = 0;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
|
||||
{
|
||||
string[] oneTableRow = new string[tableColumnsCount];
|
||||
WMeterRsltItemSpec.TableRowNr++;
|
||||
|
||||
for (int i = 0; i < tableColumnsCount; i++)
|
||||
{
|
||||
WMeterRsltItemSpec.TableColumnNr = i + 1;
|
||||
oneTableRow[i] = items[i].Print(wm, mtr.Name()).Split(new char[] { '|' })[0];
|
||||
}
|
||||
|
||||
tableRows.Add(oneTableRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GetContentTestsAreColumns(Results.Entities.WaterMeter wm, IList<WMeterRsltItemSpec> items, out string[] tableHeader, out IList<string[]> tableRows, out Alignment[] itemAlignment)
|
||||
{
|
||||
int tableColumnsCount = 1;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
|
||||
{
|
||||
tableColumnsCount++;
|
||||
}
|
||||
}
|
||||
|
||||
tableRows = new List<string[]>();
|
||||
tableHeader = new string[tableColumnsCount];
|
||||
itemAlignment = new Alignment[tableColumnsCount];
|
||||
|
||||
tableHeader[0] = string.Empty;
|
||||
itemAlignment[0] = Alignment.Left;
|
||||
int columnsCount = 1;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
|
||||
{
|
||||
tableHeader[columnsCount] = mtr.Name();
|
||||
itemAlignment[columnsCount] = Alignment.Left;
|
||||
columnsCount++;
|
||||
}
|
||||
}
|
||||
|
||||
WMeterRsltItemSpec.TableRowNr = 0;
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
string[] oneTableRow = new string[tableColumnsCount];
|
||||
WMeterRsltItemSpec.TableRowNr++;
|
||||
|
||||
oneTableRow[0] = items[i].Caption;
|
||||
|
||||
WMeterRsltItemSpec.TableColumnNr = 1;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
|
||||
{
|
||||
/// Strip color information
|
||||
oneTableRow[WMeterRsltItemSpec.TableColumnNr] =
|
||||
items[i].Print(wm, mtr.Name()).Split(new char[] { '|' })[0];
|
||||
WMeterRsltItemSpec.TableColumnNr++;
|
||||
}
|
||||
}
|
||||
|
||||
tableRows.Add(oneTableRow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float DrawTable(System.Drawing.Printing.PrintPageEventArgs e, float left, float top, string[] header, IList<string[]> rows, Alignment[] alignment)
|
||||
{
|
||||
int tblColumnsCount = header.Length;
|
||||
|
||||
float[] columnWidth = new float[tblColumnsCount];
|
||||
float[] columnPos = new float[tblColumnsCount + 1];
|
||||
columnPos[0] = left;
|
||||
|
||||
///
|
||||
/// Measure table column widths and header height
|
||||
///
|
||||
float headerHeight = 0;
|
||||
for (int i = 0; i < tblColumnsCount; i++)
|
||||
{
|
||||
SizeF size = e.Graphics.MeasureString(header[i], headerFont);
|
||||
columnWidth[i] = (int)(size.Width + 0.99f);
|
||||
if (size.Height > headerHeight) headerHeight = (int)(size.Height + 0.99f);
|
||||
|
||||
foreach (var tableRow in rows)
|
||||
{
|
||||
int width = (int)(e.Graphics.MeasureString(tableRow[i], font).Width + 0.99f);
|
||||
if (width > columnWidth[i]) columnWidth[i] = width;
|
||||
}
|
||||
columnPos[i + 1] = columnPos[i] + columnWidth[i] + GapBetweenTableColumns;
|
||||
}
|
||||
|
||||
float tableLeftX = columnPos[0];
|
||||
float tableRightX = columnPos[tblColumnsCount] - GapBetweenTableColumns;
|
||||
|
||||
/// Horizontal line
|
||||
float horY = top + 1.5f * spacingOne4Header;
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY));
|
||||
|
||||
///
|
||||
/// Draw table header
|
||||
///
|
||||
for (int i = 0; i < tblColumnsCount; i++)
|
||||
{
|
||||
PrintAt(e, columnPos[i],
|
||||
top + 1.7f * spacingOne4Header,
|
||||
columnWidth[i],
|
||||
header[i],
|
||||
headerFont,
|
||||
Alignment.Center);
|
||||
}
|
||||
/// Horizontal line
|
||||
horY = top + 2.1f * spacingOne4Header + headerHeight;
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY));
|
||||
|
||||
///
|
||||
/// Draw table body
|
||||
///
|
||||
int rowsCount = 0;
|
||||
foreach (var oneTableRow in rows)
|
||||
{
|
||||
for (int i = 0; i < tblColumnsCount; i++)
|
||||
{
|
||||
PrintAt(e, columnPos[i],
|
||||
horY + 0.2f * spacingOne4Header + spacingOne * rowsCount,
|
||||
columnWidth[i],
|
||||
oneTableRow[i],
|
||||
font,
|
||||
alignment[i]);
|
||||
}
|
||||
rowsCount++;
|
||||
}
|
||||
|
||||
/// Horizontal line
|
||||
horY = horY + spacingOne * rowsCount + (3 * spacingOne4Header / 10);
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY));
|
||||
|
||||
return horY - top + spacingOne;
|
||||
}
|
||||
|
||||
|
||||
static Font lastFont = null;
|
||||
static float lastSpacing = 0;
|
||||
|
||||
SizeF Measure(System.Drawing.Printing.PrintPageEventArgs e, string paragraph, Font font)
|
||||
{
|
||||
if (font != lastFont)
|
||||
{
|
||||
lastFont = font;
|
||||
lastSpacing = e.Graphics.MeasureString("Abcgq", font).Height;
|
||||
}
|
||||
|
||||
string[] lines = paragraph.Split(new char[] { '~' });
|
||||
float width = 0;
|
||||
foreach (var line in lines)
|
||||
{
|
||||
float lineWid = e.Graphics.MeasureString(line, font).Width;
|
||||
if (lineWid > width) width = lineWid;
|
||||
}
|
||||
|
||||
return new SizeF(width, 0.8f * lines.Length * lastSpacing + 0.2f);
|
||||
}
|
||||
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, float x, float y, float width, string paragraph, Font font, Alignment alignment)
|
||||
{
|
||||
SizeF size = Measure(e, paragraph, font);
|
||||
|
||||
string[] lines = paragraph.Split(new char[] { '~' });
|
||||
foreach (var line in lines)
|
||||
{
|
||||
float xx;
|
||||
switch (alignment)
|
||||
{
|
||||
default:
|
||||
case Alignment.Left: xx = x; break;
|
||||
case Alignment.Center: xx = x + (width - e.Graphics.MeasureString(line, font).Width) / 2; break;
|
||||
case Alignment.Right: xx = x + width - e.Graphics.MeasureString(line, font).Width; break;
|
||||
}
|
||||
e.Graphics.DrawString(line, font, Brushes.Black, new PointF(xx, y));
|
||||
y += 0.8f * lastSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
|
||||
namespace Results.Output.Printers.OnePerMeter
|
||||
{
|
||||
public class OnePerMeterPrinterCfg
|
||||
{
|
||||
public Config.Entities.PageOrientation PageOrientation;
|
||||
public int TopMargin;
|
||||
public int BottomMargin;
|
||||
public int LeftMargin;
|
||||
public string TitFntFml;
|
||||
public int TitFntSz;
|
||||
public int TitFntSty;
|
||||
public string HdrFntFml;
|
||||
public int HdrFntSz;
|
||||
public int HdrFntSty;
|
||||
public string BodyFntFml;
|
||||
public int BodyFntSz;
|
||||
public int BodyFntSty;
|
||||
public bool GoodOnly;
|
||||
public bool SupressPrinting; /// Bypass printing when true
|
||||
public System.Globalization.CultureInfo CultureInfo;
|
||||
public string Header; /// =Title
|
||||
public string[] CommonItems;
|
||||
public string[] TestItems;
|
||||
public string[] TestItems2;
|
||||
public string Footer;
|
||||
public bool TestsAreRows;
|
||||
public bool TestsAreRows2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,495 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using Config.Entities;
|
||||
using Results;
|
||||
using Results.Resources;
|
||||
|
||||
namespace Results.Output.Printers.Zapiska
|
||||
{
|
||||
public class ZapiskaPrintDocument : PrintDocument
|
||||
{
|
||||
const float GapBetweenTableColumns = 10.0f;
|
||||
const float GapBetweenCommonColumns = 10.0f;
|
||||
|
||||
/// Size of the printed area without margins, after taking into account 'pageOrientation'
|
||||
readonly int printHeight; /// in 0.254 mm = 0.01 in
|
||||
readonly int printWidth; /// in 0.254 mm = 0.01 in
|
||||
|
||||
readonly int topMargin; /// in 0.254 mm = 0.01 in
|
||||
readonly int bottomMargin; /// in 0.254 mm = 0.01 in
|
||||
readonly int leftMargin; /// in 0.254 mm = 0.01 in
|
||||
|
||||
readonly float leftMarginCommon1;
|
||||
readonly float leftMarginCommon2;
|
||||
readonly float leftMarginCommon3;
|
||||
readonly float leftMarginBelow1;
|
||||
readonly float leftMarginBelow2;
|
||||
readonly float leftMarginBelow3;
|
||||
|
||||
readonly float spacingOne;
|
||||
readonly float spacingOne4Header;
|
||||
|
||||
float commonTop; /// = TitleY + 60
|
||||
float bodyTop; /// = HdrTop + 160
|
||||
///
|
||||
float titleHeight;
|
||||
float commonHeight;
|
||||
|
||||
/// <summary>
|
||||
/// Property variable for the Font the user wishes to use
|
||||
/// </summary>
|
||||
Font font;
|
||||
Font headerFont;
|
||||
Font titleFont;
|
||||
|
||||
///
|
||||
/// Data to print
|
||||
///
|
||||
Results.Entities.Batch batch;
|
||||
|
||||
ZapiskaPrinterCfg cfg;
|
||||
|
||||
///
|
||||
/// Items to print
|
||||
///
|
||||
string header;
|
||||
IList<WMeterRsltItemSpec> commonItems1;
|
||||
IList<WMeterRsltItemSpec> commonItems2;
|
||||
IList<WMeterRsltItemSpec> commonItems3;
|
||||
IList<WMeterRsltItemSpec> selectedItems;
|
||||
IList<WMeterRsltItemSpec> belowItems1;
|
||||
IList<WMeterRsltItemSpec> belowItems2;
|
||||
IList<WMeterRsltItemSpec> belowItems3;
|
||||
string footer;
|
||||
|
||||
///
|
||||
/// Layout and status
|
||||
///
|
||||
int tablesOnFirstPage;
|
||||
int tablesOnNextPage;
|
||||
int nrPages;
|
||||
int pageNr; /// Page number to be printed at the bottom of the page
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public ZapiskaPrintDocument(Results.Entities.Batch batch, ZapiskaPrinterCfg cfg)
|
||||
{
|
||||
this.batch = batch;
|
||||
|
||||
this.cfg = cfg;
|
||||
topMargin = cfg.TopMargin;
|
||||
bottomMargin = cfg.BottomMargin;
|
||||
leftMargin = cfg.LeftMargin;
|
||||
|
||||
header = string.IsNullOrEmpty(cfg.Header) ? string.Empty : cfg.Header.Replace("~", Environment.NewLine);
|
||||
commonItems1 = Results.WMeterRsltItemSpec.FromStrArray(cfg.CommonItems1);
|
||||
commonItems2 = Results.WMeterRsltItemSpec.FromStrArray(cfg.CommonItems2);
|
||||
commonItems3 = Results.WMeterRsltItemSpec.FromStrArray(cfg.CommonItems3);
|
||||
selectedItems = Results.WMeterRsltItemSpec.FromStrArray(cfg.SelectedItems);
|
||||
belowItems1 = Results.WMeterRsltItemSpec.FromStrArray(cfg.BelowItems1);
|
||||
belowItems2 = Results.WMeterRsltItemSpec.FromStrArray(cfg.BelowItems2);
|
||||
belowItems3 = Results.WMeterRsltItemSpec.FromStrArray(cfg.BelowItems3);
|
||||
footer = string.IsNullOrEmpty(cfg.Footer) ? string.Empty : cfg.Footer.Replace("~", Environment.NewLine);
|
||||
|
||||
/// Initialize fonts
|
||||
titleFont = new Font((cfg.TitFntFml != null ? cfg.TitFntFml : "Arial"), (cfg.TitFntSz > 0 ? cfg.TitFntSz : 10), (FontStyle)cfg.TitFntSty);
|
||||
headerFont = new Font((cfg.HdrFntFml != null ? cfg.HdrFntFml : "Arial"), (cfg.HdrFntSz > 0 ? cfg.HdrFntSz : 10), (FontStyle)cfg.HdrFntSty);
|
||||
font = new Font((cfg.BodyFntFml != null ? cfg.BodyFntFml : "Arial"), (cfg.BodyFntSz > 0 ? cfg.BodyFntSz : 10), (FontStyle)cfg.BodyFntSty);
|
||||
|
||||
/// Set print area size and margins (in dots using 100 dpi)
|
||||
DefaultPageSettings.Landscape = (cfg.PageOrientation == PageOrientation.Landscape);
|
||||
///
|
||||
if (DefaultPageSettings.Landscape)
|
||||
{
|
||||
printHeight = base.DefaultPageSettings.PaperSize.Width - topMargin - bottomMargin;
|
||||
printWidth = base.DefaultPageSettings.PaperSize.Height - leftMargin - leftMargin;
|
||||
}
|
||||
else
|
||||
{
|
||||
printHeight = base.DefaultPageSettings.PaperSize.Height - topMargin - bottomMargin;
|
||||
printWidth = base.DefaultPageSettings.PaperSize.Width - leftMargin - leftMargin;
|
||||
}
|
||||
|
||||
leftMarginCommon1 = leftMargin + printWidth * 0.01f * cfg.ColW0Pct;
|
||||
leftMarginCommon2 = leftMargin + printWidth * 0.01f * (cfg.ColW0Pct + cfg.ColW1Pct);
|
||||
leftMarginCommon3 = leftMargin + printWidth * 0.01f * (cfg.ColW0Pct + cfg.ColW1Pct + cfg.ColW2Pct);
|
||||
|
||||
leftMarginBelow1 = leftMargin + printWidth * 0.01f * cfg.BelowW0Pct;
|
||||
leftMarginBelow2 = leftMargin + printWidth * 0.01f * (cfg.BelowW0Pct + cfg.BelowW1Pct);
|
||||
leftMarginBelow3 = leftMargin + printWidth * 0.01f * (cfg.BelowW0Pct + cfg.BelowW1Pct + cfg.BelowW2Pct);
|
||||
|
||||
spacingOne = System.Windows.Forms.TextRenderer.MeasureText("Abcgq", font).Height;
|
||||
spacingOne4Header = System.Windows.Forms.TextRenderer.MeasureText("Abcgq", headerFont).Height;
|
||||
|
||||
pageNr = 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default onbeginPrint method of the PrintDocument Object
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks></remarks>
|
||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
base.OnBeginPrint(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default OnPrintPage method of the PrintDocument.
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks>This provides the print logic for our document</remarks>
|
||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
if (pageNr == 1)
|
||||
{
|
||||
/// Calculate the table rows count
|
||||
int tableRowsCount = 0;
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
if (!cfg.GoodOnly || wm.Passed) tableRowsCount++;
|
||||
}
|
||||
|
||||
/// Prepare document outline
|
||||
titleHeight = System.Windows.Forms.TextRenderer.MeasureText(header, titleFont).Height;
|
||||
commonTop = cfg.TopMargin + titleHeight + spacingOne4Header;
|
||||
|
||||
int commonCount = Math.Max(commonItems1.Count, Math.Max(commonItems2.Count, commonItems3.Count));
|
||||
commonHeight = commonCount * spacingOne;
|
||||
bodyTop = commonTop + commonHeight + spacingOne4Header;
|
||||
|
||||
float wmSectionHeight = (tableRowsCount + 1) * spacingOne + 3 * spacingOne4Header;
|
||||
|
||||
tablesOnFirstPage = (int)Math.Floor((printHeight - bodyTop + (float)cfg.TopMargin - 2 * spacingOne) / wmSectionHeight);
|
||||
tablesOnNextPage = Math.Max(1, (int)Math.Floor((printHeight - 2 * spacingOne) / wmSectionHeight)); /// Min. 1, prevent division by zero
|
||||
|
||||
if (tablesOnFirstPage >= 1)
|
||||
nrPages = 1;
|
||||
else
|
||||
nrPages = 2;
|
||||
}
|
||||
|
||||
/// Run base code
|
||||
base.OnPrintPage(e);
|
||||
|
||||
if (File.Exists("C:\\TBF\\header.png"))
|
||||
{
|
||||
Image img = Image.FromFile("C:\\TBF\\header.png");
|
||||
e.Graphics.DrawImage(new Bitmap(img), new Rectangle(0, 0, 827, 1169));
|
||||
}
|
||||
|
||||
/// Use the StringFormat class for the text layout of our document
|
||||
StringFormat format = new StringFormat(StringFormatFlags.LineLimit);
|
||||
|
||||
if (pageNr == 1)
|
||||
{
|
||||
///----------
|
||||
/// Title
|
||||
///----------
|
||||
float titleWid = e.Graphics.MeasureString(header, titleFont).Width;
|
||||
RectangleF printArea = new RectangleF(cfg.LeftMargin + Math.Max(0, (printWidth - titleWid)) / 2, cfg.TopMargin,
|
||||
titleWid, titleHeight);
|
||||
e.Graphics.DrawString(header, titleFont, Brushes.Black, printArea);
|
||||
|
||||
///----------------
|
||||
/// Common items
|
||||
///----------------
|
||||
for (int n = 1; n <= 3; n++)
|
||||
{
|
||||
IList<WMeterRsltItemSpec> commonItems;
|
||||
float lMargin;
|
||||
switch (n)
|
||||
{
|
||||
default:
|
||||
case 1: commonItems = commonItems1; lMargin = leftMarginCommon1; break;
|
||||
case 2: commonItems = commonItems2; lMargin = leftMarginCommon2; break;
|
||||
case 3: commonItems = commonItems3; lMargin = leftMarginCommon3; break;
|
||||
}
|
||||
|
||||
if (commonItems.Count == 0) continue; /// Common part is empty
|
||||
|
||||
string[] leftColumn = new string[commonItems.Count];
|
||||
string[] rightColumn = new string[commonItems.Count];
|
||||
|
||||
int cnt = 0;
|
||||
foreach (var v in commonItems)
|
||||
{
|
||||
leftColumn[cnt] = v.Caption;
|
||||
rightColumn[cnt] = (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
/// Determine left column width
|
||||
float leftColWidth = 0;
|
||||
foreach (var paragraph in leftColumn)
|
||||
{
|
||||
string[] lines = paragraph.Split(new char[] { '~' });
|
||||
foreach (var line in lines)
|
||||
{
|
||||
float itemWidth = Measure(e, paragraph, this.font).Width;
|
||||
if (itemWidth > leftColWidth)
|
||||
{
|
||||
leftColWidth = itemWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Write aligned columns
|
||||
for (int i = 0; i < Math.Min(leftColumn.Length, rightColumn.Length); i++)
|
||||
{
|
||||
PrintAt(e, lMargin, commonTop + spacingOne * i, leftColWidth, leftColumn[i], this.font, commonItems[i].Alignment);
|
||||
PrintAt(e, lMargin + leftColWidth + GapBetweenCommonColumns, commonTop + spacingOne * i, 0, rightColumn[i], this.font, Alignment.Left);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///--------
|
||||
/// Body
|
||||
///--------
|
||||
|
||||
/// This variable represents the top coordinate of the area where WM results are printed
|
||||
/// and it is updated (increased by) the value returned by PrintXyzWM() - the section size.
|
||||
float nextTableTop = (pageNr == 1) ? bodyTop : cfg.TopMargin;
|
||||
|
||||
if (tablesOnFirstPage > 0 || pageNr == 2)
|
||||
{
|
||||
nextTableTop += PrintWMs(e, batch.WaterMeters, nextTableTop);
|
||||
}
|
||||
|
||||
e.HasMorePages = (nrPages > 1) && (pageNr == 1);
|
||||
|
||||
///----------------
|
||||
/// Below items
|
||||
///----------------
|
||||
for (int n = 1; n <= 3; n++)
|
||||
{
|
||||
IList<WMeterRsltItemSpec> belowItems;
|
||||
float lMargin;
|
||||
switch (n)
|
||||
{
|
||||
default:
|
||||
case 1: belowItems = belowItems1; lMargin = leftMarginBelow1; break;
|
||||
case 2: belowItems = belowItems2; lMargin = leftMarginBelow2; break;
|
||||
case 3: belowItems = belowItems3; lMargin = leftMarginBelow3; break;
|
||||
}
|
||||
|
||||
if (belowItems.Count == 0) continue; /// Below part is empty
|
||||
|
||||
string[] leftColumn = new string[belowItems.Count];
|
||||
string[] rightColumn = new string[belowItems.Count];
|
||||
|
||||
int cnt = 0;
|
||||
foreach (var v in belowItems)
|
||||
{
|
||||
leftColumn[cnt] = v.Caption;
|
||||
rightColumn[cnt] = (batch.WaterMeters.Count > 0) ? v.Print(batch.WaterMeters[0]) : string.Empty;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
/// Determine left column width
|
||||
float leftColWidth = 0;
|
||||
foreach (var paragraph in leftColumn)
|
||||
{
|
||||
string[] lines = paragraph.Split(new char[] { '~' });
|
||||
foreach (var line in lines)
|
||||
{
|
||||
float itemWidth = e.Graphics.MeasureString(paragraph, font).Width + 1;
|
||||
if (itemWidth > leftColWidth) leftColWidth = itemWidth;
|
||||
}
|
||||
}
|
||||
|
||||
/// Write aligned columns
|
||||
for (int i = 0; i < Math.Min(leftColumn.Length, rightColumn.Length); i++)
|
||||
{
|
||||
PrintAt(e, lMargin, nextTableTop + spacingOne * i, leftColWidth, leftColumn[i], this.font, belowItems[i].Alignment);
|
||||
PrintAt(e, lMargin + leftColWidth + GapBetweenCommonColumns, nextTableTop + spacingOne * i, 0, rightColumn[i], this.font, Alignment.Left);
|
||||
}
|
||||
}
|
||||
|
||||
///----------
|
||||
/// Footer
|
||||
///----------
|
||||
float footerWidth = Measure(e, footer, font).Width;
|
||||
PrintAt(e, leftMargin + (printWidth - footerWidth) / 2, topMargin + printHeight - 2 * spacingOne, 0, footer, font, Alignment.Left);
|
||||
|
||||
string pageNrText = string.Format("{0} {1}/{2}", Strings.Page, pageNr++, nrPages);
|
||||
float pageNrWidth = e.Graphics.MeasureString(pageNrText, font).Width;
|
||||
PrintAt(e, leftMargin + (printWidth - pageNrWidth) / 2, topMargin + printHeight - spacingOne, 0, pageNrText, font, Alignment.Left);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Print one water meter results
|
||||
/// </summary>
|
||||
/// <param name="wm">Water meter</param>
|
||||
/// <param name="printedWMNr">Number of the water meter printed</param>
|
||||
/// <param name="top">Top coordinate of watermeter data</param>
|
||||
/// <returns>The height of the printed section</returns>
|
||||
float PrintWMs(System.Drawing.Printing.PrintPageEventArgs e,
|
||||
IList<Results.Entities.WaterMeter> wms, float top)
|
||||
{
|
||||
///
|
||||
/// Prepare table content
|
||||
///
|
||||
int tableColumnsCount = selectedItems.Count;
|
||||
///
|
||||
string[] tableHeader = new string[tableColumnsCount];
|
||||
IList<string[]> tableRows = new List<string[]>();
|
||||
Alignment[] itemAlignment = new Alignment[tableColumnsCount];
|
||||
///
|
||||
for (int i = 0; i < tableColumnsCount; i++)
|
||||
{
|
||||
tableHeader[i] = selectedItems[i].Caption;
|
||||
itemAlignment[i] = selectedItems[i].Alignment;
|
||||
}
|
||||
///
|
||||
WMeterRsltItemSpec.TableRowNr = 0;
|
||||
foreach (var wm in wms)
|
||||
{
|
||||
if (!cfg.GoodOnly || wm.Passed)
|
||||
{
|
||||
string[] oneTableRow = new string[tableColumnsCount];
|
||||
WMeterRsltItemSpec.TableRowNr++;
|
||||
|
||||
for (int i = 0; i < tableColumnsCount; i++)
|
||||
{
|
||||
WMeterRsltItemSpec.TableColumnNr = i + 1;
|
||||
oneTableRow[i] = selectedItems[i].Print(wm).Split(new char[] { '|' })[0]; /// Strip color information
|
||||
}
|
||||
|
||||
tableRows.Add(oneTableRow);
|
||||
}
|
||||
}
|
||||
|
||||
return DrawTable(e, leftMargin, top, tableHeader, tableRows, itemAlignment);
|
||||
}
|
||||
|
||||
|
||||
float DrawTable(System.Drawing.Printing.PrintPageEventArgs e, float left, float top, string[] header, IList<string[]> rows, Alignment[] alignment)
|
||||
{
|
||||
int tblColumnsCount = header.Length;
|
||||
|
||||
float[] columnWidth = new float[tblColumnsCount];
|
||||
float[] columnPos = new float[tblColumnsCount + 1];
|
||||
columnPos[0] = left;
|
||||
|
||||
///
|
||||
/// Measure table column widths and header height
|
||||
///
|
||||
float headerHeight = 0;
|
||||
for (int i = 0; i < tblColumnsCount; i++)
|
||||
{
|
||||
SizeF size = Measure(e, header[i], headerFont);
|
||||
columnWidth[i] = size.Width;
|
||||
if (size.Height > headerHeight) headerHeight = size.Height;
|
||||
|
||||
foreach (var tableRow in rows)
|
||||
{
|
||||
float width = Measure(e, tableRow[i], font).Width + 1;
|
||||
if (width > columnWidth[i]) columnWidth[i] = width;
|
||||
}
|
||||
columnPos[i + 1] = columnPos[i] + columnWidth[i] + GapBetweenTableColumns;
|
||||
}
|
||||
|
||||
float tableLeftX = columnPos[0];
|
||||
float tableRightX = columnPos[tblColumnsCount] - GapBetweenTableColumns;
|
||||
|
||||
/// Horizontal line
|
||||
float horY = top + 1.5f * spacingOne4Header;
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY));
|
||||
|
||||
///
|
||||
/// Draw table header
|
||||
///
|
||||
for (int i = 0; i < tblColumnsCount; i++)
|
||||
{
|
||||
PrintAt(e, columnPos[i],
|
||||
top + 1.7f * spacingOne4Header,
|
||||
columnWidth[i],
|
||||
header[i],
|
||||
headerFont,
|
||||
Alignment.Center);
|
||||
}
|
||||
/// Horizontal line
|
||||
horY = top + 2.1f * spacingOne4Header + headerHeight;
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY));
|
||||
|
||||
///
|
||||
/// Draw table body
|
||||
///
|
||||
int rowsCount = 0;
|
||||
foreach (var oneTableRow in rows)
|
||||
{
|
||||
for (int i = 0; i < tblColumnsCount; i++)
|
||||
{
|
||||
PrintAt(e, columnPos[i],
|
||||
horY + 0.2f * spacingOne4Header + spacingOne * rowsCount,
|
||||
columnWidth[i],
|
||||
oneTableRow[i],
|
||||
font,
|
||||
alignment[i]);
|
||||
}
|
||||
rowsCount++;
|
||||
}
|
||||
|
||||
/// Horizontal line
|
||||
horY = horY + spacingOne * rowsCount + (3 * spacingOne4Header / 10);
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, 2), new PointF(tableLeftX, horY), new PointF(tableRightX, horY));
|
||||
|
||||
return horY - top + spacingOne;
|
||||
}
|
||||
|
||||
|
||||
static Font lastFont = null;
|
||||
static float lastSpacing = 0;
|
||||
|
||||
SizeF Measure(System.Drawing.Printing.PrintPageEventArgs e, string paragraph, Font font)
|
||||
{
|
||||
if (font != lastFont)
|
||||
{
|
||||
lastFont = font;
|
||||
lastSpacing = e.Graphics.MeasureString("Abcgq", font).Height;
|
||||
}
|
||||
|
||||
string[] lines = paragraph.Split(new char[] { '~' });
|
||||
float width = 0;
|
||||
foreach (var line in lines)
|
||||
{
|
||||
float lineWid = e.Graphics.MeasureString(line, font).Width;
|
||||
if (lineWid > width) width = lineWid;
|
||||
}
|
||||
|
||||
return new SizeF(width, 0.8f * lines.Length * lastSpacing + 0.2f);
|
||||
}
|
||||
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, float x, float y, float width, string paragraph, Font font, Alignment alignment)
|
||||
{
|
||||
SizeF size = Measure(e, paragraph, font);
|
||||
|
||||
string[] lines = paragraph.Split(new char[] { '~' });
|
||||
foreach (var line in lines)
|
||||
{
|
||||
float xx;
|
||||
switch (alignment)
|
||||
{
|
||||
default:
|
||||
case Alignment.Left: xx = x; break;
|
||||
case Alignment.Center: xx = x + (width - e.Graphics.MeasureString(line, font).Width) / 2; break;
|
||||
case Alignment.Right: xx = x + width - e.Graphics.MeasureString(line, font).Width; break;
|
||||
}
|
||||
e.Graphics.DrawString(line, font, Brushes.Black, new PointF(xx, y));
|
||||
y += 0.8f * lastSpacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Results.Output.Printers.Zapiska
|
||||
{
|
||||
public class ZapiskaPrinterCfg
|
||||
{
|
||||
public Config.Entities.PageOrientation PageOrientation;
|
||||
public int TopMargin;
|
||||
public int BottomMargin;
|
||||
public int LeftMargin;
|
||||
public string TitFntFml;
|
||||
public int TitFntSz;
|
||||
public int TitFntSty;
|
||||
public string HdrFntFml;
|
||||
public int HdrFntSz;
|
||||
public int HdrFntSty;
|
||||
public string BodyFntFml;
|
||||
public int BodyFntSz;
|
||||
public int BodyFntSty;
|
||||
public bool SupressPrinting; /// Bypass printing when true
|
||||
public bool GoodOnly;
|
||||
public System.Globalization.CultureInfo CultureInfo;
|
||||
|
||||
public string Header; /// =Title
|
||||
public int ColW0Pct;
|
||||
public int ColW1Pct;
|
||||
public int ColW2Pct;
|
||||
public string[] CommonItems1;
|
||||
public string[] CommonItems2;
|
||||
public string[] CommonItems3;
|
||||
public string[] SelectedItems;
|
||||
public int BelowW0Pct;
|
||||
public int BelowW1Pct;
|
||||
public int BelowW2Pct;
|
||||
public string[] BelowItems1;
|
||||
public string[] BelowItems2;
|
||||
public string[] BelowItems3;
|
||||
public string Footer;
|
||||
}
|
||||
}
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.14.611.0")]
|
||||
[assembly: AssemblyFileVersion("2.14.611.0")]
|
||||
[assembly: AssemblyVersion("2.17.741.0")]
|
||||
[assembly: AssemblyFileVersion("2.17.741.0")]
|
||||
|
||||
Generated
+218
-2
@@ -330,6 +330,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error flags.
|
||||
/// </summary>
|
||||
internal static string Error_flags {
|
||||
get {
|
||||
return ResourceManager.GetString("Error_flags", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to E rel. ref..
|
||||
/// </summary>
|
||||
@@ -339,6 +348,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed meters count.
|
||||
/// </summary>
|
||||
internal static string Failed_meters_count {
|
||||
get {
|
||||
return ResourceManager.GetString("Failed_meters_count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to fall.
|
||||
/// </summary>
|
||||
@@ -402,6 +420,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Legalizator.
|
||||
/// </summary>
|
||||
internal static string Legalizator {
|
||||
get {
|
||||
return ResourceManager.GetString("Legalizator", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to main.
|
||||
/// </summary>
|
||||
@@ -564,6 +591,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Passed meters count.
|
||||
/// </summary>
|
||||
internal static string Passed_meters_count {
|
||||
get {
|
||||
return ResourceManager.GetString("Passed_meters_count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PO.
|
||||
/// </summary>
|
||||
@@ -762,6 +798,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to sensitivity.
|
||||
/// </summary>
|
||||
internal static string sensitivity {
|
||||
get {
|
||||
return ResourceManager.GetString("sensitivity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Single.
|
||||
/// </summary>
|
||||
@@ -1032,6 +1077,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pressure difference measured by delta P meter - maximum during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_P_de_max {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_P_de_max", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pressure difference measured by delta P meter - mean.
|
||||
/// </summary>
|
||||
@@ -1041,6 +1095,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pressure difference measured by delta P meter - minimum during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_P_de_min {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_P_de_min", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pressure difference measured by delta P meter - at the start of the test.
|
||||
/// </summary>
|
||||
@@ -1077,6 +1140,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Maximum pressure at the outlet during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_P_dw_max {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_P_dw_max", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mean pressure at the outlet.
|
||||
/// </summary>
|
||||
@@ -1086,6 +1158,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Minimum pressure at the outlet during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_P_dw_min {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_P_dw_min", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pressure at the outlet at start of the test.
|
||||
/// </summary>
|
||||
@@ -1122,6 +1203,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Maximum pressure at the inlet during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_P_up_max {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_P_up_max", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mean pressure at the inlet.
|
||||
/// </summary>
|
||||
@@ -1131,6 +1221,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Minimum pressure at the inlet during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_P_up_min {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_P_up_min", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pressure at the inlet at start of the test.
|
||||
/// </summary>
|
||||
@@ -1140,6 +1239,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow obtained from the master meter - end.
|
||||
/// </summary>
|
||||
internal static string Tooltip_Q_end {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_Q_end", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow calculated from conventional true mass and time.
|
||||
/// </summary>
|
||||
@@ -1149,6 +1257,24 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow obtained from the master meter - max.
|
||||
/// </summary>
|
||||
internal static string Tooltip_Q_max {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_Q_max", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow obtained from the master meter - min.
|
||||
/// </summary>
|
||||
internal static string Tooltip_Q_min {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_Q_min", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow obtained from the master meter - actual.
|
||||
/// </summary>
|
||||
@@ -1167,6 +1293,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow obtained from the master meter - start.
|
||||
/// </summary>
|
||||
internal static string Tooltip_Q_start {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_Q_start", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow calculated from conventional true volume and the time.
|
||||
/// </summary>
|
||||
@@ -1176,6 +1311,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calculated density of water from table or formula at water density calibration temperature (r).
|
||||
/// </summary>
|
||||
internal static string Tooltip_Rho_Wa_calc {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_Rho_Wa_calc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Serial number of the meter.
|
||||
/// </summary>
|
||||
@@ -1239,6 +1383,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Maximum temperature at the diverter during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_di_max {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_T_di_max", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mean temperature at diverter.
|
||||
/// </summary>
|
||||
@@ -1248,6 +1401,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Minimum temperature at the diverter during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_di_min {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_T_di_min", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Temperature at the diverter at start of the test – first 4 measurements from the start.
|
||||
/// </summary>
|
||||
@@ -1284,6 +1446,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Maximum temperature at the outlet during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_dw_max {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_T_dw_max", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mean temperature at outlet.
|
||||
/// </summary>
|
||||
@@ -1293,6 +1464,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Minimum temperature at the outlet during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_dw_min {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_T_dw_min", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Temperature at the outlet at start of the test – first 4 measurements from the start.
|
||||
/// </summary>
|
||||
@@ -1302,6 +1482,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Temperature of water sample at water density calibration.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_rho_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_T_rho_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Actual temperature at the inlet.
|
||||
/// </summary>
|
||||
@@ -1312,7 +1501,7 @@ namespace Results.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Average temperature at the inlet.
|
||||
/// Looks up a localized string similar to Average temperature at the inlet during a test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_up_avg {
|
||||
get {
|
||||
@@ -1330,7 +1519,16 @@ namespace Results.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mean temperature at inlet.
|
||||
/// Looks up a localized string similar to Maximum temperature at the inlet during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_up_max {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_T_up_max", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mean temperature at inlet during a test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_up_me {
|
||||
get {
|
||||
@@ -1338,6 +1536,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Minimum temperature at the inlet during the test.
|
||||
/// </summary>
|
||||
internal static string Tooltip_T_up_min {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_T_up_min", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Temperature at the inlet at start of the test – first 4 measurements from the start.
|
||||
/// </summary>
|
||||
@@ -1401,6 +1608,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User description.
|
||||
/// </summary>
|
||||
internal static string User_description {
|
||||
get {
|
||||
return ResourceManager.GetString("User_description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User nr..
|
||||
/// </summary>
|
||||
|
||||
@@ -550,13 +550,13 @@
|
||||
<value>Actual temperature at the inlet</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_avg" xml:space="preserve">
|
||||
<value>Average temperature at the inlet</value>
|
||||
<value>Average temperature at the inlet during a test</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_en" xml:space="preserve">
|
||||
<value>Temperature at the inlet at end of the test – last 4 measurement before the end</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_me" xml:space="preserve">
|
||||
<value>Mean temperature at inlet</value>
|
||||
<value>Mean temperature at inlet during a test</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_st" xml:space="preserve">
|
||||
<value>Temperature at the inlet at start of the test – first 4 measurements from the start</value>
|
||||
@@ -627,4 +627,76 @@
|
||||
<data name="Density_correction" xml:space="preserve">
|
||||
<value>Density correction</value>
|
||||
</data>
|
||||
<data name="Error_flags" xml:space="preserve">
|
||||
<value>Error flags</value>
|
||||
</data>
|
||||
<data name="Legalizator" xml:space="preserve">
|
||||
<value>Legalizator</value>
|
||||
</data>
|
||||
<data name="User_description" xml:space="preserve">
|
||||
<value>User description</value>
|
||||
</data>
|
||||
<data name="Failed_meters_count" xml:space="preserve">
|
||||
<value>Failed meters count</value>
|
||||
</data>
|
||||
<data name="Passed_meters_count" xml:space="preserve">
|
||||
<value>Passed meters count</value>
|
||||
</data>
|
||||
<data name="sensitivity" xml:space="preserve">
|
||||
<value>sensitivity</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_end" xml:space="preserve">
|
||||
<value>Flow obtained from the master meter - end</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_max" xml:space="preserve">
|
||||
<value>Flow obtained from the master meter - max</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_min" xml:space="preserve">
|
||||
<value>Flow obtained from the master meter - min</value>
|
||||
</data>
|
||||
<data name="Tooltip_Q_start" xml:space="preserve">
|
||||
<value>Flow obtained from the master meter - start</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_max" xml:space="preserve">
|
||||
<value>Maximum pressure at the outlet during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_dw_min" xml:space="preserve">
|
||||
<value>Minimum pressure at the outlet during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_max" xml:space="preserve">
|
||||
<value>Maximum pressure at the inlet during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_up_min" xml:space="preserve">
|
||||
<value>Minimum pressure at the inlet during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_max" xml:space="preserve">
|
||||
<value>Maximum temperature at the diverter during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_di_min" xml:space="preserve">
|
||||
<value>Minimum temperature at the diverter during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_max" xml:space="preserve">
|
||||
<value>Maximum temperature at the outlet during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_dw_min" xml:space="preserve">
|
||||
<value>Minimum temperature at the outlet during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_max" xml:space="preserve">
|
||||
<value>Maximum temperature at the inlet during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_up_min" xml:space="preserve">
|
||||
<value>Minimum temperature at the inlet during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_max" xml:space="preserve">
|
||||
<value>Pressure difference measured by delta P meter - maximum during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_P_de_min" xml:space="preserve">
|
||||
<value>Pressure difference measured by delta P meter - minimum during the test</value>
|
||||
</data>
|
||||
<data name="Tooltip_Rho_Wa_calc" xml:space="preserve">
|
||||
<value>Calculated density of water from table or formula at water density calibration temperature (r)</value>
|
||||
</data>
|
||||
<data name="Tooltip_T_rho_0" xml:space="preserve">
|
||||
<value>Temperature of water sample at water density calibration</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -429,4 +429,13 @@
|
||||
<data name="VName_Vol" xml:space="preserve">
|
||||
<value>Объем</value>
|
||||
</data>
|
||||
<data name="No" xml:space="preserve">
|
||||
<value>Нет</value>
|
||||
</data>
|
||||
<data name="Yes" xml:space="preserve">
|
||||
<value>Да</value>
|
||||
</data>
|
||||
<data name="Water_Meter" xml:space="preserve">
|
||||
<value>Счетчик воды</value>
|
||||
</data>
|
||||
</root>
|
||||
+11
-3
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;RUM_MOB;LANG_RO</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -27,7 +27,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;RUM_MOB;LANG_RO</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -107,6 +107,14 @@
|
||||
<Compile Include="Output\Printers\Munich\MunichPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\OnePerMeter\OnePerMeterPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\OnePerMeter\OnePerMeterPrinterCfg.cs" />
|
||||
<Compile Include="Output\Printers\Zapiska\ZapiskaPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\Zapiska\ZapiskaPrinterCfg.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ItemSpec.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
@@ -133,9 +141,9 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="FileWriters\" />
|
||||
<Folder Include="Output\FileWriters\Basic\" />
|
||||
<Folder Include="Output\FileWriters\Enhanced\" />
|
||||
<Folder Include="Output\FileWriters\OneFilePerMeter\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Forms\BatchResultsDlg.resx">
|
||||
|
||||
@@ -75,5 +75,86 @@ namespace Results
|
||||
}
|
||||
else return value.ToString();
|
||||
}
|
||||
|
||||
|
||||
public static string SignificantDigitsToFmt(double value, int sigDigits)
|
||||
{
|
||||
if (sigDigits == 5)
|
||||
{
|
||||
if (value >= 9999.5 || value < -9999.5) return "F0";
|
||||
else if (value >= 999.95 || value < -999.95) return "F1";
|
||||
else if (value >= 99.995 || value < -99.995) return "F2";
|
||||
else if (value >= 9.9995 || value < -9.9995) return "F3";
|
||||
else if (value >= 0.99995 || value < -0.99995) return "F4";
|
||||
else if (value >= 0.099995 || value < -0.099995) return "F5";
|
||||
else if (value >= 0.0099995 || value < -0.0099995) return "F6";
|
||||
else if (value >= 0.00099995 || value < -0.00099995) return "F7";
|
||||
else if (value >= 0.000099995 || value < -0.000099995) return "F8";
|
||||
else return "F9";
|
||||
}
|
||||
else if (sigDigits == 4)
|
||||
{
|
||||
if (value >= 999.5 || value < -999.5) return "F0";
|
||||
else if (value >= 99.95 || value < -99.95) return "F1";
|
||||
else if (value >= 9.995 || value < -9.995) return "F2";
|
||||
else if (value >= 0.9995 || value < -0.9995) return "F3";
|
||||
else if (value >= 0.09995 || value < -0.09995) return "F4";
|
||||
else if (value >= 0.009995 || value < -0.009995) return "F5";
|
||||
else if (value >= 0.0009995 || value < -0.0009995) return "F6";
|
||||
else if (value >= 0.00009995 || value < -0.00009995) return "F7";
|
||||
else return "F8";
|
||||
}
|
||||
else if (sigDigits == 3)
|
||||
{
|
||||
if (value >= 99.5 || value < -99.5) return "F0";
|
||||
else if (value >= 9.95 || value < -9.95) return "F1";
|
||||
else if (value >= 0.995 || value < -0.995) return "F2";
|
||||
else if (value >= 0.0995 || value < -0.0995) return "F3";
|
||||
else if (value >= 0.00995 || value < -0.00995) return "F4";
|
||||
else if (value >= 0.000995 || value < -0.000995) return "F5";
|
||||
else if (value >= 0.0000995 || value < -0.0000995) return "F6";
|
||||
else return "F7";
|
||||
}
|
||||
else if (sigDigits == 2)
|
||||
{
|
||||
if (value >= 9.5 || value < -9.5) return "F0";
|
||||
else if (value >= 0.95 || value < -0.95) return "F1";
|
||||
else if (value >= 0.095 || value < -0.095) return "F2";
|
||||
else if (value >= 0.0095 || value < -0.0095) return "F3";
|
||||
else if (value >= 0.00095 || value < -0.00095) return "F4";
|
||||
else if (value >= 0.000095 || value < -0.000095) return "F5";
|
||||
else return "F6";
|
||||
}
|
||||
else /// if (sigDigits == 1)
|
||||
{
|
||||
if (value >= 0.95 || value < -0.95) return "F0";
|
||||
else if (value >= 0.095 || value < -0.095) return "F1";
|
||||
else if (value >= 0.0095 || value < -0.0095) return "F2";
|
||||
else if (value >= 0.00095 || value < -0.00095) return "F3";
|
||||
else if (value >= 0.000095 || value < -0.000095) return "F4";
|
||||
else return "F5";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts ErrorFlags integer to string. Supports up to 31 flags (E1..E31).
|
||||
/// </summary>
|
||||
/// <param name="errorFlags">Input</param>
|
||||
/// <returns>Output string</returns>
|
||||
public static string ErrorFlagsStr(int errorFlags)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
if ((errorFlags & (1 << i)) != 0)
|
||||
{
|
||||
sb.Append("E");
|
||||
sb.Append(i + 1);
|
||||
sb.Append(" ");
|
||||
}
|
||||
}
|
||||
return sb.ToString().TrimEnd();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+324
-181
@@ -7,6 +7,7 @@ using Config;
|
||||
using Config.Entities;
|
||||
using Results.Entities;
|
||||
using Results.Resources;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
@@ -42,6 +43,11 @@ namespace Results
|
||||
return item2;
|
||||
}
|
||||
|
||||
|
||||
public static double RealDensity;
|
||||
public static double AtTemperature;
|
||||
|
||||
|
||||
///
|
||||
/// Function to pick a MeterTestResult field and convert it into a string
|
||||
///
|
||||
@@ -56,31 +62,33 @@ namespace Results
|
||||
}
|
||||
public string Print(WaterMeter waterMeterResult, string testId)
|
||||
{
|
||||
string str = printDlgt(waterMeterResult, testId, Units, Format, Precision);
|
||||
if (str == null) str = string.Empty;
|
||||
try
|
||||
{
|
||||
string str = printDlgt(waterMeterResult, testId, Units, Format, Precision);
|
||||
if (str == null) str = string.Empty;
|
||||
|
||||
if (!string.IsNullOrEmpty(Format))
|
||||
{
|
||||
str = string.Format(Format, str);
|
||||
int len = str.Length;
|
||||
if (Width == 0 || len >= Width)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
else if (Alignment == Config.Entities.Alignment.Left)
|
||||
{
|
||||
return str + new string(' ', Width - len);
|
||||
}
|
||||
else if (Alignment == Config.Entities.Alignment.Right)
|
||||
{
|
||||
return new string(' ', Width - len) + str;
|
||||
}
|
||||
else // Alignment.Center or Alignment.Justified
|
||||
{
|
||||
int nrSpaces = Width - len;
|
||||
return new string(' ', nrSpaces / 2) + str + new string(' ', nrSpaces - (nrSpaces / 2));
|
||||
}
|
||||
}
|
||||
|
||||
int len = str.Length;
|
||||
if (Width == 0 || len >= Width)
|
||||
catch (Exception)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
else if (Alignment == Config.Entities.Alignment.Left)
|
||||
{
|
||||
return str + new string(' ', Width - len);
|
||||
}
|
||||
else if (Alignment == Config.Entities.Alignment.Right)
|
||||
{
|
||||
return new string(' ', Width - len) + str;
|
||||
}
|
||||
else // Alignment.Center or Alignment.Justified
|
||||
{
|
||||
int nrSpaces = Width - len;
|
||||
return new string(' ', nrSpaces / 2) + str + new string(' ', nrSpaces - (nrSpaces / 2));
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +104,10 @@ namespace Results
|
||||
Quantity = quantity;
|
||||
Category = category;
|
||||
this.printDlgt = printDlgt;
|
||||
|
||||
Format = string.Empty;
|
||||
Precision = string.Empty;
|
||||
TestID = string.Empty;
|
||||
}
|
||||
|
||||
///
|
||||
@@ -110,19 +122,11 @@ namespace Results
|
||||
Quantity = quantity;
|
||||
Category = category;
|
||||
this.printDlgt = printDlgt;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get precision string
|
||||
/// </summary>
|
||||
/// <param name="p1">Parameter</param>
|
||||
/// <param name="p2">Default value when p1 is empty</param>
|
||||
/// <returns>Precision</returns>
|
||||
static string GetPr(string p1, string p2)
|
||||
{
|
||||
return string.IsNullOrEmpty(p1) ? p2 : p1;
|
||||
}
|
||||
Format = string.Empty;
|
||||
Precision = string.Empty;
|
||||
TestID = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
/// Static list of all available items
|
||||
@@ -136,218 +140,352 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.String, "String", "", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => f));
|
||||
|
||||
/// Common
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test, Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.ProcedureName()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_number, Strings.Batch_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.BatchNr().ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_method, Strings.Test_method + " *", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test + "()", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.ProcedureName())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_number, Strings.Batch_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.BatchNr())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_method, Strings.Test_method + "()", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method())));
|
||||
|
||||
///
|
||||
/// Volume
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TargetVolume()).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, string.Format("{0} Mt. ()", Strings.VName_Vol), Strings.Tooltip_Vol_Mt, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, string.Format("{0} rm ()", Strings.VName_Vol), Strings.Tooltip_Vol_rm, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeRef).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.main), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.aux), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).TargetVolume())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, string.Format("{0} Mt. ()", Strings.VName_Vol), Strings.Tooltip_Vol_Mt, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, string.Format("{0} rm ()", Strings.VName_Vol), Strings.Tooltip_Vol_rm, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeRef)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.main), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.aux), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd)));
|
||||
|
||||
///
|
||||
/// Mass
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start_raw, string.Format("{0} ST raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).MassStartRaw).ToString(GetPr(p, "F4"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start, string.Format("{0} ST ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).MassStart).ToString(GetPr(p, "F4"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end_raw, string.Format("{0} EN raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).MassEndRaw).ToString(GetPr(p, "F4"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end, string.Format("{0} EN ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).MassEnd).ToString(GetPr(p, "F4"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass, string.Format("{0} ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).MassEnd - w.GetTestRslt(t).MassStart).ToString(GetPr(p, "F4"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start_raw, string.Format("{0} ST raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).MassStartRaw)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start, string.Format("{0} ST ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).MassStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end_raw, string.Format("{0} EN raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).MassEndRaw)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end, string.Format("{0} EN ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).MassEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass, string.Format("{0} ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).MassEnd - w.GetTestRslt(t).MassStart)));
|
||||
|
||||
///
|
||||
/// Density
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density, Strings.Density + " ()", Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).DensityOut.ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density_correction, Strings.Density_correction + " ()", Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => w.Batch.DensityCorr.ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density, Strings.Density + " ()", Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).DensityOut)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density_correction, Strings.Density_correction + " ()", Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.Batch.DensityCorr))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Rho_Wa_calc, string.Format("{0} of sample", Strings.Density), Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", RealDensity)));
|
||||
|
||||
///
|
||||
/// Time (duration), date and time
|
||||
/// Date and time
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_start_time, Strings.T_start + "()", Quantity.DateTime, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).StartTime.ToString() : string.Format(f, w.GetTestRslt(t).StartTime))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_end_time, Strings.T_end + "()", Quantity.DateTime, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).EndTime.ToString() : string.Format(f, w.GetTestRslt(t).EndTime))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_time, Strings.T_s + "()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(GetPr(p, "F2"))));
|
||||
|
||||
///
|
||||
/// Time (duration)
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_time, Strings.T_s + "()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TestTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Diverter_start_time, "Diverter start time ()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "F3", w.GetTestRslt(t).DiverterStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Diverter_end_time, "Diverter end time ()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "F3", w.GetTestRslt(t).DiverterEnd)));
|
||||
|
||||
///
|
||||
/// Flow
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_from, string.Format("{0} {1}", Strings.VName_Flow, Strings.from), Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qfrom().ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_to, string.Format("{0} {1}", Strings.VName_Flow, Strings.to), Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qto().ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, string.Format("{0} v r", Strings.VName_Flow), Strings.Tooltip_Q_v_r, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_rise, string.Format("{0} {1}", Strings.VName_Flow, Strings.rise), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QRise == 0) ? "-" : Utils.DoubleToStr(w.QRise, 4)) : ""));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_fall, string.Format("{0} {1}", Strings.VName_Flow, Strings.fall), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QFall == 0) ? "-" : Utils.DoubleToStr(w.QFall, 4)) : ""));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_mean, string.Format("{0} rim ()", Strings.VName_Flow), Strings.Tooltip_Q_rim, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowMean), 4)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_from, string.Format("{0} {1}", Strings.VName_Flow, Strings.from), Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).Qfrom())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_to, string.Format("{0} {1}", Strings.VName_Flow, Strings.to), Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).Qto())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, string.Format("{0} v r", Strings.VName_Flow), Strings.Tooltip_Q_v_r, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowVolume)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_mean, string.Format("{0} rim ()", Strings.VName_Flow), Strings.Tooltip_Q_rim, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_min, string.Format("{0} ref min ()", Strings.VName_Flow), Strings.Tooltip_Q_min, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMin)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_max, string.Format("{0} ref max ()", Strings.VName_Flow), Strings.Tooltip_Q_max, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowMax)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_start, string.Format("{0} ref start ()", Strings.VName_Flow), Strings.Tooltip_Q_start, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_ref_end, string.Format("{0} ref end ()", Strings.VName_Flow), Strings.Tooltip_Q_end, Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).FlowEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_rise, string.Format("{0} {1}", Strings.VName_Flow, Strings.rise), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QRise == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QRise)) : ""));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_fall, string.Format("{0} {1}", Strings.VName_Flow, Strings.fall), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QFall == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QFall)) : ""));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_sensitivity, string.Format("{0} {1}", Strings.VName_Flow, Strings.sensitivity), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QRise == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QRise)) : ""));
|
||||
|
||||
///
|
||||
/// Temperature
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_mean, string.Format("{0} UP ME ()", Strings.VName_Temp), Strings.Tooltip_T_up_me, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempUpMean).ToString(GetPr(p, "F2"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_start, string.Format("{0} UP ST ()", Strings.VName_Temp), Strings.Tooltip_T_up_st, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempUpStart).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_end, string.Format("{0} UP EN ()", Strings.VName_Temp), Strings.Tooltip_T_up_en, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempUpEnd).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_avg, string.Format("{0} UP avg ()", Strings.VName_Temp), Strings.Tooltip_T_up_avg, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).TempUpStart + w.GetTestRslt(t).TempUpEnd) / 2).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_mean, string.Format("{0} DW ME ()", Strings.VName_Temp), Strings.Tooltip_T_dw_me, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDownMean).ToString(GetPr(p, "F2"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_start, string.Format("{0} DW ST ()", Strings.VName_Temp), Strings.Tooltip_T_dw_st, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDownStart).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_end, string.Format("{0} DW EN ()", Strings.VName_Temp), Strings.Tooltip_T_dw_en, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDownEnd).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_avg, string.Format("{0} DW avg ()", Strings.VName_Temp), Strings.Tooltip_T_dw_avg, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).TempDownStart + w.GetTestRslt(t).TempDownEnd) / 2).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div, string.Format("{0} DI ME ()", Strings.VName_Temp), Strings.Tooltip_T_di_me, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivMean).ToString(GetPr(p, "F2"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_start, string.Format("{0} DI ST ()", Strings.VName_Temp), Strings.Tooltip_T_di_st, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivStart).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_end, string.Format("{0} DI EN ()", Strings.VName_Temp), Strings.Tooltip_T_di_en, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivEnd).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_avg, string.Format("{0} DI avg ()", Strings.VName_Temp), Strings.Tooltip_T_di_avg, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).TempDivStart + w.GetTestRslt(t).TempDivEnd) / 2).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_mean, string.Format("{0} UP ME ()", Strings.VName_Temp), Strings.Tooltip_T_up_me, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempUpMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_start, string.Format("{0} UP ST ()", Strings.VName_Temp), Strings.Tooltip_T_up_st, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempUpStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_end, string.Format("{0} UP EN ()", Strings.VName_Temp), Strings.Tooltip_T_up_en, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempUpEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_avg, string.Format("{0} UP avg ()", Strings.VName_Temp), Strings.Tooltip_T_up_avg, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).TempUpStart + w.GetTestRslt(t).TempUpEnd) / 2)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_min, string.Format("{0} UP min ()", Strings.VName_Temp), Strings.Tooltip_T_up_min, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempUpMin)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_max, string.Format("{0} UP max ()", Strings.VName_Temp), Strings.Tooltip_T_up_max, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempUpMax)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_mean, string.Format("{0} DW ME ()", Strings.VName_Temp), Strings.Tooltip_T_dw_me, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDownMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_start, string.Format("{0} DW ST ()", Strings.VName_Temp), Strings.Tooltip_T_dw_st, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDownStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_end, string.Format("{0} DW EN ()", Strings.VName_Temp), Strings.Tooltip_T_dw_en, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDownEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_avg, string.Format("{0} DW avg ()", Strings.VName_Temp), Strings.Tooltip_T_dw_avg, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).TempDownStart + w.GetTestRslt(t).TempDownEnd) / 2)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_min, string.Format("{0} DW min ()", Strings.VName_Temp), Strings.Tooltip_T_dw_min, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDownMin)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_max, string.Format("{0} DW max ()", Strings.VName_Temp), Strings.Tooltip_T_dw_max, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDownMax)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div, string.Format("{0} DI ME ()", Strings.VName_Temp), Strings.Tooltip_T_di_me, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDivMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_start, string.Format("{0} DI ST ()", Strings.VName_Temp), Strings.Tooltip_T_di_st, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDivStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_end, string.Format("{0} DI EN ()", Strings.VName_Temp), Strings.Tooltip_T_di_en, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDivEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_avg, string.Format("{0} DI avg ()", Strings.VName_Temp), Strings.Tooltip_T_di_avg, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).TempDivStart + w.GetTestRslt(t).TempDivEnd) / 2)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_min, string.Format("{0} DI min ()", Strings.VName_Temp), Strings.Tooltip_T_di_min, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDivMin)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_max, string.Format("{0} DI max ()", Strings.VName_Temp), Strings.Tooltip_T_di_max, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDivMax)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_rho_0, string.Format("{0} RO0", Strings.VName_Temp), Strings.Tooltip_T_rho_0, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", AtTemperature)));
|
||||
#if HEAT_METERS
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_mean, string.Format("{0} hi me", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom1).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_start, string.Format("{0} hi st", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom2).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_end, string.Format("{0} hi en", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom3).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_avg, string.Format("{0} hi av", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom2 + w.GetTestRslt(t).Custom3) / 2).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Lo_mean, string.Format("{0} lo me", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom6).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Lo_start, string.Format("{0} lo st", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom7).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Lo_end, string.Format("{0} lo en", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom8).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Lo_avg, string.Format("{0} lo av", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom7 + w.GetTestRslt(t).Custom8) / 2).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_mean, string.Format("{0} hi me", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (w.GetTestRslt(t).Custom1).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_start, string.Format("{0} hi st", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (w.GetTestRslt(t).Custom2).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_end, string.Format("{0} hi en", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (w.GetTestRslt(t).Custom3).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_avg, string.Format("{0} hi av", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : ((w.GetTestRslt(t).Custom2 + w.GetTestRslt(t).Custom3) / 2).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Lo_mean, string.Format("{0} lo me", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (w.GetTestRslt(t).Custom6).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Lo_start, string.Format("{0} lo st", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (w.GetTestRslt(t).Custom7).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Lo_end, string.Format("{0} lo en", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (w.GetTestRslt(t).Custom8).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Lo_avg, string.Format("{0} lo av", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : ((w.GetTestRslt(t).Custom7 + w.GetTestRslt(t).Custom8) / 2).ToString(GetPr(p, "F3"))));
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Pressure
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up, string.Format("{0} UP ME ()", Strings.VName_Press), Strings.Tooltip_P_up_me, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpMean).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_start, string.Format("{0} UP ST ()", Strings.VName_Press), Strings.Tooltip_P_up_st, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpStart).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_end, string.Format("{0} UP EN ()", Strings.VName_Press), Strings.Tooltip_P_up_en, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpEnd).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_avg, string.Format("{0} UP avg ()", Strings.VName_Press), Strings.Tooltip_P_up_avg, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).PressUpStart + w.GetTestRslt(t).PressUpEnd) / 2).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down, string.Format("{0} DW ME ()", Strings.VName_Press), Strings.Tooltip_P_dw_me, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownMean).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_start, string.Format("{0} DW ST ()", Strings.VName_Press), Strings.Tooltip_P_dw_st, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_end, string.Format("{0} DW EN ()", Strings.VName_Press), Strings.Tooltip_P_dw_en, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_avg, string.Format("{0} DW avg ()", Strings.VName_Press), Strings.Tooltip_P_dw_avg, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).PressDownStart + w.GetTestRslt(t).PressDownEnd) / 2).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_mean, string.Format("{0} DE ME ()", Strings.VName_Press), Strings.Tooltip_P_de_me, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaMean).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_start, string.Format("{0} DE ST ()", Strings.VName_Press), Strings.Tooltip_P_de_st, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaStart).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_end, string.Format("{0} DE EN ()", Strings.VName_Press), Strings.Tooltip_P_de_en, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaEnd).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_avg, string.Format("{0} DE avg ()", Strings.VName_Press), Strings.Tooltip_P_de_avg, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).PressDeltaStart + w.GetTestRslt(t).PressDeltaEnd) / 2).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up, string.Format("{0} UP ME ()", Strings.VName_Press), Strings.Tooltip_P_up_me, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressUpMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_start, string.Format("{0} UP ST ()", Strings.VName_Press), Strings.Tooltip_P_up_st, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressUpStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_end, string.Format("{0} UP EN ()", Strings.VName_Press), Strings.Tooltip_P_up_en, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressUpEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_avg, string.Format("{0} UP avg ()", Strings.VName_Press), Strings.Tooltip_P_up_avg, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).PressUpStart + w.GetTestRslt(t).PressUpEnd) / 2)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_min, string.Format("{0} UP min ()", Strings.VName_Press), Strings.Tooltip_P_up_min, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressUpMin)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_max, string.Format("{0} UP max ()", Strings.VName_Press), Strings.Tooltip_P_up_max, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressUpMax)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down, string.Format("{0} DW ME ()", Strings.VName_Press), Strings.Tooltip_P_dw_me, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDownMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_start, string.Format("{0} DW ST ()", Strings.VName_Press), Strings.Tooltip_P_dw_st, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDownStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_end, string.Format("{0} DW EN ()", Strings.VName_Press), Strings.Tooltip_P_dw_en, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDownEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_avg, string.Format("{0} DW avg ()", Strings.VName_Press), Strings.Tooltip_P_dw_avg, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).PressDownStart + w.GetTestRslt(t).PressDownEnd) / 2)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_min, string.Format("{0} DW min ()", Strings.VName_Press), Strings.Tooltip_P_dw_min, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDownMin)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_max, string.Format("{0} DW max ()", Strings.VName_Press), Strings.Tooltip_P_dw_max, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDownMax)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_mean, string.Format("{0} DE ME ()", Strings.VName_Press), Strings.Tooltip_P_de_me, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDeltaMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_start, string.Format("{0} DE ST ()", Strings.VName_Press), Strings.Tooltip_P_de_st, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDeltaStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_end, string.Format("{0} DE EN ()", Strings.VName_Press), Strings.Tooltip_P_de_en, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDeltaEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_avg, string.Format("{0} DE avg ()", Strings.VName_Press), Strings.Tooltip_P_de_avg, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).PressDeltaStart + w.GetTestRslt(t).PressDeltaEnd) / 2)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_min, string.Format("{0} DE min ()", Strings.VName_Press), Strings.Tooltip_P_de_min, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDeltaMin)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_max, string.Format("{0} DE max ()", Strings.VName_Press), Strings.Tooltip_P_de_max, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).PressDeltaMax)));
|
||||
|
||||
///
|
||||
/// Ambient temperature/pressure/humidity/Buoyancy
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, string.Format("{0} Amb M", Strings.VName_Temp), Strings.Tooltip_T_Amb_M, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbTempMean()).ToString(GetPr(p, "F1")) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbTempMean).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, string.Format("{0} Amb M", Strings.VName_Press), Strings.Tooltip_P_Amb_M, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbPressMean()).ToString(GetPr(p, "F0")) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbPressMean).ToString(GetPr(p, "F0"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, string.Format("{0} Amb M", Strings.VName_Humi), Strings.Tooltip_Hu_Amb_M, Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbHumiMean()).ToString(GetPr(p, "F1")) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbHumiMean).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Buoyancy, "Buoyancy ()", Quantity.Number, ItemCategory.TestResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.Batch.Buoyancy().ToString(GetPr(p, "F5")) : ((w.GetTestRslt(t) != null) ? w.GetTestRslt(t).Buoyancy.ToString(GetPr(p, "F5")) : "")));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, string.Format("{0} Amb M", Strings.VName_Temp), Strings.Tooltip_T_Amb_M, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.GetTestRslt(t) == null) ? w.Batch.AmbTempMean() : w.GetTestRslt(t).AmbTempMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, string.Format("{0} Amb M", Strings.VName_Press), Strings.Tooltip_P_Amb_M, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? w.Batch.AmbPressMean() : w.GetTestRslt(t).AmbPressMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, string.Format("{0} Amb M", Strings.VName_Humi), Strings.Tooltip_Hu_Amb_M, Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiMean() : w.GetTestRslt(t).AmbHumiMean)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_temp_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Temp), Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.GetTestRslt(t) == null) ? w.Batch.AmbTempStart() : w.GetTestRslt(t).AmbTempStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbTempEnd() : w.GetTestRslt(t).AmbTempEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_press_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Press), Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? w.Batch.AmbPressStart() : w.GetTestRslt(t).AmbPressStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbPressEnd() : w.GetTestRslt(t).AmbPressEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_humi_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Humi), Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiStart() : w.GetTestRslt(t).AmbHumiStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiEnd() : w.GetTestRslt(t).AmbHumiEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Buoyancy, "Buoyancy ()", Quantity.Number, ItemCategory.TestResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? FormatDbl(u, f, p, "V6", w.Batch.Buoyancy()) : ((w.GetTestRslt(t) != null) ? FormatDbl(u, f, p, "V6", (w.GetTestRslt(t).Buoyancy)) : "")));
|
||||
|
||||
///
|
||||
/// Error
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Lo, Strings.ErrLimLo + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimLo()).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Hi, Strings.ErrLimHi + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimHi()).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty, Strings.Uncertainty + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Uncertainty().ToString(GetPr(p, "F2"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, string.Format("{0} rel.ref. ()", Strings.VName_Error), Strings.Tooltip_E_rel_ref, Quantity.Error, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(GetPr(p, "F3"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Lo, Strings.ErrLimLo + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).ErrLimLo())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Hi, Strings.ErrLimHi + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).ErrLimHi())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty, Strings.Uncertainty + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).Uncertainty())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, string.Format("{0} rel.ref. ()", Strings.VName_Error), Strings.Tooltip_E_rel_ref, Quantity.Error, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).ErrorMaster)));
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(GetPr(p, "F2"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).Error)));
|
||||
#else
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(GetPr(p, "F2"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).Error)));
|
||||
#endif
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result, Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.PassedColorStr() : ((w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr())));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ResultOrErrorFlags, "Winiki lub E", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, string.IsNullOrEmpty(w.ErrorFlagstStr()) ? (w.WaterMeterData.Text4 + w.PassedColorStr()) : w.ErrorFlagstStr()))); /// PL specific result
|
||||
|
||||
///
|
||||
/// Water meter info
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeter_type, Strings.WM_Type, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.ProductName));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Producer, Strings.Producer, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Producer));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeter_type, Strings.WM_Type, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.ProductName)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Producer, Strings.Producer, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Producer)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.DN, "DN", Quantity.Length, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.L, "L", Quantity.Length, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mounting, Strings.Mounting, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Mounting.ToDescription()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.DN, "DN", Quantity.Length, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", w.WaterMeterData.DN)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.L, "L", Quantity.Length, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.WaterMeterData.L)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mounting, Strings.Mounting, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Mounting.ToDescription())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q4, "Q4_Qmax", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.WaterMeterData.Q4_Qmax)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q3, "Q3_Qn", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", w.WaterMeterData.Q3_Qn)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2, "Q2_Qt", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.WaterMeterData.Q2_Qt)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q1, "Q1_Qmin", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.WaterMeterData.Q1_Qmin)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q4, "Q4_Qmax", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q3, "Q3_Qn", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2, "Q2_Qt", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q1, "Q1_Qmin", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Metrological_class, Strings.MClass, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.MetrologicalClass)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Temperature_class, "Temperature class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.TemperatureClass.ToDescription())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pressure_loss_class, "Pressure loss class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.PressureLossClass.ToDescription())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_admissible_pressure, "Max. admissible pressure", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.MaxAdmissiblePressure.ToDescription())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_profile_sensitivity_class, "Flow profile sensitivity class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.FlowProfileSensitivityClass.ToDescription())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Approval_info, Strings.Approval, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.ApprovalInfo)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Certificate, "Certificate", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Certificate)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Metrological_class, Strings.MClass, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.MetrologicalClass));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Temperature_class, "Temperature class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.TemperatureClass.ToDescription()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pressure_loss_class, "Pressure loss class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.PressureLossClass.ToDescription()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_admissible_pressure, "Max. admissible pressure", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.MaxAdmissiblePressure.ToDescription()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_profile_sensitivity_class, "Flow profile sensitivity class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.FlowProfileSensitivityClass.ToDescription()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_liter, Strings.PulsesLiter, Quantity.PulsePerLtr, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtr)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Approval_info, Strings.Approval, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.ApprovalInfo));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Certificate, "Certificate", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Certificate));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_liter, Strings.PulsesLiter, Quantity.PulsePerLtr, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.WaterMeterData.PulsesPerLtr.ToString()
|
||||
: w.WaterMeterData.PulsesPerLtr.ToString(p)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text1, "Text1", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text1));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text2, "Text2", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text2));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text3, "Text3", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text3));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text4, "Text4", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text4));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text5, "Text5", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text5));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text1, "Text1", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Text1)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text2, "Text2", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Text2)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text3, "Text3", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Text3)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text4, "Text4", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Text4)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text5, "Text5", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Text5)));
|
||||
|
||||
/// Water meters results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr, Strings.sn, Strings.Tooltip_sn, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.SerialNr));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Purchase_order, Strings.PO, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.PurchaseOrder));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Year_of_production, Strings.Year, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.YearOfProduction.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.WM_Position, Strings.Pos, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.WMPosition.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr, Strings.sn, Strings.Tooltip_sn, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.SerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Purchase_order, Strings.PO, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.PurchaseOrder)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Year_of_production, Strings.Year, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.YearOfProduction)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.WM_Position, Strings.Pos, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.WMPosition)));
|
||||
|
||||
/// Water meters results (single)
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state, Strings.End_state, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.EndState));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses, Strings.Pulses + "()", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMeter.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses__liter, Strings.PulsesLiter + "()", Quantity.PulsePerLtr, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t).PulsesPerLiter.ToString()
|
||||
: w.GetMeterTestRslt(t).PulsesPerLiter.ToString(p))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_pulses, Strings.RefPulses + "()", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMaster.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state, Strings.End_state, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.EndState)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses, Strings.Pulses + "()", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "F0", w.GetMeterTestRslt(t).PulsesMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_pulses, Strings.RefPulses + "()", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "F1", w.GetMeterTestRslt(t).PulsesMaster)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses__liter, Strings.PulsesLiter + "()", Quantity.PulsePerLtr, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).PulsesPerLiter)));
|
||||
|
||||
/// Water meters results (combined)
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_main, Strings.Err_main + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).Error.ToString() : w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).Error.ToString(p))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_aux, Strings.Err_aux + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).Error.ToString()
|
||||
: w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).Error.ToString(p))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr_main, string.Format("{0} {1}", Strings.sn, Strings.main), Strings.Tooltip_sn_main, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.SerialNr));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr_aux, string.Format("{0} {1}", Strings.sn, Strings.aux), Strings.Tooltip_sn_aux, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.SerialNrAux));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state_main, Strings.EndState_main, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.EndState));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state_aux, Strings.EndState_aux, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.EndStateAux));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_main, Strings.Err_main + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).Error)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_aux, Strings.Err_aux + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).Error)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr_main, string.Format("{0} {1}", Strings.sn, Strings.main), Strings.Tooltip_sn_main, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.SerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr_aux, string.Format("{0} {1}", Strings.sn, Strings.aux), Strings.Tooltip_sn_aux, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.SerialNrAux)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state_main, Strings.EndState_main, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.EndState)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state_aux, Strings.EndState_aux, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.EndStateAux)));
|
||||
|
||||
/// Batch info
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_bench_ID, Strings.Bench, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.TestBenchId.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Program_version, Strings.Ver, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.ProgramVersion));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_name, Strings.User, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.UserName));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_nr, Strings.User_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.Batch.UserNumber.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.WatermetersStr));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Protocol_title, Strings.Protocol, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.ProtocolTitle));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString()
|
||||
: ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_bench_ID, Strings.Bench, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.TestBenchId.ToString())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Program_version, Strings.Ver, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.ProgramVersion)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_nr, Strings.User_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.Batch.UserNumber)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_name, Strings.User, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, Users.Entities.User.EncodedStrToUserName(w.Batch.UserName))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.User_description, Strings.User_description, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, Users.Entities.User.EncodedStrToFullName(w.Batch.UserName))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Legalizator, Strings.Legalizator, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, Users.Entities.User.EncodedStrToLegalizator(w.Batch.UserName))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.WatermetersStr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Protocol_title, Strings.Protocol, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.Batch.ProtocolTitle)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.WaterMeterData.PulsesPerLtr != 0) ? 1/w.WaterMeterData.PulsesPerLtr : 0)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_meters_count, Strings.Passed_meters_count, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.Batch.PassedMetersCount())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_count, Strings.Failed_meters_count, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.Batch.FailedMetersCount())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_seals_count, "Seals count of passed meters", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.Batch.PassedMetersCount() * int.Parse(w.WaterMeterData.Text5))));
|
||||
|
||||
/// Extra water meter data
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Result_code, Strings.Result_code, Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.ResultCode.ToString() : string.Format(f, w.ResultCode)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Remark, Strings.Remark, Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => w.Batch.Remark));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Meter_type, Strings.Meter_type, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Compound ? Strings.Compound : (w.WaterMeterData.HeatMeter ? Strings.Heat_meter : Strings.Single)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Result_code, Strings.Result_code, Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.ResultCode)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Remark, Strings.Remark, Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatStr(f, w.Batch.Remark)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Meter_type, Strings.Meter_type, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Compound ? Strings.Compound : (w.WaterMeterData.HeatMeter ? Strings.Heat_meter : Strings.Single))));
|
||||
|
||||
#if HEAT_METERS
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy, Strings.Energy + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeMeter).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_energy, Strings.Energy_ref + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeRef).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy, Strings.Energy + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeMeter).ToString(GetPr(p, "F1"))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_energy, Strings.Energy_ref + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeRef).ToString(GetPr(p, "F1"))));
|
||||
#endif
|
||||
|
||||
#if IPERL
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.OrigCalibFactor, "iPerl OrigCalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => (w.OrigCalibFactor.ToString())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactor, "iPerl CalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => (w.CalibFactor.ToString())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2ErrWOCorrection, "iPerl Q2ErrWOCorrection", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2ErrWOCorrection.ToString(GetPr(p, "F2")))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrectionDone, "iPerl Q2CorrectionDone", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrectionDone ? "yes" : "no")));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2CorrRFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrRFlow.ToString())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2CorrLFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrLFlow.ToString())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrFlowRight, "iPerl Q2CorrFlowRight", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrFlowRight.ToString())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.FW_Version, "iPerl FW version", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => (w.FWVersion)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.OrigCalibFactor, "iPerl OrigCalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.OrigCalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactor, "iPerl CalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.CalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2ErrWOCorrection, "iPerl Q2ErrWOCorrection", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Q2ErrWOCorrection)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrectionDone, "iPerl Q2CorrectionDone", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrectionDone ? Strings.Yes : Strings.No)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2CorrRFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRFlow)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2CorrLFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLFlow)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrFlowRight, "iPerl Q2CorrFlowRight", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrFlowRight)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.FW_Version, "iPerl FW version", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.FWVersion)));
|
||||
#endif
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestDone, Strings.Test_done + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) != null && w.GetMeterTestRslt(t).TestDone) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestDone, Strings.Test_done + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) != null && w.GetMeterTestRslt(t).TestDone) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPassed, Strings.Test_passed + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) != null && w.GetMeterTestRslt(t).Passed) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlags, Strings.Error_flags + "()", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) != null) ? w.GetTestRslt(t).ErrorFlagsStr() : w.ErrorFlagstStr())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E1, "E1 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0001) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E2, "E2 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0002) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E3, "E3 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0004) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E4, "E4 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0008) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E5, "E5 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0010) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E6, "E6 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0020) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E7, "E7 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0040) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E8, "E8 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0080) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E9, "E9 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0100) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E10, "E10 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0200) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E11, "E11 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0400) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E12, "E12 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x0800) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E13, "E13 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x1000) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E14, "E14 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x2000) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E15, "E15 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x4000) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E16, "E16 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x8000) != 0) ? Strings.Yes : Strings.No));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_row_nr, "Table row #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableRowNr.ToString() : string.Format(f, TableRowNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_column_nr, "Table column #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableColumnNr.ToString() : string.Format(f, TableColumnNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.WMRemark, string.Format("{0} {1}", Strings.Water_Meter, Strings.Remark), Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.Remark)));
|
||||
}
|
||||
|
||||
/// To be updated by Output.FileWriter or Output.Printer
|
||||
public static int TableRowNr;
|
||||
public static int TableColumnNr;
|
||||
|
||||
|
||||
public static string FormatStr(string format, string value)
|
||||
{
|
||||
return string.IsNullOrEmpty(format) ? value : string.Format(format, value);
|
||||
}
|
||||
|
||||
public static string FormatInt(string format, int value)
|
||||
{
|
||||
return string.IsNullOrEmpty(format) ? value.ToString() : string.Format(format, value);
|
||||
}
|
||||
|
||||
public static string FormatDbl(Config.Unit units, string format, string precisionOrEmpty, string dfltPrecision, double v)
|
||||
{
|
||||
return FormatDbl(units, format, precisionOrEmpty, dfltPrecision, v, CultureInfo.CurrentCulture);
|
||||
}
|
||||
///
|
||||
public static string FormatDbl(Config.Unit units, string format, string precisionOrEmpty, string dfltPrecision, double v, CultureInfo ci)
|
||||
{
|
||||
double val = Config.Units.ConvertTo(units, v);
|
||||
|
||||
string precision = string.IsNullOrEmpty(precisionOrEmpty) ? dfltPrecision : precisionOrEmpty;
|
||||
|
||||
/// Modify "Vx" precision specification to an appropriate "Fx" format specification
|
||||
if (precision.Contains("V"))
|
||||
{
|
||||
int significantDigits;
|
||||
if (int.TryParse(precision.Substring(1), out significantDigits))
|
||||
{
|
||||
precision = Utils.SignificantDigitsToFmt(val, significantDigits);
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(format))
|
||||
{
|
||||
if (-float.Epsilon <= val && val <= float.Epsilon)
|
||||
return "0";
|
||||
else
|
||||
return val.ToString(precision, ci);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (-float.Epsilon <= val && val <= float.Epsilon)
|
||||
return string.Format(format, "0");
|
||||
else
|
||||
return string.Format(format, val.ToString(precision, ci));
|
||||
}
|
||||
}
|
||||
|
||||
public static string FormatDbl(Config.Unit units, string format, string precisionOrEmpty, string dfltPrecision, double v1, double v2)
|
||||
{
|
||||
return FormatDbl(units, format, precisionOrEmpty, dfltPrecision, v1, v2, CultureInfo.CurrentCulture);
|
||||
}
|
||||
///
|
||||
public static string FormatDbl(Config.Unit units, string format, string precisionOrEmpty, string dfltPrecision, double v1, double v2, CultureInfo ci)
|
||||
{
|
||||
double val1 = Config.Units.ConvertTo(units, v1);
|
||||
double val2 = Config.Units.ConvertTo(units, v1);
|
||||
|
||||
string precision = string.IsNullOrEmpty(precisionOrEmpty) ? dfltPrecision : precisionOrEmpty;
|
||||
|
||||
/// Modify "Vx" precision specification to an appropriate "Fx" format specification
|
||||
if (precision.Contains("V"))
|
||||
{
|
||||
int significantDigits;
|
||||
if (int.TryParse(precision.Substring(1), out significantDigits))
|
||||
{
|
||||
precision = Utils.SignificantDigitsToFmt(val1, significantDigits);
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(format))
|
||||
{
|
||||
return string.Format("{0} {1}",
|
||||
(-float.Epsilon <= val1 && val1 <= float.Epsilon) ? "0" : val1.ToString(precision, ci),
|
||||
(-float.Epsilon <= val2 && val2 <= float.Epsilon) ? "0" : val2.ToString(precision, ci));
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format(format,
|
||||
(-float.Epsilon <= val1 && val1 <= float.Epsilon) ? "0" : val1.ToString(precision, ci),
|
||||
(-float.Epsilon <= val2 && val2 <= float.Epsilon) ? "0" : val2.ToString(precision, ci));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts a list of 'Output item specifications' to a string array
|
||||
/// </summary>
|
||||
@@ -359,12 +497,17 @@ namespace Results
|
||||
string[] result = new string[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (items[i].Caption == null) items[i].Caption = string.Empty;
|
||||
if (items[i].TestID == null) items[i].TestID = string.Empty;
|
||||
if (items[i].Format == null) items[i].Format = string.Empty;
|
||||
if (items[i].Precision == null) items[i].Precision = string.Empty;
|
||||
|
||||
result[i] = string.Format("{0}~{1}~{2}~{3}~{4}~{5}~{6}~{7}",
|
||||
items[i].Uid,
|
||||
items[i].Caption,
|
||||
items[i].Caption.Replace("~", "\n"),
|
||||
items[i].TestID,
|
||||
items[i].Units,
|
||||
items[i].Format,
|
||||
items[i].Format.Replace("~", "\n"),
|
||||
items[i].Precision,
|
||||
items[i].Width,
|
||||
items[i].Alignment);
|
||||
@@ -425,14 +568,14 @@ namespace Results
|
||||
///
|
||||
/// Load the new style results item specification
|
||||
///
|
||||
item.Caption = field[1];
|
||||
item.Caption = field[1].Replace("\n", "~");
|
||||
item.TestID = field[2];
|
||||
item.Units = 0;
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
{
|
||||
if (u.ToString().Equals(field[3])) { item.Units = u; break; }
|
||||
}
|
||||
item.Format = field[4];
|
||||
item.Format = field[4].Replace("\n", "~");
|
||||
item.Precision = field[5];
|
||||
item.Width = int.Parse(field[6]);
|
||||
item.Alignment = 0;
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.14.572.0")]
|
||||
[assembly: AssemblyFileVersion("2.14.572.0")]
|
||||
[assembly: AssemblyVersion("2.17.748.0")]
|
||||
[assembly: AssemblyFileVersion("2.17.748.0")]
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;RUM_MOB;LANG_RO</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -31,7 +31,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;RUM_MOB;LANG_RO</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBF", "TestBenchFramework\TBF.csproj", "{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA} = {0C0A1F4D-1363-4544-A7C5-196C76D26CCA}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "TBFSetup", "TBFSetup\TBFSetup.vdproj", "{4890DE5C-9F68-40D7-B075-92C8EAB79833}"
|
||||
EndProject
|
||||
@@ -30,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserManagement", "UserManag
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphLib", "GraphLib\GraphLib.csproj", "{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -126,6 +131,16 @@ Global
|
||||
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Release|x86.ActiveCfg = Release|x86
|
||||
{B2CD81B3-AF09-4978-996C-02EDB5F819B7}.Release|x86.Build.0 = Release|x86
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
@@ -9,6 +9,6 @@ namespace TBF.BenchControl
|
||||
/// A fraction of the tank volume that is considered to be safe.
|
||||
/// When the estimated test end tank volume exceeds this fraction, tank emptying is forced.
|
||||
/// </summary>
|
||||
public const float TankFullFactor = 0.9f;
|
||||
public const float TankFullFactor = 0.95f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,10 +27,23 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Database));
|
||||
public override string ToString() { return string.Format("Sensus-Oracle-Database({0})", Cfg.ToString(1)); }
|
||||
|
||||
const int Anbid_StaraTura = 4;
|
||||
|
||||
enum CurrentOp
|
||||
{
|
||||
None,
|
||||
CheckBarcodeScanning,
|
||||
WriteResults,
|
||||
}
|
||||
CurrentOp currentOp;
|
||||
bool opCompleted;
|
||||
bool anyError;
|
||||
|
||||
|
||||
///
|
||||
/// iPerls to verify
|
||||
///
|
||||
GenericDevices.IRegisterReader[] iperlHeads;
|
||||
|
||||
public static DatabaseCfg DBCfg;
|
||||
string separatorStr;
|
||||
|
||||
/// <summary>
|
||||
/// Result items to print
|
||||
@@ -47,6 +60,12 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
StreamWriter logger; /// Logs specified by LU
|
||||
|
||||
|
||||
const int Anbid_StaraTura = 4;
|
||||
|
||||
public static DatabaseCfg DBCfg;
|
||||
string separatorStr;
|
||||
|
||||
|
||||
///
|
||||
/// Information extracted from VT_PRUEFPUNKT_SOLL_SD for a given watermeter by query:
|
||||
/// SELECT * FROM VT_PRUEFPUNKT_SOLL_SD WHERE ANBID=4 AND ID_WZTyp=x AND Rev_WZTyp=y
|
||||
@@ -73,6 +92,8 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
{
|
||||
DBCfg = cfg as DatabaseCfg;
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
|
||||
switch (DBCfg.Separator)
|
||||
{
|
||||
default:
|
||||
@@ -211,6 +232,7 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
return string.Format("{0}{1}_{2}.log", directory, time.Hour.ToString("D2"), time.Minute.ToString("D2"));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file, Events: Event.ResultsWritten
|
||||
/// </summary>
|
||||
@@ -219,7 +241,12 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(Results.Entities.Batch batch)
|
||||
{
|
||||
this.batch = batch;
|
||||
if (currentOp != CurrentOp.None)
|
||||
throw new Exception("Sequence error");
|
||||
else
|
||||
currentOp = CurrentOp.WriteResults;
|
||||
|
||||
this.batch = batch;
|
||||
|
||||
string fname = GetLogFileName(batch.StartTime);
|
||||
|
||||
@@ -233,43 +260,81 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
log.ErrorFormat("Was not able to open LU log file {0}", fname);
|
||||
}
|
||||
|
||||
return this;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IOperation CheckBarcodeScanningOp(GenericDevices.IRegisterReader[] iperlHeads)
|
||||
{
|
||||
if (currentOp != CurrentOp.None)
|
||||
throw new Exception("Sequence error");
|
||||
else
|
||||
currentOp = CurrentOp.CheckBarcodeScanning;
|
||||
|
||||
this.iperlHeads = iperlHeads;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
}
|
||||
opCompleted = false;
|
||||
anyError = false;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsWritten or Event.Error</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (batch.WaterMeters.Count == 0) return Event.ResultsWritten;
|
||||
|
||||
bool anyError = false;
|
||||
if (currentOp == CurrentOp.WriteResults)
|
||||
{
|
||||
if (!opCompleted)
|
||||
{
|
||||
if (batch.WaterMeters.Count == 0) return Event.ResultsWritten;
|
||||
#if ORACLE_DB
|
||||
if (DBCfg.DebugLevel != DebugMode.Simulate && connection != null)
|
||||
{
|
||||
if (WriteResultsToDatabase(connection, batch, false) == Retv.Error) anyError = true;
|
||||
}
|
||||
if (DBCfg.DebugLevel != DebugMode.Simulate && connection != null)
|
||||
{
|
||||
if (WriteResultsToDatabase(connection, batch, false) == Retv.Error) anyError = true;
|
||||
}
|
||||
#endif
|
||||
WriteLogsToDisk(logger, batch);
|
||||
|
||||
WriteLogsToDisk(logger, batch);
|
||||
|
||||
if (anyError)
|
||||
{
|
||||
return Event.ResultsNotWritten;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
opCompleted = true;
|
||||
}
|
||||
|
||||
if (anyError)
|
||||
return Event.ResultsNotWritten;
|
||||
else
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
else if (currentOp == CurrentOp.CheckBarcodeScanning)
|
||||
{
|
||||
if (!opCompleted)
|
||||
{
|
||||
#if ORACLE_DB
|
||||
if (DBCfg.DebugLevel != DebugMode.Simulate && connection != null)
|
||||
{
|
||||
if (CheckBarcodeScanning(connection, iperlHeads) == Retv.Error) anyError = true; ;
|
||||
}
|
||||
#endif
|
||||
opCompleted = true;
|
||||
}
|
||||
|
||||
if (anyError)
|
||||
return Event.CheckNotDone;
|
||||
else
|
||||
return Event.CheckDone;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
@@ -433,7 +498,7 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
q2 = wMtr.GetMeterTestRslt(string.Format("Q2"));
|
||||
q3 = wMtr.GetMeterTestRslt(string.Format("Q3"));
|
||||
|
||||
logger.WriteLine(string.Empty);
|
||||
logger.WriteLine();
|
||||
logger.WriteLine(string.Format("[Zählerdaten_{0}]", i + 1));
|
||||
|
||||
if (wMtr == null || adj == null || q1 == null || q2 == null || q3 == null)
|
||||
@@ -544,7 +609,7 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
}
|
||||
|
||||
|
||||
logger.WriteLine(string.Empty);
|
||||
logger.WriteLine();
|
||||
logger.WriteLine("[Prüfdaten]");
|
||||
///
|
||||
logger.WriteLine(string.Format("Startzeit={0}", batch.StartTime.ToString("HH:mm:ss")));
|
||||
@@ -586,7 +651,7 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
logger.WriteLine(string.Format("MeldungZaehler={0}", 0)); /// 0
|
||||
|
||||
|
||||
logger.WriteLine(string.Empty);
|
||||
logger.WriteLine();
|
||||
logger.WriteLine("[allgemein]");
|
||||
///
|
||||
logger.WriteLine(string.Format("Prüfer={0}", batch.UserName));
|
||||
@@ -665,9 +730,50 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if ORACLE_DB
|
||||
public static Retv WriteResultsToDatabase(OracleConnection conn, Results.Entities.Batch batch, bool safeMode)
|
||||
public static Retv CheckBarcodeScanning(OracleConnection conn, GenericDevices.IRegisterReader[] iPerlHeads)
|
||||
{
|
||||
try
|
||||
{
|
||||
conn.Open(); /// Open the Oracle database
|
||||
|
||||
foreach (var rr in iPerlHeads)
|
||||
{
|
||||
//WaterMeters.iPerl.WaterMeter iPerlHead = rr as WaterMeters.iPerl.WaterMeter;
|
||||
|
||||
//if (iPerlHead != null)
|
||||
//{
|
||||
// OracleCommand cmd = new OracleCommand("select * from IP_ENDTEST_PD where PCBNUMBER = :1 and TESTSTATIONNAME = :2", conn);
|
||||
// OracleParameter param;
|
||||
// param = new OracleParameter("PCBNUMBER", OracleDbType.Varchar2); param.Value = iPerlHead.SerialNr; cmd.Parameters.Add(param);
|
||||
// param = new OracleParameter("TESTSTATIONNAME", OracleDbType.Varchar2); param.Value = "STAWL001"; cmd.Parameters.Add(param);
|
||||
|
||||
// bool exists = false; /// true = RF_Power record exists
|
||||
// OracleDataReader dr1 = cmd.ExecuteReader();
|
||||
// if (dr1.Read()) { exists = true; }
|
||||
// dr1.Close();
|
||||
|
||||
// if (!exists)
|
||||
// {
|
||||
// iPerlHead.CommFailed = true;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Barcode scanning records were not checked: {1}", exc.Message);
|
||||
|
||||
conn.Close();
|
||||
return Retv.Error;
|
||||
}
|
||||
|
||||
conn.Close();
|
||||
return Retv.OK;
|
||||
}
|
||||
|
||||
|
||||
public static Retv WriteResultsToDatabase(OracleConnection conn, Results.Entities.Batch batch, bool safeMode)
|
||||
{
|
||||
OracleTransaction transaction = null;
|
||||
|
||||
@@ -1044,7 +1150,7 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
"VT_Fernum, Pruefindex, PruefungsNr, ANBID, ID_WZTyp, Rev_WZTyp, Rev_WZPruefpunkt, " +
|
||||
"Q_WZ, Q_Fehler, Q_Best, NIZ, AnfangZStand, EndZStand, " +
|
||||
"KorrErrQok, KorrErrQ, KorrQWz, TIZ, Vol_WZ_US, TempMittel_US)" +
|
||||
" VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, 0, 0, 0, :14, 0, 0)", conn);
|
||||
" VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, 0, :14, 0, :15, 0, 0)", conn);
|
||||
OracleParameter parm;
|
||||
parm = new OracleParameter("VT_Fernum", OracleDbType.Varchar2); parm.Value = mtr.WaterMeter.SerialNr; cmd.Parameters.Add(parm); ///:1
|
||||
parm = new OracleParameter("Pruefindex", OracleDbType.Int32); parm.Value = max_Pruefindex; cmd.Parameters.Add(parm); ///:2
|
||||
@@ -1060,10 +1166,11 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
parm = new OracleParameter("AnfangZStand", OracleDbType.Double); parm.Value = mtr.VolumeStart; cmd.Parameters.Add(parm); ///:12
|
||||
parm = new OracleParameter("EndZStand", OracleDbType.Double); parm.Value = mtr.VolumeEnd; cmd.Parameters.Add(parm); ///:13
|
||||
/// KorrErrQok bool true = Q2 within limits, 'passed' in case of Q1, Q3, Q4
|
||||
/// KorrErrQ double 'Q2 error before correction' when correction done or 'Q2 error' when correction not done
|
||||
parm = new OracleParameter("KorrErrQ", OracleDbType.Double); parm.Value = Math.Min(100.0, Math.Max(-100.0, mtr.KorrErrQ)); cmd.Parameters.Add(parm); ///:14
|
||||
/// KorrErrQ double 'Q2 error before correction' when correction done or 'Q2 error' when correction not done
|
||||
/// = q2.WaterMeter.Q2CorrectionDone ? q2.WaterMeter.Q2ErrWOCorrection.ToString(Program.AltCulture) : q2.Error.ToString(Program.AltCulture)));
|
||||
/// KorrQWz double
|
||||
parm = new OracleParameter("TIZ", OracleDbType.Double); parm.Value = Math.Min(100000, mtr.TestTime); cmd.Parameters.Add(parm);
|
||||
parm = new OracleParameter("TIZ", OracleDbType.Double); parm.Value = Math.Min(100000, mtr.TestTime); cmd.Parameters.Add(parm); ///:15
|
||||
/// Vol_WZ_US
|
||||
/// TempMittel_US
|
||||
|
||||
|
||||
@@ -105,8 +105,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
if (Program.LocalSettings.LastMainSNTextsCount == TextBoxesCount &&
|
||||
Program.LocalSettings.LastAuxSNTextsCount == TextBoxesCount)
|
||||
{
|
||||
mainComboBoxes[i].Items.Add(Program.LocalSettings.LastMainSNTexts[i]);
|
||||
auxComboBoxes[i].Items.Add(Program.LocalSettings.LastAuxSNTexts[i]);
|
||||
mainComboBoxes[i].Items.Add((Program.LocalSettings.LastMainSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastMainSNTexts[i]);
|
||||
auxComboBoxes[i].Items.Add((Program.LocalSettings.LastAuxSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastAuxSNTexts[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,10 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString() { return string.Format("DataEntry.Combined({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin and the End form
|
||||
@@ -97,18 +100,20 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
@@ -132,7 +137,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.CompoundWMsCount, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.CompoundWMsCount, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
@@ -145,7 +150,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
mainStartStateStr[i] = wmStartStateStr[2 * i];
|
||||
auxStartStateStr[i] = wmStartStateStr[2 * i + 1];
|
||||
}
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.CompoundWMsCount, mainStartStateStr, auxStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.CompoundWMsCount, myRef.regReaders, mainStartStateStr, auxStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
@@ -19,20 +20,20 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount; /// Main + Aux water meter count as one (combined) water meter
|
||||
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] MainStartState;
|
||||
public float[] AuxStartState;
|
||||
public double[] MainStartState;
|
||||
public double[] AuxStartState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] MainStartStateStr;
|
||||
public readonly string[] AuxStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] MainEndState;
|
||||
public float[] AuxEndState;
|
||||
public double[] MainEndState;
|
||||
public double[] AuxEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
double refVolume;
|
||||
@@ -77,18 +78,19 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
public TestStartEndForm(int waterMetersCount, bool[] disabled)
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
MainStartState = new float[waterMetersCount];
|
||||
AuxStartState = new float[waterMetersCount];
|
||||
MainStartState = new double[waterMetersCount];
|
||||
AuxStartState = new double[waterMetersCount];
|
||||
MainStartStateStr = new string[waterMetersCount];
|
||||
AuxStartStateStr = new string[waterMetersCount];
|
||||
}
|
||||
@@ -103,13 +105,14 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] mainStartStateStr, string[] auxStartStateStr,
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] mainStartStateStr, string[] auxStartStateStr,
|
||||
bool[] disabled, double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
if (mainStartStateStr == null || mainStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'mainStartStateStr' argument"));
|
||||
this.MainStartStateStr = mainStartStateStr;
|
||||
@@ -123,8 +126,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
MainEndState = new float[waterMetersCount];
|
||||
AuxEndState = new float[waterMetersCount];
|
||||
MainEndState = new double[waterMetersCount];
|
||||
AuxEndState = new double[waterMetersCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -230,11 +233,11 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
if (mainEndTextBoxes[i].Visible && mainEndTextBoxes[i].Enabled)
|
||||
{
|
||||
MainEndState[i] = Utils.ParseUFloat(mainEndTextBoxes[i].Text);
|
||||
MainEndState[i] = Utils.ParseUDouble(mainEndTextBoxes[i].Text);
|
||||
}
|
||||
if (auxEndTextBoxes[i].Visible && auxEndTextBoxes[i].Enabled)
|
||||
{
|
||||
AuxEndState[i] = Utils.ParseUFloat(auxEndTextBoxes[i].Text);
|
||||
AuxEndState[i] = Utils.ParseUDouble(auxEndTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -245,12 +248,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
if (mainStartTextBoxes[i].Visible && mainStartTextBoxes[i].Enabled)
|
||||
{
|
||||
MainStartStateStr[i] = mainStartTextBoxes[i].Text;
|
||||
MainStartState[i] = Utils.ParseUFloat(mainStartTextBoxes[i].Text);
|
||||
MainStartState[i] = Utils.ParseUDouble(mainStartTextBoxes[i].Text);
|
||||
}
|
||||
if (auxStartTextBoxes[i].Visible && auxStartTextBoxes[i].Enabled)
|
||||
{
|
||||
AuxStartStateStr[i] = auxStartTextBoxes[i].Text;
|
||||
AuxStartState[i] = Utils.ParseUFloat(auxStartTextBoxes[i].Text);
|
||||
AuxStartState[i] = Utils.ParseUDouble(auxStartTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -294,8 +297,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(main1EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(main1StartTextBox.Text);
|
||||
// double endState = Utils.ParseUDouble(main1EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(main1StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { };
|
||||
@@ -308,8 +311,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(aux1EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(aux1StartTextBox.Text);
|
||||
// double endState = Utils.ParseUDouble(aux1EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(aux1StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
@@ -322,8 +325,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(main2EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(main2StartTextBox.Text);
|
||||
// double endState = Utils.ParseUDouble(main2EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(main2StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
@@ -336,8 +339,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(aux2EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(aux2StartTextBox.Text);
|
||||
// double endState = Utils.ParseUDouble(aux2EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(aux2StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
@@ -350,8 +353,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(main3EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(main3StartTextBox.Text);
|
||||
// double endState = Utils.ParseUDouble(main3EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(main3StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
@@ -364,8 +367,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(aux3EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(aux3StartTextBox.Text);
|
||||
// double endState = Utils.ParseUDouble(aux3EndTextBox.Text);
|
||||
// double startState = Utils.ParseUDouble(aux3StartTextBox.Text);
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
+620
-620
File diff suppressed because it is too large
Load Diff
@@ -148,8 +148,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add(Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
if (AtTheEnd)
|
||||
|
||||
@@ -18,7 +18,10 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||
}
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
@@ -115,18 +118,20 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
@@ -137,12 +142,13 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi,
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi,
|
||||
double refEnergy, double energyErrLimLo, double energyErrLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.refVolume = refVolume;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
this.refEnergy = refEnergy;
|
||||
@@ -167,13 +173,13 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, wmStartStateStr, energyStartStateStr,
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, myRef.regReaders, wmStartStateStr, energyStartStateStr,
|
||||
disabled, refVolume, errLimLo, errLimHi, refEnergy, energyErrLimLo, energyErrLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
@@ -21,13 +22,13 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMStartState;
|
||||
public double[] WMStartState;
|
||||
public readonly string[] WMStartStateStr;
|
||||
public float[] WMEndState;
|
||||
public double[] WMEndState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] EnergyStartState;
|
||||
@@ -105,7 +106,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, bool[] disabled)
|
||||
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
@@ -113,11 +114,12 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
entryFormCfg = cfg;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMStartState = new float[waterMetersCount];
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
|
||||
EnergyStartState = new double[waterMetersCount];
|
||||
@@ -133,7 +135,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, string[] wmStartStateStr, string[] energyStartStateStr,
|
||||
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, string[] energyStartStateStr,
|
||||
bool[] disabled, double refVolume, double errLimLo, double errLimHi,
|
||||
double refEnergy, double energyErrLimLo, double energyErrLimHi)
|
||||
: this()
|
||||
@@ -143,6 +145,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
entryFormCfg = cfg;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
@@ -164,7 +167,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMEndState = new float[waterMetersCount];
|
||||
WMEndState = new double[waterMetersCount];
|
||||
EnergyEndState = new double[waterMetersCount];
|
||||
}
|
||||
|
||||
@@ -300,8 +303,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUFloat(endTextBoxes[i].Text);
|
||||
EnergyEndState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(energyEndTextBoxes[i].Text));
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
EnergyEndState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyEndTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,9 +315,9 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUFloat(startTextBoxes[i].Text);
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
EnergyStartStateStr[i] = energyStartTextBoxes[i].Text;
|
||||
EnergyStartState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(energyStartTextBoxes[i].Text));
|
||||
EnergyStartState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyStartTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -358,8 +361,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox1.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
@@ -370,8 +373,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox2.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox2.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -382,8 +385,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox3.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -394,8 +397,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox4.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -406,8 +409,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox5.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -418,8 +421,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox6.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -430,8 +433,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox7.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox7.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -442,8 +445,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox8.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox8.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -454,8 +457,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox9.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox9.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -467,8 +470,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox10.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox10.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -480,8 +483,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox11.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox11.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -492,8 +495,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox12.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox12.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -504,8 +507,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox13.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox13.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox13.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox13.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -516,8 +519,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox14.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox14.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox14.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox14.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -528,8 +531,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox15.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox15.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox15.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox15.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -540,8 +543,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox16.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox16.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox16.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox16.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -552,8 +555,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox17.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox17.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox17.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox17.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -564,8 +567,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox18.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox18.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox18.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox18.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -576,8 +579,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox19.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox19.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox19.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox19.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -588,8 +591,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox20.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox20.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox20.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox20.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -600,8 +603,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox21.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox21.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox21.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox21.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -612,8 +615,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox22.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox22.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox22.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox22.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -624,8 +627,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox23.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox23.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox23.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox23.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -636,8 +639,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox24.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox24.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox24.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox24.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
+1
-1
@@ -1316,7 +1316,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.ClientSize = new System.Drawing.Size(1292, 613);
|
||||
this.Controls.Add(this.unitsLabel);
|
||||
this.Controls.Add(this.unitsComboBox);
|
||||
|
||||
+404
-404
@@ -31,410 +31,410 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.checkBox3 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox3 = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox4 = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.checkBox5 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox5 = new System.Windows.Forms.ComboBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.checkBox6 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox6 = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.extensionsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.remarkTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.snSuffixTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.snPrefixTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.idNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.ext4Label = new System.Windows.Forms.Label();
|
||||
this.ext4TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext3Label = new System.Windows.Forms.Label();
|
||||
this.ext3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext2Label = new System.Windows.Forms.Label();
|
||||
this.ext2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext1Label = new System.Windows.Forms.Label();
|
||||
this.ext1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.autoSNButton = new System.Windows.Forms.Button();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox5 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
this.extensionsGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
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";
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
resources.ApplyResources(this.clearButton, "clearButton");
|
||||
this.clearButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
resources.ApplyResources(this.comboBox1, "comboBox1");
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);
|
||||
this.comboBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox1_KeyPress);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
resources.ApplyResources(this.checkBox1, "checkBox1");
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
resources.ApplyResources(this.checkBox2, "checkBox2");
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
resources.ApplyResources(this.comboBox2, "comboBox2");
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
|
||||
this.comboBox2.TextChanged += new System.EventHandler(this.comboBox2_TextChanged);
|
||||
this.comboBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox2_KeyPress);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
resources.ApplyResources(this.checkBox3, "checkBox3");
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox3
|
||||
//
|
||||
resources.ApplyResources(this.comboBox3, "comboBox3");
|
||||
this.comboBox3.FormattingEnabled = true;
|
||||
this.comboBox3.Name = "comboBox3";
|
||||
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
|
||||
this.comboBox3.TextChanged += new System.EventHandler(this.comboBox3_TextChanged);
|
||||
this.comboBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox3_KeyPress);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
resources.ApplyResources(this.checkBox4, "checkBox4");
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox4
|
||||
//
|
||||
resources.ApplyResources(this.comboBox4, "comboBox4");
|
||||
this.comboBox4.FormattingEnabled = true;
|
||||
this.comboBox4.Name = "comboBox4";
|
||||
this.comboBox4.SelectedIndexChanged += new System.EventHandler(this.comboBox4_SelectedIndexChanged);
|
||||
this.comboBox4.TextChanged += new System.EventHandler(this.comboBox4_TextChanged);
|
||||
this.comboBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox4_KeyPress);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
resources.ApplyResources(this.checkBox5, "checkBox5");
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox5
|
||||
//
|
||||
resources.ApplyResources(this.comboBox5, "comboBox5");
|
||||
this.comboBox5.FormattingEnabled = true;
|
||||
this.comboBox5.Name = "comboBox5";
|
||||
this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);
|
||||
this.comboBox5.TextChanged += new System.EventHandler(this.comboBox5_TextChanged);
|
||||
this.comboBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox5_KeyPress);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
resources.ApplyResources(this.checkBox6, "checkBox6");
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox6
|
||||
//
|
||||
resources.ApplyResources(this.comboBox6, "comboBox6");
|
||||
this.comboBox6.FormattingEnabled = true;
|
||||
this.comboBox6.Name = "comboBox6";
|
||||
this.comboBox6.SelectedIndexChanged += new System.EventHandler(this.comboBox6_SelectedIndexChanged);
|
||||
this.comboBox6.TextChanged += new System.EventHandler(this.comboBox6_TextChanged);
|
||||
this.comboBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox6_KeyPress);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// extensionsGroupBox
|
||||
//
|
||||
this.extensionsGroupBox.Controls.Add(this.remarkTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label16);
|
||||
this.extensionsGroupBox.Controls.Add(this.snSuffixTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label15);
|
||||
this.extensionsGroupBox.Controls.Add(this.snPrefixTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label14);
|
||||
this.extensionsGroupBox.Controls.Add(this.idNumberTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label13);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext4Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext4TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext3Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext3TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext2Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext2TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext1Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext1TextBox);
|
||||
resources.ApplyResources(this.extensionsGroupBox, "extensionsGroupBox");
|
||||
this.extensionsGroupBox.Name = "extensionsGroupBox";
|
||||
this.extensionsGroupBox.TabStop = false;
|
||||
//
|
||||
// remarkTextBox
|
||||
//
|
||||
resources.ApplyResources(this.remarkTextBox, "remarkTextBox");
|
||||
this.remarkTextBox.Name = "remarkTextBox";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
this.label16.Name = "label16";
|
||||
//
|
||||
// snSuffixTextBox
|
||||
//
|
||||
resources.ApplyResources(this.snSuffixTextBox, "snSuffixTextBox");
|
||||
this.snSuffixTextBox.Name = "snSuffixTextBox";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// snPrefixTextBox
|
||||
//
|
||||
resources.ApplyResources(this.snPrefixTextBox, "snPrefixTextBox");
|
||||
this.snPrefixTextBox.Name = "snPrefixTextBox";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
resources.ApplyResources(this.label14, "label14");
|
||||
this.label14.Name = "label14";
|
||||
//
|
||||
// idNumberTextBox
|
||||
//
|
||||
resources.ApplyResources(this.idNumberTextBox, "idNumberTextBox");
|
||||
this.idNumberTextBox.Name = "idNumberTextBox";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
this.label13.Name = "label13";
|
||||
//
|
||||
// ext4Label
|
||||
//
|
||||
resources.ApplyResources(this.ext4Label, "ext4Label");
|
||||
this.ext4Label.Name = "ext4Label";
|
||||
//
|
||||
// ext4TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext4TextBox, "ext4TextBox");
|
||||
this.ext4TextBox.Name = "ext4TextBox";
|
||||
//
|
||||
// ext3Label
|
||||
//
|
||||
resources.ApplyResources(this.ext3Label, "ext3Label");
|
||||
this.ext3Label.Name = "ext3Label";
|
||||
//
|
||||
// ext3TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext3TextBox, "ext3TextBox");
|
||||
this.ext3TextBox.Name = "ext3TextBox";
|
||||
//
|
||||
// ext2Label
|
||||
//
|
||||
resources.ApplyResources(this.ext2Label, "ext2Label");
|
||||
this.ext2Label.Name = "ext2Label";
|
||||
//
|
||||
// ext2TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext2TextBox, "ext2TextBox");
|
||||
this.ext2TextBox.Name = "ext2TextBox";
|
||||
//
|
||||
// ext1Label
|
||||
//
|
||||
resources.ApplyResources(this.ext1Label, "ext1Label");
|
||||
this.ext1Label.Name = "ext1Label";
|
||||
//
|
||||
// ext1TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext1TextBox, "ext1TextBox");
|
||||
this.ext1TextBox.Name = "ext1TextBox";
|
||||
this.ext1TextBox.TextChanged += new System.EventHandler(this.ext1TextBox_TextChanged);
|
||||
//
|
||||
// autoSNButton
|
||||
//
|
||||
resources.ApplyResources(this.autoSNButton, "autoSNButton");
|
||||
this.autoSNButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.autoSNButton.Name = "autoSNButton";
|
||||
this.autoSNButton.UseVisualStyleBackColor = true;
|
||||
this.autoSNButton.Click += new System.EventHandler(this.autoSNButton_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox2, "pictureBox2");
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// pictureBox3
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox3, "pictureBox3");
|
||||
this.pictureBox3.Name = "pictureBox3";
|
||||
this.pictureBox3.TabStop = false;
|
||||
//
|
||||
// pictureBox4
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox4, "pictureBox4");
|
||||
this.pictureBox4.Name = "pictureBox4";
|
||||
this.pictureBox4.TabStop = false;
|
||||
//
|
||||
// pictureBox5
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox5, "pictureBox5");
|
||||
this.pictureBox5.Name = "pictureBox5";
|
||||
this.pictureBox5.TabStop = false;
|
||||
//
|
||||
// pictureBox6
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox6, "pictureBox6");
|
||||
this.pictureBox6.Name = "pictureBox6";
|
||||
this.pictureBox6.TabStop = false;
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.Controls.Add(this.pictureBox6);
|
||||
this.Controls.Add(this.pictureBox5);
|
||||
this.Controls.Add(this.pictureBox4);
|
||||
this.Controls.Add(this.pictureBox3);
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.autoSNButton);
|
||||
this.Controls.Add(this.extensionsGroupBox);
|
||||
this.Controls.Add(this.checkBox6);
|
||||
this.Controls.Add(this.comboBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.checkBox5);
|
||||
this.Controls.Add(this.comboBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.checkBox4);
|
||||
this.Controls.Add(this.comboBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.checkBox3);
|
||||
this.Controls.Add(this.comboBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.comboBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.clearButton);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
this.extensionsGroupBox.ResumeLayout(false);
|
||||
this.extensionsGroupBox.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.checkBox3 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox3 = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox4 = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.checkBox5 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox5 = new System.Windows.Forms.ComboBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.checkBox6 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox6 = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.extensionsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.remarkTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.snSuffixTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.snPrefixTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.idNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.ext4Label = new System.Windows.Forms.Label();
|
||||
this.ext4TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext3Label = new System.Windows.Forms.Label();
|
||||
this.ext3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext2Label = new System.Windows.Forms.Label();
|
||||
this.ext2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.ext1Label = new System.Windows.Forms.Label();
|
||||
this.ext1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.autoSNButton = new System.Windows.Forms.Button();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox5 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
this.extensionsGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
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";
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
resources.ApplyResources(this.clearButton, "clearButton");
|
||||
this.clearButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
resources.ApplyResources(this.comboBox1, "comboBox1");
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);
|
||||
this.comboBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox1_KeyPress);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
resources.ApplyResources(this.checkBox1, "checkBox1");
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
resources.ApplyResources(this.checkBox2, "checkBox2");
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
resources.ApplyResources(this.comboBox2, "comboBox2");
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
|
||||
this.comboBox2.TextChanged += new System.EventHandler(this.comboBox2_TextChanged);
|
||||
this.comboBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox2_KeyPress);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
resources.ApplyResources(this.checkBox3, "checkBox3");
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox3
|
||||
//
|
||||
resources.ApplyResources(this.comboBox3, "comboBox3");
|
||||
this.comboBox3.FormattingEnabled = true;
|
||||
this.comboBox3.Name = "comboBox3";
|
||||
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
|
||||
this.comboBox3.TextChanged += new System.EventHandler(this.comboBox3_TextChanged);
|
||||
this.comboBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox3_KeyPress);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
resources.ApplyResources(this.checkBox4, "checkBox4");
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox4
|
||||
//
|
||||
resources.ApplyResources(this.comboBox4, "comboBox4");
|
||||
this.comboBox4.FormattingEnabled = true;
|
||||
this.comboBox4.Name = "comboBox4";
|
||||
this.comboBox4.SelectedIndexChanged += new System.EventHandler(this.comboBox4_SelectedIndexChanged);
|
||||
this.comboBox4.TextChanged += new System.EventHandler(this.comboBox4_TextChanged);
|
||||
this.comboBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox4_KeyPress);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
resources.ApplyResources(this.checkBox5, "checkBox5");
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox5
|
||||
//
|
||||
resources.ApplyResources(this.comboBox5, "comboBox5");
|
||||
this.comboBox5.FormattingEnabled = true;
|
||||
this.comboBox5.Name = "comboBox5";
|
||||
this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);
|
||||
this.comboBox5.TextChanged += new System.EventHandler(this.comboBox5_TextChanged);
|
||||
this.comboBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox5_KeyPress);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
resources.ApplyResources(this.checkBox6, "checkBox6");
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox6
|
||||
//
|
||||
resources.ApplyResources(this.comboBox6, "comboBox6");
|
||||
this.comboBox6.FormattingEnabled = true;
|
||||
this.comboBox6.Name = "comboBox6";
|
||||
this.comboBox6.SelectedIndexChanged += new System.EventHandler(this.comboBox6_SelectedIndexChanged);
|
||||
this.comboBox6.TextChanged += new System.EventHandler(this.comboBox6_TextChanged);
|
||||
this.comboBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox6_KeyPress);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// extensionsGroupBox
|
||||
//
|
||||
this.extensionsGroupBox.Controls.Add(this.remarkTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label16);
|
||||
this.extensionsGroupBox.Controls.Add(this.snSuffixTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label15);
|
||||
this.extensionsGroupBox.Controls.Add(this.snPrefixTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label14);
|
||||
this.extensionsGroupBox.Controls.Add(this.idNumberTextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.label13);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext4Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext4TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext3Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext3TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext2Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext2TextBox);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext1Label);
|
||||
this.extensionsGroupBox.Controls.Add(this.ext1TextBox);
|
||||
resources.ApplyResources(this.extensionsGroupBox, "extensionsGroupBox");
|
||||
this.extensionsGroupBox.Name = "extensionsGroupBox";
|
||||
this.extensionsGroupBox.TabStop = false;
|
||||
//
|
||||
// remarkTextBox
|
||||
//
|
||||
resources.ApplyResources(this.remarkTextBox, "remarkTextBox");
|
||||
this.remarkTextBox.Name = "remarkTextBox";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
this.label16.Name = "label16";
|
||||
//
|
||||
// snSuffixTextBox
|
||||
//
|
||||
resources.ApplyResources(this.snSuffixTextBox, "snSuffixTextBox");
|
||||
this.snSuffixTextBox.Name = "snSuffixTextBox";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// snPrefixTextBox
|
||||
//
|
||||
resources.ApplyResources(this.snPrefixTextBox, "snPrefixTextBox");
|
||||
this.snPrefixTextBox.Name = "snPrefixTextBox";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
resources.ApplyResources(this.label14, "label14");
|
||||
this.label14.Name = "label14";
|
||||
//
|
||||
// idNumberTextBox
|
||||
//
|
||||
resources.ApplyResources(this.idNumberTextBox, "idNumberTextBox");
|
||||
this.idNumberTextBox.Name = "idNumberTextBox";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
this.label13.Name = "label13";
|
||||
//
|
||||
// ext4Label
|
||||
//
|
||||
resources.ApplyResources(this.ext4Label, "ext4Label");
|
||||
this.ext4Label.Name = "ext4Label";
|
||||
//
|
||||
// ext4TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext4TextBox, "ext4TextBox");
|
||||
this.ext4TextBox.Name = "ext4TextBox";
|
||||
//
|
||||
// ext3Label
|
||||
//
|
||||
resources.ApplyResources(this.ext3Label, "ext3Label");
|
||||
this.ext3Label.Name = "ext3Label";
|
||||
//
|
||||
// ext3TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext3TextBox, "ext3TextBox");
|
||||
this.ext3TextBox.Name = "ext3TextBox";
|
||||
//
|
||||
// ext2Label
|
||||
//
|
||||
resources.ApplyResources(this.ext2Label, "ext2Label");
|
||||
this.ext2Label.Name = "ext2Label";
|
||||
//
|
||||
// ext2TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext2TextBox, "ext2TextBox");
|
||||
this.ext2TextBox.Name = "ext2TextBox";
|
||||
//
|
||||
// ext1Label
|
||||
//
|
||||
resources.ApplyResources(this.ext1Label, "ext1Label");
|
||||
this.ext1Label.Name = "ext1Label";
|
||||
//
|
||||
// ext1TextBox
|
||||
//
|
||||
resources.ApplyResources(this.ext1TextBox, "ext1TextBox");
|
||||
this.ext1TextBox.Name = "ext1TextBox";
|
||||
this.ext1TextBox.TextChanged += new System.EventHandler(this.ext1TextBox_TextChanged);
|
||||
//
|
||||
// autoSNButton
|
||||
//
|
||||
resources.ApplyResources(this.autoSNButton, "autoSNButton");
|
||||
this.autoSNButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.autoSNButton.Name = "autoSNButton";
|
||||
this.autoSNButton.UseVisualStyleBackColor = true;
|
||||
this.autoSNButton.Click += new System.EventHandler(this.autoSNButton_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox2, "pictureBox2");
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// pictureBox3
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox3, "pictureBox3");
|
||||
this.pictureBox3.Name = "pictureBox3";
|
||||
this.pictureBox3.TabStop = false;
|
||||
//
|
||||
// pictureBox4
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox4, "pictureBox4");
|
||||
this.pictureBox4.Name = "pictureBox4";
|
||||
this.pictureBox4.TabStop = false;
|
||||
//
|
||||
// pictureBox5
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox5, "pictureBox5");
|
||||
this.pictureBox5.Name = "pictureBox5";
|
||||
this.pictureBox5.TabStop = false;
|
||||
//
|
||||
// pictureBox6
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox6, "pictureBox6");
|
||||
this.pictureBox6.Name = "pictureBox6";
|
||||
this.pictureBox6.TabStop = false;
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.Controls.Add(this.pictureBox6);
|
||||
this.Controls.Add(this.pictureBox5);
|
||||
this.Controls.Add(this.pictureBox4);
|
||||
this.Controls.Add(this.pictureBox3);
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.autoSNButton);
|
||||
this.Controls.Add(this.extensionsGroupBox);
|
||||
this.Controls.Add(this.checkBox6);
|
||||
this.Controls.Add(this.comboBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.checkBox5);
|
||||
this.Controls.Add(this.comboBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.checkBox4);
|
||||
this.Controls.Add(this.comboBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.checkBox3);
|
||||
this.Controls.Add(this.comboBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.comboBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.clearButton);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
this.extensionsGroupBox.ResumeLayout(false);
|
||||
this.extensionsGroupBox.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -141,8 +141,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add(Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
if (AtTheEnd)
|
||||
|
||||
@@ -18,7 +18,10 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||
}
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
@@ -115,19 +118,21 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
return this;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.refVolume = refVolume;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
this.refEnergy = 0;
|
||||
@@ -137,12 +142,13 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi,
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi,
|
||||
double refEnergy, double energyErrLimLo, double energyErrLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.refVolume = refVolume;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
this.refEnergy = refEnergy;
|
||||
@@ -167,13 +173,13 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, myRef.regReaders, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, wmStartStateStr, energyStartStateStr,
|
||||
myRef.modelessDlg = new TestStartEndForm(entryFormCfg, myRef.waterMeters.Length, myRef.regReaders, wmStartStateStr, energyStartStateStr,
|
||||
disabled, refVolume, errLimLo, errLimHi, refEnergy, energyErrLimLo, energyErrLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
@@ -21,13 +22,13 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMStartState;
|
||||
public double[] WMStartState;
|
||||
public readonly string[] WMStartStateStr;
|
||||
public float[] WMEndState;
|
||||
public double[] WMEndState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] EnergyStartState;
|
||||
@@ -64,10 +65,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
|
||||
TextBoxesCount = 6;
|
||||
|
||||
labels = new Label[]
|
||||
{
|
||||
label1, label2, label3, label4, label5, label6,
|
||||
};
|
||||
labels = new Label[] { label1, label2, label3, label4, label5, label6 };
|
||||
|
||||
startTextBoxes = new TextBox[]
|
||||
{
|
||||
startTextBox1, startTextBox2, startTextBox3, startTextBox4, startTextBox5, startTextBox6,
|
||||
@@ -77,10 +76,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
endTextBox1, endTextBox2, endTextBox3, endTextBox4, endTextBox5, endTextBox6,
|
||||
};
|
||||
|
||||
energyLabels = new Label[]
|
||||
{
|
||||
label13, label14, label15, label16, label17, label18,
|
||||
};
|
||||
energyLabels = new Label[] { label13, label14, label15, label16, label17, label18 };
|
||||
|
||||
energyStartTextBoxes = new TextBox[]
|
||||
{
|
||||
startTextBox13, startTextBox14, startTextBox15, startTextBox16, startTextBox17, startTextBox18,
|
||||
@@ -101,7 +98,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, bool[] disabled)
|
||||
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
@@ -109,11 +106,12 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
entryFormCfg = cfg;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMStartState = new float[waterMetersCount];
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
|
||||
EnergyStartState = new double[waterMetersCount];
|
||||
@@ -129,7 +127,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, string[] wmStartStateStr, string[] energyStartStateStr,
|
||||
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, string[] energyStartStateStr,
|
||||
bool[] disabled, double refVolume, double errLimLo, double errLimHi,
|
||||
double refEnergy, double energyErrLimLo, double energyErrLimHi)
|
||||
: this()
|
||||
@@ -139,6 +137,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
entryFormCfg = cfg;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
@@ -160,7 +159,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMEndState = new float[waterMetersCount];
|
||||
WMEndState = new double[waterMetersCount];
|
||||
EnergyEndState = new double[waterMetersCount];
|
||||
}
|
||||
|
||||
@@ -296,8 +295,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUFloat(endTextBoxes[i].Text);
|
||||
EnergyEndState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(energyEndTextBoxes[i].Text));
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
EnergyEndState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyEndTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -308,9 +307,9 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUFloat(startTextBoxes[i].Text);
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
EnergyStartStateStr[i] = energyStartTextBoxes[i].Text;
|
||||
EnergyStartState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(energyStartTextBoxes[i].Text));
|
||||
EnergyStartState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyStartTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -354,8 +353,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox1.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
@@ -366,8 +365,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox2.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox2.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -378,8 +377,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox3.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -390,8 +389,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox4.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -402,8 +401,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox5.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -414,8 +413,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox6.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -427,8 +426,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox13.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox13.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox13.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox13.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -439,8 +438,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox14.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox14.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox14.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox14.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -451,8 +450,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox15.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox15.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox15.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox15.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -463,8 +462,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox16.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox16.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox16.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox16.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -475,8 +474,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox17.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox17.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox17.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox17.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -487,8 +486,8 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(endTextBox18.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUFloat(startTextBox18.Text));
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox18.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox18.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
+750
-750
File diff suppressed because it is too large
Load Diff
@@ -54,16 +54,16 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
Text = Strings.Data;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
|
||||
groupBox1.Text = string.Format(Strings.Water_Meter_nr, 1);
|
||||
|
||||
groupBox1.Text = string.Format("{0} {1}", Strings.Water_Meter, 1);
|
||||
mainSN1Label.Text = Strings.Main_WM_SerialNr;
|
||||
auxSN1Label.Text = Strings.Aux_WM_SerialNr;
|
||||
|
||||
groupBox2.Text = string.Format(Strings.Water_Meter_nr, 2);
|
||||
groupBox2.Text = string.Format("{0} {1}", Strings.Water_Meter, 2);
|
||||
mainSN2Label.Text = Strings.Main_WM_SerialNr;
|
||||
auxSN2Label.Text = Strings.Aux_WM_SerialNr;
|
||||
|
||||
groupBox3.Text = string.Format(Strings.Water_Meter_nr, 3);
|
||||
groupBox3.Text = string.Format("{0} {1}", Strings.Water_Meter, 3);
|
||||
mainSN3Label.Text = Strings.Main_WM_SerialNr;
|
||||
auxSN3Label.Text = Strings.Aux_WM_SerialNr;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString() { return string.Format("DataEntry.Munich({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -15,7 +15,10 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
|
||||
public override string ToString() { return string.Format("DataEntry.Munich3({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin and the End form
|
||||
@@ -101,18 +104,20 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
@@ -140,13 +145,13 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich3
|
||||
@@ -18,180 +19,179 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMStartState;
|
||||
public double[] WMStartState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] WMStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMEndState;
|
||||
public double[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to fill in start states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public TestStartEndForm(int waterMetersCount, bool[] disabled)
|
||||
GroupBox[] groupBoxes;
|
||||
Label[] labels;
|
||||
TextBox[] startTextBoxes;
|
||||
TextBox[] endTextBoxes;
|
||||
Label[] exclamations;
|
||||
|
||||
|
||||
public TestStartEndForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
endStates = false;
|
||||
groupBoxes = new GroupBox[] { groupBox1, groupBox2, groupBox3, groupBox4, groupBox5, groupBox6 };
|
||||
labels = new Label[] { label1, label2, label3, label4, label5, label6 };
|
||||
startTextBoxes = new TextBox[] { startTextBox1, startTextBox2, startTextBox3, startTextBox4, startTextBox5, startTextBox6 };
|
||||
endTextBoxes = new TextBox[] { endTextBox1, endTextBox2, endTextBox3, endTextBox4, endTextBox5, endTextBox6 };
|
||||
exclamations = new Label[] { exclamation1, exclamation2, exclamation3, exclamation3, exclamation4, exclamation5 };
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.disabled = disabled;
|
||||
|
||||
WMStartState = new float[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to fill in start states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.regReaders = regReaders;
|
||||
this.WaterMetersCount = Math.Min(waterMetersCount, regReaders.Length);
|
||||
this.disabled = disabled;
|
||||
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
|
||||
Height = 70 + 90 * WaterMetersCount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to fill in end states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.WaterMetersCount = Math.Min(waterMetersCount, regReaders.Length);
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != this.WaterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.disabled = disabled;
|
||||
this.refVolume = refVolume;
|
||||
this.warningLimLo = 2 * errLimLo;
|
||||
this.warningLimHi = 2 * errLimHi;
|
||||
|
||||
InitializeComponent();
|
||||
WMEndState = new float[waterMetersCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
WMEndState = new double[waterMetersCount];
|
||||
|
||||
Height = 70 + 90 * WaterMetersCount;
|
||||
}
|
||||
|
||||
/// <summary> Parameterless constructor for all watermeters </summary>
|
||||
public TestStartEndForm()
|
||||
: this(Config.Data.WMsCount, null)
|
||||
{
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
private void TestStartEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
Height = 70 + 90 * WaterMetersCount;
|
||||
|
||||
if (WaterMetersCount < 1) groupBox1.Visible = false;
|
||||
if (WaterMetersCount < 2) groupBox2.Visible = false;
|
||||
if (WaterMetersCount < 3) groupBox3.Visible = false;
|
||||
if (WaterMetersCount < 4) groupBox4.Visible = false;
|
||||
if (WaterMetersCount < 5) groupBox5.Visible = false;
|
||||
if (WaterMetersCount < 6) groupBox6.Visible = false;
|
||||
|
||||
if (endStates)
|
||||
/// First 'WaterMetersCount' positions
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (WaterMetersCount >= 1) wmStartStateTextBox1.Text = WMStartStateStr[0];
|
||||
if (WaterMetersCount >= 2) wmStartStateTextBox2.Text = WMStartStateStr[1];
|
||||
if (WaterMetersCount >= 3) wmStartStateTextBox3.Text = WMStartStateStr[2];
|
||||
if (WaterMetersCount >= 4) wmStartStateTextBox4.Text = WMStartStateStr[3];
|
||||
if (WaterMetersCount >= 5) wmStartStateTextBox5.Text = WMStartStateStr[4];
|
||||
if (WaterMetersCount >= 6) wmStartStateTextBox6.Text = WMStartStateStr[5];
|
||||
if (disabled.Length > i && regReaders[i] == null) disabled[i] = true;
|
||||
|
||||
wmEndStateTextBox1.Enabled = (disabled.Length >= 1 && !disabled[0]);
|
||||
wmEndStateTextBox2.Enabled = (disabled.Length >= 2 && !disabled[1]);
|
||||
wmEndStateTextBox3.Enabled = (disabled.Length >= 3 && !disabled[2]);
|
||||
wmEndStateTextBox4.Enabled = (disabled.Length >= 4 && !disabled[3]);
|
||||
wmEndStateTextBox5.Enabled = (disabled.Length >= 5 && !disabled[4]);
|
||||
wmEndStateTextBox6.Enabled = (disabled.Length >= 6 && !disabled[5]);
|
||||
if (endStates)
|
||||
{
|
||||
startTextBoxes[i].Text = WMStartStateStr[i];
|
||||
endTextBoxes[i].Enabled = (disabled.Length > i && !disabled[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
startTextBoxes[i].Enabled = (disabled.Length > i && !disabled[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
/// Remaining positions
|
||||
for (int i = WaterMetersCount; i < 6; i++)
|
||||
{
|
||||
wmStartStateTextBox1.Enabled = (disabled.Length >= 1 && !disabled[0]);
|
||||
wmStartStateTextBox2.Enabled = (disabled.Length >= 2 && !disabled[1]);
|
||||
wmStartStateTextBox3.Enabled = (disabled.Length >= 3 && !disabled[2]);
|
||||
wmStartStateTextBox4.Enabled = (disabled.Length >= 4 && !disabled[3]);
|
||||
wmStartStateTextBox5.Enabled = (disabled.Length >= 5 && !disabled[4]);
|
||||
wmStartStateTextBox6.Enabled = (disabled.Length >= 6 && !disabled[5]);
|
||||
groupBoxes[i].Visible = false;
|
||||
}
|
||||
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Water_Meter_States;
|
||||
|
||||
groupBox1.Text = Strings.Water_Meter + " 1";
|
||||
groupBox2.Text = Strings.Water_Meter + " 2";
|
||||
groupBox3.Text = Strings.Water_Meter + " 3";
|
||||
groupBox4.Text = Strings.Water_Meter + " 4";
|
||||
groupBox5.Text = Strings.Water_Meter + " 5";
|
||||
groupBox6.Text = Strings.Water_Meter + " 6";
|
||||
|
||||
wmStateLabel1.Text = Strings.WMState;
|
||||
wmStateLabel2.Text = Strings.WMState;
|
||||
wmStateLabel3.Text = Strings.WMState;
|
||||
wmStateLabel4.Text = Strings.WMState;
|
||||
wmStateLabel5.Text = Strings.WMState;
|
||||
wmStateLabel6.Text = Strings.WMState;
|
||||
|
||||
startLabel.Text = Strings.Start;
|
||||
endLabel.Text = Strings.End;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
groupBoxes[i].Text = string.Format("{0} {1}", Strings.Water_Meter, i + 1);
|
||||
if (disabled.Length > i && !disabled[i])
|
||||
{
|
||||
labels[i].Text = string.Format("{0} [{1}]", Strings.State, GetUnitStr(regReaders[i].PulsesPerLtr));
|
||||
}
|
||||
else
|
||||
{
|
||||
labels[i].Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string GetUnitStr(double pulsesPerLtr)
|
||||
{
|
||||
if (pulsesPerLtr == 1 || pulsesPerLtr <= float.Epsilon)
|
||||
{
|
||||
return "l";
|
||||
}
|
||||
else if (pulsesPerLtr == 0.001)
|
||||
{
|
||||
return "m3";
|
||||
}
|
||||
else if (pulsesPerLtr == 1000)
|
||||
{
|
||||
return "ml";
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format("{0} l", 1/pulsesPerLtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (endStates)
|
||||
{
|
||||
if (wmEndStateTextBox1.Enabled) WMEndState[0] = Utils.ParseUFloat(wmEndStateTextBox1.Text);
|
||||
if (wmEndStateTextBox2.Enabled) WMEndState[1] = Utils.ParseUFloat(wmEndStateTextBox2.Text);
|
||||
if (wmEndStateTextBox3.Enabled) WMEndState[2] = Utils.ParseUFloat(wmEndStateTextBox3.Text);
|
||||
if (wmEndStateTextBox4.Enabled) WMEndState[3] = Utils.ParseUFloat(wmEndStateTextBox4.Text);
|
||||
if (wmEndStateTextBox5.Enabled) WMEndState[4] = Utils.ParseUFloat(wmEndStateTextBox5.Text);
|
||||
if (wmEndStateTextBox6.Enabled) WMEndState[5] = Utils.ParseUFloat(wmEndStateTextBox6.Text);
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (endTextBoxes[i].Enabled) WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text) * regReaders[i].LtrsPerPulse;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wmStartStateTextBox1.Enabled)
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
WMStartStateStr[0] = wmStartStateTextBox1.Text;
|
||||
WMStartState[0] = Utils.ParseUFloat(wmStartStateTextBox1.Text);
|
||||
}
|
||||
if (wmStartStateTextBox2.Enabled)
|
||||
{
|
||||
WMStartStateStr[1] = wmStartStateTextBox2.Text;
|
||||
WMStartState[1] = Utils.ParseUFloat(wmStartStateTextBox2.Text);
|
||||
}
|
||||
if (wmStartStateTextBox3.Enabled)
|
||||
{
|
||||
WMStartStateStr[2] = wmStartStateTextBox3.Text;
|
||||
WMStartState[2] = Utils.ParseUFloat(wmStartStateTextBox3.Text);
|
||||
}
|
||||
if (wmStartStateTextBox4.Enabled)
|
||||
{
|
||||
WMStartStateStr[3] = wmStartStateTextBox4.Text;
|
||||
WMStartState[3] = Utils.ParseUFloat(wmStartStateTextBox4.Text);
|
||||
}
|
||||
if (wmStartStateTextBox5.Enabled)
|
||||
{
|
||||
WMStartStateStr[4] = wmStartStateTextBox5.Text;
|
||||
WMStartState[4] = Utils.ParseUFloat(wmStartStateTextBox5.Text);
|
||||
}
|
||||
if (wmStartStateTextBox6.Enabled)
|
||||
{
|
||||
WMStartStateStr[5] = wmStartStateTextBox6.Text;
|
||||
WMStartState[5] = Utils.ParseUFloat(wmStartStateTextBox6.Text);
|
||||
if (startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text) * regReaders[i].LtrsPerPulse;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,242 +223,181 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
|
||||
#endregion
|
||||
|
||||
private void wmEndStateTextBox1_TextChanged(object sender, EventArgs e)
|
||||
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e) { EndTextChanged(0); }
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e) { EndTextChanged(1); }
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e) { EndTextChanged(2); }
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e) { EndTextChanged(3); }
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e) { EndTextChanged(4); }
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e) { EndTextChanged(5); }
|
||||
|
||||
void EndTextChanged(int i)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox2.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBoxes[i].Text) * regReaders[i].LtrsPerPulse; ;
|
||||
double startState = Utils.ParseUDouble(startTextBoxes[i].Text) * regReaders[i].LtrsPerPulse; ;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
exclamations[i].Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox1_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void startTextBox1_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
if (startTextBox2.Enabled) startTextBox2.Focus();
|
||||
else if (startTextBox3.Enabled) startTextBox3.Focus();
|
||||
else if (startTextBox4.Enabled) startTextBox4.Focus();
|
||||
else if (startTextBox5.Enabled) startTextBox5.Focus();
|
||||
else if (startTextBox6.Enabled) startTextBox6.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox2_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void startTextBox2_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
if (startTextBox3.Enabled) startTextBox3.Focus();
|
||||
else if (startTextBox4.Enabled) startTextBox4.Focus();
|
||||
else if (startTextBox5.Enabled) startTextBox5.Focus();
|
||||
else if (startTextBox6.Enabled) startTextBox6.Focus();
|
||||
else if (startTextBox1.Enabled) startTextBox1.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox3_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void startTextBox3_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
if (startTextBox4.Enabled) startTextBox4.Focus();
|
||||
else if (startTextBox5.Enabled) startTextBox5.Focus();
|
||||
else if (startTextBox6.Enabled) startTextBox6.Focus();
|
||||
else if (startTextBox1.Enabled) startTextBox1.Focus();
|
||||
else if (startTextBox2.Enabled) startTextBox2.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox4_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void startTextBox4_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
else if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
if (startTextBox5.Enabled) startTextBox5.Focus();
|
||||
else if (startTextBox6.Enabled) startTextBox6.Focus();
|
||||
else if (startTextBox1.Enabled) startTextBox1.Focus();
|
||||
else if (startTextBox2.Enabled) startTextBox2.Focus();
|
||||
else if (startTextBox3.Enabled) startTextBox3.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox5_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void startTextBox5_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox6.Enabled) wmStartStateTextBox6.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
if (startTextBox6.Enabled) startTextBox6.Focus();
|
||||
else if (startTextBox1.Enabled) startTextBox1.Focus();
|
||||
else if (startTextBox2.Enabled) startTextBox2.Focus();
|
||||
else if (startTextBox3.Enabled) startTextBox3.Focus();
|
||||
else if (startTextBox4.Enabled) startTextBox4.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmStartStateTextBox6_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void startTextBox6_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
if (startTextBox1.Enabled) startTextBox1.Focus();
|
||||
else if (startTextBox1.Enabled) startTextBox1.Focus();
|
||||
else if (startTextBox3.Enabled) startTextBox3.Focus();
|
||||
else if (startTextBox4.Enabled) startTextBox4.Focus();
|
||||
else if (startTextBox5.Enabled) startTextBox5.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox1_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void endTextBox1_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
if (endTextBox2.Enabled) endTextBox2.Focus();
|
||||
else if (endTextBox3.Enabled) endTextBox3.Focus();
|
||||
else if (endTextBox4.Enabled) endTextBox4.Focus();
|
||||
else if (endTextBox5.Enabled) endTextBox5.Focus();
|
||||
else if (endTextBox6.Enabled) endTextBox6.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox2_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void endTextBox2_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
if (endTextBox3.Enabled) endTextBox3.Focus();
|
||||
else if (endTextBox4.Enabled) endTextBox4.Focus();
|
||||
else if (endTextBox5.Enabled) endTextBox5.Focus();
|
||||
else if (endTextBox6.Enabled) endTextBox6.Focus();
|
||||
else if (endTextBox1.Enabled) endTextBox1.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox3_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void endTextBox3_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
if (endTextBox4.Enabled) endTextBox4.Focus();
|
||||
else if (endTextBox5.Enabled) endTextBox5.Focus();
|
||||
else if (endTextBox6.Enabled) endTextBox6.Focus();
|
||||
else if (endTextBox1.Enabled) endTextBox1.Focus();
|
||||
else if (endTextBox2.Enabled) endTextBox2.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox4_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void endTextBox4_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
else if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
if (endTextBox5.Enabled) endTextBox5.Focus();
|
||||
else if (endTextBox6.Enabled) endTextBox6.Focus();
|
||||
else if (endTextBox1.Enabled) endTextBox1.Focus();
|
||||
else if (endTextBox2.Enabled) endTextBox2.Focus();
|
||||
else if (endTextBox3.Enabled) endTextBox3.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox5_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void endTextBox5_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox6.Enabled) wmEndStateTextBox6.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
if (endTextBox6.Enabled) endTextBox6.Focus();
|
||||
else if (endTextBox1.Enabled) endTextBox1.Focus();
|
||||
else if (endTextBox2.Enabled) endTextBox2.Focus();
|
||||
else if (endTextBox3.Enabled) endTextBox3.Focus();
|
||||
else if (endTextBox4.Enabled) endTextBox4.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void wmEndStateTextBox6_KeyPress(object sender, KeyPressEventArgs e)
|
||||
private void endTextBox6_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
if (endTextBox1.Enabled) endTextBox1.Focus();
|
||||
else if (endTextBox1.Enabled) endTextBox1.Focus();
|
||||
else if (endTextBox3.Enabled) endTextBox3.Focus();
|
||||
else if (endTextBox4.Enabled) endTextBox4.Focus();
|
||||
else if (endTextBox5.Enabled) endTextBox5.Focus();
|
||||
}
|
||||
else if (e.KeyChar == '+') okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
+169
-169
@@ -33,35 +33,35 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
{
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.exclamation2 = new System.Windows.Forms.Label();
|
||||
this.wmStartStateTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.wmEndStateTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.wmStateLabel2 = new System.Windows.Forms.Label();
|
||||
this.startTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.exclamation1 = new System.Windows.Forms.Label();
|
||||
this.wmStartStateTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.wmEndStateTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.wmStateLabel1 = new System.Windows.Forms.Label();
|
||||
this.startTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.exclamation3 = new System.Windows.Forms.Label();
|
||||
this.wmStartStateTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.wmEndStateTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.wmStateLabel3 = new System.Windows.Forms.Label();
|
||||
this.startTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.exclamation4 = new System.Windows.Forms.Label();
|
||||
this.wmStartStateTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.wmEndStateTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.wmStateLabel4 = new System.Windows.Forms.Label();
|
||||
this.startTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.exclamation5 = new System.Windows.Forms.Label();
|
||||
this.wmStartStateTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.wmEndStateTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.wmStateLabel5 = new System.Windows.Forms.Label();
|
||||
this.startTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.exclamation6 = new System.Windows.Forms.Label();
|
||||
this.wmStartStateTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.wmEndStateTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.wmStateLabel6 = new System.Windows.Forms.Label();
|
||||
this.startTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.endTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.startLabel = new System.Windows.Forms.Label();
|
||||
this.endLabel = new System.Windows.Forms.Label();
|
||||
this.groupBox2.SuspendLayout();
|
||||
@@ -75,9 +75,9 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.exclamation2);
|
||||
this.groupBox2.Controls.Add(this.wmStartStateTextBox2);
|
||||
this.groupBox2.Controls.Add(this.wmEndStateTextBox2);
|
||||
this.groupBox2.Controls.Add(this.wmStateLabel2);
|
||||
this.groupBox2.Controls.Add(this.startTextBox2);
|
||||
this.groupBox2.Controls.Add(this.endTextBox2);
|
||||
this.groupBox2.Controls.Add(this.label2);
|
||||
this.groupBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.groupBox2.ForeColor = System.Drawing.Color.Black;
|
||||
this.groupBox2.Location = new System.Drawing.Point(25, 122);
|
||||
@@ -101,38 +101,38 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
//
|
||||
// wmStartStateTextBox2
|
||||
//
|
||||
this.wmStartStateTextBox2.Enabled = false;
|
||||
this.wmStartStateTextBox2.Location = new System.Drawing.Point(164, 31);
|
||||
this.wmStartStateTextBox2.Name = "wmStartStateTextBox2";
|
||||
this.wmStartStateTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmStartStateTextBox2.TabIndex = 3;
|
||||
this.wmStartStateTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox2_KeyPress);
|
||||
this.startTextBox2.Enabled = false;
|
||||
this.startTextBox2.Location = new System.Drawing.Point(164, 31);
|
||||
this.startTextBox2.Name = "wmStartStateTextBox2";
|
||||
this.startTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox2.TabIndex = 3;
|
||||
this.startTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox2_KeyPress);
|
||||
//
|
||||
// wmEndStateTextBox2
|
||||
//
|
||||
this.wmEndStateTextBox2.Enabled = false;
|
||||
this.wmEndStateTextBox2.Location = new System.Drawing.Point(350, 31);
|
||||
this.wmEndStateTextBox2.Name = "wmEndStateTextBox2";
|
||||
this.wmEndStateTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmEndStateTextBox2.TabIndex = 1;
|
||||
this.wmEndStateTextBox2.TextChanged += new System.EventHandler(this.wmEndStateTextBox2_TextChanged);
|
||||
this.wmEndStateTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox2_KeyPress);
|
||||
this.endTextBox2.Enabled = false;
|
||||
this.endTextBox2.Location = new System.Drawing.Point(350, 31);
|
||||
this.endTextBox2.Name = "wmEndStateTextBox2";
|
||||
this.endTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox2.TabIndex = 1;
|
||||
this.endTextBox2.TextChanged += new System.EventHandler(this.endTextBox2_TextChanged);
|
||||
this.endTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox2_KeyPress);
|
||||
//
|
||||
// wmStateLabel2
|
||||
//
|
||||
this.wmStateLabel2.AutoSize = true;
|
||||
this.wmStateLabel2.Location = new System.Drawing.Point(18, 34);
|
||||
this.wmStateLabel2.Name = "wmStateLabel2";
|
||||
this.wmStateLabel2.Size = new System.Drawing.Size(68, 23);
|
||||
this.wmStateLabel2.TabIndex = 0;
|
||||
this.wmStateLabel2.Text = "State:";
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(18, 34);
|
||||
this.label2.Name = "wmStateLabel2";
|
||||
this.label2.Size = new System.Drawing.Size(68, 23);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "State:";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.exclamation1);
|
||||
this.groupBox1.Controls.Add(this.wmStartStateTextBox1);
|
||||
this.groupBox1.Controls.Add(this.wmEndStateTextBox1);
|
||||
this.groupBox1.Controls.Add(this.wmStateLabel1);
|
||||
this.groupBox1.Controls.Add(this.startTextBox1);
|
||||
this.groupBox1.Controls.Add(this.endTextBox1);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.groupBox1.ForeColor = System.Drawing.Color.Black;
|
||||
this.groupBox1.Location = new System.Drawing.Point(25, 32);
|
||||
@@ -156,31 +156,31 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
//
|
||||
// wmStartStateTextBox1
|
||||
//
|
||||
this.wmStartStateTextBox1.Enabled = false;
|
||||
this.wmStartStateTextBox1.Location = new System.Drawing.Point(164, 31);
|
||||
this.wmStartStateTextBox1.Name = "wmStartStateTextBox1";
|
||||
this.wmStartStateTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmStartStateTextBox1.TabIndex = 2;
|
||||
this.wmStartStateTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox1_KeyPress);
|
||||
this.startTextBox1.Enabled = false;
|
||||
this.startTextBox1.Location = new System.Drawing.Point(164, 31);
|
||||
this.startTextBox1.Name = "wmStartStateTextBox1";
|
||||
this.startTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox1.TabIndex = 2;
|
||||
this.startTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox1_KeyPress);
|
||||
//
|
||||
// wmEndStateTextBox1
|
||||
//
|
||||
this.wmEndStateTextBox1.Enabled = false;
|
||||
this.wmEndStateTextBox1.Location = new System.Drawing.Point(350, 31);
|
||||
this.wmEndStateTextBox1.Name = "wmEndStateTextBox1";
|
||||
this.wmEndStateTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmEndStateTextBox1.TabIndex = 1;
|
||||
this.wmEndStateTextBox1.TextChanged += new System.EventHandler(this.wmEndStateTextBox1_TextChanged);
|
||||
this.wmEndStateTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox1_KeyPress);
|
||||
this.endTextBox1.Enabled = false;
|
||||
this.endTextBox1.Location = new System.Drawing.Point(350, 31);
|
||||
this.endTextBox1.Name = "wmEndStateTextBox1";
|
||||
this.endTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox1.TabIndex = 1;
|
||||
this.endTextBox1.TextChanged += new System.EventHandler(this.endTextBox1_TextChanged);
|
||||
this.endTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox1_KeyPress);
|
||||
//
|
||||
// wmStateLabel1
|
||||
//
|
||||
this.wmStateLabel1.AutoSize = true;
|
||||
this.wmStateLabel1.Location = new System.Drawing.Point(18, 34);
|
||||
this.wmStateLabel1.Name = "wmStateLabel1";
|
||||
this.wmStateLabel1.Size = new System.Drawing.Size(68, 23);
|
||||
this.wmStateLabel1.TabIndex = 0;
|
||||
this.wmStateLabel1.Text = "State:";
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(18, 34);
|
||||
this.label1.Name = "wmStateLabel1";
|
||||
this.label1.Size = new System.Drawing.Size(68, 23);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "State:";
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
@@ -197,9 +197,9 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.exclamation3);
|
||||
this.groupBox3.Controls.Add(this.wmStartStateTextBox3);
|
||||
this.groupBox3.Controls.Add(this.wmEndStateTextBox3);
|
||||
this.groupBox3.Controls.Add(this.wmStateLabel3);
|
||||
this.groupBox3.Controls.Add(this.startTextBox3);
|
||||
this.groupBox3.Controls.Add(this.endTextBox3);
|
||||
this.groupBox3.Controls.Add(this.label3);
|
||||
this.groupBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.groupBox3.ForeColor = System.Drawing.Color.Black;
|
||||
this.groupBox3.Location = new System.Drawing.Point(25, 212);
|
||||
@@ -223,38 +223,38 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
//
|
||||
// wmStartStateTextBox3
|
||||
//
|
||||
this.wmStartStateTextBox3.Enabled = false;
|
||||
this.wmStartStateTextBox3.Location = new System.Drawing.Point(164, 31);
|
||||
this.wmStartStateTextBox3.Name = "wmStartStateTextBox3";
|
||||
this.wmStartStateTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmStartStateTextBox3.TabIndex = 4;
|
||||
this.wmStartStateTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox3_KeyPress);
|
||||
this.startTextBox3.Enabled = false;
|
||||
this.startTextBox3.Location = new System.Drawing.Point(164, 31);
|
||||
this.startTextBox3.Name = "wmStartStateTextBox3";
|
||||
this.startTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox3.TabIndex = 4;
|
||||
this.startTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox3_KeyPress);
|
||||
//
|
||||
// wmEndStateTextBox3
|
||||
//
|
||||
this.wmEndStateTextBox3.Enabled = false;
|
||||
this.wmEndStateTextBox3.Location = new System.Drawing.Point(350, 31);
|
||||
this.wmEndStateTextBox3.Name = "wmEndStateTextBox3";
|
||||
this.wmEndStateTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmEndStateTextBox3.TabIndex = 1;
|
||||
this.wmEndStateTextBox3.TextChanged += new System.EventHandler(this.wmEndStateTextBox3_TextChanged);
|
||||
this.wmEndStateTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox3_KeyPress);
|
||||
this.endTextBox3.Enabled = false;
|
||||
this.endTextBox3.Location = new System.Drawing.Point(350, 31);
|
||||
this.endTextBox3.Name = "wmEndStateTextBox3";
|
||||
this.endTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox3.TabIndex = 1;
|
||||
this.endTextBox3.TextChanged += new System.EventHandler(this.endTextBox3_TextChanged);
|
||||
this.endTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox3_KeyPress);
|
||||
//
|
||||
// wmStateLabel3
|
||||
//
|
||||
this.wmStateLabel3.AutoSize = true;
|
||||
this.wmStateLabel3.Location = new System.Drawing.Point(18, 34);
|
||||
this.wmStateLabel3.Name = "wmStateLabel3";
|
||||
this.wmStateLabel3.Size = new System.Drawing.Size(68, 23);
|
||||
this.wmStateLabel3.TabIndex = 0;
|
||||
this.wmStateLabel3.Text = "State:";
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(18, 34);
|
||||
this.label3.Name = "wmStateLabel3";
|
||||
this.label3.Size = new System.Drawing.Size(68, 23);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "State:";
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.exclamation4);
|
||||
this.groupBox4.Controls.Add(this.wmStartStateTextBox4);
|
||||
this.groupBox4.Controls.Add(this.wmEndStateTextBox4);
|
||||
this.groupBox4.Controls.Add(this.wmStateLabel4);
|
||||
this.groupBox4.Controls.Add(this.startTextBox4);
|
||||
this.groupBox4.Controls.Add(this.endTextBox4);
|
||||
this.groupBox4.Controls.Add(this.label4);
|
||||
this.groupBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.groupBox4.ForeColor = System.Drawing.Color.Black;
|
||||
this.groupBox4.Location = new System.Drawing.Point(25, 302);
|
||||
@@ -278,38 +278,38 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
//
|
||||
// wmStartStateTextBox4
|
||||
//
|
||||
this.wmStartStateTextBox4.Enabled = false;
|
||||
this.wmStartStateTextBox4.Location = new System.Drawing.Point(164, 31);
|
||||
this.wmStartStateTextBox4.Name = "wmStartStateTextBox4";
|
||||
this.wmStartStateTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmStartStateTextBox4.TabIndex = 4;
|
||||
this.wmStartStateTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox4_KeyPress);
|
||||
this.startTextBox4.Enabled = false;
|
||||
this.startTextBox4.Location = new System.Drawing.Point(164, 31);
|
||||
this.startTextBox4.Name = "wmStartStateTextBox4";
|
||||
this.startTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox4.TabIndex = 4;
|
||||
this.startTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox4_KeyPress);
|
||||
//
|
||||
// wmEndStateTextBox4
|
||||
//
|
||||
this.wmEndStateTextBox4.Enabled = false;
|
||||
this.wmEndStateTextBox4.Location = new System.Drawing.Point(350, 31);
|
||||
this.wmEndStateTextBox4.Name = "wmEndStateTextBox4";
|
||||
this.wmEndStateTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmEndStateTextBox4.TabIndex = 1;
|
||||
this.wmEndStateTextBox4.TextChanged += new System.EventHandler(this.wmEndStateTextBox4_TextChanged);
|
||||
this.wmEndStateTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox4_KeyPress);
|
||||
this.endTextBox4.Enabled = false;
|
||||
this.endTextBox4.Location = new System.Drawing.Point(350, 31);
|
||||
this.endTextBox4.Name = "wmEndStateTextBox4";
|
||||
this.endTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox4.TabIndex = 1;
|
||||
this.endTextBox4.TextChanged += new System.EventHandler(this.endTextBox4_TextChanged);
|
||||
this.endTextBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox4_KeyPress);
|
||||
//
|
||||
// wmStateLabel4
|
||||
//
|
||||
this.wmStateLabel4.AutoSize = true;
|
||||
this.wmStateLabel4.Location = new System.Drawing.Point(18, 34);
|
||||
this.wmStateLabel4.Name = "wmStateLabel4";
|
||||
this.wmStateLabel4.Size = new System.Drawing.Size(68, 23);
|
||||
this.wmStateLabel4.TabIndex = 0;
|
||||
this.wmStateLabel4.Text = "State:";
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(18, 34);
|
||||
this.label4.Name = "wmStateLabel4";
|
||||
this.label4.Size = new System.Drawing.Size(68, 23);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "State:";
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.exclamation5);
|
||||
this.groupBox5.Controls.Add(this.wmStartStateTextBox5);
|
||||
this.groupBox5.Controls.Add(this.wmEndStateTextBox5);
|
||||
this.groupBox5.Controls.Add(this.wmStateLabel5);
|
||||
this.groupBox5.Controls.Add(this.startTextBox5);
|
||||
this.groupBox5.Controls.Add(this.endTextBox5);
|
||||
this.groupBox5.Controls.Add(this.label5);
|
||||
this.groupBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.groupBox5.ForeColor = System.Drawing.Color.Black;
|
||||
this.groupBox5.Location = new System.Drawing.Point(25, 392);
|
||||
@@ -333,38 +333,38 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
//
|
||||
// wmStartStateTextBox5
|
||||
//
|
||||
this.wmStartStateTextBox5.Enabled = false;
|
||||
this.wmStartStateTextBox5.Location = new System.Drawing.Point(164, 31);
|
||||
this.wmStartStateTextBox5.Name = "wmStartStateTextBox5";
|
||||
this.wmStartStateTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmStartStateTextBox5.TabIndex = 4;
|
||||
this.wmStartStateTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox5_KeyPress);
|
||||
this.startTextBox5.Enabled = false;
|
||||
this.startTextBox5.Location = new System.Drawing.Point(164, 31);
|
||||
this.startTextBox5.Name = "wmStartStateTextBox5";
|
||||
this.startTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox5.TabIndex = 4;
|
||||
this.startTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox5_KeyPress);
|
||||
//
|
||||
// wmEndStateTextBox5
|
||||
//
|
||||
this.wmEndStateTextBox5.Enabled = false;
|
||||
this.wmEndStateTextBox5.Location = new System.Drawing.Point(350, 31);
|
||||
this.wmEndStateTextBox5.Name = "wmEndStateTextBox5";
|
||||
this.wmEndStateTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmEndStateTextBox5.TabIndex = 1;
|
||||
this.wmEndStateTextBox5.TextChanged += new System.EventHandler(this.wmEndStateTextBox5_TextChanged);
|
||||
this.wmEndStateTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox5_KeyPress);
|
||||
this.endTextBox5.Enabled = false;
|
||||
this.endTextBox5.Location = new System.Drawing.Point(350, 31);
|
||||
this.endTextBox5.Name = "wmEndStateTextBox5";
|
||||
this.endTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox5.TabIndex = 1;
|
||||
this.endTextBox5.TextChanged += new System.EventHandler(this.endTextBox5_TextChanged);
|
||||
this.endTextBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox5_KeyPress);
|
||||
//
|
||||
// wmStateLabel5
|
||||
//
|
||||
this.wmStateLabel5.AutoSize = true;
|
||||
this.wmStateLabel5.Location = new System.Drawing.Point(18, 34);
|
||||
this.wmStateLabel5.Name = "wmStateLabel5";
|
||||
this.wmStateLabel5.Size = new System.Drawing.Size(68, 23);
|
||||
this.wmStateLabel5.TabIndex = 0;
|
||||
this.wmStateLabel5.Text = "State:";
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(18, 34);
|
||||
this.label5.Name = "wmStateLabel5";
|
||||
this.label5.Size = new System.Drawing.Size(68, 23);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "State:";
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Controls.Add(this.exclamation6);
|
||||
this.groupBox6.Controls.Add(this.wmStartStateTextBox6);
|
||||
this.groupBox6.Controls.Add(this.wmEndStateTextBox6);
|
||||
this.groupBox6.Controls.Add(this.wmStateLabel6);
|
||||
this.groupBox6.Controls.Add(this.startTextBox6);
|
||||
this.groupBox6.Controls.Add(this.endTextBox6);
|
||||
this.groupBox6.Controls.Add(this.label6);
|
||||
this.groupBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.groupBox6.ForeColor = System.Drawing.Color.Black;
|
||||
this.groupBox6.Location = new System.Drawing.Point(25, 482);
|
||||
@@ -388,31 +388,31 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
//
|
||||
// wmStartStateTextBox6
|
||||
//
|
||||
this.wmStartStateTextBox6.Enabled = false;
|
||||
this.wmStartStateTextBox6.Location = new System.Drawing.Point(164, 31);
|
||||
this.wmStartStateTextBox6.Name = "wmStartStateTextBox6";
|
||||
this.wmStartStateTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmStartStateTextBox6.TabIndex = 4;
|
||||
this.wmStartStateTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmStartStateTextBox6_KeyPress);
|
||||
this.startTextBox6.Enabled = false;
|
||||
this.startTextBox6.Location = new System.Drawing.Point(164, 31);
|
||||
this.startTextBox6.Name = "wmStartStateTextBox6";
|
||||
this.startTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox6.TabIndex = 4;
|
||||
this.startTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox6_KeyPress);
|
||||
//
|
||||
// wmEndStateTextBox6
|
||||
//
|
||||
this.wmEndStateTextBox6.Enabled = false;
|
||||
this.wmEndStateTextBox6.Location = new System.Drawing.Point(350, 31);
|
||||
this.wmEndStateTextBox6.Name = "wmEndStateTextBox6";
|
||||
this.wmEndStateTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.wmEndStateTextBox6.TabIndex = 1;
|
||||
this.wmEndStateTextBox6.TextChanged += new System.EventHandler(this.wmEndStateTextBox6_TextChanged);
|
||||
this.wmEndStateTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.wmEndStateTextBox6_KeyPress);
|
||||
this.endTextBox6.Enabled = false;
|
||||
this.endTextBox6.Location = new System.Drawing.Point(350, 31);
|
||||
this.endTextBox6.Name = "wmEndStateTextBox6";
|
||||
this.endTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox6.TabIndex = 1;
|
||||
this.endTextBox6.TextChanged += new System.EventHandler(this.endTextBox6_TextChanged);
|
||||
this.endTextBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.endTextBox6_KeyPress);
|
||||
//
|
||||
// wmStateLabel6
|
||||
//
|
||||
this.wmStateLabel6.AutoSize = true;
|
||||
this.wmStateLabel6.Location = new System.Drawing.Point(18, 34);
|
||||
this.wmStateLabel6.Name = "wmStateLabel6";
|
||||
this.wmStateLabel6.Size = new System.Drawing.Size(68, 23);
|
||||
this.wmStateLabel6.TabIndex = 0;
|
||||
this.wmStateLabel6.Text = "State:";
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(18, 34);
|
||||
this.label6.Name = "wmStateLabel6";
|
||||
this.label6.Size = new System.Drawing.Size(68, 23);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "State:";
|
||||
//
|
||||
// startLabel
|
||||
//
|
||||
@@ -454,7 +454,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Text = "End States";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleEndForm_Load);
|
||||
this.Load += new System.EventHandler(this.TestStartEndForm_Load);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
@@ -475,30 +475,30 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox wmEndStateTextBox2;
|
||||
private System.Windows.Forms.Label wmStateLabel2;
|
||||
private System.Windows.Forms.TextBox endTextBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox wmEndStateTextBox1;
|
||||
private System.Windows.Forms.Label wmStateLabel1;
|
||||
private System.Windows.Forms.TextBox endTextBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.TextBox wmEndStateTextBox3;
|
||||
private System.Windows.Forms.Label wmStateLabel3;
|
||||
private System.Windows.Forms.TextBox endTextBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.TextBox wmEndStateTextBox4;
|
||||
private System.Windows.Forms.Label wmStateLabel4;
|
||||
private System.Windows.Forms.TextBox endTextBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
private System.Windows.Forms.TextBox wmEndStateTextBox5;
|
||||
private System.Windows.Forms.Label wmStateLabel5;
|
||||
private System.Windows.Forms.TextBox endTextBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.GroupBox groupBox6;
|
||||
private System.Windows.Forms.TextBox wmEndStateTextBox6;
|
||||
private System.Windows.Forms.Label wmStateLabel6;
|
||||
private System.Windows.Forms.TextBox wmStartStateTextBox2;
|
||||
private System.Windows.Forms.TextBox wmStartStateTextBox1;
|
||||
private System.Windows.Forms.TextBox wmStartStateTextBox3;
|
||||
private System.Windows.Forms.TextBox wmStartStateTextBox4;
|
||||
private System.Windows.Forms.TextBox wmStartStateTextBox5;
|
||||
private System.Windows.Forms.TextBox wmStartStateTextBox6;
|
||||
private System.Windows.Forms.TextBox endTextBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox startTextBox2;
|
||||
private System.Windows.Forms.TextBox startTextBox1;
|
||||
private System.Windows.Forms.TextBox startTextBox3;
|
||||
private System.Windows.Forms.TextBox startTextBox4;
|
||||
private System.Windows.Forms.TextBox startTextBox5;
|
||||
private System.Windows.Forms.TextBox startTextBox6;
|
||||
private System.Windows.Forms.Label startLabel;
|
||||
private System.Windows.Forms.Label endLabel;
|
||||
private System.Windows.Forms.Label exclamation2;
|
||||
|
||||
+620
-620
File diff suppressed because it is too large
Load Diff
@@ -148,8 +148,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add(Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
if (AtTheEnd)
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 124</value>
|
||||
<value>225, 124</value>
|
||||
</data>
|
||||
<data name="comboBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -346,7 +346,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 168</value>
|
||||
<value>225, 168</value>
|
||||
</data>
|
||||
<data name="comboBox2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -439,7 +439,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 212</value>
|
||||
<value>225, 212</value>
|
||||
</data>
|
||||
<data name="comboBox3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -532,7 +532,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 256</value>
|
||||
<value>225, 256</value>
|
||||
</data>
|
||||
<data name="comboBox4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -625,7 +625,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 300</value>
|
||||
<value>225, 300</value>
|
||||
</data>
|
||||
<data name="comboBox5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -718,7 +718,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 344</value>
|
||||
<value>225, 344</value>
|
||||
</data>
|
||||
<data name="comboBox6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -811,7 +811,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox7.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 388</value>
|
||||
<value>225, 388</value>
|
||||
</data>
|
||||
<data name="comboBox7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -904,7 +904,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox8.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 432</value>
|
||||
<value>225, 432</value>
|
||||
</data>
|
||||
<data name="comboBox8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -997,7 +997,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox9.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 476</value>
|
||||
<value>225, 476</value>
|
||||
</data>
|
||||
<data name="comboBox9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1090,7 +1090,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox10.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 520</value>
|
||||
<value>225, 520</value>
|
||||
</data>
|
||||
<data name="comboBox10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1183,7 +1183,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox11.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 564</value>
|
||||
<value>225, 564</value>
|
||||
</data>
|
||||
<data name="comboBox11.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1276,7 +1276,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox12.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 608</value>
|
||||
<value>225, 608</value>
|
||||
</data>
|
||||
<data name="comboBox12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
|
||||
@@ -15,7 +15,10 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
|
||||
public override string ToString() { return string.Format("DataEntry.Standard12({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
@@ -97,18 +100,20 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
@@ -131,13 +136,13 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Standard12
|
||||
@@ -19,17 +20,17 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMStartState;
|
||||
public double[] WMStartState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] WMStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMEndState;
|
||||
public double[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
double refVolume;
|
||||
@@ -79,17 +80,18 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
public TestStartEndForm(int waterMetersCount, bool[] disabled)
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMStartState = new float[waterMetersCount];
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
}
|
||||
|
||||
@@ -102,13 +104,14 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
@@ -119,7 +122,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMEndState = new float[waterMetersCount];
|
||||
WMEndState = new double[waterMetersCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -221,7 +224,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUFloat(endTextBoxes[i].Text);
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,7 +235,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUFloat(startTextBoxes[i].Text);
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -276,8 +279,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox1.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
@@ -288,8 +291,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox2.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox2.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -300,8 +303,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox3.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -312,8 +315,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox4.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -324,8 +327,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox5.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -336,8 +339,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox6.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -348,8 +351,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox7.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox7.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -360,8 +363,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox8.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox8.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -372,8 +375,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox9.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox9.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -385,8 +388,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox10.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox10.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -398,8 +401,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox11.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox11.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -410,8 +413,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox12.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox12.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
@@ -120,8 +120,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add(Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 124</value>
|
||||
<value>225, 124</value>
|
||||
</data>
|
||||
<data name="comboBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -346,7 +346,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 168</value>
|
||||
<value>225, 168</value>
|
||||
</data>
|
||||
<data name="comboBox2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -439,7 +439,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 212</value>
|
||||
<value>225, 212</value>
|
||||
</data>
|
||||
<data name="comboBox3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -532,7 +532,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 256</value>
|
||||
<value>225, 256</value>
|
||||
</data>
|
||||
<data name="comboBox4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -625,7 +625,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 300</value>
|
||||
<value>225, 300</value>
|
||||
</data>
|
||||
<data name="comboBox5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -718,7 +718,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 344</value>
|
||||
<value>225, 344</value>
|
||||
</data>
|
||||
<data name="comboBox6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -811,7 +811,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox7.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 388</value>
|
||||
<value>225, 388</value>
|
||||
</data>
|
||||
<data name="comboBox7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -904,7 +904,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox8.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 432</value>
|
||||
<value>225, 432</value>
|
||||
</data>
|
||||
<data name="comboBox8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -997,7 +997,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox9.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 476</value>
|
||||
<value>225, 476</value>
|
||||
</data>
|
||||
<data name="comboBox9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1090,7 +1090,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox10.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 520</value>
|
||||
<value>225, 520</value>
|
||||
</data>
|
||||
<data name="comboBox10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1183,7 +1183,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox11.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 564</value>
|
||||
<value>225, 564</value>
|
||||
</data>
|
||||
<data name="comboBox11.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1276,7 +1276,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox12.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 608</value>
|
||||
<value>225, 608</value>
|
||||
</data>
|
||||
<data name="comboBox12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1369,7 +1369,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 124</value>
|
||||
<value>686, 124</value>
|
||||
</data>
|
||||
<data name="comboBox13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1462,7 +1462,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox14.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 168</value>
|
||||
<value>686, 168</value>
|
||||
</data>
|
||||
<data name="comboBox14.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1555,7 +1555,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox15.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 212</value>
|
||||
<value>686, 212</value>
|
||||
</data>
|
||||
<data name="comboBox15.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1648,7 +1648,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox16.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 256</value>
|
||||
<value>686, 256</value>
|
||||
</data>
|
||||
<data name="comboBox16.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1741,7 +1741,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox17.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 300</value>
|
||||
<value>686, 300</value>
|
||||
</data>
|
||||
<data name="comboBox17.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1834,7 +1834,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox18.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 344</value>
|
||||
<value>686, 344</value>
|
||||
</data>
|
||||
<data name="comboBox18.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -1927,7 +1927,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox19.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 388</value>
|
||||
<value>686, 388</value>
|
||||
</data>
|
||||
<data name="comboBox19.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -2020,7 +2020,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox20.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 432</value>
|
||||
<value>686, 432</value>
|
||||
</data>
|
||||
<data name="comboBox20.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -2113,7 +2113,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox21.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 476</value>
|
||||
<value>686, 476</value>
|
||||
</data>
|
||||
<data name="comboBox21.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -2206,7 +2206,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox22.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 520</value>
|
||||
<value>686, 520</value>
|
||||
</data>
|
||||
<data name="comboBox22.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -2299,7 +2299,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox23.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 564</value>
|
||||
<value>686, 564</value>
|
||||
</data>
|
||||
<data name="comboBox23.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
@@ -2392,7 +2392,7 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="comboBox24.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>676, 608</value>
|
||||
<value>686, 608</value>
|
||||
</data>
|
||||
<data name="comboBox24.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>163, 31</value>
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
///
|
||||
public bool EnterSerialNrsAtTheEnd;
|
||||
public bool ShowCycleEndForm;
|
||||
public bool SensusExtensions;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
@@ -30,7 +29,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
ParentName = string.Empty;
|
||||
EnterSerialNrsAtTheEnd = false;
|
||||
ShowCycleEndForm = false;
|
||||
SensusExtensions = false;
|
||||
}
|
||||
|
||||
public EntryFormCfg(IComponentFactory factory)
|
||||
@@ -41,7 +39,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, EnterSNsAtTheEnd={1}, ShowEndForm={2}, SensusExt={3}", Name, EnterSerialNrsAtTheEnd, ShowCycleEndForm, SensusExtensions);
|
||||
return string.Format("Name={0}, EnterSNsAtTheEnd={1}, ShowEndForm={2}", Name, EnterSerialNrsAtTheEnd, ShowCycleEndForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
enterSNsAtTheEndCheckBox.Text = Strings.Enter_SNs_at_the_end;
|
||||
showEndStateFormCheckBox.Text = Strings.Show_cycle_end_form;
|
||||
sensusExtensionsCheckBox.Text = Strings.Sensus_extensions;
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
@@ -55,7 +54,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
nameTextBox.Text = config.Name;
|
||||
enterSNsAtTheEndCheckBox.Checked = config.EnterSerialNrsAtTheEnd;
|
||||
showEndStateFormCheckBox.Checked = config.ShowCycleEndForm;
|
||||
sensusExtensionsCheckBox.Checked = config.SensusExtensions;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
@@ -63,7 +61,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
nameTextBox.Enabled = true;
|
||||
enterSNsAtTheEndCheckBox.Enabled = true;
|
||||
showEndStateFormCheckBox.Enabled = true;
|
||||
sensusExtensionsCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
@@ -81,7 +78,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
config.Name = nameTextBox.Text;
|
||||
config.EnterSerialNrsAtTheEnd = enterSNsAtTheEndCheckBox.Checked;
|
||||
config.ShowCycleEndForm = showEndStateFormCheckBox.Checked;
|
||||
config.SensusExtensions = sensusExtensionsCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
+69
-83
@@ -31,88 +31,75 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.showEndStateFormCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.enterSNsAtTheEndCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.sensusExtensionsCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(99, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(35, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(96, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// showEndStateFormCheckBox
|
||||
//
|
||||
this.showEndStateFormCheckBox.AutoSize = true;
|
||||
this.showEndStateFormCheckBox.Enabled = false;
|
||||
this.showEndStateFormCheckBox.Location = new System.Drawing.Point(99, 112);
|
||||
this.showEndStateFormCheckBox.Name = "showEndStateFormCheckBox";
|
||||
this.showEndStateFormCheckBox.Size = new System.Drawing.Size(151, 17);
|
||||
this.showEndStateFormCheckBox.TabIndex = 4;
|
||||
this.showEndStateFormCheckBox.Text = "Watermeter end state form";
|
||||
this.showEndStateFormCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// enterSNsAtTheEndCheckBox
|
||||
//
|
||||
this.enterSNsAtTheEndCheckBox.AutoSize = true;
|
||||
this.enterSNsAtTheEndCheckBox.Enabled = false;
|
||||
this.enterSNsAtTheEndCheckBox.Location = new System.Drawing.Point(99, 89);
|
||||
this.enterSNsAtTheEndCheckBox.Name = "enterSNsAtTheEndCheckBox";
|
||||
this.enterSNsAtTheEndCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.enterSNsAtTheEndCheckBox.TabIndex = 3;
|
||||
this.enterSNsAtTheEndCheckBox.Text = "Enter serial number at the end";
|
||||
this.enterSNsAtTheEndCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// sensusExtensionsCheckBox
|
||||
//
|
||||
this.sensusExtensionsCheckBox.AutoSize = true;
|
||||
this.sensusExtensionsCheckBox.Enabled = false;
|
||||
this.sensusExtensionsCheckBox.Location = new System.Drawing.Point(99, 135);
|
||||
this.sensusExtensionsCheckBox.Name = "sensusExtensionsCheckBox";
|
||||
this.sensusExtensionsCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.sensusExtensionsCheckBox.TabIndex = 5;
|
||||
this.sensusExtensionsCheckBox.Text = "Sensus production extensions";
|
||||
this.sensusExtensionsCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.sensusExtensionsCheckBox);
|
||||
this.Controls.Add(this.enterSNsAtTheEndCheckBox);
|
||||
this.Controls.Add(this.showEndStateFormCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.showEndStateFormCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.enterSNsAtTheEndCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(99, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(35, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(96, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// showEndStateFormCheckBox
|
||||
//
|
||||
this.showEndStateFormCheckBox.AutoSize = true;
|
||||
this.showEndStateFormCheckBox.Enabled = false;
|
||||
this.showEndStateFormCheckBox.Location = new System.Drawing.Point(99, 112);
|
||||
this.showEndStateFormCheckBox.Name = "showEndStateFormCheckBox";
|
||||
this.showEndStateFormCheckBox.Size = new System.Drawing.Size(151, 17);
|
||||
this.showEndStateFormCheckBox.TabIndex = 4;
|
||||
this.showEndStateFormCheckBox.Text = "Watermeter end state form";
|
||||
this.showEndStateFormCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// enterSNsAtTheEndCheckBox
|
||||
//
|
||||
this.enterSNsAtTheEndCheckBox.AutoSize = true;
|
||||
this.enterSNsAtTheEndCheckBox.Enabled = false;
|
||||
this.enterSNsAtTheEndCheckBox.Location = new System.Drawing.Point(99, 89);
|
||||
this.enterSNsAtTheEndCheckBox.Name = "enterSNsAtTheEndCheckBox";
|
||||
this.enterSNsAtTheEndCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.enterSNsAtTheEndCheckBox.TabIndex = 3;
|
||||
this.enterSNsAtTheEndCheckBox.Text = "Enter serial number at the end";
|
||||
this.enterSNsAtTheEndCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.enterSNsAtTheEndCheckBox);
|
||||
this.Controls.Add(this.showEndStateFormCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -123,6 +110,5 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.CheckBox showEndStateFormCheckBox;
|
||||
private System.Windows.Forms.CheckBox enterSNsAtTheEndCheckBox;
|
||||
private System.Windows.Forms.CheckBox sensusExtensionsCheckBox;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,10 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
|
||||
public override string ToString() { return string.Format("DataEntry.Standard24({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
@@ -97,18 +100,20 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
@@ -131,13 +136,13 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Standard24
|
||||
@@ -19,17 +20,17 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMStartState;
|
||||
public double[] WMStartState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] WMStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMEndState;
|
||||
public double[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
double refVolume;
|
||||
@@ -84,17 +85,18 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
public TestStartEndForm(int waterMetersCount, bool[] disabled)
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMStartState = new float[waterMetersCount];
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
}
|
||||
|
||||
@@ -107,13 +109,14 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
@@ -124,7 +127,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMEndState = new float[waterMetersCount];
|
||||
WMEndState = new double[waterMetersCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -211,8 +214,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
labels[i].Text = Strings.Water_Meter + " " + (i + 1).ToString();
|
||||
}
|
||||
startLabel.Text = Strings.Start;
|
||||
endLabel.Text = Strings.End;
|
||||
startLabel.Text = startLabel2.Text = Strings.Start;
|
||||
endLabel.Text = endLabel2.Text = Strings.End;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
}
|
||||
|
||||
@@ -226,7 +229,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUFloat(endTextBoxes[i].Text);
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +240,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUFloat(startTextBoxes[i].Text);
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,8 +284,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox1.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
@@ -293,8 +296,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox2.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox2.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -305,8 +308,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox3.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -317,8 +320,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox4.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -329,8 +332,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox5.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -341,8 +344,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox6.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -353,8 +356,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox7.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox7.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -365,8 +368,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox8.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox8.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -377,8 +380,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox9.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox9.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -390,8 +393,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox10.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox10.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -403,8 +406,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox11.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox11.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -415,8 +418,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox12.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox12.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -427,8 +430,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox13.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox13.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox13.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox13.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -439,8 +442,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox14.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox14.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox14.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox14.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -451,8 +454,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox15.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox15.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox15.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox15.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -463,8 +466,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox16.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox16.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox16.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox16.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -475,8 +478,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox17.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox17.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox17.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox17.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -487,8 +490,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox18.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox18.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox18.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox18.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -499,8 +502,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox19.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox19.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox19.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox19.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -511,8 +514,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox20.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox20.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox20.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox20.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -523,8 +526,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox21.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox21.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox21.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox21.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -535,8 +538,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox22.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox22.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox22.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox22.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -547,8 +550,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox23.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox23.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox23.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox23.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -559,8 +562,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox24.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox24.Text);
|
||||
double endState = Utils.ParseUDouble(endTextBox24.Text);
|
||||
double startState = Utils.ParseUDouble(startTextBox24.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
+96
-96
@@ -125,11 +125,11 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.endTextBox15 = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.startTextBox14 = new System.Windows.Forms.TextBox();
|
||||
this.label35 = new System.Windows.Forms.Label();
|
||||
this.endLabel2 = new System.Windows.Forms.Label();
|
||||
this.endTextBox14 = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.startTextBox13 = new System.Windows.Forms.TextBox();
|
||||
this.label37 = new System.Windows.Forms.Label();
|
||||
this.startLabel2 = new System.Windows.Forms.Label();
|
||||
this.endTextBox13 = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
@@ -139,7 +139,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation1.AutoSize = true;
|
||||
this.exclamation1.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation1.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation1.Location = new System.Drawing.Point(532, 56);
|
||||
this.exclamation1.Location = new System.Drawing.Point(547, 56);
|
||||
this.exclamation1.Name = "exclamation1";
|
||||
this.exclamation1.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation1.TabIndex = 5;
|
||||
@@ -150,7 +150,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox1.Enabled = false;
|
||||
this.startTextBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox1.Location = new System.Drawing.Point(185, 60);
|
||||
this.startTextBox1.Location = new System.Drawing.Point(200, 60);
|
||||
this.startTextBox1.Name = "startTextBox1";
|
||||
this.startTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox1.TabIndex = 3;
|
||||
@@ -161,7 +161,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox1.Enabled = false;
|
||||
this.endTextBox1.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox1.Location = new System.Drawing.Point(367, 60);
|
||||
this.endTextBox1.Location = new System.Drawing.Point(382, 60);
|
||||
this.endTextBox1.Name = "endTextBox1";
|
||||
this.endTextBox1.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox1.TabIndex = 4;
|
||||
@@ -197,7 +197,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation3.AutoSize = true;
|
||||
this.exclamation3.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation3.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation3.Location = new System.Drawing.Point(532, 144);
|
||||
this.exclamation3.Location = new System.Drawing.Point(547, 144);
|
||||
this.exclamation3.Name = "exclamation3";
|
||||
this.exclamation3.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation3.TabIndex = 13;
|
||||
@@ -208,7 +208,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox3.Enabled = false;
|
||||
this.startTextBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox3.Location = new System.Drawing.Point(185, 148);
|
||||
this.startTextBox3.Location = new System.Drawing.Point(200, 148);
|
||||
this.startTextBox3.Name = "startTextBox3";
|
||||
this.startTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox3.TabIndex = 11;
|
||||
@@ -219,7 +219,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox3.Enabled = false;
|
||||
this.endTextBox3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox3.Location = new System.Drawing.Point(367, 148);
|
||||
this.endTextBox3.Location = new System.Drawing.Point(382, 148);
|
||||
this.endTextBox3.Name = "endTextBox3";
|
||||
this.endTextBox3.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox3.TabIndex = 12;
|
||||
@@ -243,7 +243,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation4.AutoSize = true;
|
||||
this.exclamation4.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation4.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation4.Location = new System.Drawing.Point(532, 188);
|
||||
this.exclamation4.Location = new System.Drawing.Point(547, 188);
|
||||
this.exclamation4.Name = "exclamation4";
|
||||
this.exclamation4.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation4.TabIndex = 17;
|
||||
@@ -254,7 +254,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox4.Enabled = false;
|
||||
this.startTextBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox4.Location = new System.Drawing.Point(185, 192);
|
||||
this.startTextBox4.Location = new System.Drawing.Point(200, 192);
|
||||
this.startTextBox4.Name = "startTextBox4";
|
||||
this.startTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox4.TabIndex = 15;
|
||||
@@ -265,7 +265,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox4.Enabled = false;
|
||||
this.endTextBox4.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox4.Location = new System.Drawing.Point(367, 192);
|
||||
this.endTextBox4.Location = new System.Drawing.Point(382, 192);
|
||||
this.endTextBox4.Name = "endTextBox4";
|
||||
this.endTextBox4.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox4.TabIndex = 16;
|
||||
@@ -289,7 +289,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation5.AutoSize = true;
|
||||
this.exclamation5.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation5.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation5.Location = new System.Drawing.Point(532, 232);
|
||||
this.exclamation5.Location = new System.Drawing.Point(547, 232);
|
||||
this.exclamation5.Name = "exclamation5";
|
||||
this.exclamation5.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation5.TabIndex = 21;
|
||||
@@ -300,7 +300,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox5.Enabled = false;
|
||||
this.startTextBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox5.Location = new System.Drawing.Point(185, 236);
|
||||
this.startTextBox5.Location = new System.Drawing.Point(200, 236);
|
||||
this.startTextBox5.Name = "startTextBox5";
|
||||
this.startTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox5.TabIndex = 19;
|
||||
@@ -311,7 +311,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox5.Enabled = false;
|
||||
this.endTextBox5.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox5.Location = new System.Drawing.Point(367, 236);
|
||||
this.endTextBox5.Location = new System.Drawing.Point(382, 236);
|
||||
this.endTextBox5.Name = "endTextBox5";
|
||||
this.endTextBox5.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox5.TabIndex = 20;
|
||||
@@ -335,7 +335,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation6.AutoSize = true;
|
||||
this.exclamation6.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation6.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation6.Location = new System.Drawing.Point(532, 276);
|
||||
this.exclamation6.Location = new System.Drawing.Point(547, 276);
|
||||
this.exclamation6.Name = "exclamation6";
|
||||
this.exclamation6.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation6.TabIndex = 25;
|
||||
@@ -346,7 +346,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox6.Enabled = false;
|
||||
this.startTextBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox6.Location = new System.Drawing.Point(185, 280);
|
||||
this.startTextBox6.Location = new System.Drawing.Point(200, 280);
|
||||
this.startTextBox6.Name = "startTextBox6";
|
||||
this.startTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox6.TabIndex = 23;
|
||||
@@ -357,7 +357,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox6.Enabled = false;
|
||||
this.endTextBox6.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox6.Location = new System.Drawing.Point(367, 280);
|
||||
this.endTextBox6.Location = new System.Drawing.Point(382, 280);
|
||||
this.endTextBox6.Name = "endTextBox6";
|
||||
this.endTextBox6.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox6.TabIndex = 24;
|
||||
@@ -380,7 +380,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startLabel.AutoSize = true;
|
||||
this.startLabel.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startLabel.Location = new System.Drawing.Point(237, 21);
|
||||
this.startLabel.Location = new System.Drawing.Point(252, 21);
|
||||
this.startLabel.Name = "startLabel";
|
||||
this.startLabel.Size = new System.Drawing.Size(56, 23);
|
||||
this.startLabel.TabIndex = 0;
|
||||
@@ -390,7 +390,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endLabel.AutoSize = true;
|
||||
this.endLabel.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endLabel.Location = new System.Drawing.Point(423, 21);
|
||||
this.endLabel.Location = new System.Drawing.Point(438, 21);
|
||||
this.endLabel.Name = "endLabel";
|
||||
this.endLabel.Size = new System.Drawing.Size(46, 23);
|
||||
this.endLabel.TabIndex = 1;
|
||||
@@ -411,7 +411,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox2.Enabled = false;
|
||||
this.endTextBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox2.Location = new System.Drawing.Point(367, 104);
|
||||
this.endTextBox2.Location = new System.Drawing.Point(382, 104);
|
||||
this.endTextBox2.Name = "endTextBox2";
|
||||
this.endTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox2.TabIndex = 8;
|
||||
@@ -423,7 +423,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox2.Enabled = false;
|
||||
this.startTextBox2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox2.Location = new System.Drawing.Point(185, 104);
|
||||
this.startTextBox2.Location = new System.Drawing.Point(200, 104);
|
||||
this.startTextBox2.Name = "startTextBox2";
|
||||
this.startTextBox2.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox2.TabIndex = 7;
|
||||
@@ -435,7 +435,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation2.AutoSize = true;
|
||||
this.exclamation2.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation2.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation2.Location = new System.Drawing.Point(532, 100);
|
||||
this.exclamation2.Location = new System.Drawing.Point(547, 100);
|
||||
this.exclamation2.Name = "exclamation2";
|
||||
this.exclamation2.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation2.TabIndex = 9;
|
||||
@@ -447,7 +447,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation7.AutoSize = true;
|
||||
this.exclamation7.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation7.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation7.Location = new System.Drawing.Point(532, 320);
|
||||
this.exclamation7.Location = new System.Drawing.Point(547, 320);
|
||||
this.exclamation7.Name = "exclamation7";
|
||||
this.exclamation7.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation7.TabIndex = 29;
|
||||
@@ -458,7 +458,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox7.Enabled = false;
|
||||
this.startTextBox7.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox7.Location = new System.Drawing.Point(185, 324);
|
||||
this.startTextBox7.Location = new System.Drawing.Point(200, 324);
|
||||
this.startTextBox7.Name = "startTextBox7";
|
||||
this.startTextBox7.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox7.TabIndex = 27;
|
||||
@@ -469,7 +469,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox7.Enabled = false;
|
||||
this.endTextBox7.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox7.Location = new System.Drawing.Point(367, 324);
|
||||
this.endTextBox7.Location = new System.Drawing.Point(382, 324);
|
||||
this.endTextBox7.Name = "endTextBox7";
|
||||
this.endTextBox7.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox7.TabIndex = 28;
|
||||
@@ -493,7 +493,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation8.AutoSize = true;
|
||||
this.exclamation8.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation8.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation8.Location = new System.Drawing.Point(532, 364);
|
||||
this.exclamation8.Location = new System.Drawing.Point(547, 364);
|
||||
this.exclamation8.Name = "exclamation8";
|
||||
this.exclamation8.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation8.TabIndex = 33;
|
||||
@@ -504,7 +504,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox8.Enabled = false;
|
||||
this.startTextBox8.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox8.Location = new System.Drawing.Point(185, 368);
|
||||
this.startTextBox8.Location = new System.Drawing.Point(200, 368);
|
||||
this.startTextBox8.Name = "startTextBox8";
|
||||
this.startTextBox8.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox8.TabIndex = 31;
|
||||
@@ -515,7 +515,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox8.Enabled = false;
|
||||
this.endTextBox8.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox8.Location = new System.Drawing.Point(367, 368);
|
||||
this.endTextBox8.Location = new System.Drawing.Point(382, 368);
|
||||
this.endTextBox8.Name = "endTextBox8";
|
||||
this.endTextBox8.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox8.TabIndex = 32;
|
||||
@@ -539,7 +539,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation9.AutoSize = true;
|
||||
this.exclamation9.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation9.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation9.Location = new System.Drawing.Point(532, 408);
|
||||
this.exclamation9.Location = new System.Drawing.Point(547, 408);
|
||||
this.exclamation9.Name = "exclamation9";
|
||||
this.exclamation9.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation9.TabIndex = 37;
|
||||
@@ -550,7 +550,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox9.Enabled = false;
|
||||
this.startTextBox9.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox9.Location = new System.Drawing.Point(185, 412);
|
||||
this.startTextBox9.Location = new System.Drawing.Point(200, 412);
|
||||
this.startTextBox9.Name = "startTextBox9";
|
||||
this.startTextBox9.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox9.TabIndex = 35;
|
||||
@@ -561,7 +561,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox9.Enabled = false;
|
||||
this.endTextBox9.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox9.Location = new System.Drawing.Point(367, 412);
|
||||
this.endTextBox9.Location = new System.Drawing.Point(382, 412);
|
||||
this.endTextBox9.Name = "endTextBox9";
|
||||
this.endTextBox9.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox9.TabIndex = 36;
|
||||
@@ -585,7 +585,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation10.AutoSize = true;
|
||||
this.exclamation10.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation10.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation10.Location = new System.Drawing.Point(532, 452);
|
||||
this.exclamation10.Location = new System.Drawing.Point(547, 452);
|
||||
this.exclamation10.Name = "exclamation10";
|
||||
this.exclamation10.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation10.TabIndex = 41;
|
||||
@@ -596,7 +596,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox10.Enabled = false;
|
||||
this.startTextBox10.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox10.Location = new System.Drawing.Point(185, 456);
|
||||
this.startTextBox10.Location = new System.Drawing.Point(200, 456);
|
||||
this.startTextBox10.Name = "startTextBox10";
|
||||
this.startTextBox10.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox10.TabIndex = 39;
|
||||
@@ -607,7 +607,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox10.Enabled = false;
|
||||
this.endTextBox10.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox10.Location = new System.Drawing.Point(367, 456);
|
||||
this.endTextBox10.Location = new System.Drawing.Point(382, 456);
|
||||
this.endTextBox10.Name = "endTextBox10";
|
||||
this.endTextBox10.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox10.TabIndex = 40;
|
||||
@@ -631,7 +631,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation11.AutoSize = true;
|
||||
this.exclamation11.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation11.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation11.Location = new System.Drawing.Point(532, 496);
|
||||
this.exclamation11.Location = new System.Drawing.Point(547, 496);
|
||||
this.exclamation11.Name = "exclamation11";
|
||||
this.exclamation11.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation11.TabIndex = 45;
|
||||
@@ -642,7 +642,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox11.Enabled = false;
|
||||
this.startTextBox11.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox11.Location = new System.Drawing.Point(185, 500);
|
||||
this.startTextBox11.Location = new System.Drawing.Point(200, 500);
|
||||
this.startTextBox11.Name = "startTextBox11";
|
||||
this.startTextBox11.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox11.TabIndex = 43;
|
||||
@@ -653,7 +653,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox11.Enabled = false;
|
||||
this.endTextBox11.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox11.Location = new System.Drawing.Point(367, 500);
|
||||
this.endTextBox11.Location = new System.Drawing.Point(382, 500);
|
||||
this.endTextBox11.Name = "endTextBox11";
|
||||
this.endTextBox11.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox11.TabIndex = 44;
|
||||
@@ -677,7 +677,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation12.AutoSize = true;
|
||||
this.exclamation12.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation12.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation12.Location = new System.Drawing.Point(532, 540);
|
||||
this.exclamation12.Location = new System.Drawing.Point(547, 540);
|
||||
this.exclamation12.Name = "exclamation12";
|
||||
this.exclamation12.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation12.TabIndex = 49;
|
||||
@@ -688,7 +688,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox12.Enabled = false;
|
||||
this.startTextBox12.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox12.Location = new System.Drawing.Point(185, 544);
|
||||
this.startTextBox12.Location = new System.Drawing.Point(200, 544);
|
||||
this.startTextBox12.Name = "startTextBox12";
|
||||
this.startTextBox12.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox12.TabIndex = 47;
|
||||
@@ -699,7 +699,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox12.Enabled = false;
|
||||
this.endTextBox12.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox12.Location = new System.Drawing.Point(367, 544);
|
||||
this.endTextBox12.Location = new System.Drawing.Point(382, 544);
|
||||
this.endTextBox12.Name = "endTextBox12";
|
||||
this.endTextBox12.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox12.TabIndex = 48;
|
||||
@@ -723,7 +723,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation24.AutoSize = true;
|
||||
this.exclamation24.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation24.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation24.Location = new System.Drawing.Point(1101, 540);
|
||||
this.exclamation24.Location = new System.Drawing.Point(1116, 540);
|
||||
this.exclamation24.Name = "exclamation24";
|
||||
this.exclamation24.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation24.TabIndex = 99;
|
||||
@@ -734,7 +734,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox24.Enabled = false;
|
||||
this.startTextBox24.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox24.Location = new System.Drawing.Point(754, 544);
|
||||
this.startTextBox24.Location = new System.Drawing.Point(769, 544);
|
||||
this.startTextBox24.Name = "startTextBox24";
|
||||
this.startTextBox24.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox24.TabIndex = 97;
|
||||
@@ -745,7 +745,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox24.Enabled = false;
|
||||
this.endTextBox24.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox24.Location = new System.Drawing.Point(936, 544);
|
||||
this.endTextBox24.Location = new System.Drawing.Point(951, 544);
|
||||
this.endTextBox24.Name = "endTextBox24";
|
||||
this.endTextBox24.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox24.TabIndex = 98;
|
||||
@@ -769,7 +769,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation23.AutoSize = true;
|
||||
this.exclamation23.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation23.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation23.Location = new System.Drawing.Point(1101, 496);
|
||||
this.exclamation23.Location = new System.Drawing.Point(1116, 496);
|
||||
this.exclamation23.Name = "exclamation23";
|
||||
this.exclamation23.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation23.TabIndex = 95;
|
||||
@@ -780,7 +780,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox23.Enabled = false;
|
||||
this.startTextBox23.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox23.Location = new System.Drawing.Point(754, 500);
|
||||
this.startTextBox23.Location = new System.Drawing.Point(769, 500);
|
||||
this.startTextBox23.Name = "startTextBox23";
|
||||
this.startTextBox23.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox23.TabIndex = 93;
|
||||
@@ -791,7 +791,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox23.Enabled = false;
|
||||
this.endTextBox23.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox23.Location = new System.Drawing.Point(936, 500);
|
||||
this.endTextBox23.Location = new System.Drawing.Point(951, 500);
|
||||
this.endTextBox23.Name = "endTextBox23";
|
||||
this.endTextBox23.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox23.TabIndex = 94;
|
||||
@@ -815,7 +815,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation22.AutoSize = true;
|
||||
this.exclamation22.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation22.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation22.Location = new System.Drawing.Point(1101, 452);
|
||||
this.exclamation22.Location = new System.Drawing.Point(1116, 452);
|
||||
this.exclamation22.Name = "exclamation22";
|
||||
this.exclamation22.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation22.TabIndex = 91;
|
||||
@@ -826,7 +826,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox22.Enabled = false;
|
||||
this.startTextBox22.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox22.Location = new System.Drawing.Point(754, 456);
|
||||
this.startTextBox22.Location = new System.Drawing.Point(769, 456);
|
||||
this.startTextBox22.Name = "startTextBox22";
|
||||
this.startTextBox22.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox22.TabIndex = 89;
|
||||
@@ -837,7 +837,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox22.Enabled = false;
|
||||
this.endTextBox22.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox22.Location = new System.Drawing.Point(936, 456);
|
||||
this.endTextBox22.Location = new System.Drawing.Point(951, 456);
|
||||
this.endTextBox22.Name = "endTextBox22";
|
||||
this.endTextBox22.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox22.TabIndex = 90;
|
||||
@@ -861,7 +861,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation21.AutoSize = true;
|
||||
this.exclamation21.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation21.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation21.Location = new System.Drawing.Point(1101, 408);
|
||||
this.exclamation21.Location = new System.Drawing.Point(1116, 408);
|
||||
this.exclamation21.Name = "exclamation21";
|
||||
this.exclamation21.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation21.TabIndex = 87;
|
||||
@@ -872,7 +872,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox21.Enabled = false;
|
||||
this.startTextBox21.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox21.Location = new System.Drawing.Point(754, 412);
|
||||
this.startTextBox21.Location = new System.Drawing.Point(769, 412);
|
||||
this.startTextBox21.Name = "startTextBox21";
|
||||
this.startTextBox21.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox21.TabIndex = 85;
|
||||
@@ -883,7 +883,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox21.Enabled = false;
|
||||
this.endTextBox21.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox21.Location = new System.Drawing.Point(936, 412);
|
||||
this.endTextBox21.Location = new System.Drawing.Point(951, 412);
|
||||
this.endTextBox21.Name = "endTextBox21";
|
||||
this.endTextBox21.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox21.TabIndex = 86;
|
||||
@@ -907,7 +907,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation20.AutoSize = true;
|
||||
this.exclamation20.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation20.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation20.Location = new System.Drawing.Point(1101, 364);
|
||||
this.exclamation20.Location = new System.Drawing.Point(1116, 364);
|
||||
this.exclamation20.Name = "exclamation20";
|
||||
this.exclamation20.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation20.TabIndex = 83;
|
||||
@@ -918,7 +918,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox20.Enabled = false;
|
||||
this.startTextBox20.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox20.Location = new System.Drawing.Point(754, 368);
|
||||
this.startTextBox20.Location = new System.Drawing.Point(769, 368);
|
||||
this.startTextBox20.Name = "startTextBox20";
|
||||
this.startTextBox20.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox20.TabIndex = 81;
|
||||
@@ -929,7 +929,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox20.Enabled = false;
|
||||
this.endTextBox20.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox20.Location = new System.Drawing.Point(936, 368);
|
||||
this.endTextBox20.Location = new System.Drawing.Point(951, 368);
|
||||
this.endTextBox20.Name = "endTextBox20";
|
||||
this.endTextBox20.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox20.TabIndex = 82;
|
||||
@@ -953,7 +953,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation19.AutoSize = true;
|
||||
this.exclamation19.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation19.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation19.Location = new System.Drawing.Point(1101, 320);
|
||||
this.exclamation19.Location = new System.Drawing.Point(1116, 320);
|
||||
this.exclamation19.Name = "exclamation19";
|
||||
this.exclamation19.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation19.TabIndex = 79;
|
||||
@@ -964,7 +964,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox19.Enabled = false;
|
||||
this.startTextBox19.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox19.Location = new System.Drawing.Point(754, 324);
|
||||
this.startTextBox19.Location = new System.Drawing.Point(769, 324);
|
||||
this.startTextBox19.Name = "startTextBox19";
|
||||
this.startTextBox19.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox19.TabIndex = 77;
|
||||
@@ -975,7 +975,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox19.Enabled = false;
|
||||
this.endTextBox19.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox19.Location = new System.Drawing.Point(936, 324);
|
||||
this.endTextBox19.Location = new System.Drawing.Point(951, 324);
|
||||
this.endTextBox19.Name = "endTextBox19";
|
||||
this.endTextBox19.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox19.TabIndex = 78;
|
||||
@@ -999,7 +999,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation18.AutoSize = true;
|
||||
this.exclamation18.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation18.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation18.Location = new System.Drawing.Point(1101, 276);
|
||||
this.exclamation18.Location = new System.Drawing.Point(1116, 276);
|
||||
this.exclamation18.Name = "exclamation18";
|
||||
this.exclamation18.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation18.TabIndex = 75;
|
||||
@@ -1011,7 +1011,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation17.AutoSize = true;
|
||||
this.exclamation17.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation17.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation17.Location = new System.Drawing.Point(1101, 232);
|
||||
this.exclamation17.Location = new System.Drawing.Point(1116, 232);
|
||||
this.exclamation17.Name = "exclamation17";
|
||||
this.exclamation17.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation17.TabIndex = 71;
|
||||
@@ -1022,7 +1022,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox18.Enabled = false;
|
||||
this.startTextBox18.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox18.Location = new System.Drawing.Point(754, 280);
|
||||
this.startTextBox18.Location = new System.Drawing.Point(769, 280);
|
||||
this.startTextBox18.Name = "startTextBox18";
|
||||
this.startTextBox18.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox18.TabIndex = 73;
|
||||
@@ -1034,7 +1034,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation16.AutoSize = true;
|
||||
this.exclamation16.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation16.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation16.Location = new System.Drawing.Point(1101, 188);
|
||||
this.exclamation16.Location = new System.Drawing.Point(1116, 188);
|
||||
this.exclamation16.Name = "exclamation16";
|
||||
this.exclamation16.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation16.TabIndex = 67;
|
||||
@@ -1045,7 +1045,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox18.Enabled = false;
|
||||
this.endTextBox18.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox18.Location = new System.Drawing.Point(936, 280);
|
||||
this.endTextBox18.Location = new System.Drawing.Point(951, 280);
|
||||
this.endTextBox18.Name = "endTextBox18";
|
||||
this.endTextBox18.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox18.TabIndex = 74;
|
||||
@@ -1068,7 +1068,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox17.Enabled = false;
|
||||
this.startTextBox17.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox17.Location = new System.Drawing.Point(754, 236);
|
||||
this.startTextBox17.Location = new System.Drawing.Point(769, 236);
|
||||
this.startTextBox17.Name = "startTextBox17";
|
||||
this.startTextBox17.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox17.TabIndex = 69;
|
||||
@@ -1080,7 +1080,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation15.AutoSize = true;
|
||||
this.exclamation15.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation15.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation15.Location = new System.Drawing.Point(1101, 144);
|
||||
this.exclamation15.Location = new System.Drawing.Point(1116, 144);
|
||||
this.exclamation15.Name = "exclamation15";
|
||||
this.exclamation15.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation15.TabIndex = 63;
|
||||
@@ -1091,7 +1091,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox17.Enabled = false;
|
||||
this.endTextBox17.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox17.Location = new System.Drawing.Point(936, 236);
|
||||
this.endTextBox17.Location = new System.Drawing.Point(951, 236);
|
||||
this.endTextBox17.Name = "endTextBox17";
|
||||
this.endTextBox17.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox17.TabIndex = 70;
|
||||
@@ -1114,7 +1114,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox16.Enabled = false;
|
||||
this.startTextBox16.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox16.Location = new System.Drawing.Point(754, 192);
|
||||
this.startTextBox16.Location = new System.Drawing.Point(769, 192);
|
||||
this.startTextBox16.Name = "startTextBox16";
|
||||
this.startTextBox16.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox16.TabIndex = 65;
|
||||
@@ -1126,7 +1126,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation14.AutoSize = true;
|
||||
this.exclamation14.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation14.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation14.Location = new System.Drawing.Point(1101, 100);
|
||||
this.exclamation14.Location = new System.Drawing.Point(1116, 100);
|
||||
this.exclamation14.Name = "exclamation14";
|
||||
this.exclamation14.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation14.TabIndex = 59;
|
||||
@@ -1137,7 +1137,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox16.Enabled = false;
|
||||
this.endTextBox16.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox16.Location = new System.Drawing.Point(936, 192);
|
||||
this.endTextBox16.Location = new System.Drawing.Point(951, 192);
|
||||
this.endTextBox16.Name = "endTextBox16";
|
||||
this.endTextBox16.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox16.TabIndex = 66;
|
||||
@@ -1160,7 +1160,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox15.Enabled = false;
|
||||
this.startTextBox15.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox15.Location = new System.Drawing.Point(754, 148);
|
||||
this.startTextBox15.Location = new System.Drawing.Point(769, 148);
|
||||
this.startTextBox15.Name = "startTextBox15";
|
||||
this.startTextBox15.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox15.TabIndex = 61;
|
||||
@@ -1172,7 +1172,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.exclamation13.AutoSize = true;
|
||||
this.exclamation13.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.exclamation13.ForeColor = System.Drawing.Color.Red;
|
||||
this.exclamation13.Location = new System.Drawing.Point(1101, 56);
|
||||
this.exclamation13.Location = new System.Drawing.Point(1116, 56);
|
||||
this.exclamation13.Name = "exclamation13";
|
||||
this.exclamation13.Size = new System.Drawing.Size(30, 38);
|
||||
this.exclamation13.TabIndex = 55;
|
||||
@@ -1183,7 +1183,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.endTextBox15.Enabled = false;
|
||||
this.endTextBox15.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox15.Location = new System.Drawing.Point(936, 148);
|
||||
this.endTextBox15.Location = new System.Drawing.Point(951, 148);
|
||||
this.endTextBox15.Name = "endTextBox15";
|
||||
this.endTextBox15.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox15.TabIndex = 62;
|
||||
@@ -1206,28 +1206,28 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox14.Enabled = false;
|
||||
this.startTextBox14.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox14.Location = new System.Drawing.Point(754, 104);
|
||||
this.startTextBox14.Location = new System.Drawing.Point(769, 104);
|
||||
this.startTextBox14.Name = "startTextBox14";
|
||||
this.startTextBox14.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox14.TabIndex = 57;
|
||||
this.startTextBox14.Visible = false;
|
||||
this.startTextBox14.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox14_KeyPress);
|
||||
//
|
||||
// label35
|
||||
// endLabel2
|
||||
//
|
||||
this.label35.AutoSize = true;
|
||||
this.label35.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label35.Location = new System.Drawing.Point(992, 21);
|
||||
this.label35.Name = "label35";
|
||||
this.label35.Size = new System.Drawing.Size(46, 23);
|
||||
this.label35.TabIndex = 51;
|
||||
this.label35.Text = "End";
|
||||
this.endLabel2.AutoSize = true;
|
||||
this.endLabel2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endLabel2.Location = new System.Drawing.Point(1007, 21);
|
||||
this.endLabel2.Name = "endLabel2";
|
||||
this.endLabel2.Size = new System.Drawing.Size(46, 23);
|
||||
this.endLabel2.TabIndex = 51;
|
||||
this.endLabel2.Text = "End";
|
||||
//
|
||||
// endTextBox14
|
||||
//
|
||||
this.endTextBox14.Enabled = false;
|
||||
this.endTextBox14.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox14.Location = new System.Drawing.Point(936, 104);
|
||||
this.endTextBox14.Location = new System.Drawing.Point(951, 104);
|
||||
this.endTextBox14.Name = "endTextBox14";
|
||||
this.endTextBox14.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox14.TabIndex = 58;
|
||||
@@ -1250,28 +1250,28 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
//
|
||||
this.startTextBox13.Enabled = false;
|
||||
this.startTextBox13.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startTextBox13.Location = new System.Drawing.Point(754, 60);
|
||||
this.startTextBox13.Location = new System.Drawing.Point(769, 60);
|
||||
this.startTextBox13.Name = "startTextBox13";
|
||||
this.startTextBox13.Size = new System.Drawing.Size(163, 31);
|
||||
this.startTextBox13.TabIndex = 53;
|
||||
this.startTextBox13.Visible = false;
|
||||
this.startTextBox13.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.startTextBox13_KeyPress);
|
||||
//
|
||||
// label37
|
||||
// startLabel2
|
||||
//
|
||||
this.label37.AutoSize = true;
|
||||
this.label37.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.label37.Location = new System.Drawing.Point(806, 21);
|
||||
this.label37.Name = "label37";
|
||||
this.label37.Size = new System.Drawing.Size(56, 23);
|
||||
this.label37.TabIndex = 50;
|
||||
this.label37.Text = "Start";
|
||||
this.startLabel2.AutoSize = true;
|
||||
this.startLabel2.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.startLabel2.Location = new System.Drawing.Point(821, 21);
|
||||
this.startLabel2.Name = "startLabel2";
|
||||
this.startLabel2.Size = new System.Drawing.Size(56, 23);
|
||||
this.startLabel2.TabIndex = 50;
|
||||
this.startLabel2.Text = "Start";
|
||||
//
|
||||
// endTextBox13
|
||||
//
|
||||
this.endTextBox13.Enabled = false;
|
||||
this.endTextBox13.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.endTextBox13.Location = new System.Drawing.Point(936, 60);
|
||||
this.endTextBox13.Location = new System.Drawing.Point(951, 60);
|
||||
this.endTextBox13.Name = "endTextBox13";
|
||||
this.endTextBox13.Size = new System.Drawing.Size(163, 31);
|
||||
this.endTextBox13.TabIndex = 54;
|
||||
@@ -1339,11 +1339,11 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
this.Controls.Add(this.endTextBox15);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.startTextBox14);
|
||||
this.Controls.Add(this.label35);
|
||||
this.Controls.Add(this.endLabel2);
|
||||
this.Controls.Add(this.endTextBox14);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.startTextBox13);
|
||||
this.Controls.Add(this.label37);
|
||||
this.Controls.Add(this.startLabel2);
|
||||
this.Controls.Add(this.endTextBox13);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.exclamation12);
|
||||
@@ -1504,11 +1504,11 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
private System.Windows.Forms.TextBox endTextBox15;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.TextBox startTextBox14;
|
||||
private System.Windows.Forms.Label label35;
|
||||
private System.Windows.Forms.Label endLabel2;
|
||||
private System.Windows.Forms.TextBox endTextBox14;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.TextBox startTextBox13;
|
||||
private System.Windows.Forms.Label label37;
|
||||
private System.Windows.Forms.Label startLabel2;
|
||||
private System.Windows.Forms.TextBox endTextBox13;
|
||||
private System.Windows.Forms.Label label13;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add(Program.LocalSettings.LastSNTexts[i]);
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
|
||||
@@ -15,7 +15,10 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
|
||||
public override string ToString() { return string.Format("DataEntry.Standard48({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
@@ -97,18 +100,20 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
@@ -131,13 +136,13 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Standard48
|
||||
@@ -19,17 +20,17 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMStartState;
|
||||
public double[] WMStartState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] WMStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMEndState;
|
||||
public double[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
double refVolume;
|
||||
@@ -51,27 +52,31 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
TextBoxesCount = 24;
|
||||
TextBoxesCount = 48;
|
||||
|
||||
labels = new Label[]
|
||||
{
|
||||
label1, label2, label3, label4, label5, label6, label7, label8, label9, label10,
|
||||
label11, label12, label13, label14, label15, label16, label17, label18, label19, label20,
|
||||
label21, label22, label23, label24,
|
||||
label21, label22, label23, label24, label25, label26, label27, label28, label29, label30,
|
||||
label31, label32, label33, label34, label35, label36, label37, label38, label39, label40,
|
||||
label41, label42, label43, label44, label45, label46, label47, label48,
|
||||
};
|
||||
startTextBoxes = new TextBox[]
|
||||
{
|
||||
startTextBox1, startTextBox2, startTextBox3, startTextBox4, startTextBox5, startTextBox6,
|
||||
startTextBox7, startTextBox8, startTextBox9, startTextBox10, startTextBox11, startTextBox12,
|
||||
startTextBox13, startTextBox14, startTextBox15, startTextBox16, startTextBox17, startTextBox18,
|
||||
startTextBox19, startTextBox20, startTextBox21, startTextBox22, startTextBox23, startTextBox24,
|
||||
startTextBox1, startTextBox2, startTextBox3, startTextBox4, startTextBox5, startTextBox6, startTextBox7, startTextBox8, startTextBox9, startTextBox10,
|
||||
startTextBox11, startTextBox12, startTextBox13, startTextBox14, startTextBox15, startTextBox16, startTextBox17, startTextBox18, startTextBox19, startTextBox20,
|
||||
startTextBox21, startTextBox22, startTextBox23, startTextBox24, startTextBox25, startTextBox26, startTextBox27, startTextBox28, startTextBox29, startTextBox30,
|
||||
startTextBox31, startTextBox32, startTextBox33, startTextBox34, startTextBox35, startTextBox36, startTextBox37, startTextBox38, startTextBox39, startTextBox40,
|
||||
startTextBox41, startTextBox42, startTextBox43, startTextBox44, startTextBox45, startTextBox46, startTextBox47, startTextBox48,
|
||||
};
|
||||
endTextBoxes = new TextBox[]
|
||||
{
|
||||
endTextBox1, endTextBox2, endTextBox3, endTextBox4, endTextBox5, endTextBox6,
|
||||
endTextBox7, endTextBox8, endTextBox9, endTextBox10, endTextBox11, endTextBox12,
|
||||
endTextBox13, endTextBox14, endTextBox15, endTextBox16, endTextBox17, endTextBox18,
|
||||
endTextBox19, endTextBox20, endTextBox21, endTextBox22, endTextBox23, endTextBox24,
|
||||
endTextBox1, endTextBox2, endTextBox3, endTextBox4, endTextBox5, endTextBox6, endTextBox7, endTextBox8, endTextBox9, endTextBox10,
|
||||
endTextBox11, endTextBox12, endTextBox13, endTextBox14, endTextBox15, endTextBox16, endTextBox17, endTextBox18, endTextBox19, endTextBox20,
|
||||
endTextBox21, endTextBox22, endTextBox23, endTextBox24, endTextBox25, endTextBox26, endTextBox27, endTextBox28, endTextBox29, endTextBox30,
|
||||
endTextBox31, endTextBox32, endTextBox33, endTextBox34, endTextBox35, endTextBox36, endTextBox37, endTextBox38, endTextBox39, endTextBox40,
|
||||
endTextBox41, endTextBox42, endTextBox43, endTextBox44, endTextBox45, endTextBox46, endTextBox47, endTextBox48,
|
||||
};
|
||||
enabledTextBoxes = new List<TextBox>();
|
||||
|
||||
@@ -84,17 +89,18 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
public TestStartEndForm(int waterMetersCount, bool[] disabled)
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this()
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMStartState = new float[waterMetersCount];
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
}
|
||||
|
||||
@@ -107,13 +113,14 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
@@ -124,7 +131,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
|
||||
ShuffleTextBoxes();
|
||||
|
||||
WMEndState = new float[waterMetersCount];
|
||||
WMEndState = new double[waterMetersCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -209,10 +216,10 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
Text = Strings.Water_Meter_States;
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
labels[i].Text = Strings.Water_Meter + " " + (i + 1).ToString();
|
||||
labels[i].Text = string.Format("{0} {1}", Strings.Water_Meter, i + 1);
|
||||
}
|
||||
startLabel.Text = Strings.Start;
|
||||
endLabel.Text = Strings.End;
|
||||
startLabel.Text = start2Label.Text = Strings.Start;
|
||||
endLabel.Text = end2Label.Text = Strings.End;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
}
|
||||
|
||||
@@ -226,7 +233,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUFloat(endTextBoxes[i].Text);
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,7 +244,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUFloat(startTextBoxes[i].Text);
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,331 +278,104 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the approximate error and verify whether it is within limits.
|
||||
/// Make an exclamation mark visible if out of range.
|
||||
/// Similar event handler is implemented for all endTextBoxes (1..24).
|
||||
/// </summary>
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void ProcTextChanged(object sender, EventArgs e, TextBox endStateTB, TextBox startStateTB, Label exclamation)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endStateTB.Text);
|
||||
double startState = Utils.ParseUDouble(startStateTB.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox1_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox1, startTextBox1, exclamation1); }
|
||||
private void endTextBox2_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox2, startTextBox2, exclamation2); }
|
||||
private void endTextBox3_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox3, startTextBox3, exclamation3); }
|
||||
private void endTextBox4_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox4, startTextBox4, exclamation4); }
|
||||
private void endTextBox5_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox5, startTextBox5, exclamation5); }
|
||||
private void endTextBox6_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox6, startTextBox6, exclamation6); }
|
||||
private void endTextBox7_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox7, startTextBox7, exclamation7); }
|
||||
private void endTextBox8_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox8, startTextBox8, exclamation8); }
|
||||
private void endTextBox9_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox9, startTextBox9, exclamation9); }
|
||||
private void endTextBox10_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox10, startTextBox10, exclamation10); }
|
||||
private void endTextBox11_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox11, startTextBox11, exclamation11); }
|
||||
private void endTextBox12_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox12, startTextBox12, exclamation12); }
|
||||
private void endTextBox13_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox13, startTextBox13, exclamation13); }
|
||||
private void endTextBox14_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox14, startTextBox14, exclamation14); }
|
||||
private void endTextBox15_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox15, startTextBox15, exclamation15); }
|
||||
private void endTextBox16_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox16, startTextBox16, exclamation16); }
|
||||
private void endTextBox17_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox17, startTextBox17, exclamation17); }
|
||||
private void endTextBox18_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox18, startTextBox18, exclamation18); }
|
||||
private void endTextBox19_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox19, startTextBox19, exclamation19); }
|
||||
private void endTextBox20_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox20, startTextBox20, exclamation20); }
|
||||
private void endTextBox21_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox21, startTextBox21, exclamation21); }
|
||||
private void endTextBox22_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox22, startTextBox22, exclamation22); }
|
||||
private void endTextBox23_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox23, startTextBox23, exclamation23); }
|
||||
private void endTextBox24_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox24, startTextBox24, exclamation24); }
|
||||
private void endTextBox25_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox25, startTextBox25, exclamation25); }
|
||||
private void endTextBox26_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox26, startTextBox26, exclamation26); }
|
||||
private void endTextBox27_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox27, startTextBox27, exclamation27); }
|
||||
private void endTextBox28_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox28, startTextBox28, exclamation28); }
|
||||
private void endTextBox29_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox29, startTextBox29, exclamation29); }
|
||||
private void endTextBox30_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox30, startTextBox30, exclamation30); }
|
||||
private void endTextBox31_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox31, startTextBox31, exclamation31); }
|
||||
private void endTextBox32_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox32, startTextBox32, exclamation32); }
|
||||
private void endTextBox33_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox33, startTextBox33, exclamation33); }
|
||||
private void endTextBox34_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox34, startTextBox34, exclamation34); }
|
||||
private void endTextBox35_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox35, startTextBox35, exclamation35); }
|
||||
private void endTextBox36_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox36, startTextBox36, exclamation36); }
|
||||
private void endTextBox37_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox37, startTextBox37, exclamation37); }
|
||||
private void endTextBox38_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox38, startTextBox38, exclamation38); }
|
||||
private void endTextBox39_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox39, startTextBox39, exclamation39); }
|
||||
private void endTextBox40_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox40, startTextBox40, exclamation40); }
|
||||
private void endTextBox41_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox41, startTextBox41, exclamation41); }
|
||||
private void endTextBox42_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox42, startTextBox42, exclamation42); }
|
||||
private void endTextBox43_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox43, startTextBox43, exclamation43); }
|
||||
private void endTextBox44_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox44, startTextBox44, exclamation44); }
|
||||
private void endTextBox45_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox45, startTextBox45, exclamation45); }
|
||||
private void endTextBox46_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox46, startTextBox46, exclamation46); }
|
||||
private void endTextBox47_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox47, startTextBox47, exclamation47); }
|
||||
private void endTextBox48_TextChanged(object sndr, EventArgs e) { ProcTextChanged(sndr, e, endTextBox48, startTextBox48, exclamation48); }
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox13.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox13.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox14.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox14.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox15.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox15.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox16.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox16.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox17.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox17.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox18.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox18.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox19_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox19.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox19.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation19.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox20_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox20.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox20.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation20.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox21_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox21.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox21.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation21.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox22_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox22.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox22.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation22.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox23_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox23.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox23.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation23.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox24_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox24.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox24.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation24.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process a key press within any enabled text boxe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="currentFocusOwner">TextBox control which received the event</param>
|
||||
private void ProcKeyPress(object sender, KeyPressEventArgs e, TextBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledTextBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
/// <summary>
|
||||
/// Process a key press within any enabled text boxe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="currentFocusOwner">TextBox control which received the event</param>
|
||||
private void ProcKeyPress(object sender, KeyPressEventArgs e, TextBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledTextBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledTextBoxes.Count; i++)
|
||||
{
|
||||
if (enabledTextBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledTextBoxes[(i + 1) % enabledTextBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < enabledTextBoxes.Count; i++)
|
||||
{
|
||||
if (enabledTextBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledTextBoxes[(i + 1) % enabledTextBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void startTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox1); }
|
||||
private void startTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox2); }
|
||||
@@ -621,6 +401,30 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
private void startTextBox22_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox22); }
|
||||
private void startTextBox23_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox23); }
|
||||
private void startTextBox24_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox24); }
|
||||
private void startTextBox25_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox25); }
|
||||
private void startTextBox26_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox26); }
|
||||
private void startTextBox27_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox27); }
|
||||
private void startTextBox28_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox28); }
|
||||
private void startTextBox29_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox29); }
|
||||
private void startTextBox30_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox30); }
|
||||
private void startTextBox31_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox31); }
|
||||
private void startTextBox32_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox32); }
|
||||
private void startTextBox33_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox33); }
|
||||
private void startTextBox34_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox34); }
|
||||
private void startTextBox35_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox35); }
|
||||
private void startTextBox36_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox36); }
|
||||
private void startTextBox37_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox37); }
|
||||
private void startTextBox38_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox38); }
|
||||
private void startTextBox39_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox39); }
|
||||
private void startTextBox40_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox40); }
|
||||
private void startTextBox41_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox41); }
|
||||
private void startTextBox42_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox42); }
|
||||
private void startTextBox43_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox43); }
|
||||
private void startTextBox44_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox44); }
|
||||
private void startTextBox45_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox45); }
|
||||
private void startTextBox46_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox46); }
|
||||
private void startTextBox47_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox47); }
|
||||
private void startTextBox48_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox48); }
|
||||
|
||||
private void endTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox1); }
|
||||
private void endTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox2); }
|
||||
@@ -646,5 +450,29 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
private void endTextBox22_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox22); }
|
||||
private void endTextBox23_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox23); }
|
||||
private void endTextBox24_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox24); }
|
||||
private void endTextBox25_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox25); }
|
||||
private void endTextBox26_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox26); }
|
||||
private void endTextBox27_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox27); }
|
||||
private void endTextBox28_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox28); }
|
||||
private void endTextBox29_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox29); }
|
||||
private void endTextBox30_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox30); }
|
||||
private void endTextBox31_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox31); }
|
||||
private void endTextBox32_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox32); }
|
||||
private void endTextBox33_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox33); }
|
||||
private void endTextBox34_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox34); }
|
||||
private void endTextBox35_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox35); }
|
||||
private void endTextBox36_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox36); }
|
||||
private void endTextBox37_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox37); }
|
||||
private void endTextBox38_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox38); }
|
||||
private void endTextBox39_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox39); }
|
||||
private void endTextBox40_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox40); }
|
||||
private void endTextBox41_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox41); }
|
||||
private void endTextBox42_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox42); }
|
||||
private void endTextBox43_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox43); }
|
||||
private void endTextBox44_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox44); }
|
||||
private void endTextBox45_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox45); }
|
||||
private void endTextBox46_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox46); }
|
||||
private void endTextBox47_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox47); }
|
||||
private void endTextBox48_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox48); }
|
||||
}
|
||||
}
|
||||
|
||||
+2769
-1377
File diff suppressed because it is too large
Load Diff
@@ -61,12 +61,12 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (WaterMetersCount >= 1) comboBox1.Items.Add(Program.LocalSettings.LastSNTexts[0]);
|
||||
if (WaterMetersCount >= 2) comboBox2.Items.Add(Program.LocalSettings.LastSNTexts[1]);
|
||||
if (WaterMetersCount >= 3) comboBox3.Items.Add(Program.LocalSettings.LastSNTexts[2]);
|
||||
if (WaterMetersCount >= 4) comboBox4.Items.Add(Program.LocalSettings.LastSNTexts[3]);
|
||||
if (WaterMetersCount >= 5) comboBox5.Items.Add(Program.LocalSettings.LastSNTexts[4]);
|
||||
if (WaterMetersCount >= 6) comboBox6.Items.Add(Program.LocalSettings.LastSNTexts[5]);
|
||||
if (WaterMetersCount >= 1) comboBox1.Items.Add((Program.LocalSettings.LastSNTexts[0] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[0]);
|
||||
if (WaterMetersCount >= 2) comboBox2.Items.Add((Program.LocalSettings.LastSNTexts[1] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[1]);
|
||||
if (WaterMetersCount >= 3) comboBox3.Items.Add((Program.LocalSettings.LastSNTexts[2] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[2]);
|
||||
if (WaterMetersCount >= 4) comboBox4.Items.Add((Program.LocalSettings.LastSNTexts[3] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[3]);
|
||||
if (WaterMetersCount >= 5) comboBox5.Items.Add((Program.LocalSettings.LastSNTexts[4] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[4]);
|
||||
if (WaterMetersCount >= 6) comboBox6.Items.Add((Program.LocalSettings.LastSNTexts[5] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[5]);
|
||||
}
|
||||
|
||||
if (WaterMetersCount < 1) { groupBox1.Visible = false; } else { enabledComboBoxes.Add(comboBox1); }
|
||||
|
||||
@@ -15,7 +15,10 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
|
||||
public override string ToString() { return string.Format("DataEntry.Standard6({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
@@ -97,18 +100,20 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp()
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
@@ -131,13 +136,13 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
myRef.modelessDlg = new TestStartEndForm(myRef.waterMeters.Length, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Standard6
|
||||
@@ -18,17 +19,17 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMStartState;
|
||||
public double[] WMStartState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] WMStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public float[] WMEndState;
|
||||
public double[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
double refVolume;
|
||||
@@ -42,15 +43,16 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
/// Constructor to fill in start states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public TestStartEndForm(int waterMetersCount, bool[] disabled)
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
endStates = false;
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
WMStartState = new float[waterMetersCount];
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
|
||||
completed = false;
|
||||
@@ -61,12 +63,13 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
/// Constructor to fill in end states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
@@ -76,14 +79,14 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
this.warningLimHi = 2 * errLimHi;
|
||||
|
||||
InitializeComponent();
|
||||
WMEndState = new float[waterMetersCount];
|
||||
WMEndState = new double[waterMetersCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary> Parameterless constructor for all watermeters </summary>
|
||||
public TestStartEndForm()
|
||||
: this(Config.Data.WMsCount, null)
|
||||
: this(Config.Data.WMsCount, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -156,44 +159,44 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
{
|
||||
if (endStates)
|
||||
{
|
||||
if (wmEndStateTextBox1.Enabled) WMEndState[0] = Utils.ParseUFloat(wmEndStateTextBox1.Text);
|
||||
if (wmEndStateTextBox2.Enabled) WMEndState[1] = Utils.ParseUFloat(wmEndStateTextBox2.Text);
|
||||
if (wmEndStateTextBox3.Enabled) WMEndState[2] = Utils.ParseUFloat(wmEndStateTextBox3.Text);
|
||||
if (wmEndStateTextBox4.Enabled) WMEndState[3] = Utils.ParseUFloat(wmEndStateTextBox4.Text);
|
||||
if (wmEndStateTextBox5.Enabled) WMEndState[4] = Utils.ParseUFloat(wmEndStateTextBox5.Text);
|
||||
if (wmEndStateTextBox6.Enabled) WMEndState[5] = Utils.ParseUFloat(wmEndStateTextBox6.Text);
|
||||
if (wmEndStateTextBox1.Enabled) WMEndState[0] = Utils.ParseUDouble(wmEndStateTextBox1.Text);
|
||||
if (wmEndStateTextBox2.Enabled) WMEndState[1] = Utils.ParseUDouble(wmEndStateTextBox2.Text);
|
||||
if (wmEndStateTextBox3.Enabled) WMEndState[2] = Utils.ParseUDouble(wmEndStateTextBox3.Text);
|
||||
if (wmEndStateTextBox4.Enabled) WMEndState[3] = Utils.ParseUDouble(wmEndStateTextBox4.Text);
|
||||
if (wmEndStateTextBox5.Enabled) WMEndState[4] = Utils.ParseUDouble(wmEndStateTextBox5.Text);
|
||||
if (wmEndStateTextBox6.Enabled) WMEndState[5] = Utils.ParseUDouble(wmEndStateTextBox6.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wmStartStateTextBox1.Enabled)
|
||||
{
|
||||
WMStartStateStr[0] = wmStartStateTextBox1.Text;
|
||||
WMStartState[0] = Utils.ParseUFloat(wmStartStateTextBox1.Text);
|
||||
WMStartState[0] = Utils.ParseUDouble(wmStartStateTextBox1.Text);
|
||||
}
|
||||
if (wmStartStateTextBox2.Enabled)
|
||||
{
|
||||
WMStartStateStr[1] = wmStartStateTextBox2.Text;
|
||||
WMStartState[1] = Utils.ParseUFloat(wmStartStateTextBox2.Text);
|
||||
WMStartState[1] = Utils.ParseUDouble(wmStartStateTextBox2.Text);
|
||||
}
|
||||
if (wmStartStateTextBox3.Enabled)
|
||||
{
|
||||
WMStartStateStr[2] = wmStartStateTextBox3.Text;
|
||||
WMStartState[2] = Utils.ParseUFloat(wmStartStateTextBox3.Text);
|
||||
WMStartState[2] = Utils.ParseUDouble(wmStartStateTextBox3.Text);
|
||||
}
|
||||
if (wmStartStateTextBox4.Enabled)
|
||||
{
|
||||
WMStartStateStr[3] = wmStartStateTextBox4.Text;
|
||||
WMStartState[3] = Utils.ParseUFloat(wmStartStateTextBox4.Text);
|
||||
WMStartState[3] = Utils.ParseUDouble(wmStartStateTextBox4.Text);
|
||||
}
|
||||
if (wmStartStateTextBox5.Enabled)
|
||||
{
|
||||
WMStartStateStr[4] = wmStartStateTextBox5.Text;
|
||||
WMStartState[4] = Utils.ParseUFloat(wmStartStateTextBox5.Text);
|
||||
WMStartState[4] = Utils.ParseUDouble(wmStartStateTextBox5.Text);
|
||||
}
|
||||
if (wmStartStateTextBox6.Enabled)
|
||||
{
|
||||
WMStartStateStr[5] = wmStartStateTextBox6.Text;
|
||||
WMStartState[5] = Utils.ParseUFloat(wmStartStateTextBox6.Text);
|
||||
WMStartState[5] = Utils.ParseUDouble(wmStartStateTextBox6.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,8 +233,8 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox1.Text);
|
||||
double endState = Utils.ParseUDouble(wmEndStateTextBox1.Text);
|
||||
double startState = Utils.ParseUDouble(wmStartStateTextBox1.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
@@ -244,8 +247,8 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox2.Text);
|
||||
double endState = Utils.ParseUDouble(wmEndStateTextBox2.Text);
|
||||
double startState = Utils.ParseUDouble(wmStartStateTextBox2.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -258,8 +261,8 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox3.Text);
|
||||
double endState = Utils.ParseUDouble(wmEndStateTextBox3.Text);
|
||||
double startState = Utils.ParseUDouble(wmStartStateTextBox3.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -272,8 +275,8 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox4.Text);
|
||||
double endState = Utils.ParseUDouble(wmEndStateTextBox4.Text);
|
||||
double startState = Utils.ParseUDouble(wmStartStateTextBox4.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -286,8 +289,8 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox5.Text);
|
||||
double endState = Utils.ParseUDouble(wmEndStateTextBox5.Text);
|
||||
double startState = Utils.ParseUDouble(wmStartStateTextBox5.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -300,8 +303,8 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox6.Text);
|
||||
double endState = Utils.ParseUDouble(wmEndStateTextBox6.Text);
|
||||
double startState = Utils.ParseUDouble(wmStartStateTextBox6.Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -379,7 +382,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox1.Enabled) wmStartStateTextBox1.Focus();
|
||||
else if (wmStartStateTextBox2.Enabled) wmStartStateTextBox2.Focus();
|
||||
else if (wmStartStateTextBox3.Enabled) wmStartStateTextBox3.Focus();
|
||||
else if (wmStartStateTextBox4.Enabled) wmStartStateTextBox4.Focus();
|
||||
else if (wmStartStateTextBox5.Enabled) wmStartStateTextBox5.Focus();
|
||||
@@ -457,7 +460,7 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox1.Enabled) wmEndStateTextBox1.Focus();
|
||||
else if (wmEndStateTextBox2.Enabled) wmEndStateTextBox2.Focus();
|
||||
else if (wmEndStateTextBox3.Enabled) wmEndStateTextBox3.Focus();
|
||||
else if (wmEndStateTextBox4.Enabled) wmEndStateTextBox4.Focus();
|
||||
else if (wmEndStateTextBox5.Enabled) wmEndStateTextBox5.Focus();
|
||||
|
||||
+794
@@ -0,0 +1,794 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
{
|
||||
partial class CycleBeginningForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.checkBox3 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox3 = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox4 = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.checkBox5 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox5 = new System.Windows.Forms.ComboBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.checkBox6 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox6 = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.checkBox7 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox7 = new System.Windows.Forms.ComboBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox8 = new System.Windows.Forms.ComboBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.checkBox9 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox9 = new System.Windows.Forms.ComboBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.checkBox10 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox10 = new System.Windows.Forms.ComboBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.checkBox11 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox11 = new System.Windows.Forms.ComboBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.checkBox12 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox12 = new System.Windows.Forms.ComboBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.checkBox13 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox13 = new System.Windows.Forms.ComboBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.checkBox14 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox14 = new System.Windows.Forms.ComboBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.checkBox15 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox15 = new System.Windows.Forms.ComboBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.checkBox16 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox16 = new System.Windows.Forms.ComboBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.checkBox17 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox17 = new System.Windows.Forms.ComboBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.checkBox18 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox18 = new System.Windows.Forms.ComboBox();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.checkBox19 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox19 = new System.Windows.Forms.ComboBox();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.checkBox20 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox20 = new System.Windows.Forms.ComboBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.checkBox21 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox21 = new System.Windows.Forms.ComboBox();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.checkBox22 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox22 = new System.Windows.Forms.ComboBox();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.checkBox23 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox23 = new System.Windows.Forms.ComboBox();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.checkBox24 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox24 = new System.Windows.Forms.ComboBox();
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
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";
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
resources.ApplyResources(this.clearButton, "clearButton");
|
||||
this.clearButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
resources.ApplyResources(this.comboBox1, "comboBox1");
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);
|
||||
this.comboBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox1_KeyPress);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
resources.ApplyResources(this.checkBox1, "checkBox1");
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
resources.ApplyResources(this.checkBox2, "checkBox2");
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
resources.ApplyResources(this.comboBox2, "comboBox2");
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
|
||||
this.comboBox2.TextChanged += new System.EventHandler(this.comboBox2_TextChanged);
|
||||
this.comboBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox2_KeyPress);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
resources.ApplyResources(this.checkBox3, "checkBox3");
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox3
|
||||
//
|
||||
resources.ApplyResources(this.comboBox3, "comboBox3");
|
||||
this.comboBox3.FormattingEnabled = true;
|
||||
this.comboBox3.Name = "comboBox3";
|
||||
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
|
||||
this.comboBox3.TextChanged += new System.EventHandler(this.comboBox3_TextChanged);
|
||||
this.comboBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox3_KeyPress);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
resources.ApplyResources(this.checkBox4, "checkBox4");
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox4
|
||||
//
|
||||
resources.ApplyResources(this.comboBox4, "comboBox4");
|
||||
this.comboBox4.FormattingEnabled = true;
|
||||
this.comboBox4.Name = "comboBox4";
|
||||
this.comboBox4.SelectedIndexChanged += new System.EventHandler(this.comboBox4_SelectedIndexChanged);
|
||||
this.comboBox4.TextChanged += new System.EventHandler(this.comboBox4_TextChanged);
|
||||
this.comboBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox4_KeyPress);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
resources.ApplyResources(this.checkBox5, "checkBox5");
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox5
|
||||
//
|
||||
resources.ApplyResources(this.comboBox5, "comboBox5");
|
||||
this.comboBox5.FormattingEnabled = true;
|
||||
this.comboBox5.Name = "comboBox5";
|
||||
this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);
|
||||
this.comboBox5.TextChanged += new System.EventHandler(this.comboBox5_TextChanged);
|
||||
this.comboBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox5_KeyPress);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
resources.ApplyResources(this.checkBox6, "checkBox6");
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox6
|
||||
//
|
||||
resources.ApplyResources(this.comboBox6, "comboBox6");
|
||||
this.comboBox6.FormattingEnabled = true;
|
||||
this.comboBox6.Name = "comboBox6";
|
||||
this.comboBox6.SelectedIndexChanged += new System.EventHandler(this.comboBox6_SelectedIndexChanged);
|
||||
this.comboBox6.TextChanged += new System.EventHandler(this.comboBox6_TextChanged);
|
||||
this.comboBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox6_KeyPress);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// checkBox7
|
||||
//
|
||||
resources.ApplyResources(this.checkBox7, "checkBox7");
|
||||
this.checkBox7.Name = "checkBox7";
|
||||
this.checkBox7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox7
|
||||
//
|
||||
resources.ApplyResources(this.comboBox7, "comboBox7");
|
||||
this.comboBox7.FormattingEnabled = true;
|
||||
this.comboBox7.Name = "comboBox7";
|
||||
this.comboBox7.SelectedIndexChanged += new System.EventHandler(this.comboBox7_SelectedIndexChanged);
|
||||
this.comboBox7.TextChanged += new System.EventHandler(this.comboBox7_TextChanged);
|
||||
this.comboBox7.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox7_KeyPress);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
resources.ApplyResources(this.label7, "label7");
|
||||
this.label7.Name = "label7";
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
resources.ApplyResources(this.checkBox8, "checkBox8");
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox8
|
||||
//
|
||||
resources.ApplyResources(this.comboBox8, "comboBox8");
|
||||
this.comboBox8.FormattingEnabled = true;
|
||||
this.comboBox8.Name = "comboBox8";
|
||||
this.comboBox8.SelectedIndexChanged += new System.EventHandler(this.comboBox8_SelectedIndexChanged);
|
||||
this.comboBox8.TextChanged += new System.EventHandler(this.comboBox8_TextChanged);
|
||||
this.comboBox8.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox8_KeyPress);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
resources.ApplyResources(this.label8, "label8");
|
||||
this.label8.Name = "label8";
|
||||
//
|
||||
// checkBox9
|
||||
//
|
||||
resources.ApplyResources(this.checkBox9, "checkBox9");
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox9
|
||||
//
|
||||
resources.ApplyResources(this.comboBox9, "comboBox9");
|
||||
this.comboBox9.FormattingEnabled = true;
|
||||
this.comboBox9.Name = "comboBox9";
|
||||
this.comboBox9.SelectedIndexChanged += new System.EventHandler(this.comboBox9_SelectedIndexChanged);
|
||||
this.comboBox9.TextChanged += new System.EventHandler(this.comboBox9_TextChanged);
|
||||
this.comboBox9.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox9_KeyPress);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
resources.ApplyResources(this.label9, "label9");
|
||||
this.label9.Name = "label9";
|
||||
//
|
||||
// checkBox10
|
||||
//
|
||||
resources.ApplyResources(this.checkBox10, "checkBox10");
|
||||
this.checkBox10.Name = "checkBox10";
|
||||
this.checkBox10.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox10
|
||||
//
|
||||
resources.ApplyResources(this.comboBox10, "comboBox10");
|
||||
this.comboBox10.FormattingEnabled = true;
|
||||
this.comboBox10.Name = "comboBox10";
|
||||
this.comboBox10.SelectedIndexChanged += new System.EventHandler(this.comboBox10_SelectedIndexChanged);
|
||||
this.comboBox10.TextChanged += new System.EventHandler(this.comboBox10_TextChanged);
|
||||
this.comboBox10.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox10_KeyPress);
|
||||
//
|
||||
// label10
|
||||
//
|
||||
resources.ApplyResources(this.label10, "label10");
|
||||
this.label10.Name = "label10";
|
||||
//
|
||||
// checkBox11
|
||||
//
|
||||
resources.ApplyResources(this.checkBox11, "checkBox11");
|
||||
this.checkBox11.Name = "checkBox11";
|
||||
this.checkBox11.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox11
|
||||
//
|
||||
resources.ApplyResources(this.comboBox11, "comboBox11");
|
||||
this.comboBox11.FormattingEnabled = true;
|
||||
this.comboBox11.Name = "comboBox11";
|
||||
this.comboBox11.SelectedIndexChanged += new System.EventHandler(this.comboBox11_SelectedIndexChanged);
|
||||
this.comboBox11.TextChanged += new System.EventHandler(this.comboBox11_TextChanged);
|
||||
this.comboBox11.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox11_KeyPress);
|
||||
//
|
||||
// label11
|
||||
//
|
||||
resources.ApplyResources(this.label11, "label11");
|
||||
this.label11.Name = "label11";
|
||||
//
|
||||
// checkBox12
|
||||
//
|
||||
resources.ApplyResources(this.checkBox12, "checkBox12");
|
||||
this.checkBox12.Name = "checkBox12";
|
||||
this.checkBox12.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox12
|
||||
//
|
||||
resources.ApplyResources(this.comboBox12, "comboBox12");
|
||||
this.comboBox12.FormattingEnabled = true;
|
||||
this.comboBox12.Name = "comboBox12";
|
||||
this.comboBox12.SelectedIndexChanged += new System.EventHandler(this.comboBox12_SelectedIndexChanged);
|
||||
this.comboBox12.TextChanged += new System.EventHandler(this.comboBox12_TextChanged);
|
||||
this.comboBox12.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox12_KeyPress);
|
||||
//
|
||||
// label12
|
||||
//
|
||||
resources.ApplyResources(this.label12, "label12");
|
||||
this.label12.Name = "label12";
|
||||
//
|
||||
// checkBox13
|
||||
//
|
||||
resources.ApplyResources(this.checkBox13, "checkBox13");
|
||||
this.checkBox13.Name = "checkBox13";
|
||||
this.checkBox13.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox13
|
||||
//
|
||||
resources.ApplyResources(this.comboBox13, "comboBox13");
|
||||
this.comboBox13.FormattingEnabled = true;
|
||||
this.comboBox13.Name = "comboBox13";
|
||||
this.comboBox13.SelectedIndexChanged += new System.EventHandler(this.comboBox13_SelectedIndexChanged);
|
||||
this.comboBox13.TextChanged += new System.EventHandler(this.comboBox13_TextChanged);
|
||||
this.comboBox13.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox13_KeyPress);
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
this.label13.Name = "label13";
|
||||
//
|
||||
// checkBox14
|
||||
//
|
||||
resources.ApplyResources(this.checkBox14, "checkBox14");
|
||||
this.checkBox14.Name = "checkBox14";
|
||||
this.checkBox14.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox14
|
||||
//
|
||||
resources.ApplyResources(this.comboBox14, "comboBox14");
|
||||
this.comboBox14.FormattingEnabled = true;
|
||||
this.comboBox14.Name = "comboBox14";
|
||||
this.comboBox14.SelectedIndexChanged += new System.EventHandler(this.comboBox14_SelectedIndexChanged);
|
||||
this.comboBox14.TextChanged += new System.EventHandler(this.comboBox14_TextChanged);
|
||||
this.comboBox14.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox14_KeyPress);
|
||||
//
|
||||
// label14
|
||||
//
|
||||
resources.ApplyResources(this.label14, "label14");
|
||||
this.label14.Name = "label14";
|
||||
//
|
||||
// checkBox15
|
||||
//
|
||||
resources.ApplyResources(this.checkBox15, "checkBox15");
|
||||
this.checkBox15.Name = "checkBox15";
|
||||
this.checkBox15.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox15
|
||||
//
|
||||
resources.ApplyResources(this.comboBox15, "comboBox15");
|
||||
this.comboBox15.FormattingEnabled = true;
|
||||
this.comboBox15.Name = "comboBox15";
|
||||
this.comboBox15.SelectedIndexChanged += new System.EventHandler(this.comboBox15_SelectedIndexChanged);
|
||||
this.comboBox15.TextChanged += new System.EventHandler(this.comboBox15_TextChanged);
|
||||
this.comboBox15.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox15_KeyPress);
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// checkBox16
|
||||
//
|
||||
resources.ApplyResources(this.checkBox16, "checkBox16");
|
||||
this.checkBox16.Name = "checkBox16";
|
||||
this.checkBox16.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox16
|
||||
//
|
||||
resources.ApplyResources(this.comboBox16, "comboBox16");
|
||||
this.comboBox16.FormattingEnabled = true;
|
||||
this.comboBox16.Name = "comboBox16";
|
||||
this.comboBox16.SelectedIndexChanged += new System.EventHandler(this.comboBox16_SelectedIndexChanged);
|
||||
this.comboBox16.TextChanged += new System.EventHandler(this.comboBox16_TextChanged);
|
||||
this.comboBox16.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox16_KeyPress);
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
this.label16.Name = "label16";
|
||||
//
|
||||
// checkBox17
|
||||
//
|
||||
resources.ApplyResources(this.checkBox17, "checkBox17");
|
||||
this.checkBox17.Name = "checkBox17";
|
||||
this.checkBox17.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox17
|
||||
//
|
||||
resources.ApplyResources(this.comboBox17, "comboBox17");
|
||||
this.comboBox17.FormattingEnabled = true;
|
||||
this.comboBox17.Name = "comboBox17";
|
||||
this.comboBox17.SelectedIndexChanged += new System.EventHandler(this.comboBox17_SelectedIndexChanged);
|
||||
this.comboBox17.TextChanged += new System.EventHandler(this.comboBox17_TextChanged);
|
||||
this.comboBox17.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox17_KeyPress);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
resources.ApplyResources(this.label17, "label17");
|
||||
this.label17.Name = "label17";
|
||||
//
|
||||
// checkBox18
|
||||
//
|
||||
resources.ApplyResources(this.checkBox18, "checkBox18");
|
||||
this.checkBox18.Name = "checkBox18";
|
||||
this.checkBox18.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox18
|
||||
//
|
||||
resources.ApplyResources(this.comboBox18, "comboBox18");
|
||||
this.comboBox18.FormattingEnabled = true;
|
||||
this.comboBox18.Name = "comboBox18";
|
||||
this.comboBox18.SelectedIndexChanged += new System.EventHandler(this.comboBox18_SelectedIndexChanged);
|
||||
this.comboBox18.TextChanged += new System.EventHandler(this.comboBox18_TextChanged);
|
||||
this.comboBox18.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox18_KeyPress);
|
||||
//
|
||||
// label18
|
||||
//
|
||||
resources.ApplyResources(this.label18, "label18");
|
||||
this.label18.Name = "label18";
|
||||
//
|
||||
// checkBox19
|
||||
//
|
||||
resources.ApplyResources(this.checkBox19, "checkBox19");
|
||||
this.checkBox19.Name = "checkBox19";
|
||||
this.checkBox19.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox19
|
||||
//
|
||||
resources.ApplyResources(this.comboBox19, "comboBox19");
|
||||
this.comboBox19.FormattingEnabled = true;
|
||||
this.comboBox19.Name = "comboBox19";
|
||||
this.comboBox19.SelectedIndexChanged += new System.EventHandler(this.comboBox19_SelectedIndexChanged);
|
||||
this.comboBox19.TextChanged += new System.EventHandler(this.comboBox19_TextChanged);
|
||||
this.comboBox19.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox19_KeyPress);
|
||||
//
|
||||
// label19
|
||||
//
|
||||
resources.ApplyResources(this.label19, "label19");
|
||||
this.label19.Name = "label19";
|
||||
//
|
||||
// checkBox20
|
||||
//
|
||||
resources.ApplyResources(this.checkBox20, "checkBox20");
|
||||
this.checkBox20.Name = "checkBox20";
|
||||
this.checkBox20.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox20
|
||||
//
|
||||
resources.ApplyResources(this.comboBox20, "comboBox20");
|
||||
this.comboBox20.FormattingEnabled = true;
|
||||
this.comboBox20.Name = "comboBox20";
|
||||
this.comboBox20.SelectedIndexChanged += new System.EventHandler(this.comboBox20_SelectedIndexChanged);
|
||||
this.comboBox20.TextChanged += new System.EventHandler(this.comboBox20_TextChanged);
|
||||
this.comboBox20.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox20_KeyPress);
|
||||
//
|
||||
// label20
|
||||
//
|
||||
resources.ApplyResources(this.label20, "label20");
|
||||
this.label20.Name = "label20";
|
||||
//
|
||||
// checkBox21
|
||||
//
|
||||
resources.ApplyResources(this.checkBox21, "checkBox21");
|
||||
this.checkBox21.Name = "checkBox21";
|
||||
this.checkBox21.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox21
|
||||
//
|
||||
resources.ApplyResources(this.comboBox21, "comboBox21");
|
||||
this.comboBox21.FormattingEnabled = true;
|
||||
this.comboBox21.Name = "comboBox21";
|
||||
this.comboBox21.SelectedIndexChanged += new System.EventHandler(this.comboBox21_SelectedIndexChanged);
|
||||
this.comboBox21.TextChanged += new System.EventHandler(this.comboBox21_TextChanged);
|
||||
this.comboBox21.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox21_KeyPress);
|
||||
//
|
||||
// label21
|
||||
//
|
||||
resources.ApplyResources(this.label21, "label21");
|
||||
this.label21.Name = "label21";
|
||||
//
|
||||
// checkBox22
|
||||
//
|
||||
resources.ApplyResources(this.checkBox22, "checkBox22");
|
||||
this.checkBox22.Name = "checkBox22";
|
||||
this.checkBox22.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox22
|
||||
//
|
||||
resources.ApplyResources(this.comboBox22, "comboBox22");
|
||||
this.comboBox22.FormattingEnabled = true;
|
||||
this.comboBox22.Name = "comboBox22";
|
||||
this.comboBox22.SelectedIndexChanged += new System.EventHandler(this.comboBox22_SelectedIndexChanged);
|
||||
this.comboBox22.TextChanged += new System.EventHandler(this.comboBox22_TextChanged);
|
||||
this.comboBox22.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox22_KeyPress);
|
||||
//
|
||||
// label22
|
||||
//
|
||||
resources.ApplyResources(this.label22, "label22");
|
||||
this.label22.Name = "label22";
|
||||
//
|
||||
// checkBox23
|
||||
//
|
||||
resources.ApplyResources(this.checkBox23, "checkBox23");
|
||||
this.checkBox23.Name = "checkBox23";
|
||||
this.checkBox23.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox23
|
||||
//
|
||||
resources.ApplyResources(this.comboBox23, "comboBox23");
|
||||
this.comboBox23.FormattingEnabled = true;
|
||||
this.comboBox23.Name = "comboBox23";
|
||||
this.comboBox23.SelectedIndexChanged += new System.EventHandler(this.comboBox23_SelectedIndexChanged);
|
||||
this.comboBox23.TextChanged += new System.EventHandler(this.comboBox23_TextChanged);
|
||||
this.comboBox23.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox23_KeyPress);
|
||||
//
|
||||
// label23
|
||||
//
|
||||
resources.ApplyResources(this.label23, "label23");
|
||||
this.label23.Name = "label23";
|
||||
//
|
||||
// checkBox24
|
||||
//
|
||||
resources.ApplyResources(this.checkBox24, "checkBox24");
|
||||
this.checkBox24.Name = "checkBox24";
|
||||
this.checkBox24.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox24
|
||||
//
|
||||
resources.ApplyResources(this.comboBox24, "comboBox24");
|
||||
this.comboBox24.FormattingEnabled = true;
|
||||
this.comboBox24.Name = "comboBox24";
|
||||
this.comboBox24.SelectedIndexChanged += new System.EventHandler(this.comboBox24_SelectedIndexChanged);
|
||||
this.comboBox24.TextChanged += new System.EventHandler(this.comboBox24_TextChanged);
|
||||
this.comboBox24.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox24_KeyPress);
|
||||
//
|
||||
// label24
|
||||
//
|
||||
resources.ApplyResources(this.label24, "label24");
|
||||
this.label24.Name = "label24";
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.Controls.Add(this.checkBox24);
|
||||
this.Controls.Add(this.comboBox24);
|
||||
this.Controls.Add(this.label24);
|
||||
this.Controls.Add(this.checkBox23);
|
||||
this.Controls.Add(this.comboBox23);
|
||||
this.Controls.Add(this.label23);
|
||||
this.Controls.Add(this.checkBox22);
|
||||
this.Controls.Add(this.comboBox22);
|
||||
this.Controls.Add(this.label22);
|
||||
this.Controls.Add(this.checkBox21);
|
||||
this.Controls.Add(this.comboBox21);
|
||||
this.Controls.Add(this.label21);
|
||||
this.Controls.Add(this.checkBox20);
|
||||
this.Controls.Add(this.comboBox20);
|
||||
this.Controls.Add(this.label20);
|
||||
this.Controls.Add(this.checkBox19);
|
||||
this.Controls.Add(this.comboBox19);
|
||||
this.Controls.Add(this.label19);
|
||||
this.Controls.Add(this.checkBox18);
|
||||
this.Controls.Add(this.comboBox18);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.checkBox17);
|
||||
this.Controls.Add(this.comboBox17);
|
||||
this.Controls.Add(this.label17);
|
||||
this.Controls.Add(this.checkBox16);
|
||||
this.Controls.Add(this.comboBox16);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.checkBox15);
|
||||
this.Controls.Add(this.comboBox15);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.checkBox14);
|
||||
this.Controls.Add(this.comboBox14);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.checkBox13);
|
||||
this.Controls.Add(this.comboBox13);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.checkBox12);
|
||||
this.Controls.Add(this.comboBox12);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.checkBox11);
|
||||
this.Controls.Add(this.comboBox11);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.checkBox10);
|
||||
this.Controls.Add(this.comboBox10);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.checkBox9);
|
||||
this.Controls.Add(this.comboBox9);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.checkBox8);
|
||||
this.Controls.Add(this.comboBox8);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.checkBox7);
|
||||
this.Controls.Add(this.comboBox7);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.checkBox6);
|
||||
this.Controls.Add(this.comboBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.checkBox5);
|
||||
this.Controls.Add(this.comboBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.checkBox4);
|
||||
this.Controls.Add(this.comboBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.checkBox3);
|
||||
this.Controls.Add(this.comboBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.comboBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.clearButton);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox orderGroupBox;
|
||||
private System.Windows.Forms.ComboBox orderComboBox;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox comboBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
private System.Windows.Forms.ComboBox comboBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.CheckBox checkBox3;
|
||||
private System.Windows.Forms.ComboBox comboBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckBox checkBox4;
|
||||
private System.Windows.Forms.ComboBox comboBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.CheckBox checkBox5;
|
||||
private System.Windows.Forms.ComboBox comboBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.CheckBox checkBox6;
|
||||
private System.Windows.Forms.ComboBox comboBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.CheckBox checkBox7;
|
||||
private System.Windows.Forms.ComboBox comboBox7;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.ComboBox comboBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.CheckBox checkBox9;
|
||||
private System.Windows.Forms.ComboBox comboBox9;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.CheckBox checkBox10;
|
||||
private System.Windows.Forms.ComboBox comboBox10;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.CheckBox checkBox11;
|
||||
private System.Windows.Forms.ComboBox comboBox11;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.CheckBox checkBox12;
|
||||
private System.Windows.Forms.ComboBox comboBox12;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.CheckBox checkBox13;
|
||||
private System.Windows.Forms.ComboBox comboBox13;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.CheckBox checkBox14;
|
||||
private System.Windows.Forms.ComboBox comboBox14;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.CheckBox checkBox15;
|
||||
private System.Windows.Forms.ComboBox comboBox15;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.CheckBox checkBox16;
|
||||
private System.Windows.Forms.ComboBox comboBox16;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.CheckBox checkBox17;
|
||||
private System.Windows.Forms.ComboBox comboBox17;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.CheckBox checkBox18;
|
||||
private System.Windows.Forms.ComboBox comboBox18;
|
||||
private System.Windows.Forms.Label label18;
|
||||
private System.Windows.Forms.CheckBox checkBox19;
|
||||
private System.Windows.Forms.ComboBox comboBox19;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.CheckBox checkBox20;
|
||||
private System.Windows.Forms.ComboBox comboBox20;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.CheckBox checkBox21;
|
||||
private System.Windows.Forms.ComboBox comboBox21;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.CheckBox checkBox22;
|
||||
private System.Windows.Forms.ComboBox comboBox22;
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.CheckBox checkBox23;
|
||||
private System.Windows.Forms.ComboBox comboBox23;
|
||||
private System.Windows.Forms.Label label23;
|
||||
private System.Windows.Forms.CheckBox checkBox24;
|
||||
private System.Windows.Forms.ComboBox comboBox24;
|
||||
private System.Windows.Forms.Label label24;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,500 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.StandardCamera
|
||||
{
|
||||
public partial class CycleBeginningForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleBeginningForm));
|
||||
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
/// To be retrieved after the form is closed
|
||||
public string PurchaseOrder;
|
||||
public string[] SNText;
|
||||
public bool[] Disabled;
|
||||
|
||||
/// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
int textBoxesCount;
|
||||
Label[] labels;
|
||||
ComboBox[] comboBoxes;
|
||||
CheckBox[] checkBoxes;
|
||||
IList<ComboBox> enabledComboBoxes;
|
||||
|
||||
|
||||
/// <summary> Parameterless constructor for common functionality </summary>
|
||||
public CycleBeginningForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
textBoxesCount = 24;
|
||||
labels = new Label[]
|
||||
{
|
||||
label1, label2, label3, label4, label5, label6, label7, label8, label9, label10,
|
||||
label11, label12, label13, label14, label15, label16, label17, label18, label19, label20,
|
||||
label21, label22, label23, label24,
|
||||
};
|
||||
comboBoxes = new ComboBox[]
|
||||
{
|
||||
comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6,
|
||||
comboBox7, comboBox8, comboBox9, comboBox10, comboBox11, comboBox12,
|
||||
comboBox13, comboBox14, comboBox15, comboBox16, comboBox17, comboBox18,
|
||||
comboBox19, comboBox20, comboBox21, comboBox22, comboBox23, comboBox24,
|
||||
};
|
||||
checkBoxes = new CheckBox[]
|
||||
{
|
||||
checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6,
|
||||
checkBox7, checkBox8, checkBox9, checkBox10, checkBox11, checkBox12,
|
||||
checkBox13, checkBox14, checkBox15, checkBox16, checkBox17, checkBox18,
|
||||
checkBox19, checkBox20, checkBox21, checkBox22, checkBox23, checkBox24,
|
||||
};
|
||||
enabledComboBoxes = new List<ComboBox>();
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(int waterMetersCount, bool hideOrder)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
SNText = new string[WaterMetersCount];
|
||||
Disabled = new bool[WaterMetersCount];
|
||||
|
||||
int lineSize = (WaterMetersCount <= 6) ? WaterMetersCount : Config.Data.LineSize;
|
||||
ShuffleTextBoxes(Config.Data.WMsCount, lineSize);
|
||||
|
||||
if (hideOrder) orderGroupBox.Visible = false;
|
||||
|
||||
Height = 155 + lineSize * 44;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure the layout of labels/text boxes on the screen
|
||||
/// corresponds to the layout of watermeters of the test bench.
|
||||
/// </summary>
|
||||
/// <param name="wmsCount">Number of watermeters</param>
|
||||
/// <param name="lineSize">Number of watermeters in one line</param>
|
||||
void ShuffleTextBoxes(int wmsCount, int lineSize)
|
||||
{
|
||||
if (wmsCount < textBoxesCount && lineSize > 0)
|
||||
{
|
||||
int nrLines = (wmsCount + lineSize - 1) / lineSize;
|
||||
int gap = (textBoxesCount - wmsCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
{
|
||||
for (int i = 0; i < lineSize; i++)
|
||||
{
|
||||
labels[dest] = labels[l * lineSize + l * gap + i];
|
||||
comboBoxes[dest] = comboBoxes[l * lineSize + l * gap + i];
|
||||
checkBoxes[dest] = checkBoxes[l * lineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
textBoxesCount = wmsCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void CycleBeginningForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
if (orderGroupBox.Visible) PrepareOrderCombo(orderComboBox);
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
orderGroupBox.Text = Strings.Purchase_order;
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
labels[i].Text = Strings.Serial_Number + " " + (i + 1).ToString();
|
||||
}
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
clearButton.Text = Strings.ClearBtnText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
/// <param name="orderComboBox">Puchase order ComboBox</param>
|
||||
void PrepareOrderCombo(ComboBox orderComboBox)
|
||||
{
|
||||
for (int i = 0; i < Program.LocalSettings.PurchaseOrderHistoryCount; i++)
|
||||
{
|
||||
orderComboBox.Items.Add(Program.LocalSettings.PurchaseOrderHistory[i]);
|
||||
}
|
||||
|
||||
if (orderComboBox.Items.Count > 0)
|
||||
{
|
||||
orderComboBox.Text = orderComboBox.Items[0].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (orderGroupBox.Visible)
|
||||
{
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU150 || FUZHOU300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
Program.LocalSettings.LastSNTexts = SNText;
|
||||
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
SNText[i] = comboBoxes[i].Text;
|
||||
Disabled[i] = !checkBoxes[i].Checked;
|
||||
}
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When one combo box is updated using drop-down menu, all combo boxes
|
||||
/// are updated by this function.
|
||||
/// </summary>
|
||||
private void UpdateAllCombos()
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
comboBoxes[i].Text = Program.LocalSettings.LastSNTexts[i];
|
||||
checkBoxes[i].Checked = !string.IsNullOrEmpty(comboBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
comboBoxes[i].Text = string.Empty;
|
||||
checkBoxes[i].Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void comboBox1_TextChanged(object sender, EventArgs e) { checkBox1.Checked = true; }
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox1.Text.Equals(comboBox1.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox2_TextChanged(object sender, EventArgs e) { checkBox2.Checked = true; }
|
||||
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox2.Text.Equals(comboBox2.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox3_TextChanged(object sender, EventArgs e) { checkBox3.Checked = true; }
|
||||
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox3.Text.Equals(comboBox3.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox4_TextChanged(object sender, EventArgs e) { checkBox4.Checked = true; }
|
||||
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox4.Text.Equals(comboBox4.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox5_TextChanged(object sender, EventArgs e) { checkBox5.Checked = true; }
|
||||
private void comboBox5_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox5.Text.Equals(comboBox5.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox6_TextChanged(object sender, EventArgs e) { checkBox6.Checked = true; }
|
||||
private void comboBox6_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox6.Text.Equals(comboBox6.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox7_TextChanged(object sender, EventArgs e) { checkBox7.Checked = true; }
|
||||
private void comboBox7_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox7.Text.Equals(comboBox7.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox8_TextChanged(object sender, EventArgs e) { checkBox8.Checked = true; }
|
||||
private void comboBox8_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox8.Text.Equals(comboBox8.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox9_TextChanged(object sender, EventArgs e) { checkBox9.Checked = true; }
|
||||
private void comboBox9_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox9.Text.Equals(comboBox9.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox10_TextChanged(object sender, EventArgs e) { checkBox10.Checked = true; }
|
||||
private void comboBox10_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox10.Text.Equals(comboBox10.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox11_TextChanged(object sender, EventArgs e) { checkBox11.Checked = true; }
|
||||
private void comboBox11_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox11.Text.Equals(comboBox11.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox12_TextChanged(object sender, EventArgs e) { checkBox12.Checked = true; }
|
||||
private void comboBox12_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox12.Text.Equals(comboBox12.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox13_TextChanged(object sender, EventArgs e) { checkBox13.Checked = true; }
|
||||
private void comboBox13_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox13.Text.Equals(comboBox13.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox14_TextChanged(object sender, EventArgs e) { checkBox14.Checked = true; }
|
||||
private void comboBox14_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox14.Text.Equals(comboBox14.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox15_TextChanged(object sender, EventArgs e) { checkBox15.Checked = true; }
|
||||
private void comboBox15_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox15.Text.Equals(comboBox15.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox16_TextChanged(object sender, EventArgs e) { checkBox16.Checked = true; }
|
||||
private void comboBox16_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox16.Text.Equals(comboBox16.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox17_TextChanged(object sender, EventArgs e) { checkBox17.Checked = true; }
|
||||
private void comboBox17_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox17.Text.Equals(comboBox17.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox18_TextChanged(object sender, EventArgs e) { checkBox18.Checked = true; }
|
||||
private void comboBox18_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox18.Text.Equals(comboBox18.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox19_TextChanged(object sender, EventArgs e) { checkBox19.Checked = true; }
|
||||
private void comboBox19_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox19.Text.Equals(comboBox19.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox20_TextChanged(object sender, EventArgs e) { checkBox20.Checked = true; }
|
||||
private void comboBox20_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox20.Text.Equals(comboBox20.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox21_TextChanged(object sender, EventArgs e) { checkBox21.Checked = true; }
|
||||
private void comboBox21_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox21.Text.Equals(comboBox21.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox22_TextChanged(object sender, EventArgs e) { checkBox22.Checked = true; }
|
||||
private void comboBox22_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox22.Text.Equals(comboBox22.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox23_TextChanged(object sender, EventArgs e) { checkBox23.Checked = true; }
|
||||
private void comboBox23_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox23.Text.Equals(comboBox23.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox24_TextChanged(object sender, EventArgs e) { checkBox24.Checked = true; }
|
||||
private void comboBox24_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox24.Text.Equals(comboBox24.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
#region Forced close handling
|
||||
|
||||
public void StartForceCloseHandler()
|
||||
{
|
||||
UiBridge.Bridge.CloseModelessFormHandler += delegate(object sender, EventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<EventArgs>(OnForceClose), sender, args); }
|
||||
else OnForceClose(sender, args);
|
||||
};
|
||||
}
|
||||
|
||||
private void OnForceClose(object sender, EventArgs args)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Process a key press within any enabled text boxe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="currentFocusOwner">TextBox control which received the event</param>
|
||||
private void ProcKeyPress(object sender, KeyPressEventArgs e, ComboBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledComboBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledComboBoxes.Count; i++)
|
||||
{
|
||||
if (enabledComboBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledComboBoxes[(i + 1) % enabledComboBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox1); }
|
||||
private void comboBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox2); }
|
||||
private void comboBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox3); }
|
||||
private void comboBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox4); }
|
||||
private void comboBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox5); }
|
||||
private void comboBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox6); }
|
||||
private void comboBox7_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox7); }
|
||||
private void comboBox8_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox8); }
|
||||
private void comboBox9_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox9); }
|
||||
private void comboBox10_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox10); }
|
||||
private void comboBox11_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox11); }
|
||||
private void comboBox12_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox12); }
|
||||
private void comboBox13_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox13); }
|
||||
private void comboBox14_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox14); }
|
||||
private void comboBox15_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox15); }
|
||||
private void comboBox16_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox16); }
|
||||
private void comboBox17_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox17); }
|
||||
private void comboBox18_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox18); }
|
||||
private void comboBox19_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox19); }
|
||||
private void comboBox20_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox20); }
|
||||
private void comboBox21_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox21); }
|
||||
private void comboBox22_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox22); }
|
||||
private void comboBox23_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox23); }
|
||||
private void comboBox24_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox24); }
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user