Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d9a7e2385 | ||
|
|
dd24c8b073 | ||
|
|
4e12942f5f | ||
|
|
a81858ee9f | ||
|
|
3b211b8644 | ||
|
|
0732e8360f | ||
|
|
c53cb8ace0 | ||
|
|
a58fe1f997 | ||
|
|
cb1a66381f | ||
|
|
535038bce1 | ||
|
|
e651244601 | ||
|
|
b63408cc68 | ||
|
|
bb3a6ff4f3 | ||
|
|
ce0b8af4a0 | ||
|
|
1bc3e5d6eb | ||
|
|
08c2d3b0d8 | ||
|
|
4fda48f7e7 | ||
|
|
dd08ca770d | ||
|
|
c7e87c95da | ||
|
|
79e80e8b6d | ||
|
|
689841cd2d | ||
|
|
0cc21f40af | ||
|
|
e4da4929e4 | ||
|
|
8a846a774f | ||
|
|
51aa0f4e43 | ||
|
|
4e9d1c8281 | ||
|
|
5e790e5d07 | ||
|
|
931a4bcc00 | ||
|
|
d6ae50f4dd | ||
|
|
ef004ce92e | ||
|
|
df6741cf1a | ||
|
|
f083fe568e | ||
|
|
a8e808a510 | ||
|
|
27972aff64 | ||
|
|
0468d9abf5 | ||
|
|
bebb5e5909 | ||
|
|
71c4f8f32f | ||
|
|
1a8ef4f1be | ||
|
|
6be8af6d63 | ||
|
|
68ca5c4901 | ||
|
|
79e1fff45e | ||
|
|
eb142244e4 | ||
|
|
baf7f84343 | ||
|
|
0fc8bb4ea0 | ||
|
|
25856496d8 | ||
|
|
ebf7c97bc6 | ||
|
|
9bfa70d5c1 | ||
|
|
80beb9d54b | ||
|
|
aff25e307d | ||
|
|
ce6896b584 | ||
|
|
9b1a427369 | ||
|
|
78f9b10255 | ||
|
|
061ab99486 | ||
|
|
ef96c06328 | ||
|
|
8f5291332f | ||
|
|
747195fc10 | ||
|
|
0e8bbec3bc | ||
|
|
141b9a7b4c | ||
|
|
595f0c514e | ||
|
|
e1dfe758cd | ||
|
|
6eaa9dad90 | ||
|
|
be9d912489 | ||
|
|
d7e65ff04b | ||
|
|
ff70a11cad | ||
|
|
e201c0ea66 | ||
|
|
1c093caff3 | ||
|
|
48484e1dbb | ||
|
|
068c51157e | ||
|
|
e8e1be644b | ||
|
|
d971831ab8 | ||
|
|
a432bbb5c6 | ||
|
|
95a0cebcf8 | ||
|
|
d22158404d | ||
|
|
4770f3e393 | ||
|
|
d287902f62 | ||
|
|
f74fff9b51 | ||
|
|
bdefc0b8fa | ||
|
|
afa213f8d5 | ||
|
|
7af4e9465c | ||
|
|
6e1b02ebd5 | ||
|
|
93d5398f10 | ||
|
|
baae5655d4 | ||
|
|
b1862e2f02 | ||
|
|
3e7ad6c06c | ||
|
|
768fb69653 | ||
|
|
21183ca801 | ||
|
|
13b3aca95f | ||
|
|
a21766b944 | ||
|
|
6f701adb9e | ||
|
|
e4c6bf5aa6 | ||
|
|
a1edfcc71a | ||
|
|
e2a8d66e48 | ||
|
|
6cf3bd6160 | ||
|
|
84c8ec26b6 | ||
|
|
d27c1b89ad | ||
|
|
f87cbe9e54 | ||
|
|
2a96af3503 | ||
|
|
1e5e0508e4 | ||
|
|
1baba9ee6d | ||
|
|
724872eb43 | ||
|
|
69fde570ce | ||
|
|
9495b9f3a3 | ||
|
|
cdca702738 | ||
|
|
f5786ef93d | ||
|
|
1c27f0df4c | ||
|
|
3f9973f8b8 | ||
|
|
be07d04f67 | ||
|
|
c950cc231c | ||
|
|
8dc45484b0 | ||
|
|
35815fe78a | ||
|
|
b5f8d06e5b | ||
|
|
a9d6fa631c | ||
|
|
878e7be9fa | ||
|
|
4cf4192ebb | ||
|
|
5325d7f6ee | ||
|
|
f54430ccf6 | ||
|
|
71ae636410 | ||
|
|
3732d3255f |
@@ -47,6 +47,21 @@ namespace Common
|
||||
return crc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the CRC from a data telegram (an array of bytes).
|
||||
/// A complete telegram including two bytes reserved for the CRC
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="data">Data telegram</param>
|
||||
/// <returns>Calculated CRC</returns>
|
||||
public static UInt16 CalculateTelegramCRC(int offset, byte[] data, int enforcedLen = 0)
|
||||
{
|
||||
int len = (enforcedLen != 0) ? Math.Min(enforcedLen, data.Length - offset) : data.Length - offset;
|
||||
UInt16 crc = crcSeed;
|
||||
for (int i = 0; i < len - 2; i++) UpdateCRC(data[offset + i], ref crc);
|
||||
return crc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function modifies the last 2 bytes in the message buffer
|
||||
/// by the CRC calculated from the remaining first (Lenght - 2) bytes.
|
||||
@@ -85,6 +100,26 @@ namespace Common
|
||||
return (data[len - 2] == (byte)(crc & 0xFF)) && (data[len - 1] == (byte)(crc >> 8));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function compares the last 2 bytes in the message buffer
|
||||
/// with the CRC calculated from the remaining first (Lenght - 2) bytes.
|
||||
/// A complete telegram including two bytes reserved for the CRC
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="data">Data telegram</param>
|
||||
/// <returns>true if the CRC in the telegram is correct</returns>
|
||||
public static bool VerifyTelegramCRC(int offset, byte[] data, int enforcedLen = 0)
|
||||
{
|
||||
if (data == null || data.Length == 0 || enforcedLen > data.Length - offset) return false;
|
||||
|
||||
int len = (enforcedLen != 0) ? enforcedLen : data.Length - offset;
|
||||
if (len < 2) return false;
|
||||
|
||||
UInt16 crc = CalculateTelegramCRC(offset, data, len);
|
||||
|
||||
return (data[offset + len - 2] == (byte)(crc & 0xFF)) && (data[offset + len - 1] == (byte)(crc >> 8));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -8,111 +8,19 @@ namespace Config
|
||||
public const string AdminPassword = "staratura";
|
||||
public const string SQLiteDbFName = "SQLite.db";
|
||||
|
||||
#if MUNICH
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 3;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif BADGER_STREDNA_TRAT || BADGER_VELKA_TRAT || CEVAK_200 || DN100
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif FUZHOU_150 || FUZHOU_300 || GENESIS || IZRAEL_200 || PETERSBURG_200 || SLM_150
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif PUCHONG_200
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 3;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 3;
|
||||
#elif DEWA_300 || ROMA_200
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif DUBAJ_50
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 5;
|
||||
public const int CompoundWMsCount = 0;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif IZRAEL_50
|
||||
public const int WMsCount = 40;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 0;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif FUZHOU_100
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 10;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif BADGER_MALA_TRAT || BERLIN || GELSENWASSER || TORINO_50
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 1;
|
||||
#elif ALZIR_25 || BAHRAIN_50 || CEVAK_40 || FEWA_50 || FILIPINY_50 || FUZHOU_50 || IZRAEL_25 || JUZNA_AFRIKA_50 || JUZNA_AFRIKA_NEW || KEMPNO_50 || KRAKOW_50 || MURES_40 || PETERSBURG_50 || TORUN_50 || ZAMBIA || ZODINO
|
||||
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 || TURA_IPERL_NEW
|
||||
public const int WMsCount = 40;
|
||||
public const int LineSize = 20;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif TURA_SPECIAL || SENTEC
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif SLM_50
|
||||
public const int WMsCount = 12;
|
||||
public const int LineSize = 12;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 6;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif SLM_END || WARSAW_END
|
||||
public const int WMsCount = 10;
|
||||
public const int LineSize = 5;
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = 4;
|
||||
#elif MALTA_WSD25
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 0;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Database related: This object reference is set after a successful user login
|
||||
///
|
||||
public static DatabaseSettings CurrentBench;
|
||||
|
||||
public static double RealDensity = 0; /// true water density [kg/m3]
|
||||
public static double AtTemperature = 0; /// measured at temperature [°C]
|
||||
public static double SampleDensity = 0; /// sample water density measured in an accredited labo [kg/m3]
|
||||
public static double SampleTemp = 0; /// sample temperature when density measured in an accredited labo [°C]
|
||||
public static double Buoyancy = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace Config.Entities
|
||||
public virtual string OriName { get; set; } /// Not mapped to database
|
||||
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
||||
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
||||
public virtual string Selector { get; set; }
|
||||
public virtual string TempMtrUp { get; set; }
|
||||
public virtual string TempMtrDown { get; set; }
|
||||
public virtual string PressMtrUp { get; set; }
|
||||
@@ -46,7 +47,8 @@ namespace Config.Entities
|
||||
|
||||
result.Qfrom = Qfrom;
|
||||
result.Qto = Qto;
|
||||
result.TempMtrUp = TempMtrUp;
|
||||
result.Selector = Selector;
|
||||
result.TempMtrUp = TempMtrUp;
|
||||
result.TempMtrDown = TempMtrDown;
|
||||
result.PressMtrUp = PressMtrUp;
|
||||
result.PressMtrDown = PressMtrDown;
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace Config.Entities
|
||||
public virtual int ItemNr { get; set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual string ClassName { get; set; }
|
||||
public virtual string ParentName { get; set; }
|
||||
public virtual DebugMode Mode { get; set; }
|
||||
public virtual LogLevel Logging { get; set; }
|
||||
public virtual string Parent { get; set; }
|
||||
public virtual DebugMode DebugMode { get; set; }
|
||||
public virtual LogLevel LogLevel { get; set; }
|
||||
public virtual string Parameters { get; set; }
|
||||
public virtual IList<MeasurementCorrection> Corrections { get; set; }
|
||||
public virtual IList<Uncertainty> Uncertainties { get; set; }
|
||||
@@ -37,9 +37,9 @@ namespace Config.Entities
|
||||
result.ItemNr = itemNr;
|
||||
result.Name = name;
|
||||
result.ClassName = className;
|
||||
result.ParentName = parentName;
|
||||
result.Mode = debugLevel;
|
||||
result.Logging = logLevel;
|
||||
result.Parent = parentName;
|
||||
result.DebugMode = debugLevel;
|
||||
result.LogLevel = logLevel;
|
||||
result.Parameters = parameters;
|
||||
return result;
|
||||
}
|
||||
@@ -51,9 +51,9 @@ namespace Config.Entities
|
||||
result.ItemNr = ItemNr;
|
||||
result.Name = Name;
|
||||
result.ClassName = ClassName;
|
||||
result.ParentName = ParentName;
|
||||
result.Mode = Mode;
|
||||
result.Logging = Logging;
|
||||
result.Parent = Parent;
|
||||
result.DebugMode = DebugMode;
|
||||
result.LogLevel = LogLevel;
|
||||
result.Parameters = Parameters;
|
||||
return result;
|
||||
}
|
||||
@@ -62,9 +62,9 @@ namespace Config.Entities
|
||||
{
|
||||
output.WriteLine(Name);
|
||||
output.WriteLine(ClassName);
|
||||
output.WriteLine(ParentName);
|
||||
output.WriteLine(Mode.ToString());
|
||||
output.WriteLine(Logging.ToString());
|
||||
output.WriteLine(Parent);
|
||||
output.WriteLine(DebugMode.ToString());
|
||||
output.WriteLine(LogLevel.ToString());
|
||||
output.Write(Parameters);
|
||||
|
||||
output.Close();
|
||||
@@ -76,28 +76,28 @@ namespace Config.Entities
|
||||
|
||||
result.Name = input.ReadLine();
|
||||
result.ClassName = input.ReadLine();
|
||||
result.ParentName = input.ReadLine();
|
||||
result.Parent = input.ReadLine();
|
||||
|
||||
string line = input.ReadLine();
|
||||
if (line.Equals(DebugMode.DetectedOff.ToString())) result.Mode = DebugMode.DetectedOff;
|
||||
else if (line.Equals(DebugMode.DetectedOn.ToString())) result.Mode = DebugMode.DetectedOn;
|
||||
else if (line.Equals(DebugMode.Normal.ToString())) result.Mode = DebugMode.Normal;
|
||||
else if (line.Equals(DebugMode.AutoDetect.ToString())) result.Mode = DebugMode.AutoDetect;
|
||||
else if (line.Equals(DebugMode.FailureDuringOperation.ToString())) result.Mode = DebugMode.FailureDuringOperation;
|
||||
else if (line.Equals(DebugMode.Off.ToString())) result.Mode = DebugMode.Off;
|
||||
else if (line.Equals(DebugMode.Record.ToString())) result.Mode = DebugMode.Record;
|
||||
else if (line.Equals(DebugMode.Reply.ToString())) result.Mode = DebugMode.Reply;
|
||||
else if (line.Equals(DebugMode.Simulate.ToString())) result.Mode = DebugMode.Simulate;
|
||||
else if (line.Equals(DebugMode.Inherit.ToString())) result.Mode = DebugMode.Inherit;
|
||||
if (line.Equals(DebugMode.DetectedOff.ToString())) result.DebugMode = DebugMode.DetectedOff;
|
||||
else if (line.Equals(DebugMode.DetectedOn.ToString())) result.DebugMode = DebugMode.DetectedOn;
|
||||
else if (line.Equals(DebugMode.Normal.ToString())) result.DebugMode = DebugMode.Normal;
|
||||
else if (line.Equals(DebugMode.AutoDetect.ToString())) result.DebugMode = DebugMode.AutoDetect;
|
||||
else if (line.Equals(DebugMode.FailureDuringOperation.ToString())) result.DebugMode = DebugMode.FailureDuringOperation;
|
||||
else if (line.Equals(DebugMode.Off.ToString())) result.DebugMode = DebugMode.Off;
|
||||
else if (line.Equals(DebugMode.Record.ToString())) result.DebugMode = DebugMode.Record;
|
||||
else if (line.Equals(DebugMode.Reply.ToString())) result.DebugMode = DebugMode.Reply;
|
||||
else if (line.Equals(DebugMode.Simulate.ToString())) result.DebugMode = DebugMode.Simulate;
|
||||
else if (line.Equals(DebugMode.Inherit.ToString())) result.DebugMode = DebugMode.Inherit;
|
||||
|
||||
line = input.ReadLine();
|
||||
if (line.Equals(LogLevel.Off.ToString())) result.Logging = LogLevel.Off;
|
||||
else if (line.Equals(LogLevel.Fatal.ToString())) result.Logging = LogLevel.Fatal;
|
||||
else if (line.Equals(LogLevel.Error.ToString())) result.Logging = LogLevel.Error;
|
||||
else if (line.Equals(LogLevel.Warn.ToString())) result.Logging = LogLevel.Warn;
|
||||
else if (line.Equals(LogLevel.Info.ToString())) result.Logging = LogLevel.Info;
|
||||
else if (line.Equals(LogLevel.Debug.ToString())) result.Logging = LogLevel.Debug;
|
||||
else if (line.Equals(LogLevel.All.ToString())) result.Logging = LogLevel.All;
|
||||
if (line.Equals(LogLevel.Off.ToString())) result.LogLevel = LogLevel.Off;
|
||||
else if (line.Equals(LogLevel.Fatal.ToString())) result.LogLevel = LogLevel.Fatal;
|
||||
else if (line.Equals(LogLevel.Error.ToString())) result.LogLevel = LogLevel.Error;
|
||||
else if (line.Equals(LogLevel.Warn.ToString())) result.LogLevel = LogLevel.Warn;
|
||||
else if (line.Equals(LogLevel.Info.ToString())) result.LogLevel = LogLevel.Info;
|
||||
else if (line.Equals(LogLevel.Debug.ToString())) result.LogLevel = LogLevel.Debug;
|
||||
else if (line.Equals(LogLevel.All.ToString())) result.LogLevel = LogLevel.All;
|
||||
|
||||
result.Parameters = string.Empty;
|
||||
line = input.ReadLine();
|
||||
@@ -118,12 +118,12 @@ namespace Config.Entities
|
||||
result += indent + "ItemNr = " + (ItemNr + 1).ToString() + Environment.NewLine;
|
||||
result += indent + "Name = " + Name + Environment.NewLine;
|
||||
result += indent + "ClassName = " + ClassName + Environment.NewLine;
|
||||
if (ParentName != null)
|
||||
if (Parent != null)
|
||||
{
|
||||
result += indent + "ParentName = " + ParentName + Environment.NewLine;
|
||||
result += indent + "ParentName = " + Parent + Environment.NewLine;
|
||||
}
|
||||
result += indent + "DebugLevel = " + Mode.ToString() + Environment.NewLine;
|
||||
result += indent + "LogLevel = " + Logging.ToString() + Environment.NewLine;
|
||||
result += indent + "DebugLevel = " + DebugMode.ToString() + Environment.NewLine;
|
||||
result += indent + "LogLevel = " + LogLevel.ToString() + Environment.NewLine;
|
||||
result += indent + "Parameters = " + Parameters + Environment.NewLine;
|
||||
|
||||
return result;
|
||||
|
||||
@@ -14,8 +14,9 @@ namespace Config.Entities
|
||||
public virtual string OriName { get; set; } /// Not mapped to database
|
||||
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
||||
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
||||
public virtual string Selector { get; set; }
|
||||
public virtual string Pump { get; set; }
|
||||
public virtual string RegulValvesPct { get; set; } /// Positions of regulation valves in % separated by ';'
|
||||
public virtual string RegVPositions { get; set; } /// Positions of regulation valves in % separated by ';'
|
||||
|
||||
/// Valves
|
||||
public virtual string ValvesOpen { get; set; }
|
||||
@@ -40,12 +41,13 @@ namespace Config.Entities
|
||||
{
|
||||
FeedingPath result = new FeedingPath(name, itemNr);
|
||||
|
||||
result.Qfrom = Qfrom;
|
||||
result.Qto = Qto;
|
||||
result.Pump = Pump;
|
||||
result.RegulValvesPct = RegulValvesPct;
|
||||
result.ValvesOpen = ValvesOpen;
|
||||
result.ValvesClose = ValvesClose;
|
||||
result.Qfrom = Qfrom;
|
||||
result.Qto = Qto;
|
||||
result.Selector = Selector;
|
||||
result.Pump = Pump;
|
||||
result.RegVPositions = RegVPositions;
|
||||
result.ValvesOpen = ValvesOpen;
|
||||
result.ValvesClose = ValvesClose;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Config.Entities
|
||||
/// Returns a list of possible values of one parameter (ComboBox when editing) or null (Textbox when editing).
|
||||
/// </summary>
|
||||
/// <param name="ix">Zero based index of the parameter</param>
|
||||
IList<string> ParamValues(int ix);
|
||||
ICollection<string> ParamValues(int ix);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a parameter value in the string form
|
||||
|
||||
@@ -14,14 +14,14 @@ namespace Config.Entities
|
||||
public virtual string OriName { get; set; } /// Not mapped to database
|
||||
public virtual float Qfrom { get; set; } /// Water flow in [m3/h]
|
||||
public virtual float Qto { get; set; } /// Water flow in [m3/h]
|
||||
public virtual string RegulValve { get; set; }
|
||||
public virtual string Selector { get; set; }
|
||||
public virtual string RegValve { get; set; }
|
||||
public virtual string FlowMeter { get; set; }
|
||||
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
||||
public virtual string StartValve { get; set; }
|
||||
public virtual string Diverter { get; set; }
|
||||
public virtual string TempDiv { get; set; }
|
||||
public virtual string TempMtrDiv { get; set; }
|
||||
public virtual string Scale { get; set; }
|
||||
public virtual string EmptyTankValve { get; set; } /// Not used anywhere
|
||||
|
||||
/// Valves
|
||||
public virtual string ValvesOpen { get; set; }
|
||||
@@ -46,18 +46,18 @@ namespace Config.Entities
|
||||
{
|
||||
OutputPath result = new OutputPath(name, itemNr);
|
||||
|
||||
result.Name = Name;
|
||||
result.Qfrom = Qfrom;
|
||||
result.Qto = Qto;
|
||||
result.RegulValve = RegulValve;
|
||||
result.FlowMeter = FlowMeter;
|
||||
result.PidCoef = PidCoef;
|
||||
result.StartValve = StartValve;
|
||||
result.Diverter = Diverter;
|
||||
result.TempDiv = TempDiv;
|
||||
result.Scale = Scale;
|
||||
result.EmptyTankValve = EmptyTankValve;
|
||||
result.ValvesOpen = ValvesOpen;
|
||||
result.Name = Name;
|
||||
result.Qfrom = Qfrom;
|
||||
result.Qto = Qto;
|
||||
result.Selector = Selector;
|
||||
result.RegValve = RegValve;
|
||||
result.FlowMeter = FlowMeter;
|
||||
result.PidCoef = PidCoef;
|
||||
result.StartValve = StartValve;
|
||||
result.Diverter = Diverter;
|
||||
result.TempMtrDiv = TempMtrDiv;
|
||||
result.Scale = Scale;
|
||||
result.ValvesOpen = ValvesOpen;
|
||||
result.ValvesClose = ValvesClose;
|
||||
|
||||
return result;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Config.Entities
|
||||
public virtual float Qfrom { get; set; } /// Water flow low limit in [m3/h]
|
||||
public virtual float Qto { get; set; } /// Water flow high limit in [m3/h]
|
||||
public virtual float Volume { get; set; } /// Test volume (target) in [l]
|
||||
public virtual float TstTime { get; set; } /// Test time (estimate) in [s]
|
||||
public virtual float TestTime { get; set; } /// Test time (estimate) in [s]
|
||||
public virtual string Method { get; set; }
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] usually < 0, in case of heat meters: 1=class1, 2=class2, 3=class3
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] usually > 0, in case of heat meters: -Qn in m3/h
|
||||
@@ -44,8 +44,7 @@ namespace Config.Entities
|
||||
public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s]
|
||||
public virtual int TimePump2StartV { get; set; } /// Delay time from the start of the pump to opening the start valve in [s]
|
||||
public virtual int TimeStop2Mass { get; set; } /// Delay time from the test end (diverted) to the 2nd mass measuremen in [s]
|
||||
public virtual double TolerRed { get; set; } /// = Filter
|
||||
public virtual string RedType { get; set; }
|
||||
public virtual int ShortPulses { get; set; } /// Short pulses
|
||||
public virtual string FeedingPath { get; set; }
|
||||
public virtual string BenchPath { get; set; }
|
||||
public virtual string OutputPath { get; set; }
|
||||
@@ -53,9 +52,9 @@ namespace Config.Entities
|
||||
#if HEAT_METERS
|
||||
public virtual string HeatMetersPath { get; set; }
|
||||
#endif
|
||||
public virtual string RelTransBefore { get; set; }
|
||||
public virtual string RelTransBetween { get; set; }
|
||||
public virtual string TransitionAfter { get; set; }
|
||||
public virtual string TransBefore { get; set; }
|
||||
public virtual string TransBetween { get; set; }
|
||||
public virtual string TransAfter { get; set; }
|
||||
|
||||
public virtual bool IsOuterLoopStart { get; set; } /// Not mapped to database
|
||||
public virtual bool IsOuterLoopEnd { get; set; } /// Not mapped to database
|
||||
@@ -89,15 +88,15 @@ namespace Config.Entities
|
||||
PumpPower = 60.0f; /// [%]
|
||||
MassRepeats = 0; /// default
|
||||
MassSpread = 0; /// default
|
||||
MassMethod = MassMethod.Scale; /// default
|
||||
MassMethod = MassMethod.Scale; /// default
|
||||
TimeBeforeFlow = 10; /// [s] time before the start of flow control in [s]
|
||||
TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s]
|
||||
TimePump2StartV = 1; /// [s] time from the 1st mass measurement to the test start in [s]
|
||||
TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement
|
||||
TolerRed = 0; /// = Filter parameter
|
||||
RelTransBefore = string.Empty;
|
||||
RelTransBetween = string.Empty;
|
||||
TransitionAfter = string.Empty;
|
||||
ShortPulses = 0; /// Short pulses parameter (0 or 1)
|
||||
TransBefore = string.Empty;
|
||||
TransBetween = string.Empty;
|
||||
TransAfter = string.Empty;
|
||||
}
|
||||
|
||||
public Test(string name, int itemNr, Procedure procedure)
|
||||
@@ -137,7 +136,7 @@ namespace Config.Entities
|
||||
result.Qfrom = Qfrom;
|
||||
result.Qto = Qto;
|
||||
result.Volume = Volume;
|
||||
result.TstTime = TstTime;
|
||||
result.TestTime = TestTime;
|
||||
result.Method = Method;
|
||||
result.ErrLimLo = ErrLimLo;
|
||||
result.ErrLimHi = ErrLimHi;
|
||||
@@ -156,8 +155,7 @@ namespace Config.Entities
|
||||
result.TimeFlow2Mass = TimeFlow2Mass;
|
||||
result.TimePump2StartV = TimePump2StartV;
|
||||
result.TimeStop2Mass = TimeStop2Mass;
|
||||
result.TolerRed = TolerRed;
|
||||
result.RedType = RedType;
|
||||
result.ShortPulses = ShortPulses;
|
||||
result.FeedingPath = FeedingPath;
|
||||
result.BenchPath = BenchPath;
|
||||
result.OutputPath = OutputPath;
|
||||
@@ -165,9 +163,9 @@ namespace Config.Entities
|
||||
#if HEAT_METERS
|
||||
result.HeatMetersPath = HeatMetersPath;
|
||||
#endif
|
||||
result.RelTransBefore = RelTransBefore;
|
||||
result.RelTransBetween = RelTransBetween;
|
||||
result.TransitionAfter = TransitionAfter;
|
||||
result.TransBefore = TransBefore;
|
||||
result.TransBetween = TransBetween;
|
||||
result.TransAfter = TransAfter;
|
||||
foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone()); }
|
||||
|
||||
return result;
|
||||
@@ -185,7 +183,7 @@ namespace Config.Entities
|
||||
output.WriteLine(Qfrom.ToString(ci));
|
||||
output.WriteLine(Qto.ToString(ci));
|
||||
output.WriteLine(Volume.ToString(ci));
|
||||
output.WriteLine(TstTime.ToString(ci));
|
||||
output.WriteLine(TestTime.ToString(ci));
|
||||
output.WriteLine(Method);
|
||||
output.WriteLine(ErrLimLo.ToString(ci));
|
||||
output.WriteLine(ErrLimHi.ToString(ci));
|
||||
@@ -204,14 +202,15 @@ namespace Config.Entities
|
||||
output.WriteLine(TimeFlow2Mass.ToString(ci));
|
||||
output.WriteLine(TimePump2StartV.ToString(ci));
|
||||
output.WriteLine(TimeStop2Mass.ToString(ci));
|
||||
output.WriteLine(ShortPulses.ToString(ci));
|
||||
output.WriteLine(FeedingPath);
|
||||
output.WriteLine(BenchPath);
|
||||
output.WriteLine(OutputPath);
|
||||
output.WriteLine(MetersPath);
|
||||
output.WriteLine(RelTransBefore);
|
||||
output.WriteLine(RelTransBetween);
|
||||
output.WriteLine(TransBefore);
|
||||
output.WriteLine(TransBetween);
|
||||
output.WriteLine(Profile);
|
||||
output.WriteLine(TransitionAfter);
|
||||
output.WriteLine(TransAfter);
|
||||
|
||||
foreach (var prms in MoreParams) { prms.Export(output); }
|
||||
output.WriteLine();
|
||||
@@ -236,7 +235,7 @@ namespace Config.Entities
|
||||
tst.Qfrom = float.Parse(input.ReadLine(), ci);
|
||||
tst.Qto = float.Parse(input.ReadLine(), ci);
|
||||
tst.Volume = float.Parse(input.ReadLine(), ci);
|
||||
tst.TstTime = float.Parse(input.ReadLine(), ci);
|
||||
tst.TestTime = float.Parse(input.ReadLine(), ci);
|
||||
tst.Method = input.ReadLine();
|
||||
tst.ErrLimLo = float.Parse(input.ReadLine(), ci);
|
||||
tst.ErrLimHi = float.Parse(input.ReadLine(), ci);
|
||||
@@ -255,17 +254,18 @@ namespace Config.Entities
|
||||
tst.TimeFlow2Mass = int.Parse(input.ReadLine(), ci);
|
||||
tst.TimePump2StartV = int.Parse(input.ReadLine(), ci);
|
||||
tst.TimeStop2Mass = int.Parse(input.ReadLine(), ci);
|
||||
tst.ShortPulses = int.Parse(input.ReadLine(), ci);
|
||||
tst.FeedingPath = input.ReadLine();
|
||||
tst.BenchPath = input.ReadLine();
|
||||
tst.OutputPath = input.ReadLine();
|
||||
tst.MetersPath = input.ReadLine();
|
||||
tst.RelTransBefore = input.ReadLine();
|
||||
tst.RelTransBetween = input.ReadLine();
|
||||
tst.TransBefore = input.ReadLine();
|
||||
tst.TransBetween = input.ReadLine();
|
||||
string line = input.ReadLine();
|
||||
tst.Profile = line.Equals(TestProfile.ProtectedHeatMeter.ToString()) ? TestProfile.ProtectedHeatMeter
|
||||
: line.Equals(TestProfile.UserDefinedHeatMeter.ToString()) ? TestProfile.UserDefinedHeatMeter
|
||||
: line.Equals(TestProfile.Protected.ToString()) ? TestProfile.Protected : TestProfile.UserDefined; /// UserDefined is the default
|
||||
tst.TransitionAfter = input.ReadLine();
|
||||
tst.TransAfter = input.ReadLine();
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -298,14 +298,14 @@ namespace Config.Entities
|
||||
ln = inp.ReadLine(); if (ln != Qfrom.ToString(ci)) { diff.AppendFormat(fmt, "Qfrom", Qfrom.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != Qto.ToString(ci)) { diff.AppendFormat(fmt, "Qto", Qto.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != Volume.ToString(ci)) { diff.AppendFormat(fmt, "Volume", Volume.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != TstTime.ToString(ci)) { diff.AppendFormat(fmt, "TstTime", TstTime.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != TestTime.ToString(ci)) { diff.AppendFormat(fmt, "TstTime", TestTime.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != Method) { diff.AppendFormat(fmt, "Method", Method, ln); };
|
||||
ln = inp.ReadLine(); if (ln != ErrLimLo.ToString(ci)) { diff.AppendFormat(fmt, "ErrLimLo", ErrLimLo.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != ErrLimHi.ToString(ci)) { diff.AppendFormat(fmt, "ErrLimHi", ErrLimHi.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != Uncertainty.ToString(ci)) { diff.AppendFormat(fmt, "Uncertainty", Uncertainty.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != Repeats.ToString(ci)) { diff.AppendFormat(fmt, "Repeats", Repeats.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoDraining.ToString(ci)) { diff.AppendFormat(fmt, "Draining", DoDraining.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoDrainingAfter.ToString(ci)) { diff.AppendFormat(fmt, "Zeroing", DoDrainingAfter.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoDraining.ToString(ci)) { diff.AppendFormat(fmt, "DoDraining", DoDraining.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoDrainingAfter.ToString(ci)) { diff.AppendFormat(fmt, "DoDrainingAfter", DoDrainingAfter.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != DoControlWaterTemp.ToString()) { diff.AppendFormat(fmt, "DoControlWaterTemp", DoControlWaterTemp.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != TempLimLo.ToString(ci)) { diff.AppendFormat(fmt, "TempLimLo", TempLimLo.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != TempLimHi.ToString(ci)) { diff.AppendFormat(fmt, "TempLimHi", TempLimHi.ToString(ci), ln); };
|
||||
@@ -321,10 +321,10 @@ namespace Config.Entities
|
||||
ln = inp.ReadLine(); if (ln != BenchPath) { diff.AppendFormat(fmt, "BenchPath", BenchPath, ln); };
|
||||
ln = inp.ReadLine(); if (ln != OutputPath) { diff.AppendFormat(fmt, "OutputPath", OutputPath, ln); };
|
||||
ln = inp.ReadLine(); if (ln != MetersPath) { diff.AppendFormat(fmt, "MetersPath", MetersPath, ln); };
|
||||
ln = inp.ReadLine(); if (ln != RelTransBefore) { diff.AppendFormat(fmt, "RelTransBefore", RelTransBefore, ln); };
|
||||
ln = inp.ReadLine(); if (ln != RelTransBetween) { diff.AppendFormat(fmt, "RelTransBetween", RelTransBetween, ln); };
|
||||
ln = inp.ReadLine(); if (ln != Profile.ToString()) { diff.AppendFormat(fmt, "RelTransAfter", Profile, ln); };
|
||||
ln = inp.ReadLine(); if (ln != TransitionAfter) { diff.AppendFormat(fmt, "TransitionAfter", TransitionAfter, ln); };
|
||||
ln = inp.ReadLine(); if (ln != TransBefore) { diff.AppendFormat(fmt, "TransBefore", TransBefore, ln); };
|
||||
ln = inp.ReadLine(); if (ln != TransBetween) { diff.AppendFormat(fmt, "TransBetween", TransBetween, ln); };
|
||||
ln = inp.ReadLine(); if (ln != Profile.ToString()) { diff.AppendFormat(fmt, "Profile", Profile, ln); };
|
||||
ln = inp.ReadLine(); if (ln != TransAfter) { diff.AppendFormat(fmt, "TransAfter", TransAfter, ln); };
|
||||
|
||||
return diff.ToString();
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace Config
|
||||
///
|
||||
/// Wrappers
|
||||
///
|
||||
public static double RealDensity() { return Data.RealDensity; }
|
||||
public static double AtTemperature() { return Data.AtTemperature; }
|
||||
public static double RealDensity() { return Data.SampleDensity; }
|
||||
public static double AtTemperature() { return Data.SampleTemp; }
|
||||
public static double Buoyancy() { return Data.Buoyancy; }
|
||||
|
||||
|
||||
|
||||
@@ -15,10 +15,11 @@ namespace Config.Mappings
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.TempMtrUp).Column("TempIn");
|
||||
Map(x => x.TempMtrDown).Column("TempOut");
|
||||
Map(x => x.PressMtrUp).Column("PressIn");
|
||||
Map(x => x.PressMtrDown).Column("PressOut");
|
||||
Map(x => x.Selector);
|
||||
Map(x => x.TempMtrUp);
|
||||
Map(x => x.TempMtrDown);
|
||||
Map(x => x.PressMtrUp);
|
||||
Map(x => x.PressMtrDown);
|
||||
Map(x => x.PressMtrDelta);
|
||||
Map(x => x.StopBFValve);
|
||||
Map(x => x.ValvesOpen)
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace Config.Mappings
|
||||
Id(x => x.Id);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.ClassName);
|
||||
Map(x => x.ParentName);
|
||||
Map(x => x.Parent);
|
||||
Map(x => x.ItemNr);
|
||||
Map(x => x.Mode);
|
||||
Map(x => x.Logging);
|
||||
Map(x => x.DebugMode);
|
||||
Map(x => x.LogLevel);
|
||||
Map(x => x.Parameters)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(8000)");
|
||||
|
||||
@@ -15,8 +15,9 @@ namespace Config.Mappings
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.Selector);
|
||||
Map(x => x.Pump);
|
||||
Map(x => x.RegulValvesPct);
|
||||
Map(x => x.RegVPositions);
|
||||
Map(x => x.ValvesOpen)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(8000)");
|
||||
|
||||
@@ -15,15 +15,14 @@ namespace Config.Mappings
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.RegulValve);
|
||||
Map(x => x.Selector);
|
||||
Map(x => x.RegValve);
|
||||
Map(x => x.FlowMeter);
|
||||
Map(x => x.PidCoef);
|
||||
Map(x => x.StartValve);
|
||||
Map(x => x.Diverter);
|
||||
Map(x => x.TempDiv);
|
||||
Map(x => x.Scale)
|
||||
.Column("Balance");
|
||||
Map(x => x.EmptyTankValve);
|
||||
Map(x => x.TempMtrDiv);
|
||||
Map(x => x.Scale);
|
||||
Map(x => x.ValvesOpen)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(8000)");
|
||||
|
||||
@@ -16,18 +16,15 @@ namespace Config.Mappings
|
||||
Map(x => x.Part);
|
||||
Map(x => x.Profile);
|
||||
Map(x => x.Publish);
|
||||
Map(x => x.DoEvaluate)
|
||||
.Column("Evaluate");
|
||||
Map(x => x.DoEvaluate);
|
||||
Map(x => x.Qtg);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.Volume);
|
||||
Map(x => x.TstTime);
|
||||
Map(x => x.TestTime);
|
||||
Map(x => x.Repeats);
|
||||
Map(x => x.DoDraining)
|
||||
.Column("Emptying");
|
||||
Map(x => x.DoDrainingAfter)
|
||||
.Column("Zeroing");
|
||||
Map(x => x.DoDraining);
|
||||
Map(x => x.DoDrainingAfter);
|
||||
Map(x => x.DoControlWaterTemp);
|
||||
Map(x => x.TempLimLo);
|
||||
Map(x => x.TempLimHi);
|
||||
@@ -35,19 +32,16 @@ namespace Config.Mappings
|
||||
Map(x => x.MassRepeats);
|
||||
Map(x => x.MassSpread);
|
||||
Map(x => x.MassMethod)
|
||||
.CustomType<byte>();
|
||||
.CustomType<byte>();
|
||||
Map(x => x.TimeBeforeFlow);
|
||||
Map(x => x.TimeFlow2Mass);
|
||||
Map(x => x.TimePump2StartV)
|
||||
.Column("TimeMass2Start");
|
||||
Map(x => x.TimePump2StartV);
|
||||
Map(x => x.TimeStop2Mass);
|
||||
Map(x => x.Method);
|
||||
Map(x => x.ErrLimLo);
|
||||
Map(x => x.ErrLimHi);
|
||||
Map(x => x.Uncertainty);
|
||||
Map(x => x.TolerRed)
|
||||
.Column("TolerRed"); /// ???
|
||||
Map(x => x.RedType);
|
||||
Map(x => x.ShortPulses);
|
||||
Map(x => x.FeedingPath);
|
||||
Map(x => x.BenchPath);
|
||||
Map(x => x.OutputPath);
|
||||
@@ -55,12 +49,9 @@ namespace Config.Mappings
|
||||
#if HEAT_METERS
|
||||
Map(x => x.HeatMetersPath);
|
||||
#endif
|
||||
Map(x => x.RelTransBefore)
|
||||
.Column("RelTransBefore");
|
||||
Map(x => x.RelTransBetween)
|
||||
.Column("RelTransBetween");
|
||||
Map(x => x.TransitionAfter)
|
||||
.Column("TransitionAfter");
|
||||
Map(x => x.TransBefore);
|
||||
Map(x => x.TransBetween);
|
||||
Map(x => x.TransAfter);
|
||||
|
||||
HasMany(x => x.MoreParams)
|
||||
.Cascade.All();
|
||||
|
||||
@@ -10,14 +10,16 @@ namespace Config.Mappings
|
||||
public UserMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.UserName).Column("Name");
|
||||
Map(x => x.UserName)
|
||||
.Column("Name");
|
||||
Map(x => x.Number);
|
||||
Map(x => x.Tag);
|
||||
Map(x => x.Password);
|
||||
Map(x => x.Password2);
|
||||
Map(x => x.Password3);
|
||||
Map(x => x.Password4);
|
||||
Map(x => x.FullName).Column("Description");
|
||||
Map(x => x.FullName)
|
||||
.Column("Description");
|
||||
Map(x => x.LastPwChange);
|
||||
HasManyToMany(x => x.Groups)
|
||||
.Cascade.SaveUpdate()
|
||||
|
||||
@@ -26,7 +26,9 @@ namespace Config
|
||||
[Description("m3")] m3, /// 1 m3 = 1000 l
|
||||
|
||||
[Description("l/h")] lph, /// 1 l/h = 0.001 m3/h
|
||||
[Description("cf/h")] cfph, /// 1 cf/h = 0.028316846592 m3/h
|
||||
[Description("l/m")] lpm, /// 1 l/m = 60 l/h = 0.06 m3/h
|
||||
[Description("US gal/m")] USgalpm, /// 1 US gallon per minute = 0.2271247068 m3/h
|
||||
[Description("m3/h")] m3ph, /// * 1 m3/h
|
||||
[Description("l/s")] lps, /// 1 liter/s = 3.6 m3/h
|
||||
[Description("US gal/s")] USgalps, /// 1 US gallon per second = 13.627482408 m3/h
|
||||
@@ -268,7 +270,9 @@ namespace Config
|
||||
return Quantity.Volume;
|
||||
|
||||
case Unit.lph:
|
||||
case Unit.cfph:
|
||||
case Unit.lpm:
|
||||
case Unit.USgalpm:
|
||||
case Unit.m3ph:
|
||||
case Unit.lps:
|
||||
case Unit.USgalps:
|
||||
@@ -385,7 +389,9 @@ namespace Config
|
||||
|
||||
/// Flow: internal representation in m3/h
|
||||
case Unit.lph: return 1000 * v; /// 1 l/h
|
||||
case Unit.cfph: return 35.3146667214886 * v;/// 1 cf/h
|
||||
case Unit.lpm: return v / 0.06; /// 1 l/m
|
||||
case Unit.USgalpm: return 4.40286754395493 * v;/// 1 US gallon per minute
|
||||
case Unit.lps: return v / 3.6; /// 1 l/s
|
||||
case Unit.USgalps: return 0.0733811257326 * v; /// 1 US gallon per second
|
||||
case Unit.m3pm: return v / 60; /// 1 m3/m
|
||||
@@ -463,7 +469,9 @@ namespace Config
|
||||
|
||||
/// Flow: internal representation in m3/h
|
||||
case Unit.lph: return 0.001 * v; /// 1 l/h
|
||||
case Unit.cfph: return 0.028316846592 * v; /// 1 cf/h
|
||||
case Unit.lpm: return 0.06 * v; /// 1 l/m
|
||||
case Unit.USgalpm: return 0.2271247068 * v; /// 1 US gallon per minute
|
||||
case Unit.lps: return 3.6 * v; /// 1 l/s
|
||||
case Unit.USgalps: return 13.627482408 * v; /// 1 US gallon per second
|
||||
case Unit.m3pm: return 60 * v; /// 1 m3/m
|
||||
|
||||
@@ -6,8 +6,8 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.UI.Bench.Components;
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace DeviceTest
|
||||
compClasses.Add(componentFactory.ClassName);
|
||||
}
|
||||
|
||||
tbfComponents = new List<TBF.BenchControl.Generic.IComponent>();
|
||||
tbfComponents = new List<TBF.Rig.Generic.IComponent>();
|
||||
tbfDevices = new List<IDevice>();
|
||||
}
|
||||
|
||||
@@ -422,13 +422,13 @@ namespace DeviceTest
|
||||
{
|
||||
parentCfg = parentFactory.DefaultConfig();
|
||||
}
|
||||
IComponentCfgCtrl cfgControl = parentCfg.GetControl();
|
||||
ComponentParametersDlg cfgForm = new ComponentParametersDlg();
|
||||
cfgForm.CmpntEntities = new List<Config.Entities.Component>();
|
||||
|
||||
IComponentCfgCtrl cfgControl = parentCfg.GetControl(cfgForm.CmpntEntities);
|
||||
cfgControl.Config = parentCfg;
|
||||
cfgControl.Config.ItemNr = 0;
|
||||
|
||||
ComponentParametersDlg cfgForm = new ComponentParametersDlg();
|
||||
cfgForm.CmpntEntities = new List<Config.Entities.Component>();
|
||||
|
||||
cfgForm.ComponentCfgCtrl = cfgControl;
|
||||
cfgForm.UnlockAfterStart = true;
|
||||
DialogResult dr = cfgForm.ShowDialog();
|
||||
@@ -451,17 +451,17 @@ namespace DeviceTest
|
||||
{
|
||||
component1Cfg = component1Factory.DefaultConfig();
|
||||
}
|
||||
IComponentCfgCtrl cfgControl = component1Cfg.GetControl();
|
||||
cfgControl.Config = component1Cfg;
|
||||
cfgControl.Config.ItemNr = 1;
|
||||
|
||||
ComponentParametersDlg cfgForm = new ComponentParametersDlg();
|
||||
///
|
||||
IList<Config.Entities.Component> compEntities = new List<Config.Entities.Component>();
|
||||
var compEntities = new List<Config.Entities.Component>();
|
||||
if (parentFactory != null && parentCfg != null) compEntities.Add(parentCfg.CreateDbEntity());
|
||||
cfgForm.CmpntEntities = compEntities;
|
||||
|
||||
cfgForm.ComponentCfgCtrl = cfgControl;
|
||||
IComponentCfgCtrl cfgControl = component1Cfg.GetControl(compEntities);
|
||||
cfgControl.Config = component1Cfg;
|
||||
cfgControl.Config.ItemNr = 1;
|
||||
|
||||
cfgForm.ComponentCfgCtrl = cfgControl;
|
||||
cfgForm.UnlockAfterStart = true;
|
||||
DialogResult dr = cfgForm.ShowDialog();
|
||||
if (dr != DialogResult.OK) return;
|
||||
@@ -485,18 +485,18 @@ namespace DeviceTest
|
||||
{
|
||||
component2Cfg = component2Factory.DefaultConfig();
|
||||
}
|
||||
IComponentCfgCtrl cfgControl = component2Cfg.GetControl();
|
||||
cfgControl.Config = component2Cfg;
|
||||
cfgControl.Config.ItemNr = 1;
|
||||
|
||||
ComponentParametersDlg cfgForm = new ComponentParametersDlg();
|
||||
///
|
||||
IList<Config.Entities.Component> compEntities = new List<Config.Entities.Component>();
|
||||
var compEntities = new List<Config.Entities.Component>();
|
||||
if (parentFactory != null && parentCfg != null) compEntities.Add(parentCfg.CreateDbEntity());
|
||||
if (component1Factory != null && component1Cfg != null) compEntities.Add(component1Cfg.CreateDbEntity());
|
||||
cfgForm.CmpntEntities = compEntities;
|
||||
|
||||
cfgForm.ComponentCfgCtrl = cfgControl;
|
||||
IComponentCfgCtrl cfgControl = component2Cfg.GetControl(compEntities);
|
||||
cfgControl.Config = component2Cfg;
|
||||
cfgControl.Config.ItemNr = 1;
|
||||
|
||||
cfgForm.ComponentCfgCtrl = cfgControl;
|
||||
cfgForm.UnlockAfterStart = true;
|
||||
DialogResult dr = cfgForm.ShowDialog();
|
||||
if (dr != DialogResult.OK) return;
|
||||
@@ -520,19 +520,19 @@ namespace DeviceTest
|
||||
{
|
||||
component3Cfg = component3Factory.DefaultConfig();
|
||||
}
|
||||
IComponentCfgCtrl cfgControl = component3Cfg.GetControl();
|
||||
cfgControl.Config = component3Cfg;
|
||||
cfgControl.Config.ItemNr = 1;
|
||||
|
||||
ComponentParametersDlg cfgForm = new ComponentParametersDlg();
|
||||
///
|
||||
IList<Config.Entities.Component> compEntities = new List<Config.Entities.Component>();
|
||||
var compEntities = new List<Config.Entities.Component>();
|
||||
if (parentFactory != null && parentCfg != null) compEntities.Add(parentCfg.CreateDbEntity());
|
||||
if (component1Factory != null && component1Cfg != null) compEntities.Add(component1Cfg.CreateDbEntity());
|
||||
if (component2Factory != null && component2Cfg != null) compEntities.Add(component2Cfg.CreateDbEntity());
|
||||
cfgForm.CmpntEntities = compEntities;
|
||||
|
||||
cfgForm.ComponentCfgCtrl = cfgControl;
|
||||
IComponentCfgCtrl cfgControl = component3Cfg.GetControl(compEntities);
|
||||
cfgControl.Config = component3Cfg;
|
||||
cfgControl.Config.ItemNr = 1;
|
||||
|
||||
cfgForm.ComponentCfgCtrl = cfgControl;
|
||||
cfgForm.UnlockAfterStart = true;
|
||||
DialogResult dr = cfgForm.ShowDialog();
|
||||
if (dr != DialogResult.OK) return;
|
||||
@@ -569,7 +569,7 @@ namespace DeviceTest
|
||||
{
|
||||
if (parentFactory != null && parentCfg != null)
|
||||
{
|
||||
TBF.BenchControl.Generic.IComponent component = parentFactory.GetComponent(parentCfg, tbfComponents);
|
||||
TBF.Rig.Generic.IComponent component = parentFactory.GetComponent(parentCfg, tbfComponents);
|
||||
tbfComponents.Add(component);
|
||||
IDevice dev = component as IDevice;
|
||||
if (dev != null)
|
||||
@@ -581,7 +581,7 @@ namespace DeviceTest
|
||||
}
|
||||
if (component1Factory != null && component1Cfg != null)
|
||||
{
|
||||
TBF.BenchControl.Generic.IComponent component = component1Factory.GetComponent(component1Cfg, tbfComponents);
|
||||
TBF.Rig.Generic.IComponent component = component1Factory.GetComponent(component1Cfg, tbfComponents);
|
||||
tbfComponents.Add(component);
|
||||
tbfComponent1forOp = component;
|
||||
IDevice dev = component as IDevice;
|
||||
@@ -594,7 +594,7 @@ namespace DeviceTest
|
||||
}
|
||||
if (component2Factory != null && component2Cfg != null)
|
||||
{
|
||||
TBF.BenchControl.Generic.IComponent component2 = component2Factory.GetComponent(component2Cfg, tbfComponents);
|
||||
TBF.Rig.Generic.IComponent component2 = component2Factory.GetComponent(component2Cfg, tbfComponents);
|
||||
tbfComponents.Add(component2);
|
||||
tbfComponent2forOp = component2;
|
||||
IDevice dev = component2 as IDevice;
|
||||
@@ -607,7 +607,7 @@ namespace DeviceTest
|
||||
}
|
||||
if (component3Factory != null && component3Cfg != null)
|
||||
{
|
||||
TBF.BenchControl.Generic.IComponent component3 = component3Factory.GetComponent(component3Cfg, tbfComponents);
|
||||
TBF.Rig.Generic.IComponent component3 = component3Factory.GetComponent(component3Cfg, tbfComponents);
|
||||
tbfComponents.Add(component3);
|
||||
tbfComponent3forOp = component3;
|
||||
IDevice dev = component3 as IDevice;
|
||||
@@ -664,120 +664,120 @@ namespace DeviceTest
|
||||
int previousOperation = 0;
|
||||
|
||||
|
||||
if (tbfComponent1forOp is TBF.BenchControl.Modbus.Meret.PressureMeter.PressureMeter)
|
||||
if (tbfComponent1forOp is TBF.Rig.Modbus.PressureMeter.Meret.PressureMeter)
|
||||
{
|
||||
operation1 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Meret.PressureMeter.PressureMeter).ReadPressureOp(ref floatBox);
|
||||
operation1 = (tbfComponent1forOp as TBF.Rig.Modbus.PressureMeter.Meret.PressureMeter).ReadPressureOp(ref dblBox1);
|
||||
}
|
||||
else if (tbfComponent1forOp is TBF.BenchControl.Network.Camera.CLP1611.Camera)
|
||||
else if (tbfComponent1forOp is TBF.Rig.Network.Camera.CLP1611.Camera)
|
||||
{
|
||||
operation1 = (tbfComponent1forOp as TBF.BenchControl.Network.Camera.CLP1611.Camera).LiveStreamOp(false);
|
||||
operation2 = (tbfComponent1forOp as TBF.BenchControl.Network.Camera.CLP1611.Camera).LiveStreamOp(true);
|
||||
operation1 = (tbfComponent1forOp as TBF.Rig.Network.Camera.CLP1611.Camera).LiveStreamOp(false);
|
||||
operation2 = (tbfComponent1forOp as TBF.Rig.Network.Camera.CLP1611.Camera).LiveStreamOp(true);
|
||||
}
|
||||
else if (tbfComponent1forOp is TBF.BenchControl.Network.Camera.Roi.Roi)
|
||||
else if (tbfComponent1forOp is TBF.Rig.Network.Camera.Roi.Roi)
|
||||
{
|
||||
operation1 = (tbfComponent1forOp as TBF.BenchControl.Network.Camera.Roi.Roi).RoiDetectionOp();
|
||||
operation1 = (tbfComponent1forOp as TBF.Rig.Network.Camera.Roi.Roi).RoiDetectionOp();
|
||||
}
|
||||
else if (tbfComponent1forOp is TBF.BenchControl.Modbus.Easytherm.Easytherm)
|
||||
else if (tbfComponent1forOp is TBF.Rig.Modbus.Easytherm.Easytherm)
|
||||
{
|
||||
operation1 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
|
||||
operation2 = (tbfComponent1forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
|
||||
operation1 = (tbfComponent1forOp as TBF.Rig.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
|
||||
operation2 = (tbfComponent1forOp as TBF.Rig.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
|
||||
}
|
||||
else if (tbfComponent1forOp is TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
else if (tbfComponent1forOp is TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
{
|
||||
operation1 = (tbfComponent1forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation2 = (tbfComponent1forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
operation1 = (tbfComponent1forOp as TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation2 = (tbfComponent1forOp as TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
}
|
||||
else if (tbfComponent1forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
|
||||
else if (tbfComponent1forOp is TBF.Rig.Modbus.TankSelector.TankSelector)
|
||||
{
|
||||
//operation1 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(1);
|
||||
//operation2 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(2);
|
||||
//operation3 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation4 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
//operation1 = (tbfComponent1forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(1);
|
||||
//operation2 = (tbfComponent1forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(2);
|
||||
//operation3 = (tbfComponent1forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation4 = (tbfComponent1forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
|
||||
else if (tbfComponent3forOp is TBF.Rig.Modbus.TankSelector.TankSelector)
|
||||
{
|
||||
operation1 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
|
||||
operation2 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
|
||||
operation3 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
|
||||
operation4 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
|
||||
operation1 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
|
||||
operation2 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
|
||||
operation3 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
|
||||
operation4 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
|
||||
}
|
||||
|
||||
|
||||
if (tbfComponent2forOp is TBF.BenchControl.Modbus.Meret.PressureMeter.PressureMeter)
|
||||
if (tbfComponent2forOp is TBF.Rig.Modbus.PressureMeter.Meret.PressureMeter)
|
||||
{
|
||||
operation21 = (tbfComponent2forOp as TBF.BenchControl.Modbus.Meret.PressureMeter.PressureMeter).ReadPressureOp(ref floatBox);
|
||||
operation21 = (tbfComponent2forOp as TBF.Rig.Modbus.PressureMeter.Meret.PressureMeter).ReadPressureOp(ref dblBox2);
|
||||
}
|
||||
else if (tbfComponent2forOp is TBF.BenchControl.Network.Camera.CLP1611.Camera)
|
||||
else if (tbfComponent2forOp is TBF.Rig.Network.Camera.CLP1611.Camera)
|
||||
{
|
||||
operation21 = (tbfComponent2forOp as TBF.BenchControl.Network.Camera.CLP1611.Camera).LiveStreamOp(false);
|
||||
operation22 = (tbfComponent2forOp as TBF.BenchControl.Network.Camera.CLP1611.Camera).LiveStreamOp(true);
|
||||
operation21 = (tbfComponent2forOp as TBF.Rig.Network.Camera.CLP1611.Camera).LiveStreamOp(false);
|
||||
operation22 = (tbfComponent2forOp as TBF.Rig.Network.Camera.CLP1611.Camera).LiveStreamOp(true);
|
||||
}
|
||||
else if (tbfComponent2forOp is TBF.BenchControl.Network.Camera.Roi.Roi)
|
||||
else if (tbfComponent2forOp is TBF.Rig.Network.Camera.Roi.Roi)
|
||||
{
|
||||
operation21 = (tbfComponent2forOp as TBF.BenchControl.Network.Camera.Roi.Roi).RoiDetectionOp();
|
||||
operation21 = (tbfComponent2forOp as TBF.Rig.Network.Camera.Roi.Roi).RoiDetectionOp();
|
||||
}
|
||||
else if (tbfComponent2forOp is TBF.BenchControl.Modbus.Easytherm.Easytherm)
|
||||
else if (tbfComponent2forOp is TBF.Rig.Modbus.Easytherm.Easytherm)
|
||||
{
|
||||
operation21 = (tbfComponent2forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
|
||||
operation22 = (tbfComponent2forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
|
||||
operation21 = (tbfComponent2forOp as TBF.Rig.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
|
||||
operation22 = (tbfComponent2forOp as TBF.Rig.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
|
||||
}
|
||||
else if (tbfComponent2forOp is TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
else if (tbfComponent2forOp is TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
{
|
||||
operation21 = (tbfComponent2forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation22 = (tbfComponent2forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
operation21 = (tbfComponent2forOp as TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation22 = (tbfComponent2forOp as TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
}
|
||||
else if (tbfComponent2forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
|
||||
else if (tbfComponent2forOp is TBF.Rig.Modbus.TankSelector.TankSelector)
|
||||
{
|
||||
//operation21 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(1);
|
||||
//operation22 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(2);
|
||||
//operation23 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation24 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
//operation21 = (tbfComponent2forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(1);
|
||||
//operation22 = (tbfComponent2forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(2);
|
||||
//operation23 = (tbfComponent2forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation24 = (tbfComponent2forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
|
||||
else if (tbfComponent3forOp is TBF.Rig.Modbus.TankSelector.TankSelector)
|
||||
{
|
||||
operation21 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
|
||||
operation22 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
|
||||
operation23 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
|
||||
operation24 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
|
||||
operation21 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
|
||||
operation22 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
|
||||
operation23 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
|
||||
operation24 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
|
||||
}
|
||||
|
||||
|
||||
if (tbfComponent3forOp is TBF.BenchControl.Modbus.Meret.PressureMeter.PressureMeter)
|
||||
if (tbfComponent3forOp is TBF.Rig.Modbus.PressureMeter.Meret.PressureMeter)
|
||||
{
|
||||
operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.Meret.PressureMeter.PressureMeter).ReadPressureOp(ref floatBox);
|
||||
operation31 = (tbfComponent3forOp as TBF.Rig.Modbus.PressureMeter.Meret.PressureMeter).ReadPressureOp(ref dblBox3);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Network.Camera.CLP1611.Camera)
|
||||
else if (tbfComponent3forOp is TBF.Rig.Network.Camera.CLP1611.Camera)
|
||||
{
|
||||
operation31 = (tbfComponent3forOp as TBF.BenchControl.Network.Camera.CLP1611.Camera).LiveStreamOp(false);
|
||||
operation33 = (tbfComponent3forOp as TBF.BenchControl.Network.Camera.CLP1611.Camera).LiveStreamOp(true);
|
||||
operation31 = (tbfComponent3forOp as TBF.Rig.Network.Camera.CLP1611.Camera).LiveStreamOp(false);
|
||||
operation33 = (tbfComponent3forOp as TBF.Rig.Network.Camera.CLP1611.Camera).LiveStreamOp(true);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Network.Camera.Roi.Roi)
|
||||
else if (tbfComponent3forOp is TBF.Rig.Network.Camera.Roi.Roi)
|
||||
{
|
||||
operation31 = (tbfComponent3forOp as TBF.BenchControl.Network.Camera.Roi.Roi).RoiDetectionOp();
|
||||
operation31 = (tbfComponent3forOp as TBF.Rig.Network.Camera.Roi.Roi).RoiDetectionOp();
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.Easytherm.Easytherm)
|
||||
else if (tbfComponent3forOp is TBF.Rig.Modbus.Easytherm.Easytherm)
|
||||
{
|
||||
operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
|
||||
operation32 = (tbfComponent3forOp as TBF.BenchControl.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
|
||||
operation31 = (tbfComponent3forOp as TBF.Rig.Modbus.Easytherm.Easytherm).SetTemperatureOp(10);
|
||||
operation32 = (tbfComponent3forOp as TBF.Rig.Modbus.Easytherm.Easytherm).SetTemperatureOp(20);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
else if (tbfComponent3forOp is TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter)
|
||||
{
|
||||
operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation32 = (tbfComponent3forOp as TBF.BenchControl.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
operation31 = (tbfComponent3forOp as TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter).ReadLevelOp(ref dblBox1);
|
||||
operation32 = (tbfComponent3forOp as TBF.Rig.Modbus.UltrasoundLevelMeter.LevelMeter).ReadTempOp(ref dblBox3);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
|
||||
else if (tbfComponent3forOp is TBF.Rig.Modbus.TankSelector.TankSelector)
|
||||
{
|
||||
//operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(1);
|
||||
//operation32 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(2);
|
||||
//operation33 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation34 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
//operation31 = (tbfComponent3forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(1);
|
||||
//operation32 = (tbfComponent3forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(2);
|
||||
//operation33 = (tbfComponent3forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation34 = (tbfComponent3forOp as TBF.Rig.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.Modbus.TankSelector.TankSelector)
|
||||
else if (tbfComponent3forOp is TBF.Rig.Modbus.TankSelector.TankSelector)
|
||||
{
|
||||
operation31 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
|
||||
operation32 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
|
||||
operation33 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
|
||||
operation34 = (tbfComponent3forOp as TBF.BenchControl.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
|
||||
operation31 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(1);
|
||||
operation32 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(2);
|
||||
operation33 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(4);
|
||||
operation34 = (tbfComponent3forOp as TBF.Rig.Modbus.QuidoRS.QuidoRS).SetOutputsOp(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace Dirichlet.Numerics
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return ((BigInteger)this).ToString();
|
||||
return ((BigInteger)this).ToString("x");
|
||||
}
|
||||
|
||||
public string ToString(string format)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
@@ -21,6 +21,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace EventViewer
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
//log.ErrorFormat("Failed to load from '{0}': {1}", fileName, e.Message);
|
||||
return null;
|
||||
@@ -203,7 +203,7 @@ namespace EventViewer
|
||||
}
|
||||
#endif
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
//log.ErrorFormat("Failed to save to '{0}': {1}", Program.LocalSettingsFileName, e.Message);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace EventViewer
|
||||
/// Open the main application window
|
||||
Application.Run(new EventViewerWnd());
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
//LogException(log, "Exception in Application.Run(new ResultsBrowserWnd(args))", e);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace GraphLib
|
||||
Samples = newSamples;
|
||||
return samplesCount;
|
||||
}
|
||||
catch (Exception exc)
|
||||
catch (Exception)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
@@ -21,6 +21,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
||||
@@ -11,13 +11,10 @@ namespace RestClient
|
||||
{
|
||||
public class BaseClient
|
||||
{
|
||||
private string _token;
|
||||
|
||||
private string _baseUrl;
|
||||
|
||||
public string ErrorMessage { get; set; }
|
||||
|
||||
private readonly HttpClient client;
|
||||
private AuthenticationHeaderValue _authValue;
|
||||
|
||||
public BaseClient(string baseUrl)
|
||||
|
||||
@@ -66,10 +66,9 @@ namespace Results
|
||||
ProcedureDescription = procedure.Description,
|
||||
WatermetersStr = procedure.Watermeters,
|
||||
ProcedureRevision = procedure.Revision,
|
||||
ProtocolTitle = string.Empty,
|
||||
StartTime = DateTime.Now,
|
||||
RealDensity = realDensity,
|
||||
AtTemperature = atTemperature,
|
||||
SampleDensity = realDensity,
|
||||
SampleTemp = atTemperature,
|
||||
Buoyancy = buoyancy,
|
||||
Compound = (procedure.MetersKind == Config.Entities.MetersKind.Combined),
|
||||
#if HEAT_METERS
|
||||
|
||||
@@ -26,10 +26,9 @@ namespace Results.Entities
|
||||
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual int ProcedureRevision { get; set; }
|
||||
public virtual string WatermetersStr { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string ProtocolTitle { get; set; }
|
||||
public virtual string Remark { get; set; }
|
||||
public virtual double RealDensity { get; set; } /// Density correction in [kg/m3]
|
||||
public virtual double AtTemperature { get; set; }
|
||||
public virtual double SampleDensity { get; set; } /// Sample denisty in [kg/m3]
|
||||
public virtual double SampleTemp { get; set; } /// Sample temperature when density measured [°C]
|
||||
public virtual double Buoyancy { get; set; }
|
||||
public virtual int Counter6 { get; set; }
|
||||
public virtual int Counter7 { get; set; }
|
||||
@@ -114,11 +113,9 @@ namespace Results.Entities
|
||||
IsRemoteProcedure = false;
|
||||
ProcedureDescription = string.Empty;
|
||||
WatermetersStr = string.Empty;
|
||||
ProtocolTitle = string.Empty;
|
||||
ProtocolTitle = string.Empty;
|
||||
Remark = string.Empty;
|
||||
RealDensity = Config.Data.RealDensity;
|
||||
AtTemperature = Config.Data.AtTemperature;
|
||||
SampleDensity = Config.Data.SampleDensity;
|
||||
SampleTemp = Config.Data.SampleTemp;
|
||||
Buoyancy = Config.Data.Buoyancy;
|
||||
}
|
||||
|
||||
@@ -282,11 +279,10 @@ namespace Results.Entities
|
||||
|
||||
public virtual string ToString(int i)
|
||||
{
|
||||
return string.Format("Batch: BatchNr={0} ProgramVersion={1} TestBenchId={2} UserName={3} UserNumber={4} ProcedureName={5}{6} ProcRev={7} ProtocolTitle={8} Remark={9} RealDensity={10} AtTemperature={11} Buoyancy={12} StartTime={13} EndTime={14} Dirty={15} RsltsSent={16} RsltsPrinted={17}",
|
||||
return string.Format("Batch: BatchNr={0} ProgramVersion={1} TestBenchId={2} UserName={3} UserNumber={4} ProcedureName={5}{6} ProcRev={7} Remark={8} RealDensity={9} AtTemperature={10} Buoyancy={11} StartTime={12} EndTime={13} Dirty={14} RsltsSent={15} RsltsPrinted={16}",
|
||||
BatchNr, ProgramVersion, TestBenchId, UserName, UserNumber,
|
||||
ProcedureName, (IsRemoteProcedure ? "(R)" : ""), ProcedureRevision,
|
||||
ProtocolTitle, Remark, RealDensity, AtTemperature, Buoyancy,
|
||||
StartTime, EndTime, Dirty, RsltsSent, RsltsPrinted);
|
||||
Remark, SampleDensity, SampleTemp, Buoyancy, StartTime, EndTime, Dirty, RsltsSent, RsltsPrinted);
|
||||
}
|
||||
|
||||
public virtual void WriteBinary(BinaryWriter writer)
|
||||
@@ -308,10 +304,9 @@ namespace Results.Entities
|
||||
writer.Write((ProcedureDescription != null) ? ProcedureDescription : string.Empty);
|
||||
writer.Write(ProcedureRevision);
|
||||
writer.Write((WatermetersStr != null) ? WatermetersStr : string.Empty);
|
||||
writer.Write((ProtocolTitle != null) ? ProtocolTitle : string.Empty);
|
||||
writer.Write((Remark != null) ? Remark : string.Empty);
|
||||
writer.Write(RealDensity);
|
||||
writer.Write(AtTemperature);
|
||||
writer.Write(SampleDensity);
|
||||
writer.Write(SampleTemp);
|
||||
writer.Write(Buoyancy);
|
||||
writer.Write(Counter6);
|
||||
writer.Write(Counter7);
|
||||
@@ -375,10 +370,9 @@ namespace Results.Entities
|
||||
ProcedureDescription = reader.ReadString();
|
||||
ProcedureRevision = reader.ReadInt32();
|
||||
WatermetersStr = reader.ReadString();
|
||||
ProtocolTitle = reader.ReadString();
|
||||
Remark = reader.ReadString();
|
||||
RealDensity = reader.ReadDouble();
|
||||
AtTemperature = reader.ReadDouble();
|
||||
SampleDensity = reader.ReadDouble();
|
||||
SampleTemp = reader.ReadDouble();
|
||||
Buoyancy = reader.ReadDouble();
|
||||
Counter6 = reader.ReadInt32();
|
||||
Counter7 = reader.ReadInt32();
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Results.Entities
|
||||
Qfrom = (double)test.Qfrom;
|
||||
Qto = (double)test.Qto;
|
||||
TargetVolume = (double)test.Volume;
|
||||
TargetTime = (double)test.TstTime;
|
||||
TargetTime = (double)test.TestTime;
|
||||
Method = test.Method;
|
||||
ErrLimLo = (double)test.ErrLimLo;
|
||||
ErrLimHi = (double)test.ErrLimHi;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Results.Entities
|
||||
public virtual double DensityIn { get; set; } /// [kg/m3]
|
||||
public virtual double DensityLine { get; set; } /// [kg/m3]
|
||||
public virtual double DensityDiv { get; set; } /// [kg/m3]
|
||||
public virtual double Buoyancy { get; set; }
|
||||
public virtual double MassOfEvapWater { get; set; }
|
||||
public virtual double FlowMass { get; set; } /// [kg/h] calculated from conventional true value
|
||||
public virtual double FlowVolume { get; set; } /// [m3/h]
|
||||
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
|
||||
@@ -269,7 +269,7 @@ namespace Results.Entities
|
||||
DensityIn = src.DensityIn;
|
||||
DensityLine = src.DensityLine;
|
||||
DensityDiv = src.DensityDiv;
|
||||
Buoyancy = src.Buoyancy;
|
||||
MassOfEvapWater = src.MassOfEvapWater;
|
||||
FlowMass = src.FlowMass;
|
||||
FlowVolume = src.FlowVolume;
|
||||
VolumeCTV = src.VolumeCTV;
|
||||
@@ -399,7 +399,7 @@ namespace Results.Entities
|
||||
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} Buoyancy={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
|
||||
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime,
|
||||
PulsesMaster, ConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd,
|
||||
DensityIn, DensityLine, DensityDiv, Buoyancy, FlowMass, FlowVolume,
|
||||
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, FlowMass, FlowVolume,
|
||||
VolumeCTV, VolumeMaster, ErrorMaster, ErrorFlags, InfoFlags,
|
||||
AmbTempMean, AmbTempStart, AmbTempEnd, AmbTempMin, AmbTempMax,
|
||||
AmbPressMean, AmbPressStart, AmbPressEnd, AmbPressMin, AmbPressMax,
|
||||
@@ -467,7 +467,7 @@ namespace Results.Entities
|
||||
writer.Write(DensityIn);
|
||||
writer.Write(DensityLine);
|
||||
writer.Write(DensityDiv);
|
||||
writer.Write(Buoyancy);
|
||||
writer.Write(MassOfEvapWater);
|
||||
writer.Write(FlowMass);
|
||||
writer.Write(FlowVolume);
|
||||
writer.Write(VolumeCTV);
|
||||
@@ -608,7 +608,7 @@ namespace Results.Entities
|
||||
DensityIn = reader.ReadDouble();
|
||||
DensityLine = reader.ReadDouble();
|
||||
DensityDiv = reader.ReadDouble();
|
||||
Buoyancy = reader.ReadDouble();
|
||||
MassOfEvapWater = reader.ReadDouble();
|
||||
FlowMass = reader.ReadDouble();
|
||||
FlowVolume = reader.ReadDouble();
|
||||
VolumeCTV = reader.ReadDouble();
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Results.Entities
|
||||
public virtual string Remark { get; set; }
|
||||
|
||||
#if IPERL
|
||||
public virtual double OrigCalibFactor { get; set; } /// Original iPerl calibration factor used during the test
|
||||
public virtual double OrigCalibFactor { get; set; } /// Original iPerl calibration factor used during the test
|
||||
public virtual double CalibFactor { get; set; } /// iPerl calibration factor used during the test
|
||||
public virtual double OrigCalibFactorLNA{ get; set; } /// Original iPerl LNA calibration factor used during the test
|
||||
public virtual double CalibFactorLNA { get; set; } /// iPerl LNA calibration factor used during the test
|
||||
@@ -76,8 +76,6 @@ namespace Results.Entities
|
||||
/// <summary>
|
||||
/// Data from a production test bench (in case of tests on iPerl special)
|
||||
/// </summary>
|
||||
public virtual int AssignedSerialNr { get; set; }
|
||||
public virtual string CompleteSerialNr { get; set; }
|
||||
public virtual string RadioAddress { get; set; }
|
||||
public virtual int PaletteNr { get; set; }
|
||||
public virtual int UmkartonNr { get; set; }
|
||||
@@ -91,13 +89,17 @@ namespace Results.Entities
|
||||
public virtual int ProdQ2CorrLR { get; set; } /// iPerl Q2 correction for the L-flow written to iPerl
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
public virtual int Pruefindex { get; set; } /// >= 1 ... pruefindex
|
||||
public virtual int AssignedSerialNr { get; set; }
|
||||
public virtual string Prefix { get; set; }
|
||||
public virtual string Suffix { get; set; }
|
||||
public virtual string CompleteSerialNr { get; set; }
|
||||
public virtual int WMTypeRevision { get; set; }
|
||||
public virtual int Pruefindex { get; set; } /// >= 1 ... pruefindex
|
||||
public virtual int HydrPruefung { get; set; }
|
||||
public virtual int WMTypeRevision { get; set; } /// Not mapped to DB !!!
|
||||
public virtual object RawTestInfos { get; set; } /// IList<SensusTestInfo> fetched from Oracle at the beginning of the cycle, not mapped to DB !!!
|
||||
public virtual object CompleteTestInfos { get; set; } /// SensusTestInfo[] obtained as a best match at the beginning of the cycle, not mapped to DB !!!
|
||||
#endif
|
||||
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
|
||||
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
|
||||
public virtual int SessionId { get; set; } /// Not mapped to DB !!! 1 (regular tracing DB session) or 2 (alternative tracing DB session)
|
||||
public virtual bool LastRecordIsNok { get; set; } /// Not mapped to DB !!! Previous record verification result
|
||||
|
||||
@@ -419,9 +421,13 @@ namespace Results.Entities
|
||||
{
|
||||
MeterTestRslts = new List<MeterTestRslt>();
|
||||
#if ORACLE_DB
|
||||
AssignedSerialNr = 0;
|
||||
Prefix = string.Empty;
|
||||
Suffix = string.Empty;
|
||||
CompleteSerialNr = string.Empty;
|
||||
WMTypeRevision = 0;
|
||||
Pruefindex = 1;
|
||||
HydrPruefung = 0;
|
||||
WMTypeRevision = 0;
|
||||
RawTestInfos = null;
|
||||
CompleteTestInfos = null;
|
||||
#endif
|
||||
@@ -439,7 +445,6 @@ namespace Results.Entities
|
||||
ArchivePath = string.Empty;
|
||||
Remark = string.Empty;
|
||||
#if TURA_SPECIAL
|
||||
CompleteSerialNr = string.Empty;
|
||||
RadioAddress = string.Empty;
|
||||
ProdUserName = string.Empty;
|
||||
ProdPurchaseOrder = string.Empty;
|
||||
@@ -483,8 +488,6 @@ namespace Results.Entities
|
||||
FWVersion = src.FWVersion;
|
||||
#endif
|
||||
#if TURA_SPECIAL
|
||||
AssignedSerialNr = src.AssignedSerialNr;
|
||||
CompleteSerialNr = src.CompleteSerialNr;
|
||||
RadioAddress = src.RadioAddress;
|
||||
PaletteNr = src.PaletteNr;
|
||||
UmkartonNr = src.UmkartonNr;
|
||||
@@ -498,9 +501,13 @@ namespace Results.Entities
|
||||
ProdQ2CorrLR = src.ProdQ2CorrLR;
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
AssignedSerialNr = src.AssignedSerialNr;
|
||||
Prefix = src.Prefix;
|
||||
Suffix = src.Suffix;
|
||||
CompleteSerialNr = src.CompleteSerialNr;
|
||||
WMTypeRevision = src.WMTypeRevision;
|
||||
Pruefindex = src.Pruefindex;
|
||||
HydrPruefung = src.HydrPruefung;
|
||||
WMTypeRevision = src.WMTypeRevision;
|
||||
RawTestInfos = src.RawTestInfos;
|
||||
CompleteTestInfos = src.CompleteTestInfos;
|
||||
#endif
|
||||
@@ -662,8 +669,6 @@ namespace Results.Entities
|
||||
writer.Write((FWVersion != null) ? FWVersion : string.Empty);
|
||||
#endif
|
||||
#if TURA_SPECIAL
|
||||
writer.Write(AssignedSerialNr);
|
||||
writer.Write((CompleteSerialNr != null) ? CompleteSerialNr : string.Empty);
|
||||
writer.Write((RadioAddress != null) ? RadioAddress : string.Empty);
|
||||
writer.Write(PaletteNr);
|
||||
writer.Write(UmkartonNr);
|
||||
@@ -677,9 +682,13 @@ namespace Results.Entities
|
||||
writer.Write(ProdQ2CorrLR);
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
writer.Write(AssignedSerialNr);
|
||||
writer.Write((Prefix != null) ? Prefix : string.Empty);
|
||||
writer.Write((Suffix != null) ? Suffix : string.Empty);
|
||||
writer.Write((CompleteSerialNr != null) ? CompleteSerialNr : string.Empty);
|
||||
writer.Write(WMTypeRevision);
|
||||
writer.Write(Pruefindex);
|
||||
writer.Write(HydrPruefung);
|
||||
writer.Write(WMTypeRevision);
|
||||
|
||||
/// Write RawTestInfos
|
||||
IList<Results.Output.SensusTestInfo> rawTestInfos = RawTestInfos as IList<Results.Output.SensusTestInfo>;
|
||||
@@ -755,8 +764,6 @@ namespace Results.Entities
|
||||
FWVersion = reader.ReadString();
|
||||
#endif
|
||||
#if TURA_SPECIAL
|
||||
AssignedSerialNr = reader.ReadInt32();
|
||||
CompleteSerialNr = reader.ReadString();
|
||||
RadioAddress = reader.ReadString();
|
||||
PaletteNr = reader.ReadInt32();
|
||||
UmkartonNr = reader.ReadInt32();
|
||||
@@ -770,9 +777,13 @@ namespace Results.Entities
|
||||
ProdQ2CorrLR = reader.ReadInt32();
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
AssignedSerialNr = reader.ReadInt32();
|
||||
Prefix = reader.ReadString();
|
||||
Suffix = reader.ReadString();
|
||||
CompleteSerialNr = reader.ReadString();
|
||||
WMTypeRevision = reader.ReadInt32();
|
||||
Pruefindex = reader.ReadInt32();
|
||||
HydrPruefung = reader.ReadInt32();
|
||||
WMTypeRevision = reader.ReadInt32();
|
||||
|
||||
/// Read RawTestInfos
|
||||
int rawTestInfosCount = reader.ReadInt32();
|
||||
|
||||
@@ -153,7 +153,6 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private OneWMResultsRowsCtrl oneWMResultsCtrl;
|
||||
private System.Windows.Forms.TabPage graphsTabPage;
|
||||
private System.Windows.Forms.TabPage productionTracingTabPage;
|
||||
private System.Windows.Forms.SplitContainer productionTracingSplitContainer;
|
||||
|
||||
@@ -18,14 +18,13 @@ namespace Results.Mappings
|
||||
Map(x => x.UserNumber);
|
||||
Map(x => x.ProcedureName);
|
||||
Map(x => x.ProcedureRevision);
|
||||
Map(x => x.ProtocolTitle);
|
||||
Map(x => x.Remark)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(2000)");
|
||||
|
||||
Map(x => x.RealDensity).Column("Custom1");
|
||||
Map(x => x.AtTemperature).Column("Custom2");
|
||||
Map(x => x.Buoyancy).Column("Custom3");
|
||||
Map(x => x.SampleDensity);
|
||||
Map(x => x.SampleTemp);
|
||||
Map(x => x.Buoyancy);
|
||||
|
||||
Map(x => x.Counter6);
|
||||
Map(x => x.Counter7);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Results.Mappings
|
||||
Map(x => x.Method);
|
||||
Map(x => x.ErrLimLo);
|
||||
Map(x => x.ErrLimHi);
|
||||
Map(x => x.ErrLimMargin).Column("Uncertainty");
|
||||
Map(x => x.ErrLimMargin);
|
||||
Map(x => x.Publish);
|
||||
Map(x => x.Evaluate);
|
||||
}
|
||||
|
||||
@@ -37,9 +37,10 @@ namespace Results.Mappings
|
||||
Map(x => x.MassEndRaw);
|
||||
Map(x => x.MassEnd);
|
||||
Map(x => x.DensityIn);
|
||||
Map(x => x.DensityLine).Column("DensityOut");
|
||||
Map(x => x.DensityLine);
|
||||
Map(x => x.DensityDiv);
|
||||
Map(x => x.Buoyancy);
|
||||
Map(x => x.MassOfEvapWater)
|
||||
.Column("Buoyancy");
|
||||
Map(x => x.FlowMass);
|
||||
Map(x => x.FlowVolume);
|
||||
Map(x => x.VolumeCTV);
|
||||
@@ -52,27 +53,27 @@ namespace Results.Mappings
|
||||
#if HEAT_METERS
|
||||
Map(x => x.RefEnergy);
|
||||
#endif
|
||||
Map(x => x.AmbTempMean).Column("AmbientTempAve");
|
||||
Map(x => x.AmbTempMean);
|
||||
Map(x => x.AmbTempStart);
|
||||
Map(x => x.AmbTempEnd);
|
||||
Map(x => x.AmbTempMin);
|
||||
Map(x => x.AmbTempMax);
|
||||
Map(x => x.AmbPressMean).Column("AmbientPressAve");
|
||||
Map(x => x.AmbPressMean);
|
||||
Map(x => x.AmbPressStart);
|
||||
Map(x => x.AmbPressEnd);
|
||||
Map(x => x.AmbPressMin);
|
||||
Map(x => x.AmbPressMax);
|
||||
Map(x => x.AmbHumiMean).Column("AmbientHumiAve");
|
||||
Map(x => x.AmbHumiMean);
|
||||
Map(x => x.AmbHumiStart);
|
||||
Map(x => x.AmbHumiEnd);
|
||||
Map(x => x.AmbHumiMin);
|
||||
Map(x => x.AmbHumiMax);
|
||||
Map(x => x.PressUpMean).Column("PressUpAvrg");
|
||||
Map(x => x.PressUpMean);
|
||||
Map(x => x.PressUpStart);
|
||||
Map(x => x.PressUpEnd);
|
||||
Map(x => x.PressUpMin);
|
||||
Map(x => x.PressUpMax);
|
||||
Map(x => x.PressDownMean).Column("PressDownAvrg");
|
||||
Map(x => x.PressDownMean);
|
||||
Map(x => x.PressDownStart);
|
||||
Map(x => x.PressDownEnd);
|
||||
Map(x => x.PressDownMin);
|
||||
@@ -82,17 +83,17 @@ namespace Results.Mappings
|
||||
Map(x => x.PressDeltaEnd);
|
||||
Map(x => x.PressDeltaMin);
|
||||
Map(x => x.PressDeltaMax);
|
||||
Map(x => x.TempUpMean).Column("TempInAvrg");
|
||||
Map(x => x.TempUpStart).Column("TempInStart");
|
||||
Map(x => x.TempUpEnd).Column("TempInEnd");
|
||||
Map(x => x.TempUpMin).Column("TempInMin");
|
||||
Map(x => x.TempUpMax).Column("TempInMax");
|
||||
Map(x => x.TempDownMean).Column("TempOutAvrg");
|
||||
Map(x => x.TempDownStart).Column("TempOutStart");
|
||||
Map(x => x.TempDownEnd).Column("TempOutEnd");
|
||||
Map(x => x.TempDownMin).Column("TempOutMin");
|
||||
Map(x => x.TempDownMax).Column("TempOutMax");
|
||||
Map(x => x.TempDivMean).Column("TempDivAvrg");
|
||||
Map(x => x.TempUpMean);
|
||||
Map(x => x.TempUpStart);
|
||||
Map(x => x.TempUpEnd);
|
||||
Map(x => x.TempUpMin);
|
||||
Map(x => x.TempUpMax);
|
||||
Map(x => x.TempDownMean);
|
||||
Map(x => x.TempDownStart);
|
||||
Map(x => x.TempDownEnd);
|
||||
Map(x => x.TempDownMin);
|
||||
Map(x => x.TempDownMax);
|
||||
Map(x => x.TempDivMean);
|
||||
Map(x => x.TempDivStart);
|
||||
Map(x => x.TempDivEnd);
|
||||
Map(x => x.TempDivMin);
|
||||
|
||||
@@ -43,8 +43,6 @@ namespace Results.Mappings
|
||||
Map(x => x.FWVersion);
|
||||
#endif
|
||||
#if TURA_SPECIAL
|
||||
Map(x => x.AssignedSerialNr);
|
||||
Map(x => x.CompleteSerialNr);
|
||||
Map(x => x.RadioAddress);
|
||||
Map(x => x.PaletteNr);
|
||||
Map(x => x.UmkartonNr);
|
||||
@@ -58,8 +56,13 @@ namespace Results.Mappings
|
||||
Map(x => x.ProdQ2CorrLR);
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
Map(x => x.AssignedSerialNr);
|
||||
Map(x => x.Prefix);
|
||||
Map(x => x.Suffix);
|
||||
Map(x => x.CompleteSerialNr);
|
||||
Map(x => x.Pruefindex);
|
||||
Map(x => x.HydrPruefung);
|
||||
Map(x => x.WMTypeRevision);
|
||||
#endif
|
||||
References(x => x.WaterMeterData);
|
||||
References(x => x.Batch);
|
||||
|
||||
@@ -1,630 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using Config.Entities;
|
||||
using System.IO;
|
||||
using Results.Resources;
|
||||
|
||||
namespace Results.Output.Printers.Munich
|
||||
{
|
||||
public class MunichPrintDocument : PrintDocument
|
||||
{
|
||||
const string FontFamilyName = "Arial"; ///"Times New Roman";
|
||||
|
||||
const int SpacingOne = 18;
|
||||
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
|
||||
const int Tab1 = 80; /// Positions of columns above the table
|
||||
const int Tab2 = 240;
|
||||
const int Tab3 = 430;
|
||||
const int Tab4 = 590;
|
||||
const int BorderW = 1; /// Table border line width
|
||||
const int MarginTop = 7; /// Margins of the text from table lines
|
||||
const int MarginLeft = 4; /// Margins of the text from table lines
|
||||
|
||||
///
|
||||
/// Data to print
|
||||
///
|
||||
readonly string docVersion;
|
||||
readonly Results.Entities.WaterMeter wm;
|
||||
string zaehlertyp;
|
||||
string pruefvorlage;
|
||||
|
||||
readonly IList<Results.Entities.MeterTestRslt> results;
|
||||
readonly int resultsCount;
|
||||
readonly bool compound; /// true when MetersKind is MetersKind.Combined
|
||||
|
||||
|
||||
int pageNr; /// Current page number
|
||||
int nrPages; /// Total number of pages
|
||||
float tableTop; /// Top coordinate of the table
|
||||
|
||||
int[] firstTblRowsOnPage;
|
||||
int[] secondTblRowsOnPage;
|
||||
|
||||
|
||||
PageOrientation pageOrientation;
|
||||
|
||||
/// <summary>
|
||||
/// Property variable for the Font the user wishes to use
|
||||
/// </summary>
|
||||
Font font;
|
||||
Font boldFont;
|
||||
Font fontTitle;
|
||||
|
||||
///
|
||||
/// Table style
|
||||
///
|
||||
static TableStyle tableStyle = new TableStyle
|
||||
{
|
||||
Font = new Font(FontFamilyName, 10, FontStyle.Regular),
|
||||
HeaderFont = new Font(FontFamilyName, 10, FontStyle.Regular),
|
||||
MarginX = 7,
|
||||
MarginY = 5,
|
||||
LineWidth = 1,
|
||||
TopHeadersCount = 1,
|
||||
HorizLines = TableLines.FirstSecondAndLast,
|
||||
VertLines = TableLines.All,
|
||||
ColumnWidths = new float[] { 150, 70, 75, 75, 70, 75, 75 },
|
||||
};
|
||||
static Alignment[] horizontalAlignment = new Alignment[] /// Horizontal alignment of items of one row
|
||||
{
|
||||
Alignment.Left, Alignment.Left, Alignment.Left,
|
||||
Alignment.Left, Alignment.Left, Alignment.Left, Alignment.Left
|
||||
};
|
||||
static VertAlignment[] verticalAlignment = new VertAlignment[] /// Vertical alignment of items of one row
|
||||
{
|
||||
VertAlignment.Middle, VertAlignment.Middle, VertAlignment.Middle,
|
||||
VertAlignment.Middle, VertAlignment.Middle, VertAlignment.Middle, VertAlignment.Middle
|
||||
};
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public MunichPrintDocument(string docVersion,
|
||||
Results.Entities.WaterMeter wm,
|
||||
PageOrientation pageOrientation)
|
||||
{
|
||||
this.docVersion = docVersion;
|
||||
this.wm = wm;
|
||||
this.compound = wm.Compound();
|
||||
this.pageOrientation = pageOrientation;
|
||||
|
||||
string[] info = wm.ProductName().Split(new char[] { ';' });
|
||||
if (info.Length >= 2)
|
||||
{
|
||||
pruefvorlage = info[0];
|
||||
zaehlertyp = info[1];
|
||||
}
|
||||
else if (info.Length == 1)
|
||||
{
|
||||
pruefvorlage = info[0];
|
||||
zaehlertyp = compound ? "Verbundzähler" : "Einzelzähler";
|
||||
}
|
||||
else
|
||||
{
|
||||
pruefvorlage = wm.ProcedureName();
|
||||
zaehlertyp = compound ? "Verbundzähler" : "Einzelzähler";
|
||||
}
|
||||
|
||||
results = wm.RegularMeterTestRslts();
|
||||
|
||||
resultsCount = 0;
|
||||
foreach (var mtr in wm.RegularMeterTestRslts())
|
||||
{
|
||||
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) resultsCount++;
|
||||
}
|
||||
|
||||
pageNr = 1;
|
||||
if (compound)
|
||||
{
|
||||
/// Compound meter results
|
||||
const int MaxOnFirstPage = 23;
|
||||
const int MaxOnPage = 45;
|
||||
if (resultsCount <= 7)
|
||||
{
|
||||
nrPages = 1;
|
||||
firstTblRowsOnPage = new int[] { resultsCount };
|
||||
secondTblRowsOnPage = new int[] { resultsCount };
|
||||
}
|
||||
else if (resultsCount <= MaxOnFirstPage)
|
||||
{
|
||||
nrPages = 2;
|
||||
firstTblRowsOnPage = new int[] { resultsCount, 0 };
|
||||
secondTblRowsOnPage = new int[] { 0, int.MaxValue };
|
||||
}
|
||||
else if (resultsCount <= MaxOnPage)
|
||||
{
|
||||
nrPages = 3;
|
||||
firstTblRowsOnPage = new int[] { MaxOnFirstPage, (resultsCount - MaxOnFirstPage), 0 };
|
||||
int secondTblRowsOn2ndPage = Math.Max(0, MaxOnFirstPage + MaxOnPage - 2 - resultsCount);
|
||||
secondTblRowsOnPage = new int[] { 0, secondTblRowsOn2ndPage, resultsCount - secondTblRowsOn2ndPage };
|
||||
}
|
||||
else if (resultsCount <= MaxOnFirstPage + MaxOnPage)
|
||||
{
|
||||
nrPages = 4;
|
||||
firstTblRowsOnPage = new int[] { MaxOnFirstPage, MaxOnPage, 0, 0 };
|
||||
secondTblRowsOnPage = new int[] { 0, 0, MaxOnPage, MaxOnFirstPage };
|
||||
}
|
||||
else
|
||||
{
|
||||
nrPages = 5;
|
||||
firstTblRowsOnPage = new int[] { MaxOnFirstPage, MaxOnPage, (resultsCount - MaxOnFirstPage - MaxOnPage), 0 };
|
||||
secondTblRowsOnPage = new int[] { 0, 0, Math.Max(0, MaxOnFirstPage + 2 * MaxOnPage - 2 - resultsCount), MaxOnPage, MaxOnFirstPage };
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Regular (single) meter results
|
||||
const int MaxOnFirstPage = 27;
|
||||
const int MaxOnPage = 45;
|
||||
if (resultsCount <= 9)
|
||||
{
|
||||
nrPages = 1;
|
||||
firstTblRowsOnPage = new int[] { resultsCount };
|
||||
secondTblRowsOnPage = new int[] { resultsCount };
|
||||
}
|
||||
else if (resultsCount <= MaxOnFirstPage)
|
||||
{
|
||||
nrPages = 2;
|
||||
firstTblRowsOnPage = new int[] { resultsCount, 0 };
|
||||
secondTblRowsOnPage = new int[] { 0, int.MaxValue };
|
||||
}
|
||||
else if (resultsCount <= MaxOnPage)
|
||||
{
|
||||
nrPages = 3;
|
||||
firstTblRowsOnPage = new int[] { MaxOnFirstPage, (resultsCount - MaxOnFirstPage), 0 };
|
||||
int secondTblRowsOn2ndPage = Math.Max(0, MaxOnFirstPage + MaxOnPage - 2 - resultsCount);
|
||||
secondTblRowsOnPage = new int[] { 0, secondTblRowsOn2ndPage, resultsCount - secondTblRowsOn2ndPage };
|
||||
}
|
||||
else if (resultsCount <= MaxOnFirstPage + MaxOnPage)
|
||||
{
|
||||
nrPages = 4;
|
||||
firstTblRowsOnPage = new int[] { MaxOnFirstPage, MaxOnPage, 0, 0 };
|
||||
secondTblRowsOnPage = new int[] { 0, 0, MaxOnPage, MaxOnFirstPage };
|
||||
}
|
||||
else
|
||||
{
|
||||
nrPages = 5;
|
||||
firstTblRowsOnPage = new int[] { MaxOnFirstPage, MaxOnPage, (resultsCount - MaxOnFirstPage - MaxOnPage), 0 };
|
||||
secondTblRowsOnPage = new int[] { 0, 0, Math.Max(0, MaxOnFirstPage + 2 * MaxOnPage - 2 - resultsCount), MaxOnPage, MaxOnFirstPage };
|
||||
}
|
||||
}
|
||||
|
||||
DefaultPageSettings.Landscape = (pageOrientation == PageOrientation.Landscape);
|
||||
}
|
||||
|
||||
/// <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);
|
||||
|
||||
if (font == null) { font = new Font(FontFamilyName, 10, FontStyle.Regular); }
|
||||
if (boldFont == null) { boldFont = new Font(FontFamilyName, 10, FontStyle.Bold); }
|
||||
if (fontTitle == null) { fontTitle = new Font(FontFamilyName, 24, FontStyle.Bold); }
|
||||
}
|
||||
|
||||
/// <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 (pageOrientation == PageOrientation.Portrait)
|
||||
{
|
||||
string[] templatePaths = new string[] { "C:\\TBF\\Templates\\MunichP.jpg", "C:\\TBF\\Templates\\MunichP.png", "C:\\TBF\\Templates\\MunichP.tif" };
|
||||
foreach (var t in templatePaths)
|
||||
{
|
||||
if (File.Exists(t))
|
||||
{
|
||||
e.Graphics.DrawImage(new Bitmap(Image.FromFile(t), 827, 1169), new Rectangle(0, 0, 827, 1169));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] templatePaths = new string[] { "C:\\TBF\\Templates\\MunichL.jpg", "C:\\TBF\\Templates\\MunichL.png", "C:\\TBF\\Templates\\MunichL.tif" };
|
||||
foreach (var t in templatePaths)
|
||||
{
|
||||
if (File.Exists(t))
|
||||
{
|
||||
e.Graphics.DrawImage(new Bitmap(Image.FromFile(t), 1169, 827), new Rectangle(0, 0, 1169, 827));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Set print area size and margins (in dots using 80 dpi)
|
||||
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
||||
int printWidth = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
|
||||
int leftMargin = base.DefaultPageSettings.Margins.Left; /// X
|
||||
int topMargin = base.DefaultPageSettings.Margins.Top; /// Y
|
||||
|
||||
/// Check if the user selected to print in Landscape mode
|
||||
/// if they did then we need to swap height/width parameters
|
||||
if (base.DefaultPageSettings.Landscape)
|
||||
{
|
||||
int tmp = printHeight;
|
||||
printHeight = printWidth;
|
||||
printWidth = tmp;
|
||||
}
|
||||
|
||||
int x = leftMargin;
|
||||
int y = topMargin;
|
||||
|
||||
/// Use the StringFormat class for the text layout of our document
|
||||
StringFormat format = new StringFormat(StringFormatFlags.LineLimit);
|
||||
|
||||
int lineNr = FirstLineNr;
|
||||
|
||||
if (pageNr == 1)
|
||||
{
|
||||
/// This is the first page, drad the title, common part and the 1st table
|
||||
|
||||
RectangleF printArea = new RectangleF(TitleX, TitleY, 667, 50);
|
||||
e.Graphics.DrawString(wm.Batch.ProtocolTitle, this.fontTitle, Brushes.Black, printArea);
|
||||
|
||||
DrawCommonTop(e, ref lineNr, wm, pruefvorlage, docVersion);
|
||||
|
||||
lineNr += 2;
|
||||
tableTop = SpacingOne * lineNr;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// This appears on the top of the 2nd and every subsequent page.
|
||||
/// 2nd table starts from the top of the page.
|
||||
lineNr -= 3;
|
||||
|
||||
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, "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;
|
||||
|
||||
tableTop = TitleY + (compound ? 5 : 4) * SpacingOne;
|
||||
}
|
||||
|
||||
if (firstTblRowsOnPage[pageNr - 1] > 0)
|
||||
{
|
||||
int from = 0;
|
||||
for (int pN = 0; pN < pageNr - 1; pN++) from += firstTblRowsOnPage[pN];
|
||||
Table table1 = PrepareTableOne(from, from + firstTblRowsOnPage[pageNr - 1] - 1);
|
||||
tableTop = table1.Draw(e, Tab1, tableTop) + SpacingOneAndHalf;
|
||||
}
|
||||
|
||||
|
||||
if (secondTblRowsOnPage[pageNr - 1] > 0)
|
||||
{
|
||||
int from = 0;
|
||||
for (int pN = 0; pN < pageNr - 1; pN++) from += secondTblRowsOnPage[pN];
|
||||
Table table2 = PrepareTableTwo(from, from + secondTblRowsOnPage[pageNr - 1] - 1);
|
||||
tableTop = table2.Draw(e, Tab1, tableTop) + SpacingOneAndHalf;
|
||||
}
|
||||
|
||||
if (pageNr == nrPages)
|
||||
{
|
||||
int top = topMargin + printHeight - 8 * SpacingOne;
|
||||
DrawCommonBottom(e, top, wm);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.HasMorePages = true;
|
||||
}
|
||||
|
||||
///
|
||||
/// Draw a footer and increment the page number
|
||||
///
|
||||
string pageNrText = string.Format("{0} {1}/{2}", Strings.Page, pageNr++, nrPages);
|
||||
int pageNrWidth = (int)e.Graphics.MeasureString(pageNrText, font).Width;
|
||||
PrintAt(e, leftMargin + (printWidth - pageNrWidth) / 2, topMargin + printHeight - SpacingOne, pageNrText);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepares content and style of the first table.
|
||||
/// </summary>
|
||||
/// <param name="from">0-based index fo the first result to print</param>
|
||||
/// <param name="to">0-based index fo the last result to print</param>
|
||||
/// <returns>Prepared table</returns>
|
||||
Table PrepareTableOne(int from = 0, int to = int.MaxValue)
|
||||
{
|
||||
Table table = new Table(7);
|
||||
table.Style = tableStyle;
|
||||
|
||||
string[] tableHeader = new string[]
|
||||
{
|
||||
"Prüflauf",
|
||||
"Q [l/h]",
|
||||
"Prüf-Vol.[l]",
|
||||
compound ? "HZ-Vol.[l]" : "Z-Vol.[l]",
|
||||
compound ? "NZ-Vol.[l]" : "-",
|
||||
"Fehler [%]",
|
||||
"Ergebnis",
|
||||
};
|
||||
table.AddRow(tableHeader, horizontalAlignment, verticalAlignment);
|
||||
|
||||
int rowCount = 0;
|
||||
foreach (var mtr in wm.RegularMeterTestRslts())
|
||||
{
|
||||
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
|
||||
{
|
||||
if (from <= rowCount && rowCount <= to)
|
||||
{
|
||||
double flow_ctv = (mtr.TestRslt.TestTime != 0) ? (3.6 * mtr.TestRslt.VolumeCTV / mtr.TestRslt.TestTime) : 0;
|
||||
|
||||
if (compound)
|
||||
{
|
||||
Results.Entities.MeterTestRslt mainMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundAux);
|
||||
|
||||
table.AddRow(new string[] { mtr.Name(),
|
||||
Config.Units.ConvertTo(Config.Unit.lph, flow_ctv).ToString("F1"),
|
||||
mtr.TestRslt.VolumeCTV.ToString("F2"),
|
||||
mainMtr.VolumeMeter.ToString("F2"),
|
||||
auxMtr.VolumeMeter.ToString("F2"),
|
||||
mtr.Error.ToString("F2"),
|
||||
mtr.Passed ? "iO" : "NiO" },
|
||||
horizontalAlignment,
|
||||
verticalAlignment);
|
||||
}
|
||||
else
|
||||
{
|
||||
table.AddRow(new string[] { mtr.Name(),
|
||||
Config.Units.ConvertTo(Config.Unit.lph, flow_ctv).ToString("F1"),
|
||||
mtr.TestRslt.VolumeCTV.ToString("F2"),
|
||||
mtr.VolumeMeter.ToString("F2"),
|
||||
"-",
|
||||
mtr.Error.ToString("F2"),
|
||||
mtr.Passed ? "iO" : "NiO" },
|
||||
|
||||
horizontalAlignment,
|
||||
verticalAlignment);
|
||||
}
|
||||
}
|
||||
rowCount++;
|
||||
}
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepares content and style of the second table.
|
||||
/// </summary>
|
||||
/// <param name="from">0-based index fo the first result to print</param>
|
||||
/// <param name="to">0-based index fo the last result to print</param>
|
||||
/// <returns>Prepared table</returns>
|
||||
Table PrepareTableTwo(int from = 0, int to = int.MaxValue)
|
||||
{
|
||||
Table table = new Table(7);
|
||||
table.Style = tableStyle;
|
||||
|
||||
string[] tableHeader = new string[]
|
||||
{
|
||||
"",
|
||||
"Q [l/h]",
|
||||
"Temperatur",
|
||||
"Dichte",
|
||||
"Prüfzeit",
|
||||
"Druck Eing.",
|
||||
"Druck Ausg.",
|
||||
};
|
||||
table.AddRow(tableHeader, horizontalAlignment, verticalAlignment);
|
||||
|
||||
int rowCount = 0;
|
||||
foreach (var mtr in wm.RegularMeterTestRslts())
|
||||
{
|
||||
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
|
||||
{
|
||||
if (from <= rowCount && rowCount <= to)
|
||||
{
|
||||
double flow_ctv = (mtr.TestRslt.TestTime != 0) ? (3.6 * mtr.TestRslt.VolumeCTV / mtr.TestRslt.TestTime) : 0;
|
||||
|
||||
table.AddRow(new string[] { mtr.Name(),
|
||||
Config.Units.ConvertTo(Config.Unit.lph, flow_ctv).ToString("F1"),
|
||||
mtr.TestRslt.TempDownMean.ToString("F2"),
|
||||
mtr.TestRslt.DensityDiv.ToString("F2"),
|
||||
mtr.TestTime.ToString("F1"),
|
||||
Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressUpMean).ToString("F3"),
|
||||
Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressDownMean).ToString("F3") },
|
||||
horizontalAlignment,
|
||||
verticalAlignment);
|
||||
}
|
||||
rowCount++;
|
||||
}
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prints text on the top of the first page (title, common information).
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="lineNr"></param>
|
||||
/// <param name="wm"></param>
|
||||
/// <param name="pruefvorlage"></param>
|
||||
/// <param name="docVersion"></param>
|
||||
void DrawCommonTop(PrintPageEventArgs e, ref int lineNr, Entities.WaterMeter wm, string pruefvorlage, string docVersion)
|
||||
{
|
||||
///
|
||||
///
|
||||
///
|
||||
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)
|
||||
{
|
||||
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, "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, 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");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prints text at the bottom of the last page (footer).
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="lineNr"></param>
|
||||
/// <param name="wm"></param>
|
||||
void DrawCommonBottom(PrintPageEventArgs e, float top, Entities.WaterMeter wm)
|
||||
{
|
||||
int iTop = (int)top;
|
||||
|
||||
PrintAt(e, Tab1, iTop, "Temperatur");
|
||||
PrintAt(e, Tab2, iTop, wm.Batch.AmbTempMean().ToString("F1") + " \x00b0C");
|
||||
|
||||
iTop += SpacingOne;
|
||||
|
||||
PrintAt(e, Tab1, iTop, "Feuchtigkeit");
|
||||
PrintAt(e, Tab2, iTop, wm.Batch.AmbHumiMean().ToString("F0") + " %");
|
||||
|
||||
iTop += SpacingOne;
|
||||
|
||||
PrintAt(e, Tab1, iTop, "Luftdruck");
|
||||
PrintAt(e, Tab2, iTop, Config.Units.ConvertTo(Config.Unit.mbar, wm.Batch.AmbPressMean()).ToString("F0") + " mbar");
|
||||
|
||||
iTop += SpacingOne;
|
||||
|
||||
PrintAt(e, Tab3, iTop, wm.Batch.EndTime.Date.ToString("d"));
|
||||
|
||||
iTop += SpacingOne;
|
||||
|
||||
PrintAt(e, Tab3, iTop, "Datum");
|
||||
PrintAt(e, Tab4, iTop, "Unterschrift");
|
||||
}
|
||||
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
|
||||
{
|
||||
PrintAt(e, p.X, p.Y, text);
|
||||
}
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, int x, int y, string text)
|
||||
{
|
||||
RectangleF printArea = new RectangleF(x, y, 667, SpacingOne);
|
||||
e.Graphics.DrawString(text, this.font, Brushes.Black, printArea);
|
||||
}
|
||||
|
||||
void PrintBoldAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
|
||||
{
|
||||
PrintBoldAt(e, p.X, p.Y, text);
|
||||
}
|
||||
|
||||
void PrintBoldAt(System.Drawing.Printing.PrintPageEventArgs e, int x, int y, string text)
|
||||
{
|
||||
RectangleF printArea = new RectangleF(x, y, 667, SpacingOne);
|
||||
e.Graphics.DrawString(text, this.boldFont, Brushes.Black, printArea);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -512,7 +512,7 @@ namespace Results.Output
|
||||
QBezeichnungLog = fullTestNameWoPart, /// Flow name in Oracle database
|
||||
Range = range,
|
||||
Flow = (range == Range.R100_110) ? test.Qfrom : (range == Range.R90_100) ? test.Qto : (test.Qfrom + test.Qto) / 2,
|
||||
TestTime = (int)Math.Round(test.TstTime),
|
||||
TestTime = (int)Math.Round(test.TestTime),
|
||||
ErrLimLoFromDB = test.ErrLimLo,
|
||||
ErrLimHiFromDB = test.ErrLimHi,
|
||||
Uncertainty = test.Uncertainty,
|
||||
|
||||
@@ -166,9 +166,6 @@
|
||||
<Compile Include="Output\Printers\PrintersCommon.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\Munich\MunichPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\OnePerMeter\OnePerMeterPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -175,8 +175,8 @@ namespace Results
|
||||
/// Density
|
||||
///
|
||||
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).DensityLine)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density_correction, Strings.Density_correction + " ()", Quantity.Density, ItemCategory.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", Config.Formulas.DensityCorrection(w.Batch.RealDensity, w.Batch.AtTemperature))));
|
||||
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", w.Batch.RealDensity)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density_correction, Strings.Density_correction + " ()", Quantity.Density, ItemCategory.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", Config.Formulas.DensityCorrection(w.Batch.SampleDensity, w.Batch.SampleTemp))));
|
||||
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", w.Batch.SampleDensity)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.RhoDistilledWtrAtMeLineTemp, string.Format("{0} of distilled water at T line", Strings.Density), Quantity.Density, ItemCategory.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? 0 : Config.Formulas.DistilledWaterDensityFromTemp((w.GetTestRslt(t).TempUpMean + w.GetTestRslt(t).TempDownMean) / 2))));
|
||||
|
||||
///
|
||||
@@ -252,7 +252,7 @@ namespace Results
|
||||
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.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Batch.AtTemperature)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_rho_0, string.Format("{0} RO0", Strings.VName_Temp), Strings.Tooltip_T_rho_0, Quantity.Temperature, ItemCategory.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Batch.SampleTemp)));
|
||||
#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) ? "" : FormatDbl(u, f, p, "F3", w.GetTestRslt(t).Custom1)));
|
||||
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) ? "" : FormatDbl(u, f, p, "F3", w.GetTestRslt(t).Custom2)));
|
||||
@@ -405,7 +405,6 @@ namespace Results
|
||||
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)));
|
||||
@@ -444,9 +443,12 @@ namespace Results
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ORACLE_DB
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_AssignedSerialNr, "iPerl assigned s/n", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.AssignedSerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_CompleteSerialNr, "iPerl complete s/n", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.CompleteSerialNr)));
|
||||
#endif
|
||||
|
||||
#if TURA_SPECIAL
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_AssignedSerialNr, "iPerl assigned s/n", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.AssignedSerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_CompleteSerialNr, "iPerl complete s/n", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.CompleteSerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_RadioAddress, "iPerl radio address", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.RadioAddress)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_PaletteNr, "iPerl palette nr.", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.PaletteNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_UmkartonNr, "iPerl umkarton nr.", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.UmkartonNr)));
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace ResultsBrowser.Filters
|
||||
DateFilter.GetFilterID(),
|
||||
BatchNrFilter.GetFilterID(),
|
||||
ProcedureFilter.GetFilterID(),
|
||||
ProtocolFilter.GetFilterID(),
|
||||
QnFilter.GetFilterID(),
|
||||
SerialNrFilter.GetFilterID(),
|
||||
WMPositionFilter.GetFilterID(),
|
||||
@@ -31,7 +30,6 @@ namespace ResultsBrowser.Filters
|
||||
DateFilter.GetFilterName(),
|
||||
BatchNrFilter.GetFilterName(),
|
||||
ProcedureFilter.GetFilterName(),
|
||||
ProtocolFilter.GetFilterName(),
|
||||
QnFilter.GetFilterName(),
|
||||
SerialNrFilter.GetFilterName(),
|
||||
WMPositionFilter.GetFilterName(),
|
||||
@@ -46,7 +44,6 @@ namespace ResultsBrowser.Filters
|
||||
if (filterID == DateFilter.GetFilterID()) return new DateFilter();
|
||||
else if (filterID == BatchNrFilter.GetFilterID()) return new BatchNrFilter();
|
||||
else if (filterID == ProcedureFilter.GetFilterID()) return new ProcedureFilter();
|
||||
else if (filterID == ProtocolFilter.GetFilterID()) return new ProtocolFilter();
|
||||
else if (filterID == QnFilter.GetFilterID()) return new QnFilter();
|
||||
else if (filterID == SerialNrFilter.GetFilterID()) return new SerialNrFilter();
|
||||
else if (filterID == WMPositionFilter.GetFilterID()) return new WMPositionFilter();
|
||||
@@ -62,7 +59,6 @@ namespace ResultsBrowser.Filters
|
||||
if (filterID == DateFilter.GetFilterID()) type = typeof(DateFilter);
|
||||
else if (filterID == BatchNrFilter.GetFilterID()) type = typeof(BatchNrFilter);
|
||||
else if (filterID == ProcedureFilter.GetFilterID()) type = typeof(ProcedureFilter);
|
||||
else if (filterID == ProtocolFilter.GetFilterID()) type = typeof(ProtocolFilter);
|
||||
else if (filterID == QnFilter.GetFilterID()) type = typeof(QnFilter);
|
||||
else if (filterID == SerialNrFilter.GetFilterID()) type = typeof(SerialNrFilter);
|
||||
else if (filterID == WMPositionFilter.GetFilterID()) type = typeof(WMPositionFilter);
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class ProtocolFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "Protocol"; }
|
||||
public static string GetFilterName() { return Strings.Protocol; }
|
||||
|
||||
///
|
||||
/// Obligatory wrappers
|
||||
///
|
||||
public string GetThisFilterID() { return GetFilterID(); }
|
||||
public void Save(StringBuilder sb) { (new XmlSerializer(this.GetType())).Serialize(new StringWriter(sb), this); }
|
||||
public void Data2UI() { userIface.Data2UI(); }
|
||||
public void UI2Data() { userIface.UI2Data(); }
|
||||
public UserControl GetFilterUI() { return userIface as UserControl; }
|
||||
|
||||
///
|
||||
/// Serialized filter data
|
||||
///
|
||||
public string Protocol;
|
||||
|
||||
|
||||
private ProtocolFilterUI userIface;
|
||||
|
||||
public ProtocolFilter()
|
||||
{
|
||||
userIface = new ProtocolFilterUI(this);
|
||||
}
|
||||
|
||||
public IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters)
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<Batch> batches = se.QueryOver<Batch>()
|
||||
.Where(x => (x.ProtocolTitle == Protocol))
|
||||
.List<Batch>();
|
||||
|
||||
foreach (var b in batches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.Batch.ProtocolTitle == Protocol) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class ProtocolFilterUI
|
||||
{
|
||||
/// <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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.protocolTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.protocolTextBox);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Procedure";
|
||||
//
|
||||
// procedureTextBox
|
||||
//
|
||||
this.protocolTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.protocolTextBox.Name = "procedureTextBox";
|
||||
this.protocolTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.protocolTextBox.TabIndex = 0;
|
||||
//
|
||||
// ProcedureFilter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "ProcedureFilter";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox protocolTextBox;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class ProtocolFilterUI : UserControl
|
||||
{
|
||||
ProtocolFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public ProtocolFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public ProtocolFilterUI(ProtocolFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = ProtocolFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
protocolTextBox.Text = (data.Protocol != null) ? data.Protocol : string.Empty;
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
data.Protocol = protocolTextBox.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.UI.Bench.Components;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
@@ -88,13 +88,13 @@ namespace ResultsBrowser.Forms
|
||||
printerCfg = printerFactory.CmpntCfgFromCmpntEntity(cmpnt);
|
||||
}
|
||||
|
||||
IComponentCfgCtrl cfgControl = printerCfg.GetControl();
|
||||
ComponentParametersDlg cfgForm = new ComponentParametersDlg();
|
||||
cfgForm.CmpntEntities = new List<Component>();
|
||||
|
||||
IComponentCfgCtrl cfgControl = printerCfg.GetControl(cfgForm.CmpntEntities);
|
||||
cfgControl.Config = printerCfg;
|
||||
cfgControl.Config.ItemNr = 0;
|
||||
|
||||
ComponentParametersDlg cfgForm = new ComponentParametersDlg();
|
||||
cfgForm.CmpntEntities = new List<Component>();
|
||||
|
||||
cfgForm.ComponentCfgCtrl = cfgControl;
|
||||
cfgForm.UnlockAfterStart = true;
|
||||
DialogResult dr = cfgForm.ShowDialog();
|
||||
|
||||
@@ -96,13 +96,6 @@
|
||||
<Compile Include="Filters\ProcedureFilterUI.Designer.cs">
|
||||
<DependentUpon>ProcedureFilterUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Filters\ProtocolFilter.cs" />
|
||||
<Compile Include="Filters\ProtocolFilterUI.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Filters\ProtocolFilterUI.designer.cs">
|
||||
<DependentUpon>ProtocolFilterUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Filters\QnFilter.cs" />
|
||||
<Compile Include="Filters\QnFilterUI.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
@@ -219,9 +212,6 @@
|
||||
<EmbeddedResource Include="Filters\ProcedureFilterUI.resx">
|
||||
<DependentUpon>ProcedureFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Filters\ProtocolFilterUI.resx">
|
||||
<DependentUpon>ProtocolFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Filters\QnFilterUI.resx">
|
||||
<DependentUpon>QnFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -7,9 +7,9 @@ using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using ResultsBrowser.Filters;
|
||||
using ResultsBrowser.Resources;
|
||||
using Oracle;
|
||||
@@ -33,9 +33,9 @@ namespace ResultsBrowser
|
||||
|
||||
static IList<IComponent> tbfComponents;
|
||||
static IList<IDevice> tbfDevices;
|
||||
|
||||
#if IPERL
|
||||
OracleConnection oracleConnection; /// Oracle database connection
|
||||
|
||||
#endif
|
||||
public ResultsBrowserWnd(string[] args)
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -44,7 +44,7 @@ namespace ResultsBrowser
|
||||
filtersConfig = new FiltersConfig();
|
||||
this.args = args;
|
||||
|
||||
tbfComponents = new List<TBF.BenchControl.Generic.IComponent>();
|
||||
tbfComponents = new List<TBF.Rig.Generic.IComponent>();
|
||||
tbfDevices = new List<IDevice>();
|
||||
|
||||
timePeriodStart = new DateTime(0);
|
||||
@@ -409,12 +409,7 @@ namespace ResultsBrowser
|
||||
{
|
||||
if (waterMeters == null || waterMeters.Count == 0) return;
|
||||
|
||||
#if MUNICH
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
new Results.Output.Printers.Munich.MunichPrintDocument(string.Format("4/13 - {0}", BenchName()), wm, Config.Entities.PageOrientation.Portrait).Print();
|
||||
}
|
||||
#elif CEVAK_40
|
||||
#if CEVAK_40
|
||||
IList<Results.Entities.Batch> batches = new List<Results.Entities.Batch>();
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace SchematicDrawing
|
||||
public readonly Node[] Nodes; /// Nodes of this shape
|
||||
public readonly Edge[] Edges; /// Edges (in the open state in case there are two states: open/closed)
|
||||
|
||||
/// open (route bit = 1), wet
|
||||
public readonly bool HasImg; /// True when there is an image of this item to be displayed
|
||||
public readonly Image ImgRight; /// Bitmap to be drawn (in the open state in case there are two states: open/closed)
|
||||
public readonly Image ImgUp;
|
||||
@@ -35,15 +36,38 @@ namespace SchematicDrawing
|
||||
public readonly Image ImgLeftFlipped;
|
||||
public readonly Image ImgDownFlipped;
|
||||
|
||||
public readonly bool HasClosed; /// true = This shape can be displayed in a closed state
|
||||
public readonly Image ImgRightClosed; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
||||
public readonly Image ImgUpClosed;
|
||||
public readonly Image ImgLeftClosed;
|
||||
public readonly Image ImgDownClosed;
|
||||
public readonly Image ImgRightFlippedClosed;
|
||||
public readonly Image ImgUpFlippedClosed;
|
||||
public readonly Image ImgLeftFlippedClosed;
|
||||
public readonly Image ImgDownFlippedClosed;
|
||||
/// open (route bit = 1), dry
|
||||
public readonly bool HasOpenDry; /// true = this shape can be displayed as dry in an open state
|
||||
public readonly Image ImgRightOpenDry; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
||||
public readonly Image ImgUpOpenDry;
|
||||
public readonly Image ImgLeftOpenDry;
|
||||
public readonly Image ImgDownOpenDry;
|
||||
public readonly Image ImgRightFlippedOpenDry;
|
||||
public readonly Image ImgUpFlippedOpenDry;
|
||||
public readonly Image ImgLeftFlippedOpenDry;
|
||||
public readonly Image ImgDownFlippedOpenDry;
|
||||
|
||||
/// closed (route bit = 0), wet
|
||||
public readonly bool HasClosedWet; /// true = This shape can be displayed as wet in a closed state
|
||||
public readonly Image ImgRightClosedWet; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
||||
public readonly Image ImgUpClosedWet;
|
||||
public readonly Image ImgLeftClosedWet;
|
||||
public readonly Image ImgDownClosedWet;
|
||||
public readonly Image ImgRightFlippedClosedWet;
|
||||
public readonly Image ImgUpFlippedClosedWet;
|
||||
public readonly Image ImgLeftFlippedClosedWet;
|
||||
public readonly Image ImgDownFlippedClosedWet;
|
||||
|
||||
/// closed (route bit = 0), dry
|
||||
public readonly bool HasClosedDry; /// true = This shape can be displayed as dry in a closed state
|
||||
public readonly Image ImgRightClosedDry; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
||||
public readonly Image ImgUpClosedDry;
|
||||
public readonly Image ImgLeftClosedDry;
|
||||
public readonly Image ImgDownClosedDry;
|
||||
public readonly Image ImgRightFlippedClosedDry;
|
||||
public readonly Image ImgUpFlippedClosedDry;
|
||||
public readonly Image ImgLeftFlippedClosedDry;
|
||||
public readonly Image ImgDownFlippedClosedDry;
|
||||
|
||||
public readonly bool HasVacuum; /// true = This shape can display vacuum
|
||||
public readonly Image ImgRightVacuum; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
||||
@@ -55,19 +79,14 @@ namespace SchematicDrawing
|
||||
public readonly Image ImgLeftFlippedVacuum;
|
||||
public readonly Image ImgDownFlippedVacuum;
|
||||
|
||||
public readonly bool HasOpenDry; /// true = this shape can be displayed as dry in an open state
|
||||
public readonly Image ImgRightOpenDry; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
||||
public readonly Image ImgUpOpenDry;
|
||||
public readonly Image ImgLeftOpenDry;
|
||||
public readonly Image ImgDownOpenDry;
|
||||
public readonly Image ImgRightFlippedOpenDry;
|
||||
public readonly Image ImgUpFlippedOpenDry;
|
||||
public readonly Image ImgLeftFlippedOpenDry;
|
||||
public readonly Image ImgDownFlippedOpenDry;
|
||||
|
||||
DrawingShape(Shape shape, Sz sz, int szX, int szY, Node[] nodes = null, Edge[] edges = null,
|
||||
int offsX = -10, int offsY = -10, int wid = 20, int hgh = 20,
|
||||
Bitmap bmp = null, Bitmap bmpClosed = null, Bitmap bmpVacuum = null, Bitmap bmpOpenDry = null)
|
||||
Bitmap bmp = null, /// wet, open (route bit = 1)
|
||||
Bitmap bmpClosedDry = null, /// dry (Dist == int.MaxValue), closed (route bit = 0)
|
||||
Bitmap bmpVacuum = null, /// vacuum (int.MaxValue > Dist && Dist > Const.Vacuum)
|
||||
Bitmap bmpOpenDry = null, /// dry (Dist == int.MaxValue), open (route bit = 1)
|
||||
Bitmap bmpClosedWet = null) /// wet, closed (route bit = 0) ... diverter only
|
||||
{
|
||||
Shape = shape;
|
||||
Sz = sz;
|
||||
@@ -102,27 +121,27 @@ namespace SchematicDrawing
|
||||
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
}
|
||||
HasClosed = (bmpClosed != null);
|
||||
if (HasClosed)
|
||||
HasClosedDry = (bmpClosedDry != null);
|
||||
if (HasClosedDry)
|
||||
{
|
||||
ImgRightClosed = bmpClosed.Clone() as Image;
|
||||
bmpClosed.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgDownClosed = bmpClosed.Clone() as Image;
|
||||
bmpClosed.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgLeftClosed = bmpClosed.Clone() as Image;
|
||||
bmpClosed.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgUpClosed = bmpClosed.Clone() as Image;
|
||||
bmpClosed.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
bmpClosed.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
ImgRightFlippedClosed = bmpClosed.Clone() as Image;
|
||||
bmpClosed.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgDownFlippedClosed = bmpClosed.Clone() as Image;
|
||||
bmpClosed.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgLeftFlippedClosed = bmpClosed.Clone() as Image;
|
||||
bmpClosed.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgUpFlippedClosed = bmpClosed.Clone() as Image;
|
||||
bmpClosed.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
bmpClosed.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
ImgRightClosedDry = bmpClosedDry.Clone() as Image;
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgDownClosedDry = bmpClosedDry.Clone() as Image;
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgLeftClosedDry = bmpClosedDry.Clone() as Image;
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgUpClosedDry = bmpClosedDry.Clone() as Image;
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
ImgRightFlippedClosedDry = bmpClosedDry.Clone() as Image;
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgDownFlippedClosedDry = bmpClosedDry.Clone() as Image;
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgLeftFlippedClosedDry = bmpClosedDry.Clone() as Image;
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgUpFlippedClosedDry = bmpClosedDry.Clone() as Image;
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
bmpClosedDry.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
}
|
||||
HasVacuum = (bmpVacuum != null);
|
||||
if (HasVacuum)
|
||||
@@ -168,6 +187,28 @@ namespace SchematicDrawing
|
||||
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
bmpOpenDry.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
}
|
||||
HasClosedWet = (bmpClosedWet != null);
|
||||
if (HasClosedWet)
|
||||
{
|
||||
ImgRightClosedWet = bmpClosedWet.Clone() as Image;
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgDownClosedWet = bmpClosedWet.Clone() as Image;
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgLeftClosedWet = bmpClosedWet.Clone() as Image;
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgUpClosedWet = bmpClosedWet.Clone() as Image;
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
ImgRightFlippedClosedWet = bmpClosedWet.Clone() as Image;
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgDownFlippedClosedWet = bmpClosedWet.Clone() as Image;
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgLeftFlippedClosedWet = bmpClosedWet.Clone() as Image;
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
ImgUpFlippedClosedWet = bmpClosedWet.Clone() as Image;
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
bmpClosedWet.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle GetRotatedFlippedImageRectangle(IDrawingItem item)
|
||||
@@ -258,6 +299,12 @@ namespace SchematicDrawing
|
||||
{
|
||||
Shapes = new DrawingShape[(int)Shape.Count * (int)Sz.Count];
|
||||
|
||||
/// Ambient
|
||||
Shapes[DrShIx(Shape.Ambient, Sz.S)] = new DrawingShape(Shape.Ambient, Sz.S, 0, 0);
|
||||
Shapes[DrShIx(Shape.Ambient, Sz.M)] = new DrawingShape(Shape.Ambient, Sz.M, 0, 0);
|
||||
Shapes[DrShIx(Shape.Ambient, Sz.L)] = new DrawingShape(Shape.Ambient, Sz.L, 0, 0);
|
||||
Shapes[DrShIx(Shape.Ambient, Sz.XL)] = new DrawingShape(Shape.Ambient, Sz.XL, 0, 0);
|
||||
|
||||
/// Temperature meter
|
||||
Shapes[DrShIx(Shape.TempM, Sz.S)] = new DrawingShape(Shape.TempM, Sz.S, 0, 0);
|
||||
Shapes[DrShIx(Shape.TempM, Sz.M)] = new DrawingShape(Shape.TempM, Sz.M, 0, 0);
|
||||
@@ -275,100 +322,169 @@ namespace SchematicDrawing
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1), new Edge(1, 0, 20, RouteCouple.OpenWhen1) },
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Valve_S_open, Properties.Resources.Valve_S_closed,
|
||||
Properties.Resources.Valve_S_vacuum, Properties.Resources.Valve_S_open_dry);
|
||||
Properties.Resources.Valve_S_open,
|
||||
Properties.Resources.Valve_S_closed,
|
||||
Properties.Resources.Valve_S_vacuum,
|
||||
Properties.Resources.Valve_S_open_dry);
|
||||
Shapes[DrShIx(Shape.Valve, Sz.M)] = new DrawingShape(Shape.Valve, Sz.M, 3, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1), new Edge(1, 0, 30, RouteCouple.OpenWhen1) },
|
||||
0, 5, 30, 30,
|
||||
Properties.Resources.Valve_M_open, Properties.Resources.Valve_M_closed,
|
||||
Properties.Resources.Valve_M_vacuum, Properties.Resources.Valve_M_open_dry);
|
||||
Properties.Resources.Valve_M_open,
|
||||
Properties.Resources.Valve_M_closed,
|
||||
Properties.Resources.Valve_M_vacuum,
|
||||
Properties.Resources.Valve_M_open_dry);
|
||||
Shapes[DrShIx(Shape.Valve, Sz.L)] = new DrawingShape(Shape.Valve, Sz.L, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1), new Edge(1, 0, 40, RouteCouple.OpenWhen1) },
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.Valve_L_open, Properties.Resources.Valve_L_closed,
|
||||
Properties.Resources.Valve_L_vacuum, Properties.Resources.Valve_L_open_dry);
|
||||
Properties.Resources.Valve_L_open,
|
||||
Properties.Resources.Valve_L_closed,
|
||||
Properties.Resources.Valve_L_vacuum,
|
||||
Properties.Resources.Valve_L_open_dry);
|
||||
Shapes[DrShIx(Shape.Valve, Sz.XL)] = new DrawingShape(Shape.Valve, Sz.XL, 5, 6,
|
||||
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1), new Edge(1, 0, 50, RouteCouple.OpenWhen1) },
|
||||
0, 5, 50, 50,
|
||||
Properties.Resources.Valve_XL_open, Properties.Resources.Valve_XL_closed,
|
||||
Properties.Resources.Valve_XL_vacuum, Properties.Resources.Valve_XL_open_dry);
|
||||
|
||||
Properties.Resources.Valve_XL_open,
|
||||
Properties.Resources.Valve_XL_closed,
|
||||
Properties.Resources.Valve_XL_vacuum,
|
||||
Properties.Resources.Valve_XL_open_dry);
|
||||
/// Diverter
|
||||
Shapes[DrShIx(Shape.Div, Sz.S)] = new DrawingShape(Shape.Div, Sz.S, 2, 2,
|
||||
new Node[] { new Node(2, 0, Orient.Up), new Node(1, 2, Orient.Dn), new Node(3, 2, Orient.Dn) },
|
||||
new Edge[] { new Edge(0, 1, 20), new Edge(0, 2, 20, RouteCouple.OpenWhen1) },
|
||||
0, 0, 40, 20,
|
||||
Properties.Resources.Div_S_tank_wet,
|
||||
Properties.Resources.Div_S_sink_dry,
|
||||
null,
|
||||
Properties.Resources.Div_S_tank_dry,
|
||||
Properties.Resources.Div_S_sink_wet);
|
||||
Shapes[DrShIx(Shape.Div, Sz.M)] = new DrawingShape(Shape.Div, Sz.M, 3, 4,
|
||||
new Node[] { new Node(2, 0, Orient.Up), new Node(1, 3, Orient.Dn), new Node(3, 3, Orient.Dn) },
|
||||
new Edge[] { new Edge(0, 1, 30), new Edge(0, 2, 30, RouteCouple.OpenWhen1) },
|
||||
0, 0, 40, 30,
|
||||
Properties.Resources.Div_M_tank_wet,
|
||||
Properties.Resources.Div_M_sink_dry,
|
||||
null,
|
||||
Properties.Resources.Div_M_tank_dry,
|
||||
Properties.Resources.Div_M_sink_wet);
|
||||
Shapes[DrShIx(Shape.Div, Sz.L)] = new DrawingShape(Shape.Div, Sz.L, 4, 4,
|
||||
new Node[] { new Node(3, 0, Orient.Up), new Node(1, 4, Orient.Dn), new Node(5, 4, Orient.Dn) },
|
||||
new Edge[] { new Edge(0, 1, 40), new Edge(0, 2, 40, RouteCouple.OpenWhen1) },
|
||||
0, 0, 60, 40,
|
||||
Properties.Resources.Div_L_tank_wet,
|
||||
Properties.Resources.Div_L_sink_dry,
|
||||
null,
|
||||
Properties.Resources.Div_L_tank_dry,
|
||||
Properties.Resources.Div_L_sink_wet);
|
||||
Shapes[DrShIx(Shape.Div, Sz.XL)] = new DrawingShape(Shape.Div, Sz.XL, 5, 6,
|
||||
new Node[] { new Node(3, 0, Orient.Up), new Node(1, 5, Orient.Dn), new Node(5, 5, Orient.Dn) },
|
||||
new Edge[] { new Edge(0, 1, 50), new Edge(0, 2, 50, RouteCouple.OpenWhen1) },
|
||||
0, 0, 60, 50,
|
||||
Properties.Resources.Div_XL_tank_wet,
|
||||
Properties.Resources.Div_XL_sink_dry,
|
||||
null,
|
||||
Properties.Resources.Div_XL_tank_dry,
|
||||
Properties.Resources.Div_XL_sink_wet);
|
||||
/// Regulation valve
|
||||
Shapes[DrShIx(Shape.RegV, Sz.S)] = new DrawingShape(Shape.RegV, Sz.S, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 20), new Edge(1, 0, 20) },
|
||||
0, 0, 20, 20, Properties.Resources.RegV_S);
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.RegV_S);
|
||||
Shapes[DrShIx(Shape.RegV, Sz.M)] = new DrawingShape(Shape.RegV, Sz.M, 3, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 30), new Edge(1, 0, 30) },
|
||||
0, 5, 30, 30, Properties.Resources.RegV_M);
|
||||
0, 5, 30, 30,
|
||||
Properties.Resources.RegV_M);
|
||||
Shapes[DrShIx(Shape.RegV, Sz.L)] = new DrawingShape(Shape.RegV, Sz.L, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 40), new Edge(1, 0, 40) },
|
||||
0, 0, 40, 40, Properties.Resources.RegV_L);
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.RegV_L);
|
||||
Shapes[DrShIx(Shape.RegV, Sz.XL)] = new DrawingShape(Shape.RegV, Sz.XL, 5, 6,
|
||||
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 50), new Edge(1, 0, 50) },
|
||||
0, 5, 50, 50, Properties.Resources.RegV_XL);
|
||||
|
||||
0, 5, 50, 50,
|
||||
Properties.Resources.RegV_XL);
|
||||
/// Pump
|
||||
Shapes[DrShIx(Shape.Pump, Sz.S)] = new DrawingShape(Shape.Pump, Sz.S, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1) },
|
||||
0, 0, 20, 20, Properties.Resources.Pump_S_open, Properties.Resources.Pump_S_closed);
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Pump_S_open,
|
||||
Properties.Resources.Pump_S_closed);
|
||||
Shapes[DrShIx(Shape.Pump, Sz.M)] = new DrawingShape(Shape.Pump, Sz.M, 3, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1) },
|
||||
0, 5, 30, 30, Properties.Resources.Pump_M_open, Properties.Resources.Pump_M_closed);
|
||||
0, 5, 30, 30,
|
||||
Properties.Resources.Pump_M_open,
|
||||
Properties.Resources.Pump_M_closed);
|
||||
Shapes[DrShIx(Shape.Pump, Sz.L)] = new DrawingShape(Shape.Pump, Sz.L, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1) },
|
||||
0, 0, 40, 40, Properties.Resources.Pump_L_open, Properties.Resources.Pump_L_closed);
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.Pump_L_open,
|
||||
Properties.Resources.Pump_L_closed);
|
||||
Shapes[DrShIx(Shape.Pump, Sz.XL)] = new DrawingShape(Shape.Pump, Sz.XL, 5, 6,
|
||||
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1) },
|
||||
0, 5, 50, 50, Properties.Resources.Pump_XL_open, Properties.Resources.Pump_XL_closed);
|
||||
|
||||
0, 5, 50, 50,
|
||||
Properties.Resources.Pump_XL_open,
|
||||
Properties.Resources.Pump_XL_closed);
|
||||
/// Pump with frequency inverter
|
||||
Shapes[DrShIx(Shape.PumpFM, Sz.S)] = new DrawingShape(Shape.PumpFM, Sz.S, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1) },
|
||||
0, 0, 20, 20, Properties.Resources.Pump_S_open, Properties.Resources.Pump_S_closed);
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Pump_S_open,
|
||||
Properties.Resources.Pump_S_closed);
|
||||
Shapes[DrShIx(Shape.PumpFM, Sz.M)] = new DrawingShape(Shape.PumpFM, Sz.M, 3, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1) },
|
||||
0, 5, 30, 30, Properties.Resources.Pump_M_open, Properties.Resources.Pump_M_closed);
|
||||
0, 5, 30, 30,
|
||||
Properties.Resources.Pump_M_open,
|
||||
Properties.Resources.Pump_M_closed);
|
||||
Shapes[DrShIx(Shape.PumpFM, Sz.L)] = new DrawingShape(Shape.PumpFM, Sz.L, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1) },
|
||||
0, 0, 40, 40, Properties.Resources.Pump_L_open, Properties.Resources.Pump_L_closed);
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.Pump_L_open,
|
||||
Properties.Resources.Pump_L_closed);
|
||||
Shapes[DrShIx(Shape.PumpFM, Sz.XL)] = new DrawingShape(Shape.PumpFM, Sz.XL, 5, 6,
|
||||
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1) },
|
||||
0, 5, 50, 50, Properties.Resources.Pump_XL_open, Properties.Resources.Pump_XL_closed);
|
||||
|
||||
0, 5, 50, 50,
|
||||
Properties.Resources.Pump_XL_open,
|
||||
Properties.Resources.Pump_XL_closed);
|
||||
/// Flow meter
|
||||
Shapes[DrShIx(Shape.FlowM, Sz.S)] = new DrawingShape(Shape.FlowM, Sz.S, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) }, new Edge[] { new Edge(0, 1, 20) },
|
||||
0, 0, 20, 20, Properties.Resources.FlowM_S);
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 20) },
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.FlowM_S);
|
||||
Shapes[DrShIx(Shape.FlowM, Sz.M)] = new DrawingShape(Shape.FlowM, Sz.M, 3, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) }, new Edge[] { new Edge(0, 1, 30) },
|
||||
0, 5, 30, 30, Properties.Resources.FlowM_M);
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 30) },
|
||||
0, 5, 30, 30,
|
||||
Properties.Resources.FlowM_M);
|
||||
Shapes[DrShIx(Shape.FlowM, Sz.L)] = new DrawingShape(Shape.FlowM, Sz.L, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) }, new Edge[] { new Edge(0, 1, 40) },
|
||||
0, 0, 40, 40, Properties.Resources.FlowM_L);
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 40) },
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.FlowM_L);
|
||||
Shapes[DrShIx(Shape.FlowM, Sz.XL)] = new DrawingShape(Shape.FlowM, Sz.XL, 5, 6,
|
||||
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) }, new Edge[] { new Edge(0, 1, 50) },
|
||||
0, 5, 50, 50, Properties.Resources.FlowM_XL);
|
||||
|
||||
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 50) },
|
||||
0, 5, 50, 50,
|
||||
Properties.Resources.FlowM_XL);
|
||||
/// Water meter
|
||||
Shapes[DrShIx(Shape.WaterM, Sz.L)] = new DrawingShape(Shape.WaterM, Sz.L, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 40), new Edge(1, 0, 40) },
|
||||
0, 0, 40, 40, Properties.Resources.WaterM_L);
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.WaterM_L);
|
||||
Shapes[DrShIx(Shape.WaterM, Sz.S)] = Shapes[DrShIx(Shape.WaterM, Sz.L)];
|
||||
Shapes[DrShIx(Shape.WaterM, Sz.M)] = Shapes[DrShIx(Shape.WaterM, Sz.L)];
|
||||
Shapes[DrShIx(Shape.WaterM, Sz.XL)] = Shapes[DrShIx(Shape.WaterM, Sz.L)];
|
||||
@@ -387,41 +503,77 @@ namespace SchematicDrawing
|
||||
|
||||
/// Junction
|
||||
Shapes[DrShIx(Shape.Junction, Sz.None)] = new DrawingShape(Shape.Junction, Sz.None, 0, 0, new Node[] { new Node(0, 0, Orient.R) });
|
||||
Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2, new Node[] { new Node(1, 1, Orient.R) }, null, 0, 0, 20, 20,
|
||||
Properties.Resources.Junction_S, null, Properties.Resources.Junction_S_vacuum, Properties.Resources.Junction_S_closed);
|
||||
Shapes[DrShIx(Shape.Junction, Sz.M)] = new DrawingShape(Shape.Junction, Sz.M, 2, 2, new Node[] { new Node(1, 1, Orient.R) }, null, 0, 0, 20, 20,
|
||||
Properties.Resources.Junction_M, null, Properties.Resources.Junction_M_vacuum, Properties.Resources.Junction_M_closed);
|
||||
Shapes[DrShIx(Shape.Junction, Sz.L)] = new DrawingShape(Shape.Junction, Sz.L, 2, 2, new Node[] { new Node(1, 1, Orient.R) }, null, 0, 0, 20, 20,
|
||||
Properties.Resources.Junction_L, null, Properties.Resources.Junction_L_vacuum, Properties.Resources.Junction_L_closed);
|
||||
Shapes[DrShIx(Shape.Junction, Sz.XL)] = new DrawingShape(Shape.Junction, Sz.XL, 2, 2, new Node[] { new Node(1, 1, Orient.R) }, null, 0, 0, 20, 20,
|
||||
Properties.Resources.Junction_XL, null, Properties.Resources.Junction_XL_vacuum, Properties.Resources.Junction_XL_closed);
|
||||
|
||||
Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2,
|
||||
new Node[] { new Node(1, 1, Orient.R) }, null,
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Junction_S_wet,
|
||||
Properties.Resources.Junction_S_dry,
|
||||
Properties.Resources.Junction_S_vacuum);
|
||||
Shapes[DrShIx(Shape.Junction, Sz.M)] = new DrawingShape(Shape.Junction, Sz.M, 2, 2,
|
||||
new Node[] { new Node(1, 1, Orient.R) }, null,
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Junction_M_wet,
|
||||
Properties.Resources.Junction_M_dry,
|
||||
Properties.Resources.Junction_M_vacuum);
|
||||
Shapes[DrShIx(Shape.Junction, Sz.L)] = new DrawingShape(Shape.Junction, Sz.L, 2, 2,
|
||||
new Node[] { new Node(1, 1, Orient.R) }, null,
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Junction_L_wet,
|
||||
Properties.Resources.Junction_L_dry,
|
||||
Properties.Resources.Junction_L_vacuum);
|
||||
Shapes[DrShIx(Shape.Junction, Sz.XL)] = new DrawingShape(Shape.Junction, Sz.XL, 2, 2,
|
||||
new Node[] { new Node(1, 1, Orient.R) }, null,
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Junction_XL_wet,
|
||||
Properties.Resources.Junction_XL_dry,
|
||||
Properties.Resources.Junction_XL_vacuum);
|
||||
/// Knee
|
||||
Shapes[DrShIx(Shape.Knee, Sz.S)] = new DrawingShape(Shape.Knee, Sz.S, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(1, 0, Orient.Up) },
|
||||
new Edge[] { new Edge(0, 1, 18), new Edge(1, 0, 18) },
|
||||
0, 0, 20, 20, Properties.Resources.Knee_S_open, null, Properties.Resources.Knee_S_vacuum, Properties.Resources.Knee_S_closed);
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Knee_S_wet,
|
||||
Properties.Resources.Knee_S_dry,
|
||||
Properties.Resources.Knee_S_vacuum);
|
||||
Shapes[DrShIx(Shape.Knee, Sz.M)] = new DrawingShape(Shape.Knee, Sz.M, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(1, 0, Orient.Up) },
|
||||
new Edge[] { new Edge(0, 1, 18), new Edge(1, 0, 18) },
|
||||
0, 0, 20, 20, Properties.Resources.Knee_M_open, null, Properties.Resources.Knee_M_vacuum, Properties.Resources.Knee_M_closed);
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Knee_M_wet,
|
||||
Properties.Resources.Knee_M_dry,
|
||||
Properties.Resources.Knee_M_vacuum);
|
||||
Shapes[DrShIx(Shape.Knee, Sz.L)] = new DrawingShape(Shape.Knee, Sz.L, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(1, 0, Orient.Up) },
|
||||
new Edge[] { new Edge(0, 1, 17), new Edge(1, 0, 17) },
|
||||
0, 0, 20, 20, Properties.Resources.Knee_L_open, null, Properties.Resources.Knee_L_vacuum, Properties.Resources.Knee_L_closed);
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.Knee_L_wet,
|
||||
Properties.Resources.Knee_L_dry,
|
||||
Properties.Resources.Knee_L_vacuum);
|
||||
Shapes[DrShIx(Shape.Knee, Sz.XL)] = new DrawingShape(Shape.Knee, Sz.XL, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(2, 0, Orient.Up) },
|
||||
new Edge[] { new Edge(0, 1, 36), new Edge(1, 0, 36) },
|
||||
0, 0, 40, 40, Properties.Resources.Knee_XL_open, null, Properties.Resources.Knee_XL_vacuum, Properties.Resources.Knee_XL_closed);
|
||||
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.Knee_XL_wet,
|
||||
Properties.Resources.Knee_XL_dry,
|
||||
Properties.Resources.Knee_XL_vacuum);
|
||||
/// Vacuum
|
||||
Shapes[DrShIx(Shape.Vacuum, Sz.L)] = new DrawingShape(Shape.Vacuum, Sz.L, 6, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(6, 1, Orient.R), new Node(4, 0, Orient.Up) },
|
||||
new Edge[] { new Edge(0, 1, 60), new Edge(1, 0, 60), new Edge(0, 2, Const.Vacuum) },
|
||||
0, 0, 60, 20, Properties.Resources.Vacuum_L_wet, null, null, Properties.Resources.Vacuum_L_dry);
|
||||
0, 0, 60, 20,
|
||||
Properties.Resources.Vacuum_L_wet,
|
||||
Properties.Resources.Vacuum_L_dry);
|
||||
Shapes[DrShIx(Shape.Vacuum, Sz.S)] = Shapes[DrShIx(Shape.Vacuum, Sz.L)];
|
||||
Shapes[DrShIx(Shape.Vacuum, Sz.M)] = Shapes[DrShIx(Shape.Vacuum, Sz.L)];
|
||||
Shapes[DrShIx(Shape.Vacuum, Sz.XL)] = Shapes[DrShIx(Shape.Vacuum, Sz.L)];
|
||||
|
||||
/// Control board UNI
|
||||
Shapes[DrShIx(Shape.UniCB, Sz.L)] = new DrawingShape(Shape.UniCB, Sz.L, 2, 2, new Node[] { }, null, 0, 0, 20, 20,
|
||||
Properties.Resources.UniCB_M_error,
|
||||
Properties.Resources.UniCB_M_on);
|
||||
Shapes[DrShIx(Shape.UniCB, Sz.S)] = Shapes[DrShIx(Shape.UniCB, Sz.L)];
|
||||
Shapes[DrShIx(Shape.UniCB, Sz.M)] = Shapes[DrShIx(Shape.UniCB, Sz.L)];
|
||||
Shapes[DrShIx(Shape.UniCB, Sz.XL)] = Shapes[DrShIx(Shape.UniCB, Sz.L)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace SchematicDrawing
|
||||
Vacuum,
|
||||
Valve,
|
||||
WaterM,
|
||||
UniCB,
|
||||
Count
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2020-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace SchematicDrawing
|
||||
{
|
||||
public interface IDrawingItCmpntWithMeasuredVal : IDrawingItCmpnt
|
||||
{
|
||||
bool MsrmntAvailable { get; }
|
||||
double MeasuredVal { get; }
|
||||
string AltString { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace SchematicDrawing
|
||||
{
|
||||
public interface IDrawingItCmpntWithSetpoint : IDrawingItCmpnt
|
||||
{
|
||||
double SetpointVal { get; set; }
|
||||
double SetpointVal { get; set; }
|
||||
void IncreaseSetpoint();
|
||||
void DecreaseSetpoint();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2020-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace SchematicDrawing
|
||||
{
|
||||
@@ -8,9 +8,10 @@ namespace SchematicDrawing
|
||||
int MsrdX { get; set; }
|
||||
int MsrdY { get; set; }
|
||||
Orient MsrdOrient { get; set; }
|
||||
string MsrdFormat { get; set; }
|
||||
Config.Unit MsrdUnits { get; set; }
|
||||
double MsrdValLimLo { get; set; }
|
||||
double MsrdValLimHi { get; set; }
|
||||
|
||||
string MsrdFormat { get; }
|
||||
Config.Unit MsrdUnit { get; }
|
||||
double MsrdValLimLo { get; }
|
||||
double MsrdValLimHi { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2020-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace SchematicDrawing
|
||||
{
|
||||
@@ -8,7 +8,8 @@ namespace SchematicDrawing
|
||||
int SetpX { get; set; }
|
||||
int SetpY { get; set; }
|
||||
Orient SetpOrient { get; set; }
|
||||
string SetpFormat { get; set; }
|
||||
Config.Unit SetpUnits { get; set; }
|
||||
|
||||
string SetpFormat { get; }
|
||||
Config.Unit SetpUnit { get; }
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 307 B |
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 249 B |
|
After Width: | Height: | Size: 260 B |
|
After Width: | Height: | Size: 242 B |
|
After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 203 B |
|
After Width: | Height: | Size: 216 B |
|
After Width: | Height: | Size: 205 B |
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 370 B |
|
After Width: | Height: | Size: 375 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 261 B |
@@ -60,6 +60,166 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_L_sink_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_L_sink_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_L_sink_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_L_sink_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_L_tank_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_L_tank_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_L_tank_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_L_tank_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_M_sink_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_M_sink_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_M_sink_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_M_sink_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_M_tank_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_M_tank_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_M_tank_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_M_tank_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_S_sink_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_S_sink_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_S_sink_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_S_sink_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_S_tank_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_S_tank_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_S_tank_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_S_tank_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_XL_sink_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_XL_sink_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_XL_sink_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_XL_sink_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_XL_tank_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_XL_tank_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Div_XL_tank_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Div_XL_tank_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -103,19 +263,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Junction_L {
|
||||
internal static System.Drawing.Bitmap Junction_L_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Junction_L", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Junction_L_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Junction_L_closed", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Junction_L_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -133,9 +283,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Junction_M {
|
||||
internal static System.Drawing.Bitmap Junction_L_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Junction_M", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Junction_L_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -143,9 +293,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Junction_M_closed {
|
||||
internal static System.Drawing.Bitmap Junction_M_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Junction_M_closed", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Junction_M_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -163,9 +313,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Junction_S {
|
||||
internal static System.Drawing.Bitmap Junction_M_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Junction_S", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Junction_M_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -173,9 +323,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Junction_S_closed {
|
||||
internal static System.Drawing.Bitmap Junction_S_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Junction_S_closed", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Junction_S_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -193,9 +343,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Junction_XL {
|
||||
internal static System.Drawing.Bitmap Junction_S_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Junction_XL", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Junction_S_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -203,9 +353,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Junction_XL_closed {
|
||||
internal static System.Drawing.Bitmap Junction_XL_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Junction_XL_closed", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Junction_XL_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -223,9 +373,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_L_closed {
|
||||
internal static System.Drawing.Bitmap Junction_XL_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_L_closed", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Junction_XL_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -233,9 +383,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_L_open {
|
||||
internal static System.Drawing.Bitmap Knee_L_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_L_open", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Knee_L_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -253,9 +403,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_M_closed {
|
||||
internal static System.Drawing.Bitmap Knee_L_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_M_closed", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Knee_L_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -263,9 +413,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_M_open {
|
||||
internal static System.Drawing.Bitmap Knee_M_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_M_open", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Knee_M_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -283,9 +433,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_S_closed {
|
||||
internal static System.Drawing.Bitmap Knee_M_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_S_closed", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Knee_M_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -293,9 +443,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_S_open {
|
||||
internal static System.Drawing.Bitmap Knee_S_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_S_open", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Knee_S_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -313,9 +463,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_XL_closed {
|
||||
internal static System.Drawing.Bitmap Knee_S_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_XL_closed", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Knee_S_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -323,9 +473,9 @@ namespace SchematicDrawing.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_XL_open {
|
||||
internal static System.Drawing.Bitmap Knee_XL_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_XL_open", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Knee_XL_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -340,6 +490,16 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Knee_XL_wet {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Knee_XL_wet", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -540,6 +700,36 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap UniCB_M_error {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("UniCB_M_error", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap UniCB_M_off {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("UniCB_M_off", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap UniCB_M_on {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("UniCB_M_on", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -118,6 +118,63 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Div_XL_sink_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-XL-sink-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_XL_tank_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-XL-tank-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_XL_sink_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-XL-sink-wet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_XL_tank_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-XL-tank-wet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_L_sink_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-L-sink-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_L_tank_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-L-tank-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_L_sink_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-L-sink-wet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_L_tank_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-L-tank-wet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_M_sink_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-M-sink-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_M_tank_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-M-tank-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_M_sink_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-M-sink-wet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_M_tank_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-M-tank-wet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_S_sink_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-S-sink-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_S_tank_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-S-tank-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_S_sink_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-S-sink-wet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Div_S_tank_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Div-S-tank-wet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="UniCB_M_error" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\UniCB-M-error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="UniCB_M_on" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\UniCB-M-on.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="UniCB_M_off" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\UniCB-M-off.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="FlowM_L" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\FlowM-L.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -130,73 +187,73 @@
|
||||
<data name="FlowM_XL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\FlowM-XL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_L" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Junction_L_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-L.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_L_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Junction_L_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-L-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_L_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-L-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_M" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Junction_M_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-M.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_M_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Junction_M_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-M-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_M_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-M-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_S" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Junction_S_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-S.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_S_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Junction_S_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-S-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_S_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-S-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_XL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Junction_XL_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-XL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_XL_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Junction_XL_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-XL-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Junction_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Junction-XL-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_L_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Knee_L_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-L-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_L_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Knee_L_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-L-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_L_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-L-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_M_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Knee_M_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-M-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_M_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Knee_M_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-M-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_M_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-M-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_S_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Knee_S_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-S-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_S_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Knee_S_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-S-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_S_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-S-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_XL_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Knee_XL_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-XL-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_XL_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="Knee_XL_wet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Knee-XL-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Knee_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -93,6 +94,25 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Pictures\Div-L-sink-dry.png" />
|
||||
<Content Include="Pictures\Div-L-sink-wet.png" />
|
||||
<Content Include="Pictures\Div-L-tank-dry.png" />
|
||||
<Content Include="Pictures\Div-L-tank-wet.png" />
|
||||
<Content Include="Pictures\Div-M-sink-dry.png" />
|
||||
<Content Include="Pictures\Div-M-sink-wet.png" />
|
||||
<Content Include="Pictures\Div-M-tank-dry.png" />
|
||||
<Content Include="Pictures\Div-M-tank-wet.png" />
|
||||
<Content Include="Pictures\Div-S-sink-dry.png" />
|
||||
<Content Include="Pictures\Div-S-sink-wet.png" />
|
||||
<Content Include="Pictures\Div-S-tank-dry.png" />
|
||||
<Content Include="Pictures\Div-S-tank-wet.png" />
|
||||
<Content Include="Pictures\Div-XL-sink-dry.png" />
|
||||
<Content Include="Pictures\Div-XL-sink-wet.png" />
|
||||
<Content Include="Pictures\Div-XL-tank-dry.png" />
|
||||
<Content Include="Pictures\Div-XL-tank-wet.png" />
|
||||
<Content Include="Pictures\UniCB-M-error.png" />
|
||||
<Content Include="Pictures\UniCB-M-off.png" />
|
||||
<Content Include="Pictures\UniCB-M-on.png" />
|
||||
<Content Include="Pictures\Valve-XL-vacuum.png" />
|
||||
<None Include="Pictures\FlowM-L.png" />
|
||||
<None Include="Pictures\FlowM-M.png" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2020-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -74,6 +74,16 @@ namespace SchematicDrawing
|
||||
get { return route; }
|
||||
}
|
||||
|
||||
///
|
||||
/// Measurement available flags
|
||||
///
|
||||
private bool[] msrmntAvailableFlags;
|
||||
public bool[] MsrmntAvailableFlags
|
||||
{
|
||||
set { if (msrmntAvailableFlags != value) { msrmntAvailableFlags = value; Redraw(); } }
|
||||
get { return msrmntAvailableFlags; }
|
||||
}
|
||||
|
||||
///
|
||||
/// Measured values
|
||||
///
|
||||
@@ -84,6 +94,16 @@ namespace SchematicDrawing
|
||||
get { return measuredValues; }
|
||||
}
|
||||
|
||||
///
|
||||
/// Alternative strings
|
||||
///
|
||||
private string[] altStrings;
|
||||
public string[] AltStrings
|
||||
{
|
||||
set { if (altStrings != value) { altStrings = value; Redraw(); } }
|
||||
get { return altStrings; }
|
||||
}
|
||||
|
||||
///
|
||||
/// Setpoints
|
||||
///
|
||||
@@ -615,31 +635,6 @@ namespace SchematicDrawing
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Draw labels, Various.Drawing... component labels are drawn in edit mode only
|
||||
///
|
||||
foreach (var item in items)
|
||||
{
|
||||
if ((!Utils.IsHidden(item) || (EditMode && (item == selectedItem))) && /// 1. Do not show hidden items, only if they are selected
|
||||
(!item.ClassName.StartsWith("Various.Drawing.") || EditMode) && /// 2. Do not show Various.Drawing... items, only in EditMode
|
||||
!item.ClassName.Equals("Various.Drawing.Edges")) /// 3. Never show Various.Drawing.Edges components
|
||||
{
|
||||
string strVal = item.Name;
|
||||
SizeF size = e.Graphics.MeasureString(strVal, labelFont);
|
||||
Rectangle rect = new Rectangle(item.X + item.LblX, item.Y + item.LblY, (int)Math.Round(size.Width) + 4, (int)Math.Round(size.Height) + 2);
|
||||
ItemElementRectangles.Add(new ItemElementRect(item, Element.Label, rect));
|
||||
e.Graphics.FillRectangle(labelBackColor, rect);
|
||||
e.Graphics.DrawRectangle(thinBlackPen, rect);
|
||||
e.Graphics.DrawString(strVal, labelFont, labelBrush, rect.X + 2, rect.Y + 2);
|
||||
|
||||
if (EditMode && (item == selectedItem) && (selectedElement == Element.Label))
|
||||
{
|
||||
/// Draw red rectangle around the selected item label
|
||||
e.Graphics.DrawRectangle(selectedRectPen, rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Height + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Draw measured values
|
||||
///
|
||||
@@ -652,30 +647,38 @@ namespace SchematicDrawing
|
||||
if (item is IDrawingItemWithMeasuredVal)
|
||||
{
|
||||
IDrawingItemWithMeasuredVal itm = item as IDrawingItemWithMeasuredVal;
|
||||
double msrdVal = Config.Units.ConvertTo(itm.MsrdUnits, measuredValues[msrdValIx++]);
|
||||
if (!Utils.IsHidden(item))
|
||||
bool msrmntAvailable = msrmntAvailableFlags[msrdValIx];
|
||||
double msrdVal = Config.Units.ConvertTo(itm.MsrdUnit, measuredValues[msrdValIx]);
|
||||
string altString = altStrings[msrdValIx];
|
||||
msrdValIx++;
|
||||
|
||||
if ((msrmntAvailable || EditMode) && !Utils.IsHidden(item))
|
||||
{
|
||||
string strVal = string.IsNullOrEmpty(itm.MsrdFormat) ? msrdVal.ToString() : string.Format(itm.MsrdFormat, msrdVal);
|
||||
SizeF size = e.Graphics.MeasureString(strVal, measuredValueFont);
|
||||
Rectangle rect = new Rectangle(itm.X + itm.MsrdX, itm.Y + itm.MsrdY, (int)Math.Round(size.Width) + 4, (int)Math.Round(size.Height) + 2);
|
||||
ItemElementRectangles.Add(new ItemElementRect(item, Element.MeasuredVal, rect));
|
||||
e.Graphics.FillRectangle(measuredValueBackColor, rect);
|
||||
e.Graphics.DrawRectangle(thinBlackPen, rect);
|
||||
e.Graphics.DrawString(strVal, measuredValueFont, measuredValueBrush, rect.X + 2, rect.Y + 2);
|
||||
|
||||
if (EditMode && (item == selectedItem) && (selectedElement == Element.MeasuredVal))
|
||||
string strVal = string.IsNullOrEmpty(itm.MsrdFormat) ? altString : string.Format(itm.MsrdFormat, msrdVal);
|
||||
if (!string.IsNullOrEmpty(strVal))
|
||||
{
|
||||
/// Draw red rectangle around the selected item label
|
||||
e.Graphics.DrawRectangle(selectedRectPen, rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Height + 2);
|
||||
}
|
||||
/// Paint water in the tank on a scale
|
||||
DrawingShape dshape = DrawingShape.GetDrawingShape(item.Shape, item.Sz);
|
||||
if (dshape.Shape == Shape.Scale)
|
||||
{
|
||||
Rectangle r = dshape.GetRotatedFlippedImageRectangle(item);
|
||||
int level = (int)Math.Round((r.Height - 2) * msrdVal / itm.MsrdValLimHi);
|
||||
e.Graphics.FillRectangle(brushWater, r.X + 2, r.Y + r.Height - 2 - level, r.Width - 4, level);
|
||||
}
|
||||
|
||||
/// Paint water in the tank on a scale
|
||||
DrawingShape dshape = DrawingShape.GetDrawingShape(item.Shape, item.Sz);
|
||||
if (dshape.Shape == Shape.Scale)
|
||||
{
|
||||
Rectangle r = dshape.GetRotatedFlippedImageRectangle(item);
|
||||
int level = (int)Math.Round((r.Height - 2) * msrdVal / itm.MsrdValLimHi);
|
||||
e.Graphics.FillRectangle(brushWater, r.X + 2, r.Y + r.Height - 2 - level, r.Width - 4, level);
|
||||
/// Draw text
|
||||
SizeF size = e.Graphics.MeasureString(strVal, measuredValueFont);
|
||||
Rectangle rect = new Rectangle(itm.X + itm.MsrdX, itm.Y + itm.MsrdY, (int)Math.Round(size.Width) + 4, (int)Math.Round(size.Height) + 2);
|
||||
ItemElementRectangles.Add(new ItemElementRect(item, Element.MeasuredVal, rect));
|
||||
e.Graphics.FillRectangle(measuredValueBackColor, rect);
|
||||
e.Graphics.DrawRectangle(thinBlackPen, rect);
|
||||
e.Graphics.DrawString(strVal, measuredValueFont, measuredValueBrush, rect.X + 2, rect.Y + 2);
|
||||
|
||||
if (EditMode && (item == selectedItem) && (selectedElement == Element.MeasuredVal))
|
||||
{
|
||||
/// Draw red rectangle around the selected item label
|
||||
e.Graphics.DrawRectangle(selectedRectPen, rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Height + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -694,11 +697,11 @@ namespace SchematicDrawing
|
||||
if (item is IDrawingItemWithSetpoint)
|
||||
{
|
||||
IDrawingItemWithSetpoint its = item as IDrawingItemWithSetpoint;
|
||||
double setpoint = Config.Units.ConvertTo(its.SetpUnits, setpoints[setpointIx++]);
|
||||
double setpoint = Config.Units.ConvertTo(its.SetpUnit, setpoints[setpointIx++]);
|
||||
if (!Utils.IsHidden(item))
|
||||
{
|
||||
string strVal = string.IsNullOrEmpty(its.SetpFormat) ? setpoint.ToString() : string.Format(its.SetpFormat, setpoint);
|
||||
SizeF size = (its.SetpUnits != Config.Unit.Pct) ? e.Graphics.MeasureString(strVal, setpointFont)
|
||||
SizeF size = (its.SetpUnit != Config.Unit.Pct) ? e.Graphics.MeasureString(strVal, setpointFont)
|
||||
: e.Graphics.MeasureString(string.Format(its.SetpFormat, 100.0), setpointFont);
|
||||
Rectangle rect = new Rectangle(its.X + its.SetpX, its.Y + its.SetpY, (int)Math.Round(size.Width) + 4, (int)Math.Round(size.Height) + 2);
|
||||
ItemElementRectangles.Add(new ItemElementRect(item, Element.Setpoint, rect));
|
||||
@@ -717,6 +720,31 @@ namespace SchematicDrawing
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Draw labels, Various.Drawing... component labels are drawn in edit mode only
|
||||
///
|
||||
foreach (var item in items)
|
||||
{
|
||||
if ((!Utils.IsHidden(item) || (EditMode && (item == selectedItem))) && /// 1. Do not show hidden items, only if they are selected
|
||||
(!item.ClassName.StartsWith("Various.Drawing.") || EditMode) && /// 2. Do not show Various.Drawing... items, only in EditMode
|
||||
!item.ClassName.Equals("Various.Drawing.Edges")) /// 3. Never show Various.Drawing.Edges components
|
||||
{
|
||||
string strVal = item.Name;
|
||||
SizeF size = e.Graphics.MeasureString(strVal, labelFont);
|
||||
Rectangle rect = new Rectangle(item.X + item.LblX, item.Y + item.LblY, (int)Math.Round(size.Width) + 4, (int)Math.Round(size.Height) + 2);
|
||||
ItemElementRectangles.Add(new ItemElementRect(item, Element.Label, rect));
|
||||
e.Graphics.FillRectangle(labelBackColor, rect);
|
||||
e.Graphics.DrawRectangle(thinBlackPen, rect);
|
||||
e.Graphics.DrawString(strVal, labelFont, labelBrush, rect.X + 2, rect.Y + 2);
|
||||
|
||||
if (EditMode && (item == selectedItem) && (selectedElement == Element.Label))
|
||||
{
|
||||
/// Draw red rectangle around the selected item label
|
||||
e.Graphics.DrawRectangle(selectedRectPen, rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Height + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Profiling
|
||||
stopwatch.Stop();
|
||||
if (firstTime)
|
||||
@@ -751,7 +779,7 @@ namespace SchematicDrawing
|
||||
{
|
||||
if (!p.CoordinatesAreValid) p.GetCoordinates();
|
||||
|
||||
int eIx = Math.Max((int)Sz.S, Math.Min((int)Sz.XL, (int)p.Sz));
|
||||
int eIx = Math.Max((int)Sz.S, Math.Min((int)Sz.XL, (int)p.Sz)); /// eIx is (int)p.Sz, but between Sz.S .. Sz.XL (1 .. 4)
|
||||
Pen pen = (distance == int.MaxValue) ? pensDry[eIx] : (distance < Const.Vacuum) ? pensWater[eIx] : pensVacuum[eIx];
|
||||
|
||||
if (highlighted)
|
||||
@@ -791,7 +819,7 @@ namespace SchematicDrawing
|
||||
|
||||
/// Joints between straight parts of the line and the bow
|
||||
DrawingShape dsh = DrawingShape.GetDrawingShape(Shape.Junction, p.Sz);
|
||||
Image image = (distance == int.MaxValue) ? dsh.ImgRightOpenDry : (distance < Const.Vacuum) ? dsh.ImgRight : dsh.ImgRightVacuum;
|
||||
Image image = (distance == int.MaxValue) ? dsh.ImgRightClosedDry : (distance < Const.Vacuum) ? dsh.ImgRight : dsh.ImgRightVacuum;
|
||||
e.Graphics.DrawImage(image, x3 - dsh.Wid / 2, y3 - dsh.Hgh / 2);
|
||||
e.Graphics.DrawImage(image, x5 - dsh.Wid / 2, y5 - dsh.Hgh / 2);
|
||||
|
||||
@@ -823,72 +851,102 @@ namespace SchematicDrawing
|
||||
/// Draw the component image
|
||||
Rectangle rect = dsh.GetRotatedFlippedImageRectangle(item);
|
||||
|
||||
if (dsh.HasClosed && item is IRouteBasedDrawingItem && routeBit == false)
|
||||
if (item is IRouteBasedDrawingItem && routeBit == false /// closed
|
||||
&& item.GNodes.Count > 0 && item.GNodes[0].Dist < Const.Vacuum /// wet
|
||||
&& dsh.HasClosedWet) /// has appropriate image
|
||||
{
|
||||
if (item.Flip)
|
||||
{
|
||||
switch (item.Orient)
|
||||
{
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightFlippedClosed, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpFlippedClosed, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftFlippedClosed, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownFlippedClosed, rect.X, rect.Y); break;
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightFlippedClosedWet, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpFlippedClosedWet, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftFlippedClosedWet, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownFlippedClosedWet, rect.X, rect.Y); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (item.Orient)
|
||||
{
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightClosed, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpClosed, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftClosed, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownClosed, rect.X, rect.Y); break;
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightClosedWet, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpClosedWet, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftClosedWet, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownClosedWet, rect.X, rect.Y); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dsh.HasOpenDry && item.GNodes.Count > 0 && item.GNodes[0].Dist == int.MaxValue)
|
||||
else if (item is IRouteBasedDrawingItem && routeBit == true /// open
|
||||
&& item.GNodes.Count > 0 && item.GNodes[0].Dist == int.MaxValue /// dry
|
||||
&& dsh.HasOpenDry) /// has appropriate image
|
||||
{
|
||||
if (item.Flip)
|
||||
{
|
||||
switch (item.Orient)
|
||||
{
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightFlippedOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpFlippedOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftFlippedOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownFlippedOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightFlippedOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpFlippedOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftFlippedOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownFlippedOpenDry, rect.X, rect.Y); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (item.Orient)
|
||||
{
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftOpenDry, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownOpenDry, rect.X, rect.Y); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dsh.HasVacuum && item.GNodes.Count > 0 && item.GNodes[0].Dist > Const.Vacuum)
|
||||
else if (((item is IRouteBasedDrawingItem && routeBit == false) || /// closed OR
|
||||
(item.GNodes.Count > 0 && item.GNodes[0].Dist == int.MaxValue)) /// dry
|
||||
&& dsh.HasClosedDry) /// has appropriate image
|
||||
{
|
||||
if (item.Flip)
|
||||
{
|
||||
switch (item.Orient)
|
||||
{
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightFlippedVacuum, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpFlippedVacuum, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftFlippedVacuum, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownFlippedVacuum, rect.X, rect.Y); break;
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightFlippedClosedDry, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpFlippedClosedDry, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftFlippedClosedDry, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownFlippedClosedDry, rect.X, rect.Y); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (item.Orient)
|
||||
{
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightVacuum, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpVacuum, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftVacuum, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownVacuum, rect.X, rect.Y); break;
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightClosedDry, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpClosedDry, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftClosedDry, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownClosedDry, rect.X, rect.Y); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (item.GNodes.Count > 0 && Const.Vacuum <= item.GNodes[0].Dist && item.GNodes[0].Dist < int.MaxValue /// vacuum
|
||||
&& dsh.HasVacuum) /// has appropriate image
|
||||
{
|
||||
if (item.Flip)
|
||||
{
|
||||
switch (item.Orient)
|
||||
{
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightFlippedVacuum, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpFlippedVacuum, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftFlippedVacuum, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownFlippedVacuum, rect.X, rect.Y); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (item.Orient)
|
||||
{
|
||||
case Orient.R: e.Graphics.DrawImage(dsh.ImgRightVacuum, rect.X, rect.Y); break;
|
||||
case Orient.Up: e.Graphics.DrawImage(dsh.ImgUpVacuum, rect.X, rect.Y); break;
|
||||
case Orient.L: e.Graphics.DrawImage(dsh.ImgLeftVacuum, rect.X, rect.Y); break;
|
||||
case Orient.Dn: e.Graphics.DrawImage(dsh.ImgDownVacuum, rect.X, rect.Y); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,21 +232,20 @@ namespace Statistics
|
||||
{
|
||||
#if GENESIS
|
||||
Language = "DE";
|
||||
|
||||
BenchNames = new string[] { "Genesis" };
|
||||
|
||||
MidNames = new string[] { string.Empty, "I11", "I12", "I2", "I3", "I4", "I5" }; /// Index is MID-id
|
||||
ConnectionStrings = new string[]
|
||||
{
|
||||
"SERVER=localhost; DATABASE=genesis-r; UID=root; PASSWORD=; CHARSET=utf8;",
|
||||
};
|
||||
|
||||
MidNames = new string[] { string.Empty, "I11", "I12", "I2", "I3", "I4", "I5" }; /// Index is MID-id
|
||||
#else
|
||||
BenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "WR18", "WR19", "WR20", "WR21", "PT7" };
|
||||
MidNames = new string[] { string.Empty, "I1", "I2", "I3", "I4" }; /// Index is MID-id
|
||||
#if true
|
||||
/// Production Stara Tura
|
||||
Language = "SK";
|
||||
|
||||
BenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "WR18", "WR19", "WR20", "WR21", "PT7" };
|
||||
|
||||
ConnectionStrings = new string[]
|
||||
ConnectionStrings = new string[]
|
||||
{
|
||||
"SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
@@ -259,9 +258,25 @@ namespace Statistics
|
||||
"SERVER=10.42.130.156; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.130.131; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
};
|
||||
#else
|
||||
/// Off-line demo
|
||||
Language = "EN";
|
||||
|
||||
MidNames = new string[] { string.Empty, "I1", "I2", "I3", "I4" }; /// Index is MID-id
|
||||
ConnectionStrings = new string[]
|
||||
{
|
||||
"SERVER=localhost; DATABASE=st-wr10-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
"SERVER=localhost; DATABASE=st-wr11-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
"SERVER=localhost; DATABASE=st-wr13-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
"SERVER=localhost; DATABASE=st-wr14-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
"SERVER=localhost; DATABASE=st-wr15-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
"SERVER=localhost; DATABASE=st-wr18-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
"SERVER=localhost; DATABASE=st-wr19-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
"SERVER=localhost; DATABASE=st-wr20-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
"SERVER=localhost; DATABASE=st-wr21-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
FlowEnabledI1 = new bool[FlowsCount];
|
||||
FlowEnabledI2 = new bool[FlowsCount];
|
||||
FlowEnabledI3 = new bool[FlowsCount];
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Statistics
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExecutableDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
#if false
|
||||
#if true
|
||||
/// Config directory is a sibling directory of the executable directory
|
||||
ConfigDirectory = Path.Combine(ExecutableDirectory, "..", string.Format("Cfg{0}", (args.Length >= 1) ? args[0] : string.Empty));
|
||||
#else
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Statistics.UserControls
|
||||
public partial class MidOrWaterMetersCtrl : UserControl
|
||||
{
|
||||
public int MidId; /// 1-based MID Id.
|
||||
public StatisticsDlg Parent;
|
||||
public new StatisticsDlg Parent;
|
||||
|
||||
|
||||
public bool IsFlowEnabled(int i)
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Xml.Serialization;
|
||||
using SchematicDrawing;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg, IDrawingItem
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AmbientCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public int ComPortNr;
|
||||
public int BaudRate;
|
||||
public Parity Parity;
|
||||
public int DataBits;
|
||||
public StopBits StopBits;
|
||||
public Handshake Handshake;
|
||||
public bool SetDtrToOne;
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
public Sz Sz { get; set; }
|
||||
public Orient Orient { get; set; }
|
||||
public bool Flip { get; set; }
|
||||
public int LblX { get; set; }
|
||||
public int LblY { get; set; }
|
||||
public Orient LblOrient { get; set; }
|
||||
|
||||
[XmlIgnore]
|
||||
public IList<GNode> GNodes { get; set; }
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
AmbientCfg()
|
||||
{
|
||||
GNodes = new List<GNode>();
|
||||
}
|
||||
|
||||
public AmbientCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Shape = Shape.Ambient;
|
||||
Sz = Sz.M;
|
||||
|
||||
Factory = factory;
|
||||
Name = "Ambient";
|
||||
ParentName = string.Empty;
|
||||
ComPortNr = 6;
|
||||
BaudRate = 9600;
|
||||
Parity = System.IO.Ports.Parity.None;
|
||||
DataBits = 8;
|
||||
StopBits = System.IO.Ports.StopBits.Two;
|
||||
Handshake = System.IO.Ports.Handshake.None;
|
||||
SetDtrToOne = false;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("{0} {1}[{2},{3}] Com{4}, {5}Bd, {6}-bits, parity={7}, stopBits={8}, {9}",
|
||||
Name, Shape, X, Y, ComPortNr, BaudRate, DataBits, Parity, StopBits, Handshake);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,243 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
partial class AmbientCfgCtrl
|
||||
{
|
||||
/// <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.comPortNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.baudRateLabel = new System.Windows.Forms.Label();
|
||||
this.baudRateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.partityLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.stopBitsLabel = new System.Windows.Forms.Label();
|
||||
this.handshakeLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.parityComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.stopBitsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.handshakeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.setDtrCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// comPortNrTextBox
|
||||
//
|
||||
this.comPortNrTextBox.Enabled = false;
|
||||
this.comPortNrTextBox.Location = new System.Drawing.Point(140, 52);
|
||||
this.comPortNrTextBox.Name = "comPortNrTextBox";
|
||||
this.comPortNrTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.comPortNrTextBox.TabIndex = 4;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(29, 55);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(98, 13);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Serial Port Number:";
|
||||
//
|
||||
// baudRateLabel
|
||||
//
|
||||
this.baudRateLabel.AutoSize = true;
|
||||
this.baudRateLabel.Location = new System.Drawing.Point(29, 79);
|
||||
this.baudRateLabel.Name = "baudRateLabel";
|
||||
this.baudRateLabel.Size = new System.Drawing.Size(58, 13);
|
||||
this.baudRateLabel.TabIndex = 5;
|
||||
this.baudRateLabel.Text = "Baud Rate";
|
||||
//
|
||||
// baudRateTextBox
|
||||
//
|
||||
this.baudRateTextBox.Enabled = false;
|
||||
this.baudRateTextBox.Location = new System.Drawing.Point(140, 76);
|
||||
this.baudRateTextBox.Name = "baudRateTextBox";
|
||||
this.baudRateTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.baudRateTextBox.TabIndex = 6;
|
||||
//
|
||||
// partityLabel
|
||||
//
|
||||
this.partityLabel.AutoSize = true;
|
||||
this.partityLabel.Location = new System.Drawing.Point(29, 103);
|
||||
this.partityLabel.Name = "partityLabel";
|
||||
this.partityLabel.Size = new System.Drawing.Size(33, 13);
|
||||
this.partityLabel.TabIndex = 7;
|
||||
this.partityLabel.Text = "Parity";
|
||||
//
|
||||
// dataBitsLabel
|
||||
//
|
||||
this.dataBitsLabel.AutoSize = true;
|
||||
this.dataBitsLabel.Location = new System.Drawing.Point(29, 127);
|
||||
this.dataBitsLabel.Name = "dataBitsLabel";
|
||||
this.dataBitsLabel.Size = new System.Drawing.Size(50, 13);
|
||||
this.dataBitsLabel.TabIndex = 9;
|
||||
this.dataBitsLabel.Text = "Data Bits";
|
||||
//
|
||||
// dataBitsTextBox
|
||||
//
|
||||
this.dataBitsTextBox.Enabled = false;
|
||||
this.dataBitsTextBox.Location = new System.Drawing.Point(140, 124);
|
||||
this.dataBitsTextBox.Name = "dataBitsTextBox";
|
||||
this.dataBitsTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.dataBitsTextBox.TabIndex = 10;
|
||||
//
|
||||
// stopBitsLabel
|
||||
//
|
||||
this.stopBitsLabel.AutoSize = true;
|
||||
this.stopBitsLabel.Location = new System.Drawing.Point(29, 151);
|
||||
this.stopBitsLabel.Name = "stopBitsLabel";
|
||||
this.stopBitsLabel.Size = new System.Drawing.Size(49, 13);
|
||||
this.stopBitsLabel.TabIndex = 11;
|
||||
this.stopBitsLabel.Text = "Stop Bits";
|
||||
//
|
||||
// handshakeLabel
|
||||
//
|
||||
this.handshakeLabel.AutoSize = true;
|
||||
this.handshakeLabel.Location = new System.Drawing.Point(29, 175);
|
||||
this.handshakeLabel.Name = "handshakeLabel";
|
||||
this.handshakeLabel.Size = new System.Drawing.Size(62, 13);
|
||||
this.handshakeLabel.TabIndex = 13;
|
||||
this.handshakeLabel.Text = "Handshake";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(140, 28);
|
||||
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(30, 31);
|
||||
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(137, 7);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// parityComboBox
|
||||
//
|
||||
this.parityComboBox.Enabled = false;
|
||||
this.parityComboBox.FormattingEnabled = true;
|
||||
this.parityComboBox.Location = new System.Drawing.Point(140, 100);
|
||||
this.parityComboBox.Name = "parityComboBox";
|
||||
this.parityComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.parityComboBox.TabIndex = 8;
|
||||
//
|
||||
// stopBitsComboBox
|
||||
//
|
||||
this.stopBitsComboBox.Enabled = false;
|
||||
this.stopBitsComboBox.FormattingEnabled = true;
|
||||
this.stopBitsComboBox.Location = new System.Drawing.Point(140, 148);
|
||||
this.stopBitsComboBox.Name = "stopBitsComboBox";
|
||||
this.stopBitsComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.stopBitsComboBox.TabIndex = 12;
|
||||
//
|
||||
// handshakeComboBox
|
||||
//
|
||||
this.handshakeComboBox.Enabled = false;
|
||||
this.handshakeComboBox.FormattingEnabled = true;
|
||||
this.handshakeComboBox.Location = new System.Drawing.Point(140, 172);
|
||||
this.handshakeComboBox.Name = "handshakeComboBox";
|
||||
this.handshakeComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.handshakeComboBox.TabIndex = 14;
|
||||
//
|
||||
// setDtrCheckBox
|
||||
//
|
||||
this.setDtrCheckBox.AutoSize = true;
|
||||
this.setDtrCheckBox.Enabled = false;
|
||||
this.setDtrCheckBox.Location = new System.Drawing.Point(140, 201);
|
||||
this.setDtrCheckBox.Name = "setDtrCheckBox";
|
||||
this.setDtrCheckBox.Size = new System.Drawing.Size(89, 17);
|
||||
this.setDtrCheckBox.TabIndex = 15;
|
||||
this.setDtrCheckBox.Text = "Set DTR to 1";
|
||||
this.setDtrCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// AmbientCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Controls.Add(this.setDtrCheckBox);
|
||||
this.Controls.Add(this.handshakeComboBox);
|
||||
this.Controls.Add(this.stopBitsComboBox);
|
||||
this.Controls.Add(this.parityComboBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Controls.Add(this.handshakeLabel);
|
||||
this.Controls.Add(this.stopBitsLabel);
|
||||
this.Controls.Add(this.dataBitsTextBox);
|
||||
this.Controls.Add(this.dataBitsLabel);
|
||||
this.Controls.Add(this.partityLabel);
|
||||
this.Controls.Add(this.baudRateTextBox);
|
||||
this.Controls.Add(this.baudRateLabel);
|
||||
this.Controls.Add(this.comPortNrTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "AmbientCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 240);
|
||||
this.Load += new System.EventHandler(this.AbbientCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox comPortNrTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label baudRateLabel;
|
||||
private System.Windows.Forms.TextBox baudRateTextBox;
|
||||
private System.Windows.Forms.Label partityLabel;
|
||||
private System.Windows.Forms.Label dataBitsLabel;
|
||||
private System.Windows.Forms.TextBox dataBitsTextBox;
|
||||
private System.Windows.Forms.Label stopBitsLabel;
|
||||
private System.Windows.Forms.Label handshakeLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.ComboBox parityComboBox;
|
||||
private System.Windows.Forms.ComboBox stopBitsComboBox;
|
||||
private System.Windows.Forms.ComboBox handshakeComboBox;
|
||||
private System.Windows.Forms.CheckBox setDtrCheckBox;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO.Ports;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public partial class AmbientCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
AmbientCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as AmbientCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public AmbientCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
parityComboBox.Items.Add(Parity.None.ToString());
|
||||
parityComboBox.Items.Add(Parity.Even.ToString());
|
||||
parityComboBox.Items.Add(Parity.Odd.ToString());
|
||||
|
||||
stopBitsComboBox.Items.Add(StopBits.None.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.One.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.OnePointFive.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.Two.ToString());
|
||||
|
||||
handshakeComboBox.Items.Add(Handshake.None.ToString());
|
||||
handshakeComboBox.Items.Add(Handshake.RequestToSend.ToString());
|
||||
handshakeComboBox.Items.Add(Handshake.XOnXOff.ToString());
|
||||
}
|
||||
|
||||
int GetParityIx(Parity par)
|
||||
{
|
||||
if (par == Parity.None) return 0;
|
||||
if (par == Parity.Even) return 0;
|
||||
if (par == Parity.Odd) return 0;
|
||||
return -1;
|
||||
}
|
||||
Parity GetParity(string str)
|
||||
{
|
||||
if (str.Equals(Parity.None.ToString())) return Parity.None;
|
||||
if (str.Equals(Parity.Even.ToString())) return Parity.Even;
|
||||
if (str.Equals(Parity.Odd.ToString())) return Parity.Odd;
|
||||
return (Parity)(-1);
|
||||
}
|
||||
|
||||
int GetStopBitsIx(StopBits sb)
|
||||
{
|
||||
if (sb == StopBits.None) return 0;
|
||||
if (sb == StopBits.One) return 1;
|
||||
if (sb == StopBits.OnePointFive) return 2;
|
||||
if (sb == StopBits.Two) return 3;
|
||||
return -1;
|
||||
}
|
||||
StopBits GetStopBits(string str)
|
||||
{
|
||||
if (str.Equals(StopBits.None.ToString())) return StopBits.None;
|
||||
if (str.Equals(StopBits.One.ToString())) return StopBits.One;
|
||||
if (str.Equals(StopBits.OnePointFive.ToString())) return StopBits.OnePointFive;
|
||||
if (str.Equals(StopBits.Two.ToString())) return StopBits.Two;
|
||||
return (StopBits)(-1);
|
||||
}
|
||||
|
||||
int GetHandshakeIx(Handshake par)
|
||||
{
|
||||
if (par == Handshake.None) return 0;
|
||||
if (par == Handshake.RequestToSend) return 0;
|
||||
if (par == Handshake.XOnXOff) return 0;
|
||||
return -1;
|
||||
}
|
||||
Handshake GetHandshake(string str)
|
||||
{
|
||||
if (str.Equals(Handshake.None.ToString())) return Handshake.None;
|
||||
if (str.Equals(Handshake.RequestToSend.ToString())) return Handshake.RequestToSend;
|
||||
if (str.Equals(Handshake.XOnXOff.ToString())) return Handshake.XOnXOff;
|
||||
return (Handshake)(-1);
|
||||
}
|
||||
|
||||
private void AbbientCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
comPortNrTextBox.Text = config.ComPortNr.ToString();
|
||||
baudRateTextBox.Text = config.BaudRate.ToString();
|
||||
parityComboBox.Text = config.Parity.ToString();
|
||||
dataBitsTextBox.Text = config.DataBits.ToString();
|
||||
stopBitsComboBox.Text = config.StopBits.ToString();
|
||||
handshakeComboBox.Text = config.Handshake.ToString();
|
||||
setDtrCheckBox.Checked = config.SetDtrToOne;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
comPortNrTextBox.Enabled = true;
|
||||
baudRateTextBox.Enabled = true;
|
||||
parityComboBox.Enabled = true;
|
||||
dataBitsTextBox.Enabled = true;
|
||||
stopBitsComboBox.Enabled = true;
|
||||
handshakeComboBox.Enabled = true;
|
||||
setDtrCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ComPortNr = int.Parse(comPortNrTextBox.Text);
|
||||
config.BaudRate = int.Parse(baudRateTextBox.Text);
|
||||
config.Parity = GetParity(parityComboBox.SelectedItem.ToString());
|
||||
config.DataBits = int.Parse(dataBitsTextBox.Text);
|
||||
config.StopBits = GetStopBits(stopBitsComboBox.SelectedItem.ToString());
|
||||
config.Handshake = GetHandshake(handshakeComboBox.SelectedItem.ToString());
|
||||
config.SetDtrToOne = setDtrCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Serial Port Number' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(baudRateTextBox.Text, out dummy) || dummy < 150 || dummy > 115200)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Baud Rate' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(dataBitsTextBox.Text, out dummy) || dummy < 7 || dummy > 8)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Data Bits' is not valid";
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "Comet-Ambient"; } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public void ResetStaticProperties() { Ambient.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Ambient(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Ambient(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new AmbientCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(AmbientCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AmbientCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public int ComPortNr;
|
||||
public int BaudRate;
|
||||
public Parity Parity;
|
||||
public int DataBits;
|
||||
public StopBits StopBits;
|
||||
public Handshake Handshake;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
AmbientCfg()
|
||||
{
|
||||
Name = "Ambient";
|
||||
ParentName = string.Empty;
|
||||
ComPortNr = 6;
|
||||
BaudRate = 19200;
|
||||
Parity = System.IO.Ports.Parity.None;
|
||||
DataBits = 8;
|
||||
StopBits = System.IO.Ports.StopBits.One;
|
||||
Handshake = System.IO.Ports.Handshake.None;
|
||||
}
|
||||
|
||||
public AmbientCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Com{1}, {2}Bd, {3}-bits, parity={4}, stopBits={5}, {6}",
|
||||
Name, ComPortNr, BaudRate, DataBits, Parity, StopBits, Handshake);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,229 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
partial class AmbientCfgCtrl
|
||||
{
|
||||
/// <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.comPortNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.baudRateLabel = new System.Windows.Forms.Label();
|
||||
this.baudRateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.partityLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsLabel = new System.Windows.Forms.Label();
|
||||
this.dataBitsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.stopBitsLabel = new System.Windows.Forms.Label();
|
||||
this.handshakeLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.parityComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.stopBitsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.handshakeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// comPortNrTextBox
|
||||
//
|
||||
this.comPortNrTextBox.Enabled = false;
|
||||
this.comPortNrTextBox.Location = new System.Drawing.Point(140, 52);
|
||||
this.comPortNrTextBox.Name = "comPortNrTextBox";
|
||||
this.comPortNrTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.comPortNrTextBox.TabIndex = 4;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(29, 55);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(98, 13);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Serial Port Number:";
|
||||
//
|
||||
// baudRateLabel
|
||||
//
|
||||
this.baudRateLabel.AutoSize = true;
|
||||
this.baudRateLabel.Location = new System.Drawing.Point(29, 79);
|
||||
this.baudRateLabel.Name = "baudRateLabel";
|
||||
this.baudRateLabel.Size = new System.Drawing.Size(58, 13);
|
||||
this.baudRateLabel.TabIndex = 5;
|
||||
this.baudRateLabel.Text = "Baud Rate";
|
||||
//
|
||||
// baudRateTextBox
|
||||
//
|
||||
this.baudRateTextBox.Enabled = false;
|
||||
this.baudRateTextBox.Location = new System.Drawing.Point(140, 76);
|
||||
this.baudRateTextBox.Name = "baudRateTextBox";
|
||||
this.baudRateTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.baudRateTextBox.TabIndex = 6;
|
||||
//
|
||||
// partityLabel
|
||||
//
|
||||
this.partityLabel.AutoSize = true;
|
||||
this.partityLabel.Location = new System.Drawing.Point(29, 103);
|
||||
this.partityLabel.Name = "partityLabel";
|
||||
this.partityLabel.Size = new System.Drawing.Size(33, 13);
|
||||
this.partityLabel.TabIndex = 7;
|
||||
this.partityLabel.Text = "Parity";
|
||||
//
|
||||
// dataBitsLabel
|
||||
//
|
||||
this.dataBitsLabel.AutoSize = true;
|
||||
this.dataBitsLabel.Location = new System.Drawing.Point(29, 127);
|
||||
this.dataBitsLabel.Name = "dataBitsLabel";
|
||||
this.dataBitsLabel.Size = new System.Drawing.Size(50, 13);
|
||||
this.dataBitsLabel.TabIndex = 9;
|
||||
this.dataBitsLabel.Text = "Data Bits";
|
||||
//
|
||||
// dataBitsTextBox
|
||||
//
|
||||
this.dataBitsTextBox.Enabled = false;
|
||||
this.dataBitsTextBox.Location = new System.Drawing.Point(140, 124);
|
||||
this.dataBitsTextBox.Name = "dataBitsTextBox";
|
||||
this.dataBitsTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.dataBitsTextBox.TabIndex = 10;
|
||||
//
|
||||
// stopBitsLabel
|
||||
//
|
||||
this.stopBitsLabel.AutoSize = true;
|
||||
this.stopBitsLabel.Location = new System.Drawing.Point(29, 151);
|
||||
this.stopBitsLabel.Name = "stopBitsLabel";
|
||||
this.stopBitsLabel.Size = new System.Drawing.Size(49, 13);
|
||||
this.stopBitsLabel.TabIndex = 11;
|
||||
this.stopBitsLabel.Text = "Stop Bits";
|
||||
//
|
||||
// handshakeLabel
|
||||
//
|
||||
this.handshakeLabel.AutoSize = true;
|
||||
this.handshakeLabel.Location = new System.Drawing.Point(29, 175);
|
||||
this.handshakeLabel.Name = "handshakeLabel";
|
||||
this.handshakeLabel.Size = new System.Drawing.Size(62, 13);
|
||||
this.handshakeLabel.TabIndex = 13;
|
||||
this.handshakeLabel.Text = "Handshake";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(140, 28);
|
||||
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(30, 31);
|
||||
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(137, 7);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// parityComboBox
|
||||
//
|
||||
this.parityComboBox.Enabled = false;
|
||||
this.parityComboBox.FormattingEnabled = true;
|
||||
this.parityComboBox.Location = new System.Drawing.Point(140, 100);
|
||||
this.parityComboBox.Name = "parityComboBox";
|
||||
this.parityComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.parityComboBox.TabIndex = 8;
|
||||
//
|
||||
// stopBitsComboBox
|
||||
//
|
||||
this.stopBitsComboBox.Enabled = false;
|
||||
this.stopBitsComboBox.FormattingEnabled = true;
|
||||
this.stopBitsComboBox.Location = new System.Drawing.Point(140, 148);
|
||||
this.stopBitsComboBox.Name = "stopBitsComboBox";
|
||||
this.stopBitsComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.stopBitsComboBox.TabIndex = 12;
|
||||
//
|
||||
// handshakeComboBox
|
||||
//
|
||||
this.handshakeComboBox.Enabled = false;
|
||||
this.handshakeComboBox.FormattingEnabled = true;
|
||||
this.handshakeComboBox.Location = new System.Drawing.Point(140, 172);
|
||||
this.handshakeComboBox.Name = "handshakeComboBox";
|
||||
this.handshakeComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.handshakeComboBox.TabIndex = 14;
|
||||
//
|
||||
// AmbientCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Controls.Add(this.handshakeComboBox);
|
||||
this.Controls.Add(this.stopBitsComboBox);
|
||||
this.Controls.Add(this.parityComboBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Controls.Add(this.handshakeLabel);
|
||||
this.Controls.Add(this.stopBitsLabel);
|
||||
this.Controls.Add(this.dataBitsTextBox);
|
||||
this.Controls.Add(this.dataBitsLabel);
|
||||
this.Controls.Add(this.partityLabel);
|
||||
this.Controls.Add(this.baudRateTextBox);
|
||||
this.Controls.Add(this.baudRateLabel);
|
||||
this.Controls.Add(this.comPortNrTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "AmbientCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 240);
|
||||
this.Load += new System.EventHandler(this.AbbientCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox comPortNrTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label baudRateLabel;
|
||||
private System.Windows.Forms.TextBox baudRateTextBox;
|
||||
private System.Windows.Forms.Label partityLabel;
|
||||
private System.Windows.Forms.Label dataBitsLabel;
|
||||
private System.Windows.Forms.TextBox dataBitsTextBox;
|
||||
private System.Windows.Forms.Label stopBitsLabel;
|
||||
private System.Windows.Forms.Label handshakeLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.ComboBox parityComboBox;
|
||||
private System.Windows.Forms.ComboBox stopBitsComboBox;
|
||||
private System.Windows.Forms.ComboBox handshakeComboBox;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO.Ports;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
public partial class AmbientCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
AmbientCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as AmbientCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public AmbientCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
parityComboBox.Items.Add(Parity.None.ToString());
|
||||
parityComboBox.Items.Add(Parity.Even.ToString());
|
||||
parityComboBox.Items.Add(Parity.Odd.ToString());
|
||||
|
||||
stopBitsComboBox.Items.Add(StopBits.None.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.One.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.OnePointFive.ToString());
|
||||
stopBitsComboBox.Items.Add(StopBits.Two.ToString());
|
||||
|
||||
handshakeComboBox.Items.Add(Handshake.None.ToString());
|
||||
handshakeComboBox.Items.Add(Handshake.RequestToSend.ToString());
|
||||
handshakeComboBox.Items.Add(Handshake.XOnXOff.ToString());
|
||||
}
|
||||
|
||||
int GetParityIx(Parity par)
|
||||
{
|
||||
if (par == Parity.None) return 0;
|
||||
if (par == Parity.Even) return 0;
|
||||
if (par == Parity.Odd) return 0;
|
||||
return -1;
|
||||
}
|
||||
Parity GetParity(string str)
|
||||
{
|
||||
if (str.Equals(Parity.None.ToString())) return Parity.None;
|
||||
if (str.Equals(Parity.Even.ToString())) return Parity.Even;
|
||||
if (str.Equals(Parity.Odd.ToString())) return Parity.Odd;
|
||||
return (Parity)(-1);
|
||||
}
|
||||
|
||||
int GetStopBitsIx(StopBits sb)
|
||||
{
|
||||
if (sb == StopBits.None) return 0;
|
||||
if (sb == StopBits.One) return 1;
|
||||
if (sb == StopBits.OnePointFive) return 2;
|
||||
if (sb == StopBits.Two) return 3;
|
||||
return -1;
|
||||
}
|
||||
StopBits GetStopBits(string str)
|
||||
{
|
||||
if (str.Equals(StopBits.None.ToString())) return StopBits.None;
|
||||
if (str.Equals(StopBits.One.ToString())) return StopBits.One;
|
||||
if (str.Equals(StopBits.OnePointFive.ToString())) return StopBits.OnePointFive;
|
||||
if (str.Equals(StopBits.Two.ToString())) return StopBits.Two;
|
||||
return (StopBits)(-1);
|
||||
}
|
||||
|
||||
int GetHandshakeIx(Handshake par)
|
||||
{
|
||||
if (par == Handshake.None) return 0;
|
||||
if (par == Handshake.RequestToSend) return 0;
|
||||
if (par == Handshake.XOnXOff) return 0;
|
||||
return -1;
|
||||
}
|
||||
Handshake GetHandshake(string str)
|
||||
{
|
||||
if (str.Equals(Handshake.None.ToString())) return Handshake.None;
|
||||
if (str.Equals(Handshake.RequestToSend.ToString())) return Handshake.RequestToSend;
|
||||
if (str.Equals(Handshake.XOnXOff.ToString())) return Handshake.XOnXOff;
|
||||
return (Handshake)(-1);
|
||||
}
|
||||
|
||||
private void AbbientCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
comPortNrTextBox.Text = config.ComPortNr.ToString();
|
||||
baudRateTextBox.Text = config.BaudRate.ToString();
|
||||
parityComboBox.Text = config.Parity.ToString();
|
||||
dataBitsTextBox.Text = config.DataBits.ToString();
|
||||
stopBitsComboBox.Text = config.StopBits.ToString();
|
||||
handshakeComboBox.Text = config.Handshake.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
comPortNrTextBox.Enabled = true;
|
||||
baudRateTextBox.Enabled = true;
|
||||
parityComboBox.Enabled = true;
|
||||
dataBitsTextBox.Enabled = true;
|
||||
stopBitsComboBox.Enabled = true;
|
||||
handshakeComboBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ComPortNr = int.Parse(comPortNrTextBox.Text);
|
||||
config.BaudRate = int.Parse(baudRateTextBox.Text);
|
||||
config.Parity = GetParity(parityComboBox.SelectedItem.ToString());
|
||||
config.DataBits = int.Parse(dataBitsTextBox.Text);
|
||||
config.StopBits = GetStopBits(stopBitsComboBox.SelectedItem.ToString());
|
||||
config.Handshake = GetHandshake(handshakeComboBox.SelectedItem.ToString());
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy < 1 || dummy > 999)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Serial Port Number' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(baudRateTextBox.Text, out dummy) || dummy < 150 || dummy > 115200)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Baud Rate' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(dataBitsTextBox.Text, out dummy) || dummy < 7 || dummy > 8)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Data Bits' is not valid";
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "Greco Ambient"; } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public void ResetStaticProperties() { Ambient.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Ambient(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Ambient(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new AmbientCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(AmbientCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using Dirichlet.Numerics;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.ControlBoard.New
|
||||
{
|
||||
public class CBoard : ComponentBase, IControlBoard
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CBoard));
|
||||
public override string ToString() { return string.Format("CBoard({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly CBoardCfg cBoardCfg;
|
||||
|
||||
public OutputPath Devices
|
||||
{
|
||||
set { devices = value; }
|
||||
get { return devices; }
|
||||
}
|
||||
OutputPath devices;
|
||||
|
||||
public CBoard()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public CBoard(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
cBoardCfg = cfg as CBoardCfg;
|
||||
|
||||
}
|
||||
|
||||
public void SpecifyInvertedValves(UInt128 valvesToInvert)
|
||||
{
|
||||
this.valvesToInvert = valvesToInvert;
|
||||
this.benchModelRoute = valvesToInvert;
|
||||
}
|
||||
|
||||
|
||||
public void Initialize() { }
|
||||
public void RunDeviceBefore() { }
|
||||
public void RunDeviceAfter() { }
|
||||
public void StopDevice() { }
|
||||
public void StopDevice2() { }
|
||||
|
||||
|
||||
///
|
||||
/// IControlBoard interface
|
||||
///
|
||||
|
||||
/// <summary>
|
||||
/// Route: 128-bit word representing the current state of all valves and pumps
|
||||
/// </summary>
|
||||
public UInt128 Route { get { return benchModelRoute; } }
|
||||
UInt128 benchModelRoute;
|
||||
UInt128 valvesToInvert; /// Route = valesToInvert ^ RequiredRouteWithoutInvertedVlaves
|
||||
readonly UInt128 routeMask; /// This mask masks out virtual valves, routeMask is set in the constructor
|
||||
|
||||
public UInt64 DigitalInputs { get { return 0; } }
|
||||
|
||||
public double RefFrequency { get { return 0; } }
|
||||
public double RefFlow { get { return 0; } }
|
||||
|
||||
///
|
||||
/// Last test result
|
||||
///
|
||||
public int RefPulses { get { return 0; } }
|
||||
public double TestTime { get { return 1.0; } }
|
||||
public int RefPulsesWM(int wmNr1) { return (wmNr1 > 0 && wmNr1 <= Config.Data.WMsCount) ? 0 : 0; }
|
||||
public int PulsesWM(int wmNr1) { return (wmNr1 > 0 && wmNr1 <= Config.Data.WMsCount) ? 0 : 0; }
|
||||
public double TestTimeWM(int wmNr1) { return (wmNr1 > 0 && wmNr1 <= Config.Data.WMsCount) ? 1.0 : 1.0; }
|
||||
|
||||
|
||||
public void UpdateUI(string sParam, int iParam, double value) { }
|
||||
public void ClearProcessValues() { }
|
||||
|
||||
public UInt128 SetValves(UInt128 valvesToOpen, UInt128 valvesToClose, IList<BuiltIn.ValveEx.Valve> extendedValves)
|
||||
{
|
||||
return routeMask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Open one valve and/or close one valve.
|
||||
/// Events: ValvesSet
|
||||
/// </summary>
|
||||
/// <param name="valveOpen">Valve to be opened</param>
|
||||
/// <param name="valveClose">Valve to be closed</param>
|
||||
/// <returns>Created operation</returns>
|
||||
public IOperation SetValvesOp(IValve valveOpen, IValve valveClose)
|
||||
{
|
||||
return new BuiltIn.SetValvesOp(this, valveOpen, valveClose);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Open and/or close multiple valves.
|
||||
/// Events: ValvesSet
|
||||
/// </summary>
|
||||
/// <param name="valvesOpen">A list of valves to be opened</param>
|
||||
/// <param name="valvesClose">A list of valves to be closed</param>
|
||||
/// <returns>Created operation</returns>
|
||||
public IOperation SetValvesOp(IList<IValve> valvesOpen, IList<IValve> valvesClose)
|
||||
{
|
||||
return new BuiltIn.SetValvesOp(this, valvesOpen, valvesClose);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Open start/stop valve.
|
||||
/// Events: ValvesSet, ValvesBusy, Error
|
||||
/// </summary>
|
||||
/// <returns>Created operation</returns>
|
||||
public IOperation OpenStartValveOp()
|
||||
{
|
||||
return new BuiltIn.SetValvesOp(this, true, devices);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Close start/stop valve.
|
||||
/// Events: ValvesSet, ValvesBusy, Error
|
||||
/// </summary>
|
||||
/// <returns>Created operation</returns>
|
||||
public IOperation CloseStartValveOp()
|
||||
{
|
||||
return new BuiltIn.SetValvesOp(this, false, devices);
|
||||
}
|
||||
|
||||
public float ValveOpenCloseTime { get { return 0.1f; } }
|
||||
|
||||
|
||||
public IOperation SetFlowOp(double reqrdFlowLo, double reqrdFlowHi, TBF.Boxes.DoubleBox measuredFlow, int timeout)
|
||||
{
|
||||
return null; /// TODO
|
||||
}
|
||||
|
||||
public IOperation StopFlowRegulationOp()
|
||||
{
|
||||
return null; /// TODO
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start a test, Events: MeasurementStarted
|
||||
/// </summary>
|
||||
/// <param name="iParam">Int32 parameter 1</param>
|
||||
/// <param name="dParam1">Double parameter 1 (alternative lower flow limit)</param>
|
||||
/// <param name="dParam2">Double parameter 2 (alternative upper flow limit)</param>
|
||||
/// <returns>Operation</returns>
|
||||
public IOperation StartTestOp(Test test, int iParam = 0, double dParam1 = 0, double dParam2 = 0)
|
||||
{
|
||||
return null; /// TODO
|
||||
}
|
||||
|
||||
public IOperation QueryMeasurementEndOp()
|
||||
{
|
||||
return null; /// TODO
|
||||
}
|
||||
|
||||
public IOperation StopMeasurementOp()
|
||||
{
|
||||
return null; /// TODO
|
||||
}
|
||||
|
||||
public IOperation ReadDiverterTransitionOp(bool isStart, Sequences.Statistics plotter, int batchNr, string testName, int repetition)
|
||||
{
|
||||
return null; /// TODO
|
||||
}
|
||||
|
||||
public IOperation StopPreviousOp()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.ControlBoard.New
|
||||
{
|
||||
public class CBoardCfg : ComponentCfgBase, IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(CBoardCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new CBoardCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public int ComPortNr;
|
||||
public int VirtualValvesRangeLo;
|
||||
public int VirtualValvesRangeHi;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
CBoardCfg()
|
||||
{
|
||||
Name = "CB";
|
||||
ParentName = string.Empty;
|
||||
ComPortNr = 1;
|
||||
VirtualValvesRangeLo = 50;
|
||||
VirtualValvesRangeHi = 59;
|
||||
}
|
||||
|
||||
public CBoardCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Com{1}, VVRangeLo={2}, VVRangeHi={3}", Name, ComPortNr, VirtualValvesRangeLo, VirtualValvesRangeHi);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.ControlBoard.New
|
||||
{
|
||||
partial class CBoardCfgCtrl
|
||||
{
|
||||
/// <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.comPortNrLabel = new System.Windows.Forms.Label();
|
||||
this.comPortNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.vValveRangeLoTextBox = new System.Windows.Forms.TextBox();
|
||||
this.vValveRangeLoLabel = new System.Windows.Forms.Label();
|
||||
this.vValveRangeHiTextBox = new System.Windows.Forms.TextBox();
|
||||
this.vValveRangeHiLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// comPortNrLabel
|
||||
//
|
||||
this.comPortNrLabel.AutoSize = true;
|
||||
this.comPortNrLabel.Location = new System.Drawing.Point(42, 85);
|
||||
this.comPortNrLabel.Name = "comPortNrLabel";
|
||||
this.comPortNrLabel.Size = new System.Drawing.Size(95, 13);
|
||||
this.comPortNrLabel.TabIndex = 0;
|
||||
this.comPortNrLabel.Text = "Serial port number:";
|
||||
//
|
||||
// comPortNrTextBox
|
||||
//
|
||||
this.comPortNrTextBox.Enabled = false;
|
||||
this.comPortNrTextBox.Location = new System.Drawing.Point(166, 82);
|
||||
this.comPortNrTextBox.Name = "comPortNrTextBox";
|
||||
this.comPortNrTextBox.Size = new System.Drawing.Size(80, 20);
|
||||
this.comPortNrTextBox.TabIndex = 1;
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(163, 26);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 2;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(42, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 3;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(166, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(80, 20);
|
||||
this.nameTextBox.TabIndex = 4;
|
||||
//
|
||||
// vValveRangeLoTextBox
|
||||
//
|
||||
this.vValveRangeLoTextBox.Enabled = false;
|
||||
this.vValveRangeLoTextBox.Location = new System.Drawing.Point(166, 107);
|
||||
this.vValveRangeLoTextBox.Name = "vValveRangeLoTextBox";
|
||||
this.vValveRangeLoTextBox.Size = new System.Drawing.Size(80, 20);
|
||||
this.vValveRangeLoTextBox.TabIndex = 6;
|
||||
//
|
||||
// vValveRangeLoLabel
|
||||
//
|
||||
this.vValveRangeLoLabel.AutoSize = true;
|
||||
this.vValveRangeLoLabel.Location = new System.Drawing.Point(42, 110);
|
||||
this.vValveRangeLoLabel.Name = "vValveRangeLoLabel";
|
||||
this.vValveRangeLoLabel.Size = new System.Drawing.Size(118, 13);
|
||||
this.vValveRangeLoLabel.TabIndex = 5;
|
||||
this.vValveRangeLoLabel.Text = "Virtual valves range Lo:";
|
||||
//
|
||||
// vValveRangeHiTextBox
|
||||
//
|
||||
this.vValveRangeHiTextBox.Enabled = false;
|
||||
this.vValveRangeHiTextBox.Location = new System.Drawing.Point(166, 132);
|
||||
this.vValveRangeHiTextBox.Name = "vValveRangeHiTextBox";
|
||||
this.vValveRangeHiTextBox.Size = new System.Drawing.Size(80, 20);
|
||||
this.vValveRangeHiTextBox.TabIndex = 8;
|
||||
//
|
||||
// vValveRangeHiLabel
|
||||
//
|
||||
this.vValveRangeHiLabel.AutoSize = true;
|
||||
this.vValveRangeHiLabel.Location = new System.Drawing.Point(42, 135);
|
||||
this.vValveRangeHiLabel.Name = "vValveRangeHiLabel";
|
||||
this.vValveRangeHiLabel.Size = new System.Drawing.Size(116, 13);
|
||||
this.vValveRangeHiLabel.TabIndex = 7;
|
||||
this.vValveRangeHiLabel.Text = "Virtual valves range Hi:";
|
||||
//
|
||||
// ControlBoardCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.vValveRangeHiTextBox);
|
||||
this.Controls.Add(this.vValveRangeHiLabel);
|
||||
this.Controls.Add(this.vValveRangeLoTextBox);
|
||||
this.Controls.Add(this.vValveRangeLoLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Controls.Add(this.comPortNrTextBox);
|
||||
this.Controls.Add(this.comPortNrLabel);
|
||||
this.Name = "ControlBoardCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.ControlBoardCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label comPortNrLabel;
|
||||
private System.Windows.Forms.TextBox comPortNrTextBox;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.TextBox vValveRangeLoTextBox;
|
||||
private System.Windows.Forms.Label vValveRangeLoLabel;
|
||||
private System.Windows.Forms.TextBox vValveRangeHiTextBox;
|
||||
private System.Windows.Forms.Label vValveRangeHiLabel;
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.ControlBoard.New
|
||||
{
|
||||
public partial class CBoardCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
CBoardCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as CBoardCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public CBoardCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ControlBoardCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
comPortNrTextBox.Text = config.ComPortNr.ToString();
|
||||
vValveRangeLoTextBox.Text = config.VirtualValvesRangeLo.ToString();
|
||||
vValveRangeHiTextBox.Text = config.VirtualValvesRangeHi.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
comPortNrTextBox.Enabled = true;
|
||||
vValveRangeLoTextBox.Enabled = true;
|
||||
vValveRangeHiTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify current user controls for validity.
|
||||
/// Called when user wants to close/save the configuration.
|
||||
/// </summary>
|
||||
/// <returns>See VerifyFlags</returns>
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(comPortNrTextBox.Text, out dummy) || dummy <= 0 || dummy > 999)
|
||||
{
|
||||
message += "Control board serial port number is invalid";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(vValveRangeLoTextBox.Text, out dummy) || dummy < 0 || dummy > 63)
|
||||
{
|
||||
message += "Virtual valves range Lo is invalid";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
if (!int.TryParse(vValveRangeHiTextBox.Text, out dummy) || dummy < 0 || dummy > 63)
|
||||
{
|
||||
message += "Virtual valves range Hi is invalid";
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save settings to the configuration class.
|
||||
/// </summary>
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
this.Name = nameTextBox.Text;
|
||||
this.config.ComPortNr = int.Parse(comPortNrTextBox.Text);
|
||||
this.config.VirtualValvesRangeLo = int.Parse(vValveRangeLoTextBox.Text);
|
||||
this.config.VirtualValvesRangeHi = int.Parse(vValveRangeHiTextBox.Text);
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.ControlBoard.New
|
||||
{
|
||||
public class CBoardFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
/// <summary>Max. number of components of this class in the system</summary>
|
||||
public int MaxCount { get { return 1; } }
|
||||
|
||||
public IComponent DummyComponent() { return new CBoard(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new CBoard(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new CBoardCfg(this); }
|
||||
|
||||
public IComponentCfgCtrl CreateCfgCtrl() { return new CBoardCfgCtrl(); }
|
||||
|
||||
public IComponent ComponentFromCmpntCfg(IComponentCfg config, IList<Generic.IComponent> components)
|
||||
{
|
||||
return new CBoard((CBoardCfg)config);
|
||||
}
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(CBoardCfg.Serializer, component, this);
|
||||
}
|
||||
|
||||
public void ResetStaticProperties() { }
|
||||
}
|
||||
}
|
||||
@@ -1,254 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
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()
|
||||
{
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.auxSN1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxSN1Label = new System.Windows.Forms.Label();
|
||||
this.mainSN1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainSN1Label = new System.Windows.Forms.Label();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.auxSN2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxSN2Label = new System.Windows.Forms.Label();
|
||||
this.mainSN2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainSN2Label = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.auxSN3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxSN3Label = new System.Windows.Forms.Label();
|
||||
this.mainSN3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainSN3Label = new System.Windows.Forms.Label();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.okButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.okButton.Location = new System.Drawing.Point(557, 43);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(98, 63);
|
||||
this.okButton.TabIndex = 0;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.auxSN1TextBox);
|
||||
this.groupBox1.Controls.Add(this.auxSN1Label);
|
||||
this.groupBox1.Controls.Add(this.mainSN1TextBox);
|
||||
this.groupBox1.Controls.Add(this.mainSN1Label);
|
||||
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(28, 18);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(494, 137);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Water Meter 1";
|
||||
//
|
||||
// auxSN1TextBox
|
||||
//
|
||||
this.auxSN1TextBox.Location = new System.Drawing.Point(300, 83);
|
||||
this.auxSN1TextBox.Name = "auxSN1TextBox";
|
||||
this.auxSN1TextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.auxSN1TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxSN1Label
|
||||
//
|
||||
this.auxSN1Label.AutoSize = true;
|
||||
this.auxSN1Label.Location = new System.Drawing.Point(21, 86);
|
||||
this.auxSN1Label.Name = "auxSN1Label";
|
||||
this.auxSN1Label.Size = new System.Drawing.Size(193, 23);
|
||||
this.auxSN1Label.TabIndex = 2;
|
||||
this.auxSN1Label.Text = "Aux. WM Serial Nr.";
|
||||
//
|
||||
// mainSN1TextBox
|
||||
//
|
||||
this.mainSN1TextBox.Location = new System.Drawing.Point(300, 37);
|
||||
this.mainSN1TextBox.Name = "mainSN1TextBox";
|
||||
this.mainSN1TextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.mainSN1TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainSN1Label
|
||||
//
|
||||
this.mainSN1Label.AutoSize = true;
|
||||
this.mainSN1Label.Location = new System.Drawing.Point(21, 40);
|
||||
this.mainSN1Label.Name = "mainSN1Label";
|
||||
this.mainSN1Label.Size = new System.Drawing.Size(195, 23);
|
||||
this.mainSN1Label.TabIndex = 0;
|
||||
this.mainSN1Label.Text = "Main WM Serial Nr.";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.auxSN2TextBox);
|
||||
this.groupBox2.Controls.Add(this.auxSN2Label);
|
||||
this.groupBox2.Controls.Add(this.mainSN2TextBox);
|
||||
this.groupBox2.Controls.Add(this.mainSN2Label);
|
||||
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(28, 175);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(494, 137);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Water Meter 2";
|
||||
//
|
||||
// auxSN2TextBox
|
||||
//
|
||||
this.auxSN2TextBox.Location = new System.Drawing.Point(300, 83);
|
||||
this.auxSN2TextBox.Name = "auxSN2TextBox";
|
||||
this.auxSN2TextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.auxSN2TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxSN2Label
|
||||
//
|
||||
this.auxSN2Label.AutoSize = true;
|
||||
this.auxSN2Label.Location = new System.Drawing.Point(21, 86);
|
||||
this.auxSN2Label.Name = "auxSN2Label";
|
||||
this.auxSN2Label.Size = new System.Drawing.Size(193, 23);
|
||||
this.auxSN2Label.TabIndex = 2;
|
||||
this.auxSN2Label.Text = "Aux. WM Serial Nr.";
|
||||
//
|
||||
// mainSN2TextBox
|
||||
//
|
||||
this.mainSN2TextBox.Location = new System.Drawing.Point(300, 37);
|
||||
this.mainSN2TextBox.Name = "mainSN2TextBox";
|
||||
this.mainSN2TextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.mainSN2TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainSN2Label
|
||||
//
|
||||
this.mainSN2Label.AutoSize = true;
|
||||
this.mainSN2Label.Location = new System.Drawing.Point(21, 40);
|
||||
this.mainSN2Label.Name = "mainSN2Label";
|
||||
this.mainSN2Label.Size = new System.Drawing.Size(195, 23);
|
||||
this.mainSN2Label.TabIndex = 0;
|
||||
this.mainSN2Label.Text = "Main WM Serial Nr.";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.auxSN3TextBox);
|
||||
this.groupBox3.Controls.Add(this.auxSN3Label);
|
||||
this.groupBox3.Controls.Add(this.mainSN3TextBox);
|
||||
this.groupBox3.Controls.Add(this.mainSN3Label);
|
||||
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(28, 330);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(494, 137);
|
||||
this.groupBox3.TabIndex = 3;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Water Meter 3";
|
||||
//
|
||||
// auxSN3TextBox
|
||||
//
|
||||
this.auxSN3TextBox.Location = new System.Drawing.Point(300, 83);
|
||||
this.auxSN3TextBox.Name = "auxSN3TextBox";
|
||||
this.auxSN3TextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.auxSN3TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxSN3Label
|
||||
//
|
||||
this.auxSN3Label.AutoSize = true;
|
||||
this.auxSN3Label.Location = new System.Drawing.Point(21, 86);
|
||||
this.auxSN3Label.Name = "auxSN3Label";
|
||||
this.auxSN3Label.Size = new System.Drawing.Size(193, 23);
|
||||
this.auxSN3Label.TabIndex = 2;
|
||||
this.auxSN3Label.Text = "Aux. WM Serial Nr.";
|
||||
//
|
||||
// mainSN3TextBox
|
||||
//
|
||||
this.mainSN3TextBox.Location = new System.Drawing.Point(300, 37);
|
||||
this.mainSN3TextBox.Name = "mainSN3TextBox";
|
||||
this.mainSN3TextBox.Size = new System.Drawing.Size(163, 31);
|
||||
this.mainSN3TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainSN3Label
|
||||
//
|
||||
this.mainSN3Label.AutoSize = true;
|
||||
this.mainSN3Label.Location = new System.Drawing.Point(21, 40);
|
||||
this.mainSN3Label.Name = "mainSN3Label";
|
||||
this.mainSN3Label.Size = new System.Drawing.Size(195, 23);
|
||||
this.mainSN3Label.TabIndex = 0;
|
||||
this.mainSN3Label.Text = "Main WM Serial Nr.";
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.ClientSize = new System.Drawing.Size(687, 492);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.Text = "Daten";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label mainSN1Label;
|
||||
private System.Windows.Forms.TextBox mainSN1TextBox;
|
||||
private System.Windows.Forms.TextBox auxSN1TextBox;
|
||||
private System.Windows.Forms.Label auxSN1Label;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox auxSN2TextBox;
|
||||
private System.Windows.Forms.Label auxSN2Label;
|
||||
private System.Windows.Forms.TextBox mainSN2TextBox;
|
||||
private System.Windows.Forms.Label mainSN2Label;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.TextBox auxSN3TextBox;
|
||||
private System.Windows.Forms.Label auxSN3Label;
|
||||
private System.Windows.Forms.TextBox mainSN3TextBox;
|
||||
private System.Windows.Forms.Label mainSN3Label;
|
||||
}
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
#pragma warning disable 162 /// Disables 'Unreachable code detected' warning
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public partial class CycleBeginningForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleBeginningForm));
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public string[] MainSNText;
|
||||
public string[] AuxSNText;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
public CycleBeginningForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
MainSNText = new string[Config.Data.CompoundWMsCount];
|
||||
AuxSNText = new string[Config.Data.CompoundWMsCount];
|
||||
completed = false;
|
||||
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
private void CycleBeginningForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
if (Config.Data.CompoundWMsCount < 2)
|
||||
{
|
||||
groupBox2.Visible = groupBox3.Visible = false;
|
||||
Height = 200;
|
||||
}
|
||||
else if (Config.Data.CompoundWMsCount < 3)
|
||||
{
|
||||
groupBox3.Visible = false;
|
||||
Height = 355;
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
|
||||
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("{0} {1}", Strings.Water_Meter, 2);
|
||||
mainSN2Label.Text = Strings.Main_WM_SerialNr;
|
||||
auxSN2Label.Text = Strings.Aux_WM_SerialNr;
|
||||
|
||||
groupBox3.Text = string.Format("{0} {1}", Strings.Water_Meter, 3);
|
||||
mainSN3Label.Text = Strings.Main_WM_SerialNr;
|
||||
auxSN3Label.Text = Strings.Aux_WM_SerialNr;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainSNText[0] = mainSN1TextBox.Text;
|
||||
AuxSNText[0] = auxSN1TextBox.Text;
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 2)
|
||||
{
|
||||
MainSNText[1] = mainSN2TextBox.Text;
|
||||
AuxSNText[1] = auxSN2TextBox.Text;
|
||||
}
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 3)
|
||||
{
|
||||
MainSNText[2] = mainSN3TextBox.Text;
|
||||
AuxSNText[2] = auxSN3TextBox.Text;
|
||||
}
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
#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);
|
||||
};
|
||||
}
|
||||
|
||||
void OnForceClose(object sender, EventArgs args)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,201 +0,0 @@
|
||||
<?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="groupBox1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN1TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN1TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN1TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN1TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN1Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="groupBox2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN2TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN2TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN2TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN2TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN2Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="groupBox3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN3TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN3TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN3TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="auxSN3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN3TextBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="mainSN3Label.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,526 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
partial class CycleEndForm
|
||||
{
|
||||
/// <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.mainState1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState1Label = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.yearOfProduction1Label = new System.Windows.Forms.Label();
|
||||
this.yearOfProduction1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qFall1Label = new System.Windows.Forms.Label();
|
||||
this.qFall1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qRise1Label = new System.Windows.Forms.Label();
|
||||
this.qRise1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxState1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxState1Label = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.protocolGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.radioButton4 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton3 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.yearOfProduction2Label = new System.Windows.Forms.Label();
|
||||
this.yearOfProduction2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qFall2Label = new System.Windows.Forms.Label();
|
||||
this.qFall2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qRise2Label = new System.Windows.Forms.Label();
|
||||
this.qRise2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState2Label = new System.Windows.Forms.Label();
|
||||
this.auxState2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxState2Label = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.yearOfProduction3Label = new System.Windows.Forms.Label();
|
||||
this.yearOfProduction3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qFall3Label = new System.Windows.Forms.Label();
|
||||
this.qFall3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.qRise3Label = new System.Windows.Forms.Label();
|
||||
this.qRise3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.mainState3Label = new System.Windows.Forms.Label();
|
||||
this.auxState3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.auxState3Label = new System.Windows.Forms.Label();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.protocolGroupBox.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// mainState1TextBox
|
||||
//
|
||||
this.mainState1TextBox.Location = new System.Drawing.Point(211, 34);
|
||||
this.mainState1TextBox.Name = "mainState1TextBox";
|
||||
this.mainState1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.mainState1TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainState1Label
|
||||
//
|
||||
this.mainState1Label.AutoSize = true;
|
||||
this.mainState1Label.Location = new System.Drawing.Point(18, 37);
|
||||
this.mainState1Label.Name = "mainState1Label";
|
||||
this.mainState1Label.Size = new System.Drawing.Size(153, 23);
|
||||
this.mainState1Label.TabIndex = 0;
|
||||
this.mainState1Label.Text = "Main WM State";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.yearOfProduction1Label);
|
||||
this.groupBox1.Controls.Add(this.yearOfProduction1TextBox);
|
||||
this.groupBox1.Controls.Add(this.qFall1Label);
|
||||
this.groupBox1.Controls.Add(this.qFall1TextBox);
|
||||
this.groupBox1.Controls.Add(this.qRise1Label);
|
||||
this.groupBox1.Controls.Add(this.qRise1TextBox);
|
||||
this.groupBox1.Controls.Add(this.mainState1TextBox);
|
||||
this.groupBox1.Controls.Add(this.mainState1Label);
|
||||
this.groupBox1.Controls.Add(this.auxState1TextBox);
|
||||
this.groupBox1.Controls.Add(this.auxState1Label);
|
||||
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, 23);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(375, 237);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Water Meter 1";
|
||||
//
|
||||
// yearOfProduction1Label
|
||||
//
|
||||
this.yearOfProduction1Label.AutoSize = true;
|
||||
this.yearOfProduction1Label.Location = new System.Drawing.Point(18, 197);
|
||||
this.yearOfProduction1Label.Name = "yearOfProduction1Label";
|
||||
this.yearOfProduction1Label.Size = new System.Drawing.Size(188, 23);
|
||||
this.yearOfProduction1Label.TabIndex = 8;
|
||||
this.yearOfProduction1Label.Text = "Year of production";
|
||||
//
|
||||
// yearOfProduction1TextBox
|
||||
//
|
||||
this.yearOfProduction1TextBox.Location = new System.Drawing.Point(211, 190);
|
||||
this.yearOfProduction1TextBox.Name = "yearOfProduction1TextBox";
|
||||
this.yearOfProduction1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.yearOfProduction1TextBox.TabIndex = 9;
|
||||
//
|
||||
// qFall1Label
|
||||
//
|
||||
this.qFall1Label.AutoSize = true;
|
||||
this.qFall1Label.Location = new System.Drawing.Point(18, 158);
|
||||
this.qFall1Label.Name = "qFall1Label";
|
||||
this.qFall1Label.Size = new System.Drawing.Size(55, 23);
|
||||
this.qFall1Label.TabIndex = 6;
|
||||
this.qFall1Label.Text = "Qfall";
|
||||
//
|
||||
// qFall1TextBox
|
||||
//
|
||||
this.qFall1TextBox.Location = new System.Drawing.Point(211, 151);
|
||||
this.qFall1TextBox.Name = "qFall1TextBox";
|
||||
this.qFall1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qFall1TextBox.TabIndex = 7;
|
||||
//
|
||||
// qRise1Label
|
||||
//
|
||||
this.qRise1Label.AutoSize = true;
|
||||
this.qRise1Label.Location = new System.Drawing.Point(18, 115);
|
||||
this.qRise1Label.Name = "qRise1Label";
|
||||
this.qRise1Label.Size = new System.Drawing.Size(60, 23);
|
||||
this.qRise1Label.TabIndex = 4;
|
||||
this.qRise1Label.Text = "Qrise";
|
||||
//
|
||||
// qRise1TextBox
|
||||
//
|
||||
this.qRise1TextBox.Location = new System.Drawing.Point(211, 112);
|
||||
this.qRise1TextBox.Name = "qRise1TextBox";
|
||||
this.qRise1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qRise1TextBox.TabIndex = 5;
|
||||
//
|
||||
// auxState1TextBox
|
||||
//
|
||||
this.auxState1TextBox.Location = new System.Drawing.Point(211, 73);
|
||||
this.auxState1TextBox.Name = "auxState1TextBox";
|
||||
this.auxState1TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.auxState1TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxState1Label
|
||||
//
|
||||
this.auxState1Label.AutoSize = true;
|
||||
this.auxState1Label.Location = new System.Drawing.Point(18, 76);
|
||||
this.auxState1Label.Name = "auxState1Label";
|
||||
this.auxState1Label.Size = new System.Drawing.Size(151, 23);
|
||||
this.auxState1Label.TabIndex = 2;
|
||||
this.auxState1Label.Text = "Aux. WM State";
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.okButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.okButton.Location = new System.Drawing.Point(699, 23);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(98, 55);
|
||||
this.okButton.TabIndex = 0;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// protocolGroupBox
|
||||
//
|
||||
this.protocolGroupBox.Controls.Add(this.radioButton4);
|
||||
this.protocolGroupBox.Controls.Add(this.radioButton3);
|
||||
this.protocolGroupBox.Controls.Add(this.radioButton2);
|
||||
this.protocolGroupBox.Controls.Add(this.radioButton1);
|
||||
this.protocolGroupBox.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.protocolGroupBox.Location = new System.Drawing.Point(422, 87);
|
||||
this.protocolGroupBox.Name = "protocolGroupBox";
|
||||
this.protocolGroupBox.Size = new System.Drawing.Size(375, 173);
|
||||
this.protocolGroupBox.TabIndex = 4;
|
||||
this.protocolGroupBox.TabStop = false;
|
||||
this.protocolGroupBox.Text = "Protocol";
|
||||
//
|
||||
// radioButton4
|
||||
//
|
||||
this.radioButton4.AutoSize = true;
|
||||
this.radioButton4.Location = new System.Drawing.Point(34, 133);
|
||||
this.radioButton4.Name = "radioButton4";
|
||||
this.radioButton4.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton4.TabIndex = 3;
|
||||
this.radioButton4.Text = "radioButton4";
|
||||
this.radioButton4.UseVisualStyleBackColor = true;
|
||||
this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged);
|
||||
//
|
||||
// radioButton3
|
||||
//
|
||||
this.radioButton3.AutoSize = true;
|
||||
this.radioButton3.Location = new System.Drawing.Point(34, 100);
|
||||
this.radioButton3.Name = "radioButton3";
|
||||
this.radioButton3.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton3.TabIndex = 2;
|
||||
this.radioButton3.Text = "radioButton3";
|
||||
this.radioButton3.UseVisualStyleBackColor = true;
|
||||
this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(34, 67);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton2.TabIndex = 1;
|
||||
this.radioButton2.Text = "radioButton2";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Checked = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(34, 34);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(152, 27);
|
||||
this.radioButton1.TabIndex = 0;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "radioButton1";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.yearOfProduction2Label);
|
||||
this.groupBox2.Controls.Add(this.yearOfProduction2TextBox);
|
||||
this.groupBox2.Controls.Add(this.qFall2Label);
|
||||
this.groupBox2.Controls.Add(this.qFall2TextBox);
|
||||
this.groupBox2.Controls.Add(this.qRise2Label);
|
||||
this.groupBox2.Controls.Add(this.qRise2TextBox);
|
||||
this.groupBox2.Controls.Add(this.mainState2TextBox);
|
||||
this.groupBox2.Controls.Add(this.mainState2Label);
|
||||
this.groupBox2.Controls.Add(this.auxState2TextBox);
|
||||
this.groupBox2.Controls.Add(this.auxState2Label);
|
||||
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, 282);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(375, 237);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Water Meter 2";
|
||||
//
|
||||
// yearOfProduction2Label
|
||||
//
|
||||
this.yearOfProduction2Label.AutoSize = true;
|
||||
this.yearOfProduction2Label.Location = new System.Drawing.Point(18, 197);
|
||||
this.yearOfProduction2Label.Name = "yearOfProduction2Label";
|
||||
this.yearOfProduction2Label.Size = new System.Drawing.Size(188, 23);
|
||||
this.yearOfProduction2Label.TabIndex = 8;
|
||||
this.yearOfProduction2Label.Text = "Year of production";
|
||||
//
|
||||
// yearOfProduction2TextBox
|
||||
//
|
||||
this.yearOfProduction2TextBox.Location = new System.Drawing.Point(211, 190);
|
||||
this.yearOfProduction2TextBox.Name = "yearOfProduction2TextBox";
|
||||
this.yearOfProduction2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.yearOfProduction2TextBox.TabIndex = 9;
|
||||
//
|
||||
// qFall2Label
|
||||
//
|
||||
this.qFall2Label.AutoSize = true;
|
||||
this.qFall2Label.Location = new System.Drawing.Point(18, 158);
|
||||
this.qFall2Label.Name = "qFall2Label";
|
||||
this.qFall2Label.Size = new System.Drawing.Size(55, 23);
|
||||
this.qFall2Label.TabIndex = 6;
|
||||
this.qFall2Label.Text = "Qfall";
|
||||
//
|
||||
// qFall2TextBox
|
||||
//
|
||||
this.qFall2TextBox.Location = new System.Drawing.Point(211, 151);
|
||||
this.qFall2TextBox.Name = "qFall2TextBox";
|
||||
this.qFall2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qFall2TextBox.TabIndex = 7;
|
||||
//
|
||||
// qRise2Label
|
||||
//
|
||||
this.qRise2Label.AutoSize = true;
|
||||
this.qRise2Label.Location = new System.Drawing.Point(18, 115);
|
||||
this.qRise2Label.Name = "qRise2Label";
|
||||
this.qRise2Label.Size = new System.Drawing.Size(60, 23);
|
||||
this.qRise2Label.TabIndex = 4;
|
||||
this.qRise2Label.Text = "Qrise";
|
||||
//
|
||||
// qRise2TextBox
|
||||
//
|
||||
this.qRise2TextBox.Location = new System.Drawing.Point(211, 112);
|
||||
this.qRise2TextBox.Name = "qRise2TextBox";
|
||||
this.qRise2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qRise2TextBox.TabIndex = 5;
|
||||
//
|
||||
// mainState2TextBox
|
||||
//
|
||||
this.mainState2TextBox.Location = new System.Drawing.Point(211, 34);
|
||||
this.mainState2TextBox.Name = "mainState2TextBox";
|
||||
this.mainState2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.mainState2TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainState2Label
|
||||
//
|
||||
this.mainState2Label.AutoSize = true;
|
||||
this.mainState2Label.Location = new System.Drawing.Point(17, 37);
|
||||
this.mainState2Label.Name = "mainState2Label";
|
||||
this.mainState2Label.Size = new System.Drawing.Size(153, 23);
|
||||
this.mainState2Label.TabIndex = 0;
|
||||
this.mainState2Label.Text = "Main WM State";
|
||||
//
|
||||
// auxState2TextBox
|
||||
//
|
||||
this.auxState2TextBox.Location = new System.Drawing.Point(211, 73);
|
||||
this.auxState2TextBox.Name = "auxState2TextBox";
|
||||
this.auxState2TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.auxState2TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxState2Label
|
||||
//
|
||||
this.auxState2Label.AutoSize = true;
|
||||
this.auxState2Label.Location = new System.Drawing.Point(18, 76);
|
||||
this.auxState2Label.Name = "auxState2Label";
|
||||
this.auxState2Label.Size = new System.Drawing.Size(151, 23);
|
||||
this.auxState2Label.TabIndex = 2;
|
||||
this.auxState2Label.Text = "Aux. WM State";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.yearOfProduction3Label);
|
||||
this.groupBox3.Controls.Add(this.yearOfProduction3TextBox);
|
||||
this.groupBox3.Controls.Add(this.qFall3Label);
|
||||
this.groupBox3.Controls.Add(this.qFall3TextBox);
|
||||
this.groupBox3.Controls.Add(this.qRise3Label);
|
||||
this.groupBox3.Controls.Add(this.qRise3TextBox);
|
||||
this.groupBox3.Controls.Add(this.mainState3TextBox);
|
||||
this.groupBox3.Controls.Add(this.mainState3Label);
|
||||
this.groupBox3.Controls.Add(this.auxState3TextBox);
|
||||
this.groupBox3.Controls.Add(this.auxState3Label);
|
||||
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(422, 282);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(375, 237);
|
||||
this.groupBox3.TabIndex = 3;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Water Meter 3";
|
||||
//
|
||||
// yearOfProduction3Label
|
||||
//
|
||||
this.yearOfProduction3Label.AutoSize = true;
|
||||
this.yearOfProduction3Label.Location = new System.Drawing.Point(18, 197);
|
||||
this.yearOfProduction3Label.Name = "yearOfProduction3Label";
|
||||
this.yearOfProduction3Label.Size = new System.Drawing.Size(188, 23);
|
||||
this.yearOfProduction3Label.TabIndex = 8;
|
||||
this.yearOfProduction3Label.Text = "Year of production";
|
||||
//
|
||||
// yearOfProduction3TextBox
|
||||
//
|
||||
this.yearOfProduction3TextBox.Location = new System.Drawing.Point(211, 190);
|
||||
this.yearOfProduction3TextBox.Name = "yearOfProduction3TextBox";
|
||||
this.yearOfProduction3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.yearOfProduction3TextBox.TabIndex = 9;
|
||||
//
|
||||
// qFall3Label
|
||||
//
|
||||
this.qFall3Label.AutoSize = true;
|
||||
this.qFall3Label.Location = new System.Drawing.Point(18, 158);
|
||||
this.qFall3Label.Name = "qFall3Label";
|
||||
this.qFall3Label.Size = new System.Drawing.Size(55, 23);
|
||||
this.qFall3Label.TabIndex = 6;
|
||||
this.qFall3Label.Text = "Qfall";
|
||||
//
|
||||
// qFall3TextBox
|
||||
//
|
||||
this.qFall3TextBox.Location = new System.Drawing.Point(211, 151);
|
||||
this.qFall3TextBox.Name = "qFall3TextBox";
|
||||
this.qFall3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qFall3TextBox.TabIndex = 7;
|
||||
//
|
||||
// qRise3Label
|
||||
//
|
||||
this.qRise3Label.AutoSize = true;
|
||||
this.qRise3Label.Location = new System.Drawing.Point(18, 115);
|
||||
this.qRise3Label.Name = "qRise3Label";
|
||||
this.qRise3Label.Size = new System.Drawing.Size(60, 23);
|
||||
this.qRise3Label.TabIndex = 4;
|
||||
this.qRise3Label.Text = "Qrise";
|
||||
//
|
||||
// qRise3TextBox
|
||||
//
|
||||
this.qRise3TextBox.Location = new System.Drawing.Point(211, 112);
|
||||
this.qRise3TextBox.Name = "qRise3TextBox";
|
||||
this.qRise3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.qRise3TextBox.TabIndex = 5;
|
||||
//
|
||||
// mainState3TextBox
|
||||
//
|
||||
this.mainState3TextBox.Location = new System.Drawing.Point(211, 34);
|
||||
this.mainState3TextBox.Name = "mainState3TextBox";
|
||||
this.mainState3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.mainState3TextBox.TabIndex = 1;
|
||||
//
|
||||
// mainState3Label
|
||||
//
|
||||
this.mainState3Label.AutoSize = true;
|
||||
this.mainState3Label.Location = new System.Drawing.Point(18, 37);
|
||||
this.mainState3Label.Name = "mainState3Label";
|
||||
this.mainState3Label.Size = new System.Drawing.Size(153, 23);
|
||||
this.mainState3Label.TabIndex = 0;
|
||||
this.mainState3Label.Text = "Main WM State";
|
||||
//
|
||||
// auxState3TextBox
|
||||
//
|
||||
this.auxState3TextBox.Location = new System.Drawing.Point(211, 73);
|
||||
this.auxState3TextBox.Name = "auxState3TextBox";
|
||||
this.auxState3TextBox.Size = new System.Drawing.Size(135, 31);
|
||||
this.auxState3TextBox.TabIndex = 3;
|
||||
//
|
||||
// auxState3Label
|
||||
//
|
||||
this.auxState3Label.AutoSize = true;
|
||||
this.auxState3Label.Location = new System.Drawing.Point(18, 76);
|
||||
this.auxState3Label.Name = "auxState3Label";
|
||||
this.auxState3Label.Size = new System.Drawing.Size(151, 23);
|
||||
this.auxState3Label.TabIndex = 2;
|
||||
this.auxState3Label.Text = "Aux. WM State";
|
||||
//
|
||||
// CycleEndForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.ClientSize = new System.Drawing.Size(822, 542);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.protocolGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleEndForm";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Text = "Daten";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleEndForm_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.protocolGroupBox.ResumeLayout(false);
|
||||
this.protocolGroupBox.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox mainState1TextBox;
|
||||
private System.Windows.Forms.Label mainState1Label;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox auxState1TextBox;
|
||||
private System.Windows.Forms.Label auxState1Label;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox protocolGroupBox;
|
||||
private System.Windows.Forms.RadioButton radioButton3;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.Label qFall1Label;
|
||||
private System.Windows.Forms.TextBox qFall1TextBox;
|
||||
private System.Windows.Forms.Label qRise1Label;
|
||||
private System.Windows.Forms.TextBox qRise1TextBox;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.Label qFall2Label;
|
||||
private System.Windows.Forms.TextBox qFall2TextBox;
|
||||
private System.Windows.Forms.Label qRise2Label;
|
||||
private System.Windows.Forms.TextBox qRise2TextBox;
|
||||
private System.Windows.Forms.TextBox mainState2TextBox;
|
||||
private System.Windows.Forms.Label mainState2Label;
|
||||
private System.Windows.Forms.TextBox auxState2TextBox;
|
||||
private System.Windows.Forms.Label auxState2Label;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.Label qFall3Label;
|
||||
private System.Windows.Forms.TextBox qFall3TextBox;
|
||||
private System.Windows.Forms.Label qRise3Label;
|
||||
private System.Windows.Forms.TextBox qRise3TextBox;
|
||||
private System.Windows.Forms.TextBox mainState3TextBox;
|
||||
private System.Windows.Forms.Label mainState3Label;
|
||||
private System.Windows.Forms.TextBox auxState3TextBox;
|
||||
private System.Windows.Forms.Label auxState3Label;
|
||||
private System.Windows.Forms.RadioButton radioButton4;
|
||||
private System.Windows.Forms.Label yearOfProduction1Label;
|
||||
private System.Windows.Forms.TextBox yearOfProduction1TextBox;
|
||||
private System.Windows.Forms.Label yearOfProduction2Label;
|
||||
private System.Windows.Forms.TextBox yearOfProduction2TextBox;
|
||||
private System.Windows.Forms.Label yearOfProduction3Label;
|
||||
private System.Windows.Forms.TextBox yearOfProduction3TextBox;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,206 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
#pragma warning disable 162 /// Disables 'Unreachable code detected' warning
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public partial class CycleEndForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleEndForm));
|
||||
|
||||
// To be set before the form opens
|
||||
public string ProtocolName1;
|
||||
public string ProtocolName2;
|
||||
public string ProtocolName3;
|
||||
public string ProtocolName4;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public string ProtocolTitle;
|
||||
public string[] MainStateText;
|
||||
public string[] AuxStateText;
|
||||
public float[] QRise;
|
||||
public float[] QFall;
|
||||
public int[] YearOfProduction;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
public CycleEndForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
MainStateText = new string[Config.Data.CompoundWMsCount];
|
||||
AuxStateText = new string[Config.Data.CompoundWMsCount];
|
||||
QRise = new float[Config.Data.CompoundWMsCount];
|
||||
QFall = new float[Config.Data.CompoundWMsCount];
|
||||
YearOfProduction = new int[Config.Data.CompoundWMsCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
protocolGroupBox.Text = Strings.Protocol;
|
||||
groupBox1.Text = Strings.Water_Meter + " 1";
|
||||
mainState1Label.Text = Strings.Main_Water_Meter_State;
|
||||
auxState1Label.Text = Strings.Aux_Water_Meter_State;
|
||||
qRise1Label.Text = Strings.Qrise;
|
||||
qFall1Label.Text = Strings.Qfall;
|
||||
yearOfProduction1Label.Text = Strings.Year_of_production;
|
||||
|
||||
groupBox2.Text = Strings.Water_Meter + " 2";
|
||||
mainState2Label.Text = Strings.Main_Water_Meter_State;
|
||||
auxState2Label.Text = Strings.Aux_Water_Meter_State;
|
||||
qRise2Label.Text = Strings.Qrise;
|
||||
qFall2Label.Text = Strings.Qfall;
|
||||
yearOfProduction2Label.Text = Strings.Year_of_production;
|
||||
|
||||
groupBox3.Text = Strings.Water_Meter + " 3";
|
||||
mainState3Label.Text = Strings.Main_Water_Meter_State;
|
||||
auxState3Label.Text = Strings.Aux_Water_Meter_State;
|
||||
qRise3Label.Text = Strings.Qrise;
|
||||
qFall3Label.Text = Strings.Qfall;
|
||||
yearOfProduction3Label.Text = Strings.Year_of_production;
|
||||
|
||||
AnyRadioButtonChanged();
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
radioButton1.Text = ProtocolName1;
|
||||
radioButton2.Text = ProtocolName2;
|
||||
radioButton3.Text = ProtocolName3;
|
||||
radioButton4.Text = ProtocolName4;
|
||||
|
||||
if (Sequences.ProcessData.BatchRslts.Batch.WaterMeters.Count >= 1 && !Sequences.ProcessData.BatchRslts.Batch.WaterMeters[0].Disabled)
|
||||
{
|
||||
qRise1TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.Batch.WaterMeters[0].QRise, 3);
|
||||
qFall1TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.Batch.WaterMeters[0].QFall, 3);
|
||||
YearOfProduction[0] = Sequences.ProcessData.BatchRslts.Batch.WaterMeters[0].YearOfProduction;
|
||||
yearOfProduction1TextBox.Text = YearOfProduction[0].ToString();
|
||||
}
|
||||
|
||||
if (Sequences.ProcessData.BatchRslts.Batch.WaterMeters.Count >= 2 && !Sequences.ProcessData.BatchRslts.Batch.WaterMeters[1].Disabled)
|
||||
{
|
||||
qRise2TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.Batch.WaterMeters[1].QRise, 3);
|
||||
qFall2TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.Batch.WaterMeters[1].QFall, 3);
|
||||
YearOfProduction[1] = Sequences.ProcessData.BatchRslts.Batch.WaterMeters[1].YearOfProduction;
|
||||
yearOfProduction2TextBox.Text = YearOfProduction[1].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
groupBox2.Visible = false;
|
||||
Height = 305;
|
||||
}
|
||||
|
||||
if (Sequences.ProcessData.BatchRslts.Batch.WaterMeters.Count >= 3 && !Sequences.ProcessData.BatchRslts.Batch.WaterMeters[2].Disabled)
|
||||
{
|
||||
qRise3TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.Batch.WaterMeters[2].QRise, 3);
|
||||
qFall3TextBox.Text = Utils.DoubleToStr(Sequences.ProcessData.BatchRslts.Batch.WaterMeters[2].QFall, 3);
|
||||
YearOfProduction[2] = Sequences.ProcessData.BatchRslts.Batch.WaterMeters[2].YearOfProduction;
|
||||
yearOfProduction3TextBox.Text = YearOfProduction[2].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
groupBox3.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
float ftmp;
|
||||
int year;
|
||||
bool allOK = true;
|
||||
|
||||
MainStateText[0] = mainState1TextBox.Text;
|
||||
AuxStateText[0] = auxState1TextBox.Text;
|
||||
if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; }
|
||||
if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; }
|
||||
if (ShowYear() && int.TryParse(yearOfProduction1TextBox.Text, out year))
|
||||
{
|
||||
YearOfProduction[0] = year;
|
||||
}
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 2)
|
||||
{
|
||||
MainStateText[1] = mainState2TextBox.Text;
|
||||
AuxStateText[1] = auxState2TextBox.Text;
|
||||
if (Utils.TryParseUFloat(qRise2TextBox.Text, out ftmp)) { QRise[1] = ftmp; } else { allOK = false; }
|
||||
if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; }
|
||||
if (ShowYear() && int.TryParse(yearOfProduction2TextBox.Text, out year))
|
||||
{
|
||||
YearOfProduction[1] = year;
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 3)
|
||||
{
|
||||
MainStateText[2] = mainState3TextBox.Text;
|
||||
AuxStateText[2] = auxState3TextBox.Text;
|
||||
if (Utils.TryParseUFloat(qRise3TextBox.Text, out ftmp)) { QRise[2] = ftmp; } else { allOK = false; }
|
||||
if (Utils.TryParseUFloat(qFall3TextBox.Text, out ftmp)) { QFall[2] = ftmp; } else { allOK = false; }
|
||||
if (ShowYear() && int.TryParse(yearOfProduction3TextBox.Text, out year))
|
||||
{
|
||||
YearOfProduction[2] = year;
|
||||
}
|
||||
}
|
||||
|
||||
if (radioButton1.Checked) ProtocolTitle = ProtocolName1;
|
||||
else if (radioButton2.Checked) ProtocolTitle = ProtocolName2;
|
||||
else if (radioButton3.Checked) ProtocolTitle = ProtocolName3;
|
||||
else if (radioButton4.Checked) ProtocolTitle = ProtocolName4;
|
||||
|
||||
if (allOK)
|
||||
{
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
#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);
|
||||
};
|
||||
}
|
||||
|
||||
void OnForceClose(object sender, EventArgs args)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void radioButton1_CheckedChanged(object sender, EventArgs e) { AnyRadioButtonChanged(); }
|
||||
private void radioButton2_CheckedChanged(object sender, EventArgs e) { AnyRadioButtonChanged(); }
|
||||
private void radioButton3_CheckedChanged(object sender, EventArgs e) { AnyRadioButtonChanged(); }
|
||||
private void radioButton4_CheckedChanged(object sender, EventArgs e) { AnyRadioButtonChanged(); }
|
||||
|
||||
bool ShowYear()
|
||||
{
|
||||
return radioButton2.Checked || radioButton3.Checked || radioButton4.Checked;
|
||||
}
|
||||
|
||||
void AnyRadioButtonChanged()
|
||||
{
|
||||
yearOfProduction1TextBox.Visible = yearOfProduction2TextBox.Visible = yearOfProduction3TextBox.Visible =
|
||||
yearOfProduction1Label.Visible = yearOfProduction2Label.Visible = yearOfProduction3Label.Visible = ShowYear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
|
||||
{
|
||||
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>
|
||||
/// Properties set by the Begin and the End form
|
||||
/// </summary>
|
||||
string[] serialNr;
|
||||
public string SerialNr(int wmNr) { return (wmNr >= 0 && wmNr < serialNr.Length) ? serialNr[wmNr] : string.Empty; }
|
||||
|
||||
public bool Disabled(int wmNr) { return false; } /// Not supported in Munich
|
||||
|
||||
string[] wmEndState;
|
||||
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : string.Empty; }
|
||||
|
||||
public float WMState(int wmNr)
|
||||
{
|
||||
float retVal;
|
||||
if (wmNr >= 0 && wmNr < wmEndState.Length && Utils.TryParseUFloat(wmEndState[wmNr], out retVal)) return retVal;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
IList<Results.Entities.WaterMeter> wMeters; /// Reference to ...ProcessData.BatchRslts.Batch.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
ShowFormAtCycleBeginning,
|
||||
ShowFormAtCycleEnd,
|
||||
}
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.CompoundWMsCount];
|
||||
wmEndState = new string[Config.Data.CompoundWMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.wMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<Results.Entities.WaterMeter> waterMeters)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.wMeters = waterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowWMSNsAndStatesFormOp()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
delegate void EntryFormDlgt(EntryForm myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm();
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryForm myRef)
|
||||
{
|
||||
CycleEndForm endForm = new CycleEndForm();
|
||||
endForm.ProtocolName1 = entryFormCfg.ProtocolTitle1;
|
||||
endForm.ProtocolName2 = entryFormCfg.ProtocolTitle2;
|
||||
endForm.ProtocolName3 = entryFormCfg.ProtocolTitle3;
|
||||
endForm.ProtocolName4 = entryFormCfg.ProtocolTitle4;
|
||||
myRef.modelessDlg = endForm;
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
resultSaved = false;
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
break;
|
||||
case CurrentOp.ShowFormAtCycleEnd:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
{
|
||||
return Event.ModelessFormIsOpen;
|
||||
}
|
||||
|
||||
if (!resultSaved) /// This is to save the result only once
|
||||
{
|
||||
int count = Math.Min(3, Math.Min(wMeters.Count, Config.Data.CompoundWMsCount));
|
||||
if (modelessDlg is CycleBeginningForm)
|
||||
{
|
||||
if (count >= 1 && wMeters[0] != null) wMeters[0].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[0];
|
||||
if (count >= 1 && wMeters[0] != null) wMeters[0].SerialNrAux = (modelessDlg as CycleBeginningForm).AuxSNText[0];
|
||||
if (count >= 2 && wMeters[1] != null) wMeters[1].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[1];
|
||||
if (count >= 2 && wMeters[1] != null) wMeters[1].SerialNrAux = (modelessDlg as CycleBeginningForm).AuxSNText[1];
|
||||
if (count >= 3 && wMeters[2] != null) wMeters[2].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[2];
|
||||
if (count >= 3 && wMeters[2] != null) wMeters[2].SerialNrAux = (modelessDlg as CycleBeginningForm).AuxSNText[2];
|
||||
}
|
||||
else if (modelessDlg is CycleEndForm)
|
||||
{
|
||||
Sequences.ProcessData.BatchRslts.Batch.ProtocolTitle = (modelessDlg as CycleEndForm).ProtocolTitle;
|
||||
|
||||
if (count >= 1 && wMeters[0] != null)
|
||||
{
|
||||
wMeters[0].EndState = (modelessDlg as CycleEndForm).MainStateText[0];
|
||||
wMeters[0].EndStateAux = (modelessDlg as CycleEndForm).AuxStateText[0];
|
||||
wMeters[0].QRise = (modelessDlg as CycleEndForm).QRise[0];
|
||||
wMeters[0].QFall = (modelessDlg as CycleEndForm).QFall[0];
|
||||
wMeters[0].YearOfProduction = (modelessDlg as CycleEndForm).YearOfProduction[0];
|
||||
}
|
||||
if (count >= 2 && wMeters[1] != null)
|
||||
{
|
||||
wMeters[1].EndState = (modelessDlg as CycleEndForm).MainStateText[1];
|
||||
wMeters[1].EndStateAux = (modelessDlg as CycleEndForm).AuxStateText[1];
|
||||
wMeters[1].QRise = (modelessDlg as CycleEndForm).QRise[1];
|
||||
wMeters[1].QFall = (modelessDlg as CycleEndForm).QFall[1];
|
||||
wMeters[1].YearOfProduction = (modelessDlg as CycleEndForm).YearOfProduction[1];
|
||||
}
|
||||
if (count >= 3 && wMeters[2] != null)
|
||||
{
|
||||
wMeters[2].EndState = (modelessDlg as CycleEndForm).MainStateText[2];
|
||||
wMeters[2].EndStateAux = (modelessDlg as CycleEndForm).AuxStateText[2];
|
||||
wMeters[2].QRise = (modelessDlg as CycleEndForm).QRise[2];
|
||||
wMeters[2].QFall = (modelessDlg as CycleEndForm).QFall[2];
|
||||
wMeters[2].YearOfProduction = (modelessDlg as CycleEndForm).YearOfProduction[2];
|
||||
}
|
||||
}
|
||||
resultSaved = true;
|
||||
modelessDlg = null;
|
||||
}
|
||||
|
||||
return Event.ModelessFormClosed; /// Form closed
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
if (modelessDlg is IHasCompleted)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null);
|
||||
modelessDlg = null;
|
||||
}
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string ProtocolTitle1;
|
||||
public string ProtocolTitle2;
|
||||
public string ProtocolTitle3;
|
||||
public string ProtocolTitle4;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
{
|
||||
Name = "DataEntryForm-Munich";
|
||||
ParentName = string.Empty;
|
||||
ProtocolTitle1 = "Protokoll 1";
|
||||
ProtocolTitle2 = "Protokoll 2";
|
||||
ProtocolTitle3 = "Protokoll 3";
|
||||
ProtocolTitle4 = "Protokoll 4";
|
||||
}
|
||||
|
||||
public EntryFormCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, P1={1}, P2={2}, P3={3}, P4={4}",
|
||||
Name,
|
||||
(string.IsNullOrEmpty(ProtocolTitle1) ? "-" : ProtocolTitle1),
|
||||
(string.IsNullOrEmpty(ProtocolTitle2) ? "-" : ProtocolTitle2),
|
||||
(string.IsNullOrEmpty(ProtocolTitle3) ? "-" : ProtocolTitle3),
|
||||
(string.IsNullOrEmpty(ProtocolTitle4) ? "-" : ProtocolTitle4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as EntryFormCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public EntryFormCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
protocolTitle1TextBox.Text = config.ProtocolTitle1;
|
||||
protocolTitle2TextBox.Text = config.ProtocolTitle2;
|
||||
protocolTitle3TextBox.Text = config.ProtocolTitle3;
|
||||
protocolTitle4TextBox.Text = config.ProtocolTitle4;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
protocolTitle1TextBox.Enabled = true;
|
||||
protocolTitle2TextBox.Enabled = true;
|
||||
protocolTitle3TextBox.Enabled = true;
|
||||
protocolTitle4TextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ProtocolTitle1 = protocolTitle1TextBox.Text;
|
||||
config.ProtocolTitle2 = protocolTitle2TextBox.Text;
|
||||
config.ProtocolTitle3 = protocolTitle3TextBox.Text;
|
||||
config.ProtocolTitle4 = protocolTitle4TextBox.Text;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
partial class EntryFormCfgCtrl
|
||||
{
|
||||
/// <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.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.protocolTitle1TextBox = new System.Windows.Forms.TextBox();
|
||||
this.protocolTitle2TextBox = new System.Windows.Forms.TextBox();
|
||||
this.protocolTitle3TextBox = new System.Windows.Forms.TextBox();
|
||||
this.protocolTitle4TextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(27, 86);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(74, 13);
|
||||
this.label1.TabIndex = 6;
|
||||
this.label1.Text = "Protocol title 1";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(27, 112);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(74, 13);
|
||||
this.label2.TabIndex = 7;
|
||||
this.label2.Text = "Protocol title 2";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(27, 138);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(74, 13);
|
||||
this.label3.TabIndex = 8;
|
||||
this.label3.Text = "Protocol title 3";
|
||||
//
|
||||
// protocolTitle1TextBox
|
||||
//
|
||||
this.protocolTitle1TextBox.Enabled = false;
|
||||
this.protocolTitle1TextBox.Location = new System.Drawing.Point(137, 83);
|
||||
this.protocolTitle1TextBox.Name = "protocolTitle1TextBox";
|
||||
this.protocolTitle1TextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.protocolTitle1TextBox.TabIndex = 9;
|
||||
//
|
||||
// protocolTitle2TextBox
|
||||
//
|
||||
this.protocolTitle2TextBox.Enabled = false;
|
||||
this.protocolTitle2TextBox.Location = new System.Drawing.Point(137, 109);
|
||||
this.protocolTitle2TextBox.Name = "protocolTitle2TextBox";
|
||||
this.protocolTitle2TextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.protocolTitle2TextBox.TabIndex = 10;
|
||||
//
|
||||
// protocolTitle3TextBox
|
||||
//
|
||||
this.protocolTitle3TextBox.Enabled = false;
|
||||
this.protocolTitle3TextBox.Location = new System.Drawing.Point(137, 135);
|
||||
this.protocolTitle3TextBox.Name = "protocolTitle3TextBox";
|
||||
this.protocolTitle3TextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.protocolTitle3TextBox.TabIndex = 11;
|
||||
//
|
||||
// protocolTitle4TextBox
|
||||
//
|
||||
this.protocolTitle4TextBox.Enabled = false;
|
||||
this.protocolTitle4TextBox.Location = new System.Drawing.Point(137, 161);
|
||||
this.protocolTitle4TextBox.Name = "protocolTitle4TextBox";
|
||||
this.protocolTitle4TextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.protocolTitle4TextBox.TabIndex = 13;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(27, 164);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(74, 13);
|
||||
this.label4.TabIndex = 12;
|
||||
this.label4.Text = "Protocol title 4";
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.protocolTitle4TextBox);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.protocolTitle3TextBox);
|
||||
this.Controls.Add(this.protocolTitle2TextBox);
|
||||
this.Controls.Add(this.protocolTitle1TextBox);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox protocolTitle1TextBox;
|
||||
private System.Windows.Forms.TextBox protocolTitle2TextBox;
|
||||
private System.Windows.Forms.TextBox protocolTitle3TextBox;
|
||||
private System.Windows.Forms.TextBox protocolTitle4TextBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public class EntryFormFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntryForm-Munich"; } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(EntryFormCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||