Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80f1a5aa18 | ||
|
|
edb26ccf6e | ||
|
|
2574ce1aee | ||
|
|
5586f58c6e | ||
|
|
138e436645 | ||
|
|
ea7e727798 | ||
|
|
7a40cfb1f2 | ||
|
|
b2226ad779 | ||
|
|
ebf96f655c | ||
|
|
4134bf8875 | ||
|
|
fd7149e263 | ||
|
|
a40b4ff606 | ||
|
|
86c063caee | ||
|
|
bea3c04eb7 | ||
|
|
c5644d6999 | ||
|
|
29c4c869f2 | ||
|
|
707c093f0c | ||
|
|
abaf756980 | ||
|
|
32873ee2b0 | ||
|
|
dd8273798a | ||
|
|
0dae18e5e8 | ||
|
|
17063518ce | ||
|
|
a4998521f5 | ||
|
|
d2df1a678f | ||
|
|
f6aa6ba2d6 | ||
|
|
82743bac05 | ||
|
|
30df663634 | ||
|
|
f8ac27ba3c | ||
|
|
88496cf003 | ||
|
|
4e2c4c3bac | ||
|
|
9bed5e6682 | ||
|
|
c6e1d672e5 | ||
|
|
8b2d01a5ac | ||
|
|
2037f8bbe7 | ||
|
|
772cfc8e29 | ||
|
|
1eebb3b4a1 | ||
|
|
550fe20094 | ||
|
|
25e6a04a98 | ||
|
|
ab8f550bb3 | ||
|
|
c59d2cf52c | ||
|
|
23c9fadf86 | ||
|
|
f5926259a7 | ||
|
|
f180af692f | ||
|
|
d3ca871eb5 | ||
|
|
58f046ca34 | ||
|
|
e1c4da482a | ||
|
|
b7a079515c | ||
|
|
5849984381 | ||
|
|
a75a7d0a4a | ||
|
|
4fa2159e61 | ||
|
|
3f3a01857b | ||
|
|
c37f15bae2 | ||
|
|
2bce044cba | ||
|
|
1937850814 | ||
|
|
1703c5dcc2 | ||
|
|
6b803444f0 | ||
|
|
76042756b1 | ||
|
|
2f3f67c82e | ||
|
|
97c041801f | ||
|
|
7d968ba9b4 | ||
|
|
d3cd831e03 |
@@ -0,0 +1,2 @@
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
+1
-1
@@ -20,7 +20,7 @@ namespace Config
|
||||
public const int CompoundWMsCount = 1;
|
||||
public const int HeatMetersCount = 0;
|
||||
public const int MaxPartNr = WMsCount / LineSize;
|
||||
#elif FUZHOU_300 || FUZHOU_150 || IZRAEL_200 || PUCHONG_200 || GENESIS || SLM_150 || PETERSBURG_200
|
||||
#elif FUZHOU_300 || FUZHOU_150 || IZRAEL_200 || PUCHONG_200 || GENESIS || SLM_150 || PETERSBURG_200 || DEWA_300
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 3;
|
||||
|
||||
@@ -224,6 +224,14 @@ namespace Config.Entities
|
||||
Count
|
||||
}
|
||||
|
||||
public enum MeretProtocol
|
||||
{
|
||||
[Description("<undefined>")] Undefined,
|
||||
[Description("Meret (obsolete)")] Meret,
|
||||
[Description("Modbus")] Modbus,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum Publish : sbyte
|
||||
{
|
||||
#if LANG_DE
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace Config.Entities
|
||||
Count
|
||||
}
|
||||
|
||||
public enum Counting
|
||||
{
|
||||
Arbitrary,
|
||||
Positive,
|
||||
Negative,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum OptoHeadState
|
||||
{
|
||||
Disabled,
|
||||
|
||||
+50
-16
@@ -25,8 +25,8 @@ namespace Config.Entities
|
||||
public virtual float Volume { get; set; } /// Test volume (target) in [l]
|
||||
public virtual float TstTime { get; set; } /// Test time (estimate) in [s]
|
||||
public virtual string Method { get; set; }
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] (usually < 0) or 1=class1, 2=class2, 3=class3
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] (usually > 0) or -Qn in m3/h
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] usually < 0, in case of heat meters: 1=class1, 2=class2, 3=class3
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] usually > 0, in case of heat meters: -Qn in m3/h
|
||||
public virtual float Uncertainty { get; set; } /// int [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual int Repeats { get; set; }
|
||||
public virtual bool DoDraining { get; set; }
|
||||
@@ -310,54 +310,88 @@ namespace Config.Entities
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual float GetErrLimLo(float flow)
|
||||
public virtual double GetErrLimLo(double volumeCTV, double testTime)
|
||||
{
|
||||
if (ErrLimLo <= ErrLimHi)
|
||||
{
|
||||
return ErrLimLo; /// Error limit of a water meter
|
||||
return ErrLimLo; /// Error limit of a water meter
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Metrological class and nominal flow of a heat meter
|
||||
int metrClass = (int)Math.Round(ErrLimLo);
|
||||
float Qp = Math.Abs(ErrLimHi);
|
||||
float Q = Math.Max(flow, 0.00001f); /// to avoid division by zero
|
||||
double Qp = Math.Abs(ErrLimHi);
|
||||
double Q = (testTime == 0) ? 1 : Math.Max(3.6 * volumeCTV / testTime, 0.00001); /// Div. by zero avoided
|
||||
|
||||
/// Calculate the error limit of a heat meter
|
||||
switch (metrClass)
|
||||
{
|
||||
default:
|
||||
case 1: return -Math.Min(3.5f, 1.0f + 0.01f * Qp / Q);
|
||||
case 2: return -Math.Min(5.0f, 2.0f + 0.02f * Qp / Q);
|
||||
case 3: return -Math.Min(5.0f, 3.0f + 0.05f * Qp / Q);
|
||||
case 1: return -Math.Min(3.5, 1.0 + 0.01 * Qp / Q);
|
||||
case 2: return -Math.Min(5.0, 2.0 + 0.02 * Qp / Q);
|
||||
case 3: return -Math.Min(5.0, 3.0 + 0.05 * Qp / Q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual float GetErrLimHi(float flow)
|
||||
public virtual double GetErrLimHi(double volumeCTV, double testTime)
|
||||
{
|
||||
if (ErrLimLo <= ErrLimHi)
|
||||
{
|
||||
return ErrLimHi; /// Error limit of a water meter
|
||||
return ErrLimHi; /// Error limit of a water meter
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Metrological class and nominal flow of a heat meter
|
||||
int metrClass = (int)Math.Round(ErrLimLo);
|
||||
float Qp = Math.Abs(ErrLimHi);
|
||||
float Q = Math.Max(flow, 0.00001f); /// to avoid division by zero
|
||||
double Qp = Math.Abs(ErrLimHi);
|
||||
double Q = (testTime == 0) ? 1 : Math.Max(3.6 * volumeCTV / testTime, 0.00001); /// Div. by zero avoided
|
||||
|
||||
/// Calculate the error limit of a heat meter
|
||||
switch (metrClass)
|
||||
{
|
||||
default:
|
||||
case 1: return +Math.Min(3.5f, 1.0f + 0.01f * Qp / Q);
|
||||
case 2: return +Math.Min(5.0f, 2.0f + 0.02f * Qp / Q);
|
||||
case 3: return +Math.Min(5.0f, 3.0f + 0.05f * Qp / Q);
|
||||
case 1: return +Math.Min(3.5, 1.0 + 0.01 * Qp / Q);
|
||||
case 2: return +Math.Min(5.0, 2.0 + 0.02 * Qp / Q);
|
||||
case 3: return +Math.Min(5.0, 3.0 + 0.05 * Qp / Q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsPartCompatible(int waterMeterPartNr)
|
||||
{
|
||||
if ((this.Part == 0) || (waterMeterPartNr == 0)) return true;
|
||||
|
||||
if ((this.Part % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 10) % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 100) % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 1000) % 10) == waterMeterPartNr) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether tests part number is OK.
|
||||
/// Examples of correct part number are:
|
||||
/// 1, 2, 12, 21 in case of max. part nr.== 2
|
||||
/// 1, 2, 3, 4, 12, 13, 14, 23, 24, 34, 123, 124, 134, 234, 1234 in case of max. part nr.== 4
|
||||
/// </summary>
|
||||
/// <param name="partNr">Tests par tnumber</param>
|
||||
/// <returns>true when Part number is OK</returns>
|
||||
public static bool IsGoodPartNr(int partNr)
|
||||
{
|
||||
bool firstDigitIsOK = ((partNr % 10) > 0) && ((partNr % 10) <= Config.Data.MaxPartNr);
|
||||
bool secondDigitIsOK = (((partNr/10) % 10) > 0) && (((partNr/10) % 10) <= Config.Data.MaxPartNr);
|
||||
bool thirdDigitIsOK = (((partNr/100) % 10) > 0) && (((partNr/100) % 10) <= Config.Data.MaxPartNr);
|
||||
bool fourthDigitIsOK = (((partNr/1000) % 10) > 0) && (((partNr/1000) % 10) <= Config.Data.MaxPartNr);
|
||||
|
||||
if (firstDigitIsOK && (partNr / 10 == 0)) return true;
|
||||
if (firstDigitIsOK && secondDigitIsOK && (partNr / 100 == 0)) return true;
|
||||
if (firstDigitIsOK && secondDigitIsOK && thirdDigitIsOK && (partNr / 1000 == 0)) return true;
|
||||
if (firstDigitIsOK && secondDigitIsOK && thirdDigitIsOK && fourthDigitIsOK && (partNr / 10000 == 0)) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
namespace Config.Entities
|
||||
{
|
||||
@@ -37,5 +40,56 @@ namespace Config.Entities
|
||||
foreach (var step in TransitionSteps) { result.TransitionSteps.Add(step.Clone()); }
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Export(StreamWriter output)
|
||||
{
|
||||
output.WriteLine(ItemNr.ToString(CultureInfo.InvariantCulture));
|
||||
output.WriteLine(Name);
|
||||
output.WriteLine(Description);
|
||||
|
||||
foreach (var step in TransitionSteps) { step.Export(output); }
|
||||
output.WriteLine();
|
||||
|
||||
output.Close();
|
||||
}
|
||||
|
||||
public static TransitionSequence Import(StreamReader input)
|
||||
{
|
||||
TransitionSequence result = new TransitionSequence();
|
||||
|
||||
result.ItemNr = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
|
||||
result.Name = input.ReadLine();
|
||||
result.Description = input.ReadLine();
|
||||
|
||||
while (true)
|
||||
{
|
||||
TransitionStep step = TransitionStep.Import(input, result);
|
||||
if (step == null)
|
||||
break;
|
||||
else
|
||||
result.TransitionSteps.Add(step);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual string Compare(StreamReader inp)
|
||||
{
|
||||
System.Text.StringBuilder diff = new System.Text.StringBuilder();
|
||||
const string fmt = "{0} = {1}\r\n (in the file {2})\r\n";
|
||||
string ln;
|
||||
|
||||
ln = inp.ReadLine(); /// skip ItemNr
|
||||
ln = inp.ReadLine(); if (ln != Name) { diff.AppendFormat(fmt, "Name", Name, ln); };
|
||||
ln = inp.ReadLine(); if (ln != Description) { diff.AppendFormat(fmt, "Description", Description, ln); };
|
||||
|
||||
//foreach (var step in TransitionSteps)
|
||||
//{
|
||||
// string testDiff = step.Compare(inp);
|
||||
// if (testDiff.Contains(
|
||||
//}
|
||||
|
||||
return diff.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015, 2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
namespace Config.Entities
|
||||
{
|
||||
@@ -61,5 +63,64 @@ namespace Config.Entities
|
||||
result += indent + "PumpsWithFMPct = " + PumpWithFMPcts + Environment.NewLine;
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual void Export(StreamWriter output)
|
||||
{
|
||||
CultureInfo ci = CultureInfo.InvariantCulture;
|
||||
|
||||
output.WriteLine(ItemNr.ToString(ci));
|
||||
output.WriteLine(Duration.ToString(ci));
|
||||
output.WriteLine(Message);
|
||||
output.WriteLine(EndCondition);
|
||||
output.WriteLine(ValvesOpen);
|
||||
output.WriteLine(ValvesClose);
|
||||
output.WriteLine(RegulValvesPct);
|
||||
output.WriteLine(PumpWithFMPcts);
|
||||
}
|
||||
|
||||
public static TransitionStep Import(StreamReader input, TransitionSequence newSequence)
|
||||
{
|
||||
string firstLine = input.ReadLine();
|
||||
if (string.IsNullOrEmpty(firstLine))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
CultureInfo ci = CultureInfo.InvariantCulture;
|
||||
int itemNr = int.Parse(firstLine, ci);
|
||||
TransitionStep tst = new TransitionStep(itemNr, newSequence);
|
||||
|
||||
tst.Duration = int.Parse(input.ReadLine(), ci);
|
||||
tst.Message = input.ReadLine();
|
||||
tst.EndCondition = input.ReadLine();
|
||||
tst.ValvesOpen = input.ReadLine();
|
||||
tst.ValvesClose = input.ReadLine();
|
||||
tst.RegulValvesPct = input.ReadLine();
|
||||
tst.PumpWithFMPcts = input.ReadLine();
|
||||
|
||||
return tst;
|
||||
}
|
||||
|
||||
public virtual string Compare(StreamReader inp)
|
||||
{
|
||||
System.Text.StringBuilder diff = new System.Text.StringBuilder();
|
||||
string fmt = string.Format("Step {0} : ", ItemNr) + "{0} = {1}\r\n (in the file {2})\r\n";
|
||||
string ln;
|
||||
CultureInfo ci = CultureInfo.InvariantCulture;
|
||||
|
||||
string firstLine = inp.ReadLine();
|
||||
if (string.IsNullOrEmpty(firstLine)) return string.Format("TransitionStep {0} is missing in the compared file\r\n", ItemNr);
|
||||
|
||||
if (ItemNr.ToString() != firstLine) { diff.AppendFormat(fmt, "ItemNr", ItemNr, firstLine); };
|
||||
ln = inp.ReadLine(); if (ln != Duration.ToString(ci)) { diff.AppendFormat(fmt, "Duration", Duration.ToString(ci), ln); };
|
||||
ln = inp.ReadLine(); if (ln != Message) { diff.AppendFormat(fmt, "Message", Message, ln); };
|
||||
ln = inp.ReadLine(); if (ln != EndCondition) { diff.AppendFormat(fmt, "EndCondition", EndCondition, ln); };
|
||||
ln = inp.ReadLine(); if (ln != ValvesOpen) { diff.AppendFormat(fmt, "ValvesOpen", ValvesOpen, ln); };
|
||||
ln = inp.ReadLine(); if (ln != ValvesClose) { diff.AppendFormat(fmt, "ValvesClose", ValvesClose, ln); };
|
||||
ln = inp.ReadLine(); if (ln != RegulValvesPct) { diff.AppendFormat(fmt, "RegulValvesPct", RegulValvesPct, ln); };
|
||||
ln = inp.ReadLine(); if (ln != PumpWithFMPcts) { diff.AppendFormat(fmt, "PumpWithFMPcts", PumpWithFMPcts, ln); };
|
||||
|
||||
return diff.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Config.Entities
|
||||
{
|
||||
@@ -35,5 +36,24 @@ namespace Config.Entities
|
||||
foreach (var step in VirtualBenchSteps) { result.VirtualBenchSteps.Add(step.Clone()); }
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual void Export(StreamWriter output)
|
||||
{
|
||||
/// TODO
|
||||
}
|
||||
|
||||
public static VirtualBenchSequence Import(StreamReader input)
|
||||
{
|
||||
VirtualBenchSequence result = new VirtualBenchSequence();
|
||||
/// TODO
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual string Compare(StreamReader inp)
|
||||
{
|
||||
System.Text.StringBuilder diff = new System.Text.StringBuilder();
|
||||
/// TODO
|
||||
return diff.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1082.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1082.0")]
|
||||
[assembly: AssemblyVersion("2.18.1151.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1151.0")]
|
||||
|
||||
@@ -276,7 +276,14 @@ namespace DeviceTest
|
||||
radioButton3.Text = "SelectTank 3";
|
||||
radioButton4.Text = "SelectTank -";
|
||||
}
|
||||
else radioButton1.Text = "spare";
|
||||
else if (className == "Modbus.QuidoRS")
|
||||
{
|
||||
radioButton1.Text = "Close relay 1";
|
||||
radioButton2.Text = "Close relay 2";
|
||||
radioButton3.Text = "Close relay 3";
|
||||
radioButton4.Text = "Open all relays";
|
||||
}
|
||||
else radioButton1.Text = "spare";
|
||||
}
|
||||
///
|
||||
void UpdateOperations2(string className)
|
||||
@@ -296,7 +303,14 @@ namespace DeviceTest
|
||||
radioButton23.Text = "SelectTank 3";
|
||||
radioButton24.Text = "SelectTank -";
|
||||
}
|
||||
else radioButton21.Text = "spare";
|
||||
else if (className == "Modbus.QuidoRS")
|
||||
{
|
||||
radioButton21.Text = "Close relay 1";
|
||||
radioButton22.Text = "Close relay 2";
|
||||
radioButton23.Text = "Close relay 3";
|
||||
radioButton24.Text = "Open all relays";
|
||||
}
|
||||
else radioButton21.Text = "spare";
|
||||
}
|
||||
///
|
||||
void UpdateOperations3(string className)
|
||||
@@ -316,7 +330,14 @@ namespace DeviceTest
|
||||
radioButton33.Text = "SelectTank 3";
|
||||
radioButton34.Text = "SelectTank -";
|
||||
}
|
||||
else radioButton31.Text = "spare";
|
||||
else if (className == "Modbus.QuidoRS")
|
||||
{
|
||||
radioButton31.Text = "Close relay 1";
|
||||
radioButton32.Text = "Close relay 2";
|
||||
radioButton33.Text = "Close relay 3";
|
||||
radioButton34.Text = "Open all relays";
|
||||
}
|
||||
else radioButton31.Text = "spare";
|
||||
}
|
||||
|
||||
|
||||
@@ -672,6 +693,13 @@ namespace DeviceTest
|
||||
//operation3 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation4 = (tbfComponent1forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.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);
|
||||
}
|
||||
|
||||
|
||||
if (tbfComponent2forOp is TBF.BenchControl.Modbus.PressureMeter.Meret.PressureMeter)
|
||||
@@ -704,6 +732,13 @@ namespace DeviceTest
|
||||
//operation23 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation24 = (tbfComponent2forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.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);
|
||||
}
|
||||
|
||||
|
||||
if (tbfComponent3forOp is TBF.BenchControl.Modbus.PressureMeter.Meret.PressureMeter)
|
||||
@@ -736,6 +771,13 @@ namespace DeviceTest
|
||||
//operation33 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(3);
|
||||
//operation34 = (tbfComponent3forOp as TBF.BenchControl.Modbus.TankSelector.TankSelector).SelectTankOp(0);
|
||||
}
|
||||
else if (tbfComponent3forOp is TBF.BenchControl.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);
|
||||
}
|
||||
|
||||
|
||||
int time = 0;
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Results
|
||||
{
|
||||
if (d.WaterMeters[i] == null) continue;
|
||||
|
||||
if (t.Part != 0 && waterMeterParts[i] != 0 && t.Part != waterMeterParts[i]) continue;
|
||||
if (!t.IsPartCompatible(waterMeterParts[i])) continue;
|
||||
|
||||
///
|
||||
/// Create empty watermeter test results and add them to the list and to dictionaries
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace Results.Entities
|
||||
public virtual double TargetVolume { get; set; } /// [l] target test volume
|
||||
public virtual double TargetTime { get; set; } /// [s] target test time
|
||||
public virtual string Method { get; set; }
|
||||
public virtual double ErrLimLo { get; set; } /// [%] (usually < 0)
|
||||
public virtual double ErrLimHi { get; set; } /// [%] (usually > 0)
|
||||
public virtual double ErrLimLo { get; set; } /// [%] usually < 0, in case of heat meters: 1=class1, 2=class2, 3=class3
|
||||
public virtual double ErrLimHi { get; set; } /// [%] usually > 0, in case of heat meters: -Qn in m3/h
|
||||
public virtual double Uncertainty { get; set; } /// [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual bool DoControlWaterTemp { get; set; }
|
||||
public virtual float TempLimLo { get; set; }
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace Results.Entities
|
||||
/// Metrological class and nominal flow of a heat meter
|
||||
int metrClass = (int)Math.Round(TestData.ErrLimLo);
|
||||
double Qp = Math.Abs(TestData.ErrLimHi);
|
||||
double Q = Math.Max(FlowMean, 0.00001); /// to avoid division by zero
|
||||
double Q = (TestTime == 0) ? 1 : Math.Max(3.6 * VolumeCTV / TestTime, 0.00001); /// Div. by zero avoided
|
||||
|
||||
/// Calculate the error limit of a heat meter
|
||||
switch (metrClass)
|
||||
@@ -172,7 +172,7 @@ namespace Results.Entities
|
||||
/// Metrological class and nominal flow of a heat meter
|
||||
int metrClass = (int)Math.Round(TestData.ErrLimLo);
|
||||
double Qp = Math.Abs(TestData.ErrLimHi);
|
||||
double Q = Math.Max(FlowMean, 0.00001); /// to avoid division by zero
|
||||
double Q = (TestTime == 0) ? 1 : Math.Max(3.6 * VolumeCTV / TestTime, 0.00001); /// Div. by zero avoided
|
||||
|
||||
/// Calculate the error limit of a heat meter
|
||||
switch (metrClass)
|
||||
@@ -319,6 +319,18 @@ namespace Results.Entities
|
||||
#endif
|
||||
}
|
||||
|
||||
public virtual bool IsPartCompatible(int waterMeterPartNr)
|
||||
{
|
||||
if ((this.Part == 0) || (waterMeterPartNr == 0)) return true;
|
||||
|
||||
if ((this.Part % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 10) % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 100) % 10) == waterMeterPartNr) return true;
|
||||
if (((this.Part / 1000) % 10) == waterMeterPartNr) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("batch={0}, procedure={1}, test={2}, {3} {4}", Batch.BatchNr, Batch.ProcedureName, Name(), StartTime.ToShortDateString(), StartTime.ToShortTimeString());
|
||||
|
||||
@@ -41,8 +41,8 @@ namespace Results.Entities
|
||||
public class WaterMeter
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string SerialNr { get; set; } /// Main s/n for compound meters, PCB Number for iPerl water meter
|
||||
public virtual string SerialNrAux { get; set; } /// Aux s/n for compound meters, Serial number for iPerl water meter
|
||||
public virtual string SerialNr { get; set; } /// S/N _or_ S/N of the main meter of a compound meter _or_ PCB Number of an iPerl water meter
|
||||
public virtual string SerialNrAux { get; set; } /// S/N of the aux. meter of a compound meter _or_ a complete assigned S/N of an iPerl water meter
|
||||
public virtual string PurchaseOrder { get; set; }
|
||||
public virtual int YearOfProduction { get; set; }
|
||||
public virtual int WMPosition { get; set; }
|
||||
@@ -57,7 +57,6 @@ namespace Results.Entities
|
||||
public virtual string Remark { get; set; }
|
||||
|
||||
#if IPERL
|
||||
public virtual int SerialNrEx { get; set; } /// Aux s/n for compound meters, Serial number for iPerl water meter
|
||||
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
|
||||
@@ -73,9 +72,29 @@ namespace Results.Entities
|
||||
public virtual int Hz2Correction { get; set; } /// iPerl Q2 correction used during the test
|
||||
public virtual string FWVersion { get; set; }
|
||||
#endif
|
||||
#if TURA_SPECIAL
|
||||
/// <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; }
|
||||
public virtual string ProdTestBench { get; set; }
|
||||
public virtual int ProdWMPosition { get; set; }
|
||||
public virtual string ProdUserName { get; set; }
|
||||
public virtual string ProdPurchaseOrder { get; set; }
|
||||
public virtual bool ProdPassed { get; set; }
|
||||
public virtual int ProdResultCode { get; set; }
|
||||
public virtual int ProdQ2CorrRL { get; set; } /// iPerl Q2 correction for the R-flow written to iPerl
|
||||
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; } /// Not mapped to DB !!! 0=unknown (saving to Oracle failed), >=1 ... pruefindex
|
||||
public virtual int HydrPruefung { get; set; } /// Not mapped to DB !!!
|
||||
public virtual int WMTypeRevision { get; set; } /// Not mapped to DB !!!
|
||||
public virtual object TestInfos { get; set; } /// SensusTestInfo[] array fetched at the beginning of the cycle, not mapped to DB !!!
|
||||
#endif
|
||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||
public virtual Batch Batch { get; set; }
|
||||
@@ -262,7 +281,12 @@ namespace Results.Entities
|
||||
{
|
||||
return mtr;
|
||||
}
|
||||
}
|
||||
else if (meterId == Config.Entities.CompoundMeterId.SingleOrCompound &&
|
||||
mtr.CompoundMeterId == (byte)Config.Entities.CompoundMeterId.HeatMeterEnergy)
|
||||
{
|
||||
return mtr;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -324,6 +348,12 @@ namespace Results.Entities
|
||||
public WaterMeter()
|
||||
{
|
||||
MeterTestRslts = new List<MeterTestRslt>();
|
||||
#if ORACLE_DB
|
||||
Pruefindex = 1;
|
||||
HydrPruefung = 0;
|
||||
WMTypeRevision = 0;
|
||||
TestInfos = null;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -346,7 +376,6 @@ namespace Results.Entities
|
||||
ArchivePath = src.ArchivePath;
|
||||
Remark = src.Remark;
|
||||
#if IPERL
|
||||
SerialNrEx = src.SerialNrEx;
|
||||
OrigCalibFactor = src.OrigCalibFactor;
|
||||
CalibFactor = src.CalibFactor;
|
||||
Q2ErrWOCorrection = src.Q2ErrWOCorrection;
|
||||
@@ -360,9 +389,26 @@ namespace Results.Entities
|
||||
Hz2Correction = src.Hz2Correction;
|
||||
FWVersion = src.FWVersion;
|
||||
#endif
|
||||
#if TURA_SPECIAL
|
||||
AssignedSerialNr = src.AssignedSerialNr;
|
||||
CompleteSerialNr = src.CompleteSerialNr;
|
||||
RadioAddress = src.RadioAddress;
|
||||
PaletteNr = src.PaletteNr;
|
||||
UmkartonNr = src.UmkartonNr;
|
||||
ProdTestBench = src.ProdTestBench;
|
||||
ProdWMPosition = src.ProdWMPosition;
|
||||
ProdUserName = src.ProdUserName;
|
||||
ProdPurchaseOrder = src.ProdPurchaseOrder;
|
||||
ProdPassed = src.ProdPassed;
|
||||
ProdResultCode = src.ProdResultCode;
|
||||
ProdQ2CorrRL = src.ProdQ2CorrRL;
|
||||
ProdQ2CorrLR = src.ProdQ2CorrLR;
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
Pruefindex = src.Pruefindex;
|
||||
Pruefindex = src.Pruefindex;
|
||||
HydrPruefung = src.HydrPruefung;
|
||||
WMTypeRevision = src.WMTypeRevision;
|
||||
TestInfos = src.TestInfos;
|
||||
#endif
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
@@ -379,7 +425,7 @@ namespace Results.Entities
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(80);
|
||||
#if IPERL
|
||||
sb.AppendFormat("PCB:{0} S/N:{1} ", SerialNr, SerialNrEx);
|
||||
sb.AppendFormat("PCB:{0} S/N:{1} ", SerialNr, SerialNrAux);
|
||||
#else
|
||||
sb.AppendFormat("S/N:{0} ", SerialNr);
|
||||
#endif
|
||||
|
||||
@@ -54,7 +54,6 @@ namespace Results.Entities
|
||||
|
||||
#if ORACLE_DB
|
||||
public virtual int WMTypeId { get; set; }
|
||||
public virtual int WMTypeRev { get; set; }
|
||||
#endif
|
||||
|
||||
public WaterMeterData()
|
||||
@@ -111,7 +110,6 @@ namespace Results.Entities
|
||||
|
||||
#if ORACLE_DB
|
||||
if (WMTypeId != wmd.WMTypeId) return false;
|
||||
if (WMTypeRev != wmd.WMTypeRev) return false;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Results.Forms
|
||||
Results.BatchResults results;
|
||||
MetersKind metersKind;
|
||||
|
||||
ListView firstListView;
|
||||
OneWMResultsCtrl firstListView;
|
||||
public int[] rsltsClmnWidths;
|
||||
int rsltsClmnCount { get { return (rsltsClmnWidths != null) ? rsltsClmnWidths.Length : 0; } }
|
||||
|
||||
@@ -150,9 +150,9 @@ namespace Results.Forms
|
||||
{
|
||||
if (results.WaterMeters[i] != null && !results.WaterMeters[i].Disabled)
|
||||
{
|
||||
ListView lview = (TestsArrangement == TestsArrangement.Rows)
|
||||
? GetResultsTestsAreRows(results.WaterMeters[i], i + 1)
|
||||
: GetResultsTestsAreColumns(results.WaterMeters[i], i + 1);
|
||||
OneWMResultsCtrl lview = (TestsArrangement == TestsArrangement.Rows)
|
||||
? GetResultsTestsAreRows(results.WaterMeters[i], i + 1)
|
||||
: GetResultsTestsAreColumns(results.WaterMeters[i], i + 1);
|
||||
if (lview != null)
|
||||
{
|
||||
flowLayoutPanel.Controls.Add(lview);
|
||||
@@ -182,19 +182,9 @@ namespace Results.Forms
|
||||
/// Get an empty ListView control with appropriate parameters.
|
||||
/// </summary>
|
||||
/// <returns>ListView control</returns>
|
||||
ListView GetListView()
|
||||
OneWMResultsCtrl GetListView()
|
||||
{
|
||||
ListView lview = new ListView();
|
||||
lview.AllowColumnReorder = false;
|
||||
lview.Dock = System.Windows.Forms.DockStyle.None;
|
||||
lview.FullRowSelect = true;
|
||||
lview.GridLines = true;
|
||||
lview.Location = new System.Drawing.Point(0, 0);
|
||||
lview.Size = new System.Drawing.Size(lvWidth, lvHeight);
|
||||
lview.TabIndex = 0;
|
||||
lview.UseCompatibleStateImageBehavior = false;
|
||||
lview.View = System.Windows.Forms.View.Details;
|
||||
return lview;
|
||||
return new OneWMResultsCtrl(Color.White, lvWidth, lvHeight);
|
||||
}
|
||||
|
||||
|
||||
@@ -225,11 +215,16 @@ namespace Results.Forms
|
||||
/// </summary>
|
||||
/// <param name="mtr">Water meter number (1-based): 1 .. Config.Data.WMsCount</param>
|
||||
/// <returns>ListView object</returns>
|
||||
ListView GetResultsTestsAreRows(Results.Entities.WaterMeter wMtr, int printedWMNr)
|
||||
OneWMResultsCtrl GetResultsTestsAreRows(Results.Entities.WaterMeter wMtr, int printedWMNr)
|
||||
{
|
||||
metersKind = wMtr.Compound() ? MetersKind.Combined : (wMtr.HeatMeter() ? MetersKind.HeatMeter : MetersKind.Single);
|
||||
|
||||
ListView lview = GetListView();
|
||||
OneWMResultsCtrl lview = GetListView();
|
||||
#if ORACLE_DB
|
||||
lview.Caption = string.Format("PCB {0} {1} {2}", (string.IsNullOrEmpty(wMtr.SerialNr) ? string.Empty : wMtr.SerialNr), Strings.repetition, (wMtr.Pruefindex % 100));
|
||||
#else
|
||||
lview.Caption = string.Format("s/n = {0}", string.IsNullOrEmpty(wMtr.SerialNr) ? string.Empty : wMtr.SerialNr);
|
||||
#endif
|
||||
|
||||
IList<Results.WMeterRsltItemSpec> items = GetRsltItems(metersKind);
|
||||
|
||||
@@ -290,11 +285,16 @@ namespace Results.Forms
|
||||
/// </summary>
|
||||
/// <param name="mtr">Water meter number (1-based): 1 .. Config.Data.WMsCount</param>
|
||||
/// <returns>ListView object</returns>
|
||||
ListView GetResultsTestsAreColumns(Results.Entities.WaterMeter wMtr, int printedWMNr)
|
||||
OneWMResultsCtrl GetResultsTestsAreColumns(Results.Entities.WaterMeter wMtr, int printedWMNr)
|
||||
{
|
||||
metersKind = wMtr.Compound() ? MetersKind.Combined : (wMtr.HeatMeter() ? MetersKind.HeatMeter : MetersKind.Single);
|
||||
|
||||
ListView lview = GetListView();
|
||||
OneWMResultsCtrl lview = GetListView();
|
||||
#if ORACLE_DB
|
||||
lview.Caption = string.Format("PCB {0} {1} {2}", (string.IsNullOrEmpty(wMtr.SerialNr) ? string.Empty : wMtr.SerialNr), Strings.repetition, (wMtr.Pruefindex % 100));
|
||||
#else
|
||||
lview.Caption = string.Format("s/n = {0}", string.IsNullOrEmpty(wMtr.SerialNr) ? string.Empty : wMtr.SerialNr);
|
||||
#endif
|
||||
|
||||
IList<Results.WMeterRsltItemSpec> items = GetRsltItems(metersKind);
|
||||
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
namespace Results.Forms
|
||||
{
|
||||
partial class OneWMResultsCtrl
|
||||
{
|
||||
/// <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.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.tBox = new System.Windows.Forms.TextBox();
|
||||
this.lView = new System.Windows.Forms.ListView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.tBox);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.lView);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(352, 318);
|
||||
this.splitContainer1.SplitterDistance = 25;
|
||||
this.splitContainer1.SplitterWidth = 1;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// tBox
|
||||
//
|
||||
this.tBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.tBox.Name = "tBox";
|
||||
this.tBox.Size = new System.Drawing.Size(352, 20);
|
||||
this.tBox.TabIndex = 0;
|
||||
//
|
||||
// lView
|
||||
//
|
||||
this.lView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lView.FullRowSelect = true;
|
||||
this.lView.GridLines = true;
|
||||
this.lView.Location = new System.Drawing.Point(0, 0);
|
||||
this.lView.Name = "lView";
|
||||
this.lView.Size = new System.Drawing.Size(352, 292);
|
||||
this.lView.TabIndex = 0;
|
||||
this.lView.UseCompatibleStateImageBehavior = false;
|
||||
this.lView.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// OneWMResultsCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "OneWMResultsCtrl";
|
||||
this.Size = new System.Drawing.Size(352, 318);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.TextBox tBox;
|
||||
private System.Windows.Forms.ListView lView;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Results.Forms
|
||||
{
|
||||
public partial class OneWMResultsCtrl : UserControl
|
||||
{
|
||||
public OneWMResultsCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public OneWMResultsCtrl(Color backColor, int lvWidth, int lvHeight)
|
||||
: this()
|
||||
{
|
||||
lView.BackColor = backColor;
|
||||
tBox.BackColor = backColor;
|
||||
Size = new System.Drawing.Size(lvWidth, lvHeight);
|
||||
}
|
||||
|
||||
public string Caption { get { return tBox.Text; } set { tBox.Text = value; } }
|
||||
public ListView.ColumnHeaderCollection Columns { get { return lView.Columns; } }
|
||||
public ListView.ListViewItemCollection Items { get { return lView.Items; } }
|
||||
public Color BColor { set { lView.BackColor = value; tBox.BackColor = value; } }
|
||||
}
|
||||
}
|
||||
+92
-71
@@ -91,85 +91,85 @@ namespace Results
|
||||
T_Lo_start, /// 81
|
||||
T_Lo_end, /// 82
|
||||
T_Lo_avg, /// 83
|
||||
P_delta_mean, /// 84
|
||||
P_delta_start, /// 85
|
||||
P_delta_end, /// 86
|
||||
Meter_type, /// 87 Single, Compound or HeatMeter
|
||||
Volume_main, /// 88
|
||||
Volume_aux, /// 89
|
||||
Start_volume, /// 90
|
||||
Start_volume_main, /// 91
|
||||
Start_volume_aux, /// 92
|
||||
End_volume, /// 93
|
||||
End_volume_main, /// 94
|
||||
End_volume_aux, /// 95
|
||||
Error_main, /// 96
|
||||
Error_aux, /// 97
|
||||
Serial_Nr_main, /// 98
|
||||
Serial_Nr_aux, /// 99
|
||||
End_state_main, /// 100
|
||||
End_state_aux, /// 101
|
||||
Q_rise, /// 102
|
||||
Q_fall, /// 103
|
||||
P_delta_mean, /// 84
|
||||
P_delta_start, /// 85
|
||||
P_delta_end, /// 86
|
||||
Meter_type, /// 87 Single, Compound or HeatMeter
|
||||
Volume_main, /// 88
|
||||
Volume_aux, /// 89
|
||||
Start_volume, /// 90
|
||||
Start_volume_main, /// 91
|
||||
Start_volume_aux, /// 92
|
||||
End_volume, /// 93
|
||||
End_volume_main, /// 94
|
||||
End_volume_aux, /// 95
|
||||
Error_main, /// 96
|
||||
Error_aux, /// 97
|
||||
Serial_Nr_main, /// 98
|
||||
Serial_Nr_aux, /// 99
|
||||
End_state_main, /// 100
|
||||
End_state_aux, /// 101
|
||||
Q_rise, /// 102
|
||||
Q_fall, /// 103
|
||||
|
||||
/// iPerl
|
||||
/// iPerl
|
||||
OrigCalibFactor, /// 104
|
||||
CalibFactor, /// 105
|
||||
Q2ErrWOCorrection, /// 106
|
||||
Q2CorrectionDone, /// 107
|
||||
CalibFactor, /// 105
|
||||
Q2ErrWOCorrection, /// 106
|
||||
Q2CorrectionDone, /// 107
|
||||
Q2CorrRFlow, /// 108
|
||||
Q2CorrLFlow, /// 109
|
||||
Q2CorrFlowRight, /// 110
|
||||
|
||||
Q_ref_mean, /// 111
|
||||
T_up_start, /// 112
|
||||
T_up_end, /// 113
|
||||
T_up_avg, /// 114
|
||||
T_down_start, /// 115
|
||||
T_down_end, /// 116
|
||||
T_down_avg, /// 117
|
||||
T_div_start, /// 118
|
||||
T_div_end, /// 119
|
||||
T_div_avg, /// 120
|
||||
P_up_avg, /// 121
|
||||
P_down_avg, /// 122
|
||||
P_delta_avg, /// 123
|
||||
|
||||
TestDone, /// 124
|
||||
TestPassed, /// 125
|
||||
Q_ref_mean, /// 111
|
||||
T_up_start, /// 112
|
||||
T_up_end, /// 113
|
||||
T_up_avg, /// 114
|
||||
T_down_start, /// 115
|
||||
T_down_end, /// 116
|
||||
T_down_avg, /// 117
|
||||
T_div_start, /// 118
|
||||
T_div_end, /// 119
|
||||
T_div_avg, /// 120
|
||||
P_up_avg, /// 121
|
||||
P_down_avg, /// 122
|
||||
P_delta_avg, /// 123
|
||||
|
||||
TestDone, /// 124
|
||||
TestPassed, /// 125
|
||||
|
||||
/// iPerl
|
||||
FW_Version, /// 126
|
||||
|
||||
Mass_start_raw, /// 127
|
||||
Mass_start, /// 128
|
||||
Mass_end_raw, /// 129
|
||||
Mass_end, /// 130
|
||||
Mass, /// 131
|
||||
Buoyancy, /// 132
|
||||
Density_correction, /// 133
|
||||
Mass_start_raw, /// 127
|
||||
Mass_start, /// 128
|
||||
Mass_end_raw, /// 129
|
||||
Mass_end, /// 130
|
||||
Mass, /// 131
|
||||
Buoyancy, /// 132
|
||||
Density_correction, /// 133
|
||||
|
||||
ErrorFlags, /// 134
|
||||
E1, /// 135
|
||||
E2, /// 136
|
||||
E3, /// 137
|
||||
E4, /// 138
|
||||
E5, /// 139
|
||||
E6, /// 140
|
||||
E7, /// 141
|
||||
E8, /// 142
|
||||
E9, /// 143
|
||||
E10, /// 144
|
||||
E11, /// 145
|
||||
E12, /// 146
|
||||
E13, /// 147
|
||||
E14, /// 148
|
||||
E15, /// 149
|
||||
E16, /// 150
|
||||
ErrorFlags, /// 134
|
||||
E1, /// 135
|
||||
E2, /// 136
|
||||
E3, /// 137
|
||||
E4, /// 138
|
||||
E5, /// 139
|
||||
E6, /// 140
|
||||
E7, /// 141
|
||||
E8, /// 142
|
||||
E9, /// 143
|
||||
E10, /// 144
|
||||
E11, /// 145
|
||||
E12, /// 146
|
||||
E13, /// 147
|
||||
E14, /// 148
|
||||
E15, /// 149
|
||||
E16, /// 150
|
||||
|
||||
Table_row_nr, /// 151
|
||||
Table_column_nr, /// 152
|
||||
WMRemark, /// 153
|
||||
Table_row_nr, /// 151
|
||||
Table_column_nr, /// 152
|
||||
WMRemark, /// 153
|
||||
|
||||
User_description, /// 154
|
||||
Legalizator, /// 155
|
||||
@@ -181,7 +181,7 @@ namespace Results
|
||||
Diverter_start_time, /// 159
|
||||
Diverter_end_time, /// 160
|
||||
Q_sensitivity, /// 161
|
||||
|
||||
|
||||
Q_ref_min, /// 162
|
||||
Q_ref_max, /// 163
|
||||
Q_ref_start, /// 164
|
||||
@@ -210,7 +210,7 @@ namespace Results
|
||||
Rho_Wa_calc, /// 183
|
||||
|
||||
Formatted_WM_ID, /// 184, Formated WM ID string:
|
||||
/// {0}=start DateTime {1}-end DateTime, {2}=batch nr., {3}=wm pos.(1..max), {4}=s/n string
|
||||
/// {0}=start DateTime {1}-end DateTime, {2}=batch nr., {3}=wm pos.(1..max), {4}=s/n string
|
||||
E21, /// 185
|
||||
|
||||
T_line_mean, /// 186
|
||||
@@ -262,7 +262,7 @@ namespace Results
|
||||
Bench_address5, /// 227 'Address 5' from IBenchInfo
|
||||
|
||||
Max_test_index, /// 228 MaxPruefindex % 100
|
||||
VolumeCTV, /// 229
|
||||
VolumeCTV, /// 229
|
||||
|
||||
/// iPerl
|
||||
LastError, /// 230 For iPerl previous test result (test with Proefindex-1)
|
||||
@@ -270,7 +270,28 @@ namespace Results
|
||||
CalibFactorLNA, /// 232
|
||||
|
||||
WM_remark, /// 233
|
||||
|
||||
|
||||
/// iPerl special
|
||||
Prod_AssignedSerialNr, /// 234
|
||||
Prod_CompleteSerialNr, /// 235
|
||||
Prod_RadioAddress, /// 236
|
||||
Prod_PaletteNr, /// 237
|
||||
Prod_UmkartonNr, /// 238
|
||||
Prod_TestBench, /// 239
|
||||
Prod_WMPosition, /// 240
|
||||
Prod_UserName, /// 241
|
||||
Prod_PurchaseOrder, /// 242
|
||||
Prod_Passed, /// 243
|
||||
Prod_ResultCode, /// 244
|
||||
Prod_Q2CorrRL, /// 245
|
||||
Prod_Q2CorrLR, /// 246
|
||||
|
||||
TestPartStr, /// 247
|
||||
|
||||
Error_heat_mtr_vol, /// 248
|
||||
Energy_start,
|
||||
Energy_end,
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ namespace Results.Mappings
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
Map(x => x.WMTypeId);
|
||||
Map(x => x.WMTypeRev);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace Results.Mappings
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(2000)");
|
||||
#if IPERL
|
||||
Map(x => x.SerialNrEx);
|
||||
Map(x => x.OrigCalibFactor);
|
||||
Map(x => x.CalibFactor);
|
||||
Map(x => x.OrigCalibFactorLNA);
|
||||
@@ -36,14 +35,29 @@ namespace Results.Mappings
|
||||
Map(x => x.Q2ErrWOCorrection);
|
||||
Map(x => x.Q2CorrectionDone);
|
||||
Map(x => x.Q2Correction);
|
||||
Map(x => x.Q2CorrRL).Column("Q2CorrRFlow");
|
||||
Map(x => x.Q2CorrLR).Column("Q2CorrLFlow");
|
||||
Map(x => x.Q2CorrRL);
|
||||
Map(x => x.Q2CorrLR);
|
||||
Map(x => x.Q2CorrFlowRight);
|
||||
Map(x => x.Diff2Hz8Hz);
|
||||
Map(x => x.Hz2CorrectionDone);
|
||||
Map(x => x.Hz2Correction);
|
||||
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);
|
||||
Map(x => x.ProdTestBench);
|
||||
Map(x => x.ProdWMPosition);
|
||||
Map(x => x.ProdUserName);
|
||||
Map(x => x.ProdPurchaseOrder);
|
||||
Map(x => x.ProdPassed);
|
||||
Map(x => x.ProdResultCode);
|
||||
Map(x => x.ProdQ2CorrRL);
|
||||
Map(x => x.ProdQ2CorrLR);
|
||||
#endif
|
||||
#if ORACLE_DB
|
||||
Map(x => x.Pruefindex);
|
||||
Map(x => x.HydrPruefung);
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using Config.Entities;
|
||||
using Results.Resources;
|
||||
|
||||
namespace Results.Output.Printers.Label
|
||||
{
|
||||
public class LabelPrintDocument : PrintersCommon
|
||||
{
|
||||
/// Size of the printed area without margins, after taking into account 'pageOrientation'
|
||||
readonly int printHeight;
|
||||
readonly int printWidth;
|
||||
|
||||
/// Selected font
|
||||
readonly Font font;
|
||||
|
||||
/// Data to print
|
||||
Results.Entities.Batch batch;
|
||||
LabelPrinterCfg cfg;
|
||||
Results.Entities.WaterMeter wm;
|
||||
|
||||
/// Items to print
|
||||
IList<WMeterRsltItemSpec> itemsToPrint;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public LabelPrintDocument(Results.Entities.Batch batch, LabelPrinterCfg cfg, Results.Entities.WaterMeter wm, string documentName)
|
||||
{
|
||||
DocumentName = documentName;
|
||||
|
||||
this.batch = batch;
|
||||
this.cfg = cfg;
|
||||
this.wm = wm;
|
||||
this.itemsToPrint = Results.WMeterRsltItemSpec.FromStrArray(cfg.ItemsToPrint);
|
||||
|
||||
/// Initialize fonts
|
||||
font = new Font((cfg.FontFamily != null ? cfg.FontFamily : "Arial"),
|
||||
(cfg.FontSize > 0 ? cfg.FontSize : 10),
|
||||
(FontStyle)cfg.FontStyle);
|
||||
|
||||
/// Set print area size and margins (in dots using 100 dpi)
|
||||
DefaultPageSettings.Landscape = (cfg.PageOrientation == PageOrientation.Landscape);
|
||||
///
|
||||
printHeight = cfg.PaperHeight;
|
||||
printWidth = cfg.PaperWidth;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default onbeginPrint method of the PrintDocument Object
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks></remarks>
|
||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
base.OnBeginPrint(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default OnPrintPage method of the PrintDocument.
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks>This provides the print logic for our document</remarks>
|
||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
/// Run base code
|
||||
base.OnPrintPage(e);
|
||||
|
||||
if (!string.IsNullOrEmpty(cfg.Template))
|
||||
{
|
||||
string templatePath = Path.Combine("C:\\TBF\\Templates\\", cfg.Template);
|
||||
if (File.Exists(templatePath))
|
||||
{
|
||||
e.Graphics.DrawImage(new Bitmap(Image.FromFile(templatePath), printWidth, printHeight), new Rectangle(0, 0, printWidth, printHeight));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in itemsToPrint)
|
||||
{
|
||||
string[] coords = item.Caption.Split(new char[] { ';' });
|
||||
int x, y;
|
||||
if (coords.Length >= 2 && int.TryParse(coords[0].Trim(new char[] { ' ' }), out x)
|
||||
&& int.TryParse(coords[1].Trim(new char[] { ' ' }), out y))
|
||||
{
|
||||
RectangleF printArea = new RectangleF(x, y, printWidth, printHeight);
|
||||
e.Graphics.DrawString(item.Print(wm), this.font, Brushes.Black, printArea);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
|
||||
namespace Results.Output.Printers.Label
|
||||
{
|
||||
public class LabelPrinterCfg
|
||||
{
|
||||
public string Template; /// Full path to a 'png' file
|
||||
public Config.Entities.PageOrientation PageOrientation;
|
||||
public int PaperWidth; /// In 0,254 mm = 1/100 in = 100dpi pixels count
|
||||
public int PaperHeight; /// In 0,254 mm = 1/100 in = 100dpi pixels count
|
||||
public string[] ItemsToPrint;
|
||||
public string FontFamily;
|
||||
public int FontSize;
|
||||
public int FontStyle;
|
||||
public System.Globalization.CultureInfo CultureInfo;
|
||||
public bool GoodOnly;
|
||||
public bool SupressPrinting; /// true = Bypass printing
|
||||
}
|
||||
}
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1093.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1093.0")]
|
||||
[assembly: AssemblyVersion("2.18.1142.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1142.0")]
|
||||
|
||||
Generated
+9
@@ -798,6 +798,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to repetition.
|
||||
/// </summary>
|
||||
internal static string repetition {
|
||||
get {
|
||||
return ResourceManager.GetString("repetition", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Result.
|
||||
/// </summary>
|
||||
|
||||
@@ -255,4 +255,7 @@
|
||||
<data name="Batch" xml:space="preserve">
|
||||
<value>Dávka</value>
|
||||
</data>
|
||||
<data name="repetition" xml:space="preserve">
|
||||
<value>opakování</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -741,4 +741,7 @@
|
||||
<data name="Batch" xml:space="preserve">
|
||||
<value>Batch</value>
|
||||
</data>
|
||||
<data name="repetition" xml:space="preserve">
|
||||
<value>repetition</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -80,6 +80,12 @@
|
||||
<Compile Include="Forms\ListViewExtensions.cs" />
|
||||
<Compile Include="Forms\LviIntColumnComparer.cs" />
|
||||
<Compile Include="Forms\LviTextColumnComparer.cs" />
|
||||
<Compile Include="Forms\OneWMResultsCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\OneWMResultsCtrl.Designer.cs">
|
||||
<DependentUpon>OneWMResultsCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ResultsConfigCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@@ -104,6 +110,10 @@
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\Enhanced\EnhancedPrinterCfg.cs" />
|
||||
<Compile Include="Output\Printers\Label\LabelPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\Label\LabelPrinterCfg.cs" />
|
||||
<Compile Include="Output\Printers\PrintersCommon.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -155,6 +165,9 @@
|
||||
<EmbeddedResource Include="Forms\ListViewEx.resx">
|
||||
<DependentUpon>ListViewEx.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\OneWMResultsCtrl.resx">
|
||||
<DependentUpon>OneWMResultsCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ResultsConfigCtrl.resx">
|
||||
<DependentUpon>ResultsConfigCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -31,6 +31,21 @@ namespace Results
|
||||
}
|
||||
}
|
||||
|
||||
public static string BenchNameFromOracleBenchID(int id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 4: return "WR9";
|
||||
case 5: return "WR10";
|
||||
case 6: return "WR11";
|
||||
case 7: return "PT7";
|
||||
case 8: return "WR13";
|
||||
case 9: return "WR15";
|
||||
case 10: return "WR14";
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts ErrorFlags integer to string. Supports up to 31 flags (E1..E31).
|
||||
|
||||
@@ -155,16 +155,16 @@ namespace Results
|
||||
///
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).TargetVolume())));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.VolumeCTV, string.Format("{0} CTV ()", Strings.VName_Vol), Quantity.Volume, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).VolumeCTV)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, string.Format("{0} Mt. ()", Strings.VName_Vol), Strings.Tooltip_Vol_Mt, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, string.Format("{0} rm ()", Strings.VName_Vol), Strings.Tooltip_Vol_rm, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeRef)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.main), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.aux), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, string.Format("{0} Mt. ()", Strings.VName_Vol), Strings.Tooltip_Vol_Mt, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeMeter) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeMeter) : string.Empty)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, string.Format("{0} rm ()", Strings.VName_Vol), Strings.Tooltip_Vol_rm, Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeRef) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeRef) : string.Empty)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.main), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeMeter) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.aux), Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeMeter) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeStart) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart) : string.Empty)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeStart) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeStart) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeEnd) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd) : string.Empty)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeEnd) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeEnd) : string.Empty));
|
||||
|
||||
///
|
||||
/// Mass
|
||||
@@ -314,7 +314,8 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).Error)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.LastError, string.Format("{0} rel. last ()", Strings.VName_Error), Strings.Tooltip_E_rel_last, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).LastError)));
|
||||
#else
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).Error)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, string.Format("{0} rel. ()", Strings.VName_Error), Strings.Tooltip_E_rel, Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t).Error) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_heat_mtr_vol, string.Format("{0} rel.hm.vol. ()", Strings.VName_Error), Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).Error) : string.Empty));
|
||||
#endif
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result, Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.PassedColorStr(f)
|
||||
: ((w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr(f))));
|
||||
@@ -371,8 +372,8 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Degree__liter, "Degree per liter ()", Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).PulsesPerLiter : 0)));
|
||||
|
||||
/// Water meters results (combined)
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_main, Strings.Err_main + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).Error)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_aux, Strings.Err_aux + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).Error)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_main, Strings.Err_main + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).Error) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_aux, Strings.Err_aux + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V2", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).Error) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr_main, string.Format("{0} {1}", Strings.sn, Strings.main), Strings.Tooltip_sn_main, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.SerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr_aux, string.Format("{0} {1}", Strings.sn, Strings.aux), Strings.Tooltip_sn_aux, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.SerialNrAux)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state_main, Strings.EndState_main, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.EndState)));
|
||||
@@ -407,8 +408,10 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Meter_type, Strings.Meter_type, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Compound ? Strings.Compound : (w.WaterMeterData.HeatMeter ? Strings.Heat_meter : Strings.Single))));
|
||||
|
||||
#if HEAT_METERS
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy, Strings.Energy + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : FormatDbl(u, f, p, "F1", (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeMeter))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_energy, Strings.Energy_ref + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : FormatDbl(u, f, p, "F1", (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeRef))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy, Strings.Energy + " ()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) != null) ? FormatDbl(u, f, p, "F1", w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeMeter) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy_start, Strings.Energy + " start ()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) != null) ? FormatDbl(u, f, p, "F1", w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeStart) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy_end, Strings.Energy + " end ()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) != null) ? FormatDbl(u, f, p, "F1", w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeEnd) : string.Empty));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_energy, Strings.Energy_ref + " ()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) != null) ? FormatDbl(u, f, p, "F1", w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeRef) : string.Empty));
|
||||
#endif
|
||||
|
||||
#if IPERL
|
||||
@@ -418,14 +421,31 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactorLNA, "iPerl CalibFactorLNA", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.CalibFactorLNA)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2ErrWOCorrection, "iPerl Q2ErrWOCorrection", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Q2ErrWOCorrection)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrectionDone, "iPerl Q2CorrectionDone", Quantity.Boolean,ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrectionDone ? Strings.Yes : Strings.No)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2CorrRFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRL)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2CorrLFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLR)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2Corr RL", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRL)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2Corr LR", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLR)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrFlowRight, "iPerl Q2CorrFlowRight", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrFlowRight)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.FW_Version, "iPerl FW version", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.FWVersion)));
|
||||
#if ORACLE_DB
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_test_index, "iPerl test index", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, (w.Pruefindex % 100))));
|
||||
#endif
|
||||
#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)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_TestBench, "Prod iPerl test bench", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.ProdTestBench)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_WMPosition, "Prod iPerl WM position", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.ProdWMPosition)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_UserName, "Prod iPerl user name", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.ProdUserName)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_PurchaseOrder, "Prod iPerl purchase order", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.ProdPurchaseOrder)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_Passed, "Prod iPerl passed", Quantity.Boolean,ItemCategory.MeterResult, (w, t, u, f, p) => FormatBool(f,w.ProdPassed)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_ResultCode, "Prod iPerl result code", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.ProdResultCode)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_Q2CorrRL, "Prod iPerl Q2Corr RL", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.ProdQ2CorrRL)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_Q2CorrLR, "Prod iPerl Q2Corr LR", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.ProdQ2CorrLR)));
|
||||
#endif
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestDone, Strings.Test_done + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => FormatBool(f, (w.GetMeterTestRslt(t) != null) && w.GetMeterTestRslt(t).TestDone)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPassed, Strings.Test_passed + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => FormatBool(f, (w.GetMeterTestRslt(t) != null) && w.GetMeterTestRslt(t).Passed)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlags, Strings.Error_flags + "()", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) != null) ? w.GetTestRslt(t).ErrorFlagsStr() : w.ErrorFlagsStr())));
|
||||
@@ -447,6 +467,7 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E15, "E15 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x4000) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E16, "E16 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x8000) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.E21, "E21 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & 0x100000) != 0) ? Strings.Yes : Strings.No));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPartStr, "Test part str.", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatEnum(f, (w.GetMeterTestRslt(t) != null) ? w.GetMeterTestRslt(t).TestRslt.Part : 0)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_row_nr, "Table row #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableRowNr.ToString() : string.Format(f, TableRowNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Table_column_nr, "Table column #", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? TableColumnNr.ToString() : string.Format(f, TableColumnNr)));
|
||||
@@ -460,7 +481,8 @@ namespace Results
|
||||
|
||||
public static string FormatStr(string format, string value)
|
||||
{
|
||||
return string.IsNullOrEmpty(format) ? value : string.Format(format, value);
|
||||
string valueEx = string.IsNullOrEmpty(value) ? string.Empty : value;
|
||||
return string.IsNullOrEmpty(format) ? valueEx : string.Format(format, valueEx);
|
||||
}
|
||||
|
||||
public static string FormatBool(string format, bool value)
|
||||
@@ -476,6 +498,23 @@ namespace Results
|
||||
}
|
||||
}
|
||||
|
||||
public static string FormatEnum(string format, int value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(format))
|
||||
{
|
||||
return value.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] texts = format.Split(new char[] { '~' });
|
||||
|
||||
if (value >= 0 && value < texts.Length)
|
||||
return texts[value];
|
||||
else
|
||||
return value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public static string FormatInt(string format, int value)
|
||||
{
|
||||
return string.IsNullOrEmpty(format) ? value.ToString() : string.Format(format, value);
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
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;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class BatchNrFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "BatchNr"; }
|
||||
public static string GetFilterName() { return "Batch number"; }
|
||||
|
||||
///
|
||||
/// 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 int BatchNr;
|
||||
|
||||
|
||||
private BatchNrFilterUI userIface;
|
||||
|
||||
public BatchNrFilter()
|
||||
{
|
||||
userIface = new BatchNrFilterUI(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<WaterMeter> wms = se.QueryOver<WaterMeter>().List<WaterMeter>();
|
||||
|
||||
foreach (var wm in wms)
|
||||
{
|
||||
if (wm.BatchNr() == BatchNr) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.BatchNr() == BatchNr) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class BatchNrFilterUI
|
||||
{
|
||||
/// <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.batchNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.batchNrTextBox);
|
||||
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 = "Batch number";
|
||||
//
|
||||
// batchNrTextBox
|
||||
//
|
||||
this.batchNrTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.batchNrTextBox.Name = "batchNrTextBox";
|
||||
this.batchNrTextBox.Size = new System.Drawing.Size(80, 20);
|
||||
this.batchNrTextBox.TabIndex = 0;
|
||||
//
|
||||
// BatchNrFilterUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "BatchNrFilterUI";
|
||||
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 batchNrTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class BatchNrFilterUI : UserControl
|
||||
{
|
||||
BatchNrFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public BatchNrFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public BatchNrFilterUI(BatchNrFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = BatchNrFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
batchNrTextBox.Text = data.BatchNr.ToString();
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
data.BatchNr = int.Parse(batchNrTextBox.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -18,19 +18,23 @@ namespace ResultsBrowser.Filters
|
||||
IDs = new string[]
|
||||
{
|
||||
DateFilter.GetFilterID(),
|
||||
BatchNrFilter.GetFilterID(),
|
||||
ProcedureFilter.GetFilterID(),
|
||||
ProtocolFilter.GetFilterID(),
|
||||
QnFilter.GetFilterID(),
|
||||
SerialNrFilter.GetFilterID(),
|
||||
WMPositionFilter.GetFilterID(),
|
||||
};
|
||||
|
||||
Names = new string[]
|
||||
{
|
||||
DateFilter.GetFilterName(),
|
||||
BatchNrFilter.GetFilterName(),
|
||||
ProcedureFilter.GetFilterName(),
|
||||
ProtocolFilter.GetFilterName(),
|
||||
QnFilter.GetFilterName(),
|
||||
SerialNrFilter.GetFilterName(),
|
||||
WMPositionFilter.GetFilterName(),
|
||||
};
|
||||
|
||||
Count = IDs.Length;
|
||||
@@ -39,11 +43,13 @@ namespace ResultsBrowser.Filters
|
||||
|
||||
public static IFilter GetFilter(string filterID)
|
||||
{
|
||||
if (filterID == DateFilter.GetFilterID()) return new DateFilter();
|
||||
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();
|
||||
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();
|
||||
else return null;
|
||||
}
|
||||
|
||||
@@ -53,11 +59,13 @@ namespace ResultsBrowser.Filters
|
||||
try
|
||||
{
|
||||
Type type;
|
||||
if (filterID == DateFilter.GetFilterID()) type = typeof(DateFilter);
|
||||
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);
|
||||
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);
|
||||
else return null;
|
||||
|
||||
IFilter filter = (new XmlSerializer(type)).Deserialize(new StringReader(serializedText)) as IFilter;
|
||||
|
||||
+3
-3
@@ -48,15 +48,15 @@
|
||||
//
|
||||
this.procedureTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.procedureTextBox.Name = "procedureTextBox";
|
||||
this.procedureTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.procedureTextBox.Size = new System.Drawing.Size(360, 20);
|
||||
this.procedureTextBox.TabIndex = 0;
|
||||
//
|
||||
// ProcedureFilter
|
||||
// ProcedureFilterUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "ProcedureFilter";
|
||||
this.Name = "ProcedureFilterUI";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
|
||||
+3
-3
@@ -48,15 +48,15 @@
|
||||
//
|
||||
this.procedureTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.procedureTextBox.Name = "procedureTextBox";
|
||||
this.procedureTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.procedureTextBox.Size = new System.Drawing.Size(80, 20);
|
||||
this.procedureTextBox.TabIndex = 0;
|
||||
//
|
||||
// QnFilter
|
||||
// QnFilterUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "QnFilter";
|
||||
this.Name = "QnFilterUI";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
|
||||
@@ -30,7 +30,6 @@ namespace ResultsBrowser.Filters
|
||||
///
|
||||
public string SerialNr;
|
||||
|
||||
|
||||
private SerialNrFilterUI userIface;
|
||||
|
||||
public SerialNrFilter()
|
||||
@@ -42,21 +41,50 @@ namespace ResultsBrowser.Filters
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (string.IsNullOrEmpty(SerialNr)) return filteredWaterMeters; /// Empty s/n => Return an empty list of WM-s
|
||||
|
||||
IList<string> serialNumbers = new List<string>();
|
||||
///
|
||||
if (SerialNr[0] == '@')
|
||||
{
|
||||
try
|
||||
{
|
||||
TextReader rdr = new StreamReader(SerialNr.Substring(1));
|
||||
string line = rdr.ReadLine();
|
||||
while (!string.IsNullOrEmpty(line))
|
||||
{
|
||||
serialNumbers.Add(line);
|
||||
line = rdr.ReadLine();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
serialNumbers.Add(SerialNr);
|
||||
}
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<WaterMeter> wms = se.QueryOver<WaterMeter>()
|
||||
.Where(x => (x.SerialNr == SerialNr))
|
||||
.List<WaterMeter>();
|
||||
foreach (var wm in wms) filteredWaterMeters.Add(wm);
|
||||
foreach (var oneSerialNr in serialNumbers)
|
||||
{
|
||||
IList<WaterMeter> wms = se.QueryOver<WaterMeter>()
|
||||
.Where(x => (x.SerialNr == oneSerialNr))
|
||||
.List<WaterMeter>();
|
||||
foreach (var wm in wms) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.SerialNr == SerialNr) filteredWaterMeters.Add(wm);
|
||||
if (serialNumbers.Contains(wm.SerialNr)) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -48,15 +48,16 @@
|
||||
//
|
||||
this.serialNrTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.serialNrTextBox.Name = "serialNrTextBox";
|
||||
this.serialNrTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.serialNrTextBox.Size = new System.Drawing.Size(360, 20);
|
||||
this.serialNrTextBox.TabIndex = 0;
|
||||
this.serialNrTextBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.serialNrTextBox_MouseDoubleClick);
|
||||
//
|
||||
// SerialNrFilter
|
||||
// SerialNrFilterUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "SerialNrFilter";
|
||||
this.Name = "SerialNrFilterUI";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
|
||||
@@ -35,5 +35,14 @@ namespace ResultsBrowser.Filters
|
||||
{
|
||||
data.SerialNr = serialNrTextBox.Text;
|
||||
}
|
||||
|
||||
private void serialNrTextBox_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
serialNrTextBox.Text = string.Format("@{0}", dlg.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
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 WMPositionFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "WM_position"; }
|
||||
public static string GetFilterName() { return "WM Position"; }
|
||||
|
||||
///
|
||||
/// 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 int WMPosition;
|
||||
|
||||
|
||||
private WMPositionFilterUI userIface;
|
||||
|
||||
public WMPositionFilter()
|
||||
{
|
||||
userIface = new WMPositionFilterUI(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>()
|
||||
.List<Batch>();
|
||||
|
||||
foreach (var b in batches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) if (wm.WMPosition == this.WMPosition) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.WMPosition == this.WMPosition) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class WMPositionFilterUI
|
||||
{
|
||||
/// <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.wmPositionTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.wmPositionTextBox);
|
||||
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 = "WM Position";
|
||||
//
|
||||
// wmPositionTextBox
|
||||
//
|
||||
this.wmPositionTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.wmPositionTextBox.Name = "wmPositionTextBox";
|
||||
this.wmPositionTextBox.Size = new System.Drawing.Size(80, 20);
|
||||
this.wmPositionTextBox.TabIndex = 0;
|
||||
//
|
||||
// WMPositionFilterUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "WMPositionFilterUI";
|
||||
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 wmPositionTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class WMPositionFilterUI : UserControl
|
||||
{
|
||||
WMPositionFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public WMPositionFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public WMPositionFilterUI(WMPositionFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = WMPositionFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
wmPositionTextBox.Text = data.WMPosition.ToString();
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
int pos;
|
||||
if (int.TryParse(wmPositionTextBox.Text, out pos) && (pos >= 1) && (pos <= 40))
|
||||
{
|
||||
data.WMPosition = pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.WMPosition = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+218
-198
@@ -28,204 +28,222 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.connectionStringTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.benchNameTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.languageLabel = new System.Windows.Forms.Label();
|
||||
this.languageTextBox = new System.Windows.Forms.TextBox();
|
||||
this.formatLabel = new System.Windows.Forms.Label();
|
||||
this.timePeriodFormatTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// connectionStringTextBox1
|
||||
//
|
||||
this.connectionStringTextBox1.Location = new System.Drawing.Point(157, 45);
|
||||
this.connectionStringTextBox1.Name = "connectionStringTextBox1";
|
||||
this.connectionStringTextBox1.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox1.TabIndex = 3;
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(26, 20);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.benchNameLabel.TabIndex = 0;
|
||||
this.benchNameLabel.Text = "Bench name";
|
||||
//
|
||||
// connectionStringLabel
|
||||
//
|
||||
this.connectionStringLabel.AutoSize = true;
|
||||
this.connectionStringLabel.Location = new System.Drawing.Point(154, 20);
|
||||
this.connectionStringLabel.Name = "connectionStringLabel";
|
||||
this.connectionStringLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.connectionStringLabel.TabIndex = 1;
|
||||
this.connectionStringLabel.Text = "Connection string";
|
||||
//
|
||||
// connectionStringTextBox2
|
||||
//
|
||||
this.connectionStringTextBox2.Location = new System.Drawing.Point(157, 71);
|
||||
this.connectionStringTextBox2.Name = "connectionStringTextBox2";
|
||||
this.connectionStringTextBox2.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox2.TabIndex = 5;
|
||||
//
|
||||
// connectionStringTextBox3
|
||||
//
|
||||
this.connectionStringTextBox3.Location = new System.Drawing.Point(157, 97);
|
||||
this.connectionStringTextBox3.Name = "connectionStringTextBox3";
|
||||
this.connectionStringTextBox3.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox3.TabIndex = 7;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(506, 250);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 18;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(617, 250);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 19;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// benchNameTextBox1
|
||||
//
|
||||
this.benchNameTextBox1.Location = new System.Drawing.Point(29, 45);
|
||||
this.benchNameTextBox1.Name = "benchNameTextBox1";
|
||||
this.benchNameTextBox1.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox1.TabIndex = 2;
|
||||
//
|
||||
// benchNameTextBox2
|
||||
//
|
||||
this.benchNameTextBox2.Location = new System.Drawing.Point(29, 71);
|
||||
this.benchNameTextBox2.Name = "benchNameTextBox2";
|
||||
this.benchNameTextBox2.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox2.TabIndex = 4;
|
||||
//
|
||||
// benchNameTextBox3
|
||||
//
|
||||
this.benchNameTextBox3.Location = new System.Drawing.Point(29, 97);
|
||||
this.benchNameTextBox3.Name = "benchNameTextBox3";
|
||||
this.benchNameTextBox3.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox3.TabIndex = 6;
|
||||
//
|
||||
// languageLabel
|
||||
//
|
||||
this.languageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageLabel.AutoSize = true;
|
||||
this.languageLabel.Location = new System.Drawing.Point(26, 239);
|
||||
this.languageLabel.Name = "languageLabel";
|
||||
this.languageLabel.Size = new System.Drawing.Size(55, 13);
|
||||
this.languageLabel.TabIndex = 14;
|
||||
this.languageLabel.Text = "Language";
|
||||
//
|
||||
// languageTextBox
|
||||
//
|
||||
this.languageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageTextBox.Location = new System.Drawing.Point(29, 263);
|
||||
this.languageTextBox.Name = "languageTextBox";
|
||||
this.languageTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.languageTextBox.TabIndex = 15;
|
||||
//
|
||||
// formatLabel
|
||||
//
|
||||
this.formatLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.formatLabel.AutoSize = true;
|
||||
this.formatLabel.Location = new System.Drawing.Point(26, 185);
|
||||
this.formatLabel.Name = "formatLabel";
|
||||
this.formatLabel.Size = new System.Drawing.Size(94, 13);
|
||||
this.formatLabel.TabIndex = 12;
|
||||
this.formatLabel.Text = "Time period format";
|
||||
//
|
||||
// timePeriodFormatTextBox
|
||||
//
|
||||
this.timePeriodFormatTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 207);
|
||||
this.timePeriodFormatTextBox.Name = "timePeriodFormatTextBox";
|
||||
this.timePeriodFormatTextBox.Size = new System.Drawing.Size(683, 20);
|
||||
this.timePeriodFormatTextBox.TabIndex = 13;
|
||||
//
|
||||
// benchNameTextBox5
|
||||
//
|
||||
this.benchNameTextBox5.Location = new System.Drawing.Point(29, 149);
|
||||
this.benchNameTextBox5.Name = "benchNameTextBox5";
|
||||
this.benchNameTextBox5.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox5.TabIndex = 10;
|
||||
//
|
||||
// benchNameTextBox4
|
||||
//
|
||||
this.benchNameTextBox4.Location = new System.Drawing.Point(29, 123);
|
||||
this.benchNameTextBox4.Name = "benchNameTextBox4";
|
||||
this.benchNameTextBox4.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox4.TabIndex = 8;
|
||||
//
|
||||
// connectionStringTextBox5
|
||||
//
|
||||
this.connectionStringTextBox5.Location = new System.Drawing.Point(157, 149);
|
||||
this.connectionStringTextBox5.Name = "connectionStringTextBox5";
|
||||
this.connectionStringTextBox5.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox5.TabIndex = 11;
|
||||
//
|
||||
// connectionStringTextBox4
|
||||
//
|
||||
this.connectionStringTextBox4.Location = new System.Drawing.Point(157, 123);
|
||||
this.connectionStringTextBox4.Name = "connectionStringTextBox4";
|
||||
this.connectionStringTextBox4.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox4.TabIndex = 9;
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(743, 310);
|
||||
this.Controls.Add(this.benchNameTextBox5);
|
||||
this.Controls.Add(this.benchNameTextBox4);
|
||||
this.Controls.Add(this.connectionStringTextBox5);
|
||||
this.Controls.Add(this.connectionStringTextBox4);
|
||||
this.Controls.Add(this.timePeriodFormatTextBox);
|
||||
this.Controls.Add(this.formatLabel);
|
||||
this.Controls.Add(this.languageTextBox);
|
||||
this.Controls.Add(this.languageLabel);
|
||||
this.Controls.Add(this.benchNameTextBox3);
|
||||
this.Controls.Add(this.benchNameTextBox2);
|
||||
this.Controls.Add(this.benchNameTextBox1);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.connectionStringTextBox3);
|
||||
this.Controls.Add(this.connectionStringLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox2);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox1);
|
||||
this.Name = "DatabaseSettingsDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Settings";
|
||||
this.Load += new System.EventHandler(this.DatabaseSettings_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.connectionStringTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.benchNameTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.languageLabel = new System.Windows.Forms.Label();
|
||||
this.languageTextBox = new System.Windows.Forms.TextBox();
|
||||
this.formatLabel = new System.Windows.Forms.Label();
|
||||
this.timePeriodFormatTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox5 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// connectionStringTextBox1
|
||||
//
|
||||
this.connectionStringTextBox1.Location = new System.Drawing.Point(157, 45);
|
||||
this.connectionStringTextBox1.Name = "connectionStringTextBox1";
|
||||
this.connectionStringTextBox1.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox1.TabIndex = 3;
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(26, 23);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.benchNameLabel.TabIndex = 0;
|
||||
this.benchNameLabel.Text = "Bench name";
|
||||
//
|
||||
// connectionStringLabel
|
||||
//
|
||||
this.connectionStringLabel.AutoSize = true;
|
||||
this.connectionStringLabel.Location = new System.Drawing.Point(154, 23);
|
||||
this.connectionStringLabel.Name = "connectionStringLabel";
|
||||
this.connectionStringLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.connectionStringLabel.TabIndex = 1;
|
||||
this.connectionStringLabel.Text = "Connection string";
|
||||
//
|
||||
// connectionStringTextBox2
|
||||
//
|
||||
this.connectionStringTextBox2.Location = new System.Drawing.Point(157, 69);
|
||||
this.connectionStringTextBox2.Name = "connectionStringTextBox2";
|
||||
this.connectionStringTextBox2.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox2.TabIndex = 5;
|
||||
//
|
||||
// connectionStringTextBox3
|
||||
//
|
||||
this.connectionStringTextBox3.Location = new System.Drawing.Point(157, 93);
|
||||
this.connectionStringTextBox3.Name = "connectionStringTextBox3";
|
||||
this.connectionStringTextBox3.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox3.TabIndex = 7;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(506, 250);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 18;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(617, 250);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 19;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// benchNameTextBox1
|
||||
//
|
||||
this.benchNameTextBox1.Location = new System.Drawing.Point(29, 45);
|
||||
this.benchNameTextBox1.Name = "benchNameTextBox1";
|
||||
this.benchNameTextBox1.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox1.TabIndex = 2;
|
||||
//
|
||||
// benchNameTextBox2
|
||||
//
|
||||
this.benchNameTextBox2.Location = new System.Drawing.Point(29, 69);
|
||||
this.benchNameTextBox2.Name = "benchNameTextBox2";
|
||||
this.benchNameTextBox2.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox2.TabIndex = 4;
|
||||
//
|
||||
// benchNameTextBox3
|
||||
//
|
||||
this.benchNameTextBox3.Location = new System.Drawing.Point(29, 93);
|
||||
this.benchNameTextBox3.Name = "benchNameTextBox3";
|
||||
this.benchNameTextBox3.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox3.TabIndex = 6;
|
||||
//
|
||||
// languageLabel
|
||||
//
|
||||
this.languageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageLabel.AutoSize = true;
|
||||
this.languageLabel.Location = new System.Drawing.Point(26, 245);
|
||||
this.languageLabel.Name = "languageLabel";
|
||||
this.languageLabel.Size = new System.Drawing.Size(55, 13);
|
||||
this.languageLabel.TabIndex = 14;
|
||||
this.languageLabel.Text = "Language";
|
||||
//
|
||||
// languageTextBox
|
||||
//
|
||||
this.languageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageTextBox.Location = new System.Drawing.Point(29, 263);
|
||||
this.languageTextBox.Name = "languageTextBox";
|
||||
this.languageTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.languageTextBox.TabIndex = 15;
|
||||
//
|
||||
// formatLabel
|
||||
//
|
||||
this.formatLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.formatLabel.AutoSize = true;
|
||||
this.formatLabel.Location = new System.Drawing.Point(26, 196);
|
||||
this.formatLabel.Name = "formatLabel";
|
||||
this.formatLabel.Size = new System.Drawing.Size(94, 13);
|
||||
this.formatLabel.TabIndex = 12;
|
||||
this.formatLabel.Text = "Time period format";
|
||||
//
|
||||
// timePeriodFormatTextBox
|
||||
//
|
||||
this.timePeriodFormatTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 215);
|
||||
this.timePeriodFormatTextBox.Name = "timePeriodFormatTextBox";
|
||||
this.timePeriodFormatTextBox.Size = new System.Drawing.Size(683, 20);
|
||||
this.timePeriodFormatTextBox.TabIndex = 13;
|
||||
//
|
||||
// benchNameTextBox5
|
||||
//
|
||||
this.benchNameTextBox5.Location = new System.Drawing.Point(29, 141);
|
||||
this.benchNameTextBox5.Name = "benchNameTextBox5";
|
||||
this.benchNameTextBox5.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox5.TabIndex = 10;
|
||||
//
|
||||
// benchNameTextBox4
|
||||
//
|
||||
this.benchNameTextBox4.Location = new System.Drawing.Point(29, 117);
|
||||
this.benchNameTextBox4.Name = "benchNameTextBox4";
|
||||
this.benchNameTextBox4.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox4.TabIndex = 8;
|
||||
//
|
||||
// connectionStringTextBox5
|
||||
//
|
||||
this.connectionStringTextBox5.Location = new System.Drawing.Point(157, 141);
|
||||
this.connectionStringTextBox5.Name = "connectionStringTextBox5";
|
||||
this.connectionStringTextBox5.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox5.TabIndex = 11;
|
||||
//
|
||||
// connectionStringTextBox4
|
||||
//
|
||||
this.connectionStringTextBox4.Location = new System.Drawing.Point(157, 117);
|
||||
this.connectionStringTextBox4.Name = "connectionStringTextBox4";
|
||||
this.connectionStringTextBox4.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox4.TabIndex = 9;
|
||||
//
|
||||
// benchNameTextBox6
|
||||
//
|
||||
this.benchNameTextBox6.Location = new System.Drawing.Point(29, 165);
|
||||
this.benchNameTextBox6.Name = "benchNameTextBox6";
|
||||
this.benchNameTextBox6.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox6.TabIndex = 20;
|
||||
//
|
||||
// connectionStringTextBox6
|
||||
//
|
||||
this.connectionStringTextBox6.Location = new System.Drawing.Point(157, 165);
|
||||
this.connectionStringTextBox6.Name = "connectionStringTextBox6";
|
||||
this.connectionStringTextBox6.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox6.TabIndex = 21;
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(743, 310);
|
||||
this.Controls.Add(this.benchNameTextBox6);
|
||||
this.Controls.Add(this.connectionStringTextBox6);
|
||||
this.Controls.Add(this.benchNameTextBox5);
|
||||
this.Controls.Add(this.benchNameTextBox4);
|
||||
this.Controls.Add(this.connectionStringTextBox5);
|
||||
this.Controls.Add(this.connectionStringTextBox4);
|
||||
this.Controls.Add(this.timePeriodFormatTextBox);
|
||||
this.Controls.Add(this.formatLabel);
|
||||
this.Controls.Add(this.languageTextBox);
|
||||
this.Controls.Add(this.languageLabel);
|
||||
this.Controls.Add(this.benchNameTextBox3);
|
||||
this.Controls.Add(this.benchNameTextBox2);
|
||||
this.Controls.Add(this.benchNameTextBox1);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.connectionStringTextBox3);
|
||||
this.Controls.Add(this.connectionStringLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox2);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox1);
|
||||
this.Name = "DatabaseSettingsDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Settings";
|
||||
this.Load += new System.EventHandler(this.DatabaseSettings_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -249,5 +267,7 @@
|
||||
private System.Windows.Forms.TextBox benchNameTextBox4;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox5;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox4;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox6;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox6;
|
||||
}
|
||||
}
|
||||
@@ -22,12 +22,14 @@ namespace ResultsBrowser.Forms
|
||||
benchNameTextBox3.Text = Program.LocalSettings.Bench3;
|
||||
benchNameTextBox4.Text = Program.LocalSettings.Bench4;
|
||||
benchNameTextBox5.Text = Program.LocalSettings.Bench5;
|
||||
benchNameTextBox6.Text = Program.LocalSettings.Bench6;
|
||||
|
||||
connectionStringTextBox1.Text = Program.LocalSettings.ConnectionString1;
|
||||
connectionStringTextBox2.Text = Program.LocalSettings.ConnectionString2;
|
||||
connectionStringTextBox3.Text = Program.LocalSettings.ConnectionString3;
|
||||
connectionStringTextBox4.Text = Program.LocalSettings.ConnectionString4;
|
||||
connectionStringTextBox5.Text = Program.LocalSettings.ConnectionString5;
|
||||
connectionStringTextBox6.Text = Program.LocalSettings.ConnectionString6;
|
||||
|
||||
timePeriodFormatTextBox.Text = Program.LocalSettings.TimePeriodFormat;
|
||||
|
||||
@@ -52,12 +54,14 @@ namespace ResultsBrowser.Forms
|
||||
Program.LocalSettings.Bench3 = benchNameTextBox3.Text;
|
||||
Program.LocalSettings.Bench4 = benchNameTextBox4.Text;
|
||||
Program.LocalSettings.Bench5 = benchNameTextBox5.Text;
|
||||
Program.LocalSettings.Bench6 = benchNameTextBox6.Text;
|
||||
|
||||
Program.LocalSettings.ConnectionString1 = connectionStringTextBox1.Text;
|
||||
Program.LocalSettings.ConnectionString2 = connectionStringTextBox2.Text;
|
||||
Program.LocalSettings.ConnectionString3 = connectionStringTextBox3.Text;
|
||||
Program.LocalSettings.ConnectionString4 = connectionStringTextBox4.Text;
|
||||
Program.LocalSettings.ConnectionString5 = connectionStringTextBox5.Text;
|
||||
Program.LocalSettings.ConnectionString6 = connectionStringTextBox6.Text;
|
||||
|
||||
Program.LocalSettings.TimePeriodFormat = timePeriodFormatTextBox.Text;
|
||||
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class HistogramCtrl
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
|
||||
this.myChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
((System.ComponentModel.ISupportInitialize)(this.myChart)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// myChart
|
||||
//
|
||||
chartArea1.Name = "ChartArea1";
|
||||
this.myChart.ChartAreas.Add(chartArea1);
|
||||
this.myChart.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
legend1.Name = "Legend1";
|
||||
this.myChart.Legends.Add(legend1);
|
||||
this.myChart.Location = new System.Drawing.Point(0, 0);
|
||||
this.myChart.Name = "myChart";
|
||||
this.myChart.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.Bright;
|
||||
series1.ChartArea = "ChartArea1";
|
||||
series1.Legend = "Legend1";
|
||||
series1.Name = "Series1";
|
||||
this.myChart.Series.Add(series1);
|
||||
this.myChart.Size = new System.Drawing.Size(400, 300);
|
||||
this.myChart.TabIndex = 0;
|
||||
this.myChart.Text = "chart1";
|
||||
title1.Name = "Title1";
|
||||
title1.Text = "Title1";
|
||||
this.myChart.Titles.Add(title1);
|
||||
//
|
||||
// HistogramCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.myChart);
|
||||
this.Name = "HistogramCtrl";
|
||||
this.Size = new System.Drawing.Size(400, 300);
|
||||
((System.ComponentModel.ISupportInitialize)(this.myChart)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataVisualization.Charting.Chart myChart;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class HistogramCtrl : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Create user control that displays a bar chart iwth custom X-axis labels.
|
||||
/// </summary>
|
||||
/// <param name="title">Title of the chart displayed at the top</param>
|
||||
/// <param name="values">Values = bar lengths</param>
|
||||
/// <param name="labels">Labels for the X-axis</param>
|
||||
public HistogramCtrl(string title, double[] values, string[] labels)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (myChart.Titles.Count > 0) myChart.Titles[0].Text = title;
|
||||
|
||||
if ((myChart.Series.Count > 0) && (values != null))
|
||||
{
|
||||
int startOffset = -1;
|
||||
int endOffset = 1;
|
||||
for (int i = 0; i < Math.Min(values.Length + 1, labels.Length); i++)
|
||||
{
|
||||
if (i < values.Length) myChart.Series[0].Points.Add(values[i]);
|
||||
if (!string.IsNullOrEmpty(labels[i]))
|
||||
{
|
||||
myChart.ChartAreas[0].AxisX.CustomLabels.Add(new System.Windows.Forms.DataVisualization.Charting.CustomLabel(startOffset, endOffset, labels[i], 0, LabelMarkStyle.None));
|
||||
}
|
||||
startOffset = startOffset + 1;
|
||||
endOffset = endOffset + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class HistogramDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.exportButton = new System.Windows.Forms.Button();
|
||||
this.printButton = new System.Windows.Forms.Button();
|
||||
this.closeButton = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(572, 409);
|
||||
this.splitContainer1.SplitterDistance = 320;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.exportButton);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.printButton);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.closeButton);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(572, 85);
|
||||
this.splitContainer2.SplitterDistance = 249;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// exportButton
|
||||
//
|
||||
this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.exportButton.Location = new System.Drawing.Point(103, 21);
|
||||
this.exportButton.Name = "exportButton";
|
||||
this.exportButton.Size = new System.Drawing.Size(94, 41);
|
||||
this.exportButton.TabIndex = 1;
|
||||
this.exportButton.Text = "Export";
|
||||
this.exportButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// printButton
|
||||
//
|
||||
this.printButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.printButton.Location = new System.Drawing.Point(4, 21);
|
||||
this.printButton.Name = "printButton";
|
||||
this.printButton.Size = new System.Drawing.Size(94, 41);
|
||||
this.printButton.TabIndex = 0;
|
||||
this.printButton.Text = "Print";
|
||||
this.printButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// closeButton
|
||||
//
|
||||
this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.closeButton.Location = new System.Drawing.Point(203, 21);
|
||||
this.closeButton.Name = "closeButton";
|
||||
this.closeButton.Size = new System.Drawing.Size(94, 41);
|
||||
this.closeButton.TabIndex = 2;
|
||||
this.closeButton.Text = "Close";
|
||||
this.closeButton.UseVisualStyleBackColor = true;
|
||||
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(572, 320);
|
||||
this.flowLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// HistogramDlg
|
||||
//
|
||||
this.AcceptButton = this.closeButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(572, 409);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "HistogramDlg";
|
||||
this.Text = "HistogramDlg";
|
||||
this.Load += new System.EventHandler(this.HistogramDlg_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.Button closeButton;
|
||||
private System.Windows.Forms.Button printButton;
|
||||
private System.Windows.Forms.Button exportButton;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
using ResultsBrowser.Output.Printers.Statistics;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class HistogramDlg : Form
|
||||
{
|
||||
const int NrBins = 11;
|
||||
|
||||
IList<WaterMeter> waterMeters;
|
||||
HistogramOptionsDlg options;
|
||||
|
||||
public HistogramDlg(IList<WaterMeter> waterMeters, HistogramOptionsDlg options, string title)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.waterMeters = waterMeters;
|
||||
this.options = options;
|
||||
Text = title;
|
||||
|
||||
closeButton.Text = Strings.OkBtnText;
|
||||
printButton.Text = Strings.Print;
|
||||
}
|
||||
|
||||
private void HistogramDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
CalculateAndDraw();
|
||||
}
|
||||
|
||||
void CalculateAndDraw()
|
||||
{
|
||||
for (int i = 0; i < options.SelectedItems.Count; i++)
|
||||
{
|
||||
Results.WMeterRsltItemSpec item = options.SelectedItems[i];
|
||||
|
||||
try
|
||||
{
|
||||
/// Find minimum and maximum
|
||||
double min = Double.MaxValue;
|
||||
double max = Double.MinValue;
|
||||
double sum = 0;
|
||||
int count = 0;
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
string strValue = item.Print(wm);
|
||||
double value;
|
||||
if (!double.TryParse(strValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.CurrentCulture, out value) &&
|
||||
!double.TryParse(strValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out value))
|
||||
{
|
||||
throw new Exception(string.Format("{0} is not a number, cannot calculate histogram", item.Caption));
|
||||
}
|
||||
|
||||
sum += value;
|
||||
count++;
|
||||
if (min > value) min = value;
|
||||
if (max < value) max = value;
|
||||
}
|
||||
|
||||
double mean = (count != 0) ? (sum / count) : 0; /// Prevent division by zero
|
||||
|
||||
///
|
||||
/// Determine limits for bins
|
||||
///
|
||||
double[] binHiLim;
|
||||
string[] labels;
|
||||
if ((-0.55 <= min) && (max <= 0.55))
|
||||
{
|
||||
labels = new string[] { "-0.6", "", "-0.4", "", "-0.2", "", "0", "", "0.2", "", "0.4", "", "0.6" };
|
||||
binHiLim = new double[] { -0.45, -0.35, -0.25, -0.15, -0.05, 0.05, 0.15, 0.25, 0.35, 0.45, 0.55 };
|
||||
}
|
||||
else if ((-1.1 <= min) && (max <= 1.1))
|
||||
{
|
||||
labels = new string[] { "-1.2", "", "-0.8", "", "-0.4", "", "0", "", "0.4", "", "0.8", "", "1.2" };
|
||||
binHiLim = new double[] { -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 0.5, 0.7, 0.9, 1.1 };
|
||||
}
|
||||
else if ((-2.2 <= min) && (max <= 2.2))
|
||||
{
|
||||
labels = new string[] { "-2.4", "", "-1.6", "", "-0.8", "", "0", "", "0.8", "", "1.6", "", "2.4" };
|
||||
binHiLim = new double[] { -1.8, -1.4, -1.0, -0.6, -0.2, 0.2, 0.6, 1.0, 1.4, 1.8, 2.2 };
|
||||
}
|
||||
else if ((-4.4 <= min) && (max <= 4.4))
|
||||
{
|
||||
labels = new string[] { "-4.8", "", "-3.2", "", "-1.6", "", "0", "", "1.6", "", "3.2", "", "4.8" };
|
||||
binHiLim = new double[] { -3.6, -2.8, -2.0, -1.2, -0.4, 0.4, 1.2, 2.0, 2.8, 3.6, 4.4 };
|
||||
}
|
||||
else
|
||||
{
|
||||
labels = new string[] { "-9.6", "", "-6.4", "", "-3.2", "", "0", "", "3.2", "", "6.4", "", "9.6" };
|
||||
binHiLim = new double[] { -7.2, -5.6, -4.0, -2.4, -0.8, 0.8, 2.4, 4.0, 5.6, 7.2, 8.8 };
|
||||
}
|
||||
|
||||
int nrBins = Math.Min(labels.Length - 1, binHiLim.Length + 1);
|
||||
|
||||
double[] bins = new double[nrBins];
|
||||
for (int j = 0; j < nrBins; j++) bins[j] = 0;
|
||||
|
||||
/// Calculate bins
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
string strValue = item.Print(wm);
|
||||
double value;
|
||||
if (!double.TryParse(strValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.CurrentCulture, out value) &&
|
||||
!double.TryParse(strValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out value))
|
||||
{
|
||||
throw new Exception(string.Format("{0} is not a number, cannot calculate histogram", item.Caption));
|
||||
}
|
||||
|
||||
for (int j = 0; j < nrBins - 1; j++)
|
||||
{
|
||||
if (value < binHiLim[j])
|
||||
{
|
||||
bins[j] += 1.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (value >= binHiLim[nrBins - 2])
|
||||
{
|
||||
bins[nrBins - 1] += 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Draw
|
||||
///
|
||||
HistogramCtrl histo = new HistogramCtrl(string.Format("{0} mean = {1}", item.Caption, mean.ToString("F3")), bins, labels);
|
||||
flowLayoutPanel1.Controls.Add(histo);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
string msg = exc.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void closeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,91 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class HistogramOptionsDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(380, 302);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 9;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(269, 302);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 8;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(12, 12);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(479, 271);
|
||||
this.flowLayoutPanel1.TabIndex = 10;
|
||||
//
|
||||
// HistogramOptionsDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(503, 355);
|
||||
this.Controls.Add(this.flowLayoutPanel1);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Name = "HistogramOptionsDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "HistogramOptionsDlg";
|
||||
this.Load += new System.EventHandler(this.HistogramOptionsDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class HistogramOptionsDlg : Form
|
||||
{
|
||||
IList<Results.WMeterRsltItemSpec> items;
|
||||
public IList<Results.WMeterRsltItemSpec> SelectedItems;
|
||||
|
||||
IList<CheckBox> checkBoxes;
|
||||
|
||||
public HistogramOptionsDlg(IList<Results.WMeterRsltItemSpec> items)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.items = items;
|
||||
|
||||
checkBoxes = new List<CheckBox>();
|
||||
}
|
||||
|
||||
private void HistogramOptionsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
CheckBox cb = new CheckBox();
|
||||
cb.Text = item.Caption;
|
||||
cb.Checked = false;
|
||||
flowLayoutPanel1.Controls.Add(cb);
|
||||
checkBoxes.Add(cb);
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Statistics;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
SelectedItems = new List<Results.WMeterRsltItemSpec>();
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
if (checkBoxes[i].Checked) SelectedItems.Add(items[i]);
|
||||
}
|
||||
|
||||
//Program.LocalSettings.RowItemCaption = RowItem.Caption;
|
||||
// ...
|
||||
//Program.LocalSettings.Save();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Results.Entities;
|
||||
@@ -11,22 +14,7 @@ namespace ResultsBrowser.Forms
|
||||
public partial class StatisticsDlg : Form
|
||||
{
|
||||
IList<WaterMeter> waterMeters;
|
||||
|
||||
bool twoDim;
|
||||
|
||||
Results.WMeterRsltItemSpec rowItem;
|
||||
Results.WMeterRsltItemSpec rowItem2;
|
||||
Results.WMeterRsltItemSpec rowItem3;
|
||||
Results.WMeterRsltItemSpec columnItem;
|
||||
Results.WMeterRsltItemSpec columnItem2;
|
||||
Results.WMeterRsltItemSpec columnItem3;
|
||||
|
||||
string rowTestSpec;
|
||||
string rowTestSpec2;
|
||||
string rowTestSpec3;
|
||||
string columnTestSpec;
|
||||
string columnTestSpec2;
|
||||
string columnTestSpec3;
|
||||
StatisticsOptionsDlg options;
|
||||
|
||||
IList<string> rowValues;
|
||||
IList<string> columnValues;
|
||||
@@ -36,23 +24,14 @@ namespace ResultsBrowser.Forms
|
||||
string title;
|
||||
|
||||
|
||||
public StatisticsDlg(IList<WaterMeter> waterMeters, bool twoDim,
|
||||
Results.WMeterRsltItemSpec rowItem,
|
||||
Results.WMeterRsltItemSpec rowItem2,
|
||||
Results.WMeterRsltItemSpec rowItem3,
|
||||
Results.WMeterRsltItemSpec columnItem,
|
||||
Results.WMeterRsltItemSpec columnItem2,
|
||||
Results.WMeterRsltItemSpec columnItem3,
|
||||
string rowTestSpec,
|
||||
string rowTestSpec2,
|
||||
string rowTestSpec3,
|
||||
string columnTestSpec,
|
||||
string columnTestSpec2,
|
||||
string columnTestSpec3,
|
||||
public StatisticsDlg(IList<WaterMeter> waterMeters, StatisticsOptionsDlg options,
|
||||
DateTime startDate, DateTime endDate)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.waterMeters = waterMeters;
|
||||
this.options = options;
|
||||
|
||||
if (!string.IsNullOrEmpty(Program.LocalSettings.TimePeriodFormat) && (startDate != new DateTime(0)) && (endDate != new DateTime(0)))
|
||||
{
|
||||
title = string.Format(Program.LocalSettings.TimePeriodFormat, startDate, endDate);
|
||||
@@ -66,26 +45,6 @@ namespace ResultsBrowser.Forms
|
||||
|
||||
closeButton.Text = Strings.OkBtnText;
|
||||
printButton.Text = Strings.Print;
|
||||
|
||||
this.waterMeters = waterMeters;
|
||||
|
||||
this.twoDim = twoDim;
|
||||
|
||||
this.rowItem = rowItem;
|
||||
this.rowItem2 = rowItem2;
|
||||
this.rowItem3 = rowItem3;
|
||||
|
||||
this.columnItem = columnItem;
|
||||
this.columnItem2 = columnItem2;
|
||||
this.columnItem3 = columnItem3;
|
||||
|
||||
this.rowTestSpec = rowTestSpec;
|
||||
this.rowTestSpec2 = rowTestSpec2;
|
||||
this.rowTestSpec3 = rowTestSpec3;
|
||||
|
||||
this.columnTestSpec = columnTestSpec;
|
||||
this.columnTestSpec2 = columnTestSpec2;
|
||||
this.columnTestSpec3 = columnTestSpec3;
|
||||
}
|
||||
|
||||
private void StatisticsDlg_Load(object sender, EventArgs e)
|
||||
@@ -105,16 +64,16 @@ namespace ResultsBrowser.Forms
|
||||
///
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
string value = rowItem.Print(wm);
|
||||
if (rowItem2 != null) value = value + " | " + rowItem2.Print(wm);
|
||||
if (rowItem3 != null) value = value + " | " + rowItem3.Print(wm);
|
||||
string value = options.RowItem.Print(wm);
|
||||
if (options.RowItem2 != null) value = value + " | " + options.RowItem2.Print(wm);
|
||||
if (options.RowItem3 != null) value = value + " | " + options.RowItem3.Print(wm);
|
||||
if (!rowValues.Contains(value)) rowValues.Add(value);
|
||||
|
||||
if (twoDim)
|
||||
if (options.TwoDim)
|
||||
{
|
||||
value = columnItem.Print(wm);
|
||||
if (columnItem2 != null) value = value + " | " + columnItem2.Print(wm);
|
||||
if (columnItem3 != null) value = value + " | " + columnItem3.Print(wm);
|
||||
value = options.ColumnItem.Print(wm);
|
||||
if (options.ColumnItem2 != null) value = value + " | " + options.ColumnItem2.Print(wm);
|
||||
if (options.ColumnItem3 != null) value = value + " | " + options.ColumnItem3.Print(wm);
|
||||
if (!columnValues.Contains(value)) columnValues.Add(value);
|
||||
}
|
||||
}
|
||||
@@ -129,17 +88,17 @@ namespace ResultsBrowser.Forms
|
||||
{
|
||||
for (int row = 0; row < rowValues.Count; row++)
|
||||
{
|
||||
string rowValue = rowItem.Print(wm);
|
||||
if (rowItem2 != null) rowValue = rowValue + " | " + rowItem2.Print(wm);
|
||||
if (rowItem3 != null) rowValue = rowValue + " | " + rowItem3.Print(wm);
|
||||
string rowValue = options.RowItem.Print(wm);
|
||||
if (options.RowItem2 != null) rowValue = rowValue + " | " + options.RowItem2.Print(wm);
|
||||
if (options.RowItem3 != null) rowValue = rowValue + " | " + options.RowItem3.Print(wm);
|
||||
|
||||
if (twoDim)
|
||||
if (options.TwoDim)
|
||||
{
|
||||
for (int column = 0; column < columnsCount; column++)
|
||||
{
|
||||
string columnValue = columnItem.Print(wm);
|
||||
if (columnItem2 != null) columnValue = columnValue + " | " + columnItem2.Print(wm);
|
||||
if (columnItem3 != null) columnValue = columnValue + " | " + columnItem3.Print(wm);
|
||||
string columnValue = options.ColumnItem.Print(wm);
|
||||
if (options.ColumnItem2 != null) columnValue = columnValue + " | " + options.ColumnItem2.Print(wm);
|
||||
if (options.ColumnItem3 != null) columnValue = columnValue + " | " + options.ColumnItem3.Print(wm);
|
||||
|
||||
if (rowValue == rowValues[row] && columnValue == columnValues[column])
|
||||
{
|
||||
@@ -164,7 +123,7 @@ namespace ResultsBrowser.Forms
|
||||
statisticsListView.Columns.Add(" ", 200);
|
||||
for (int column = 0; column < columnsCount; column++)
|
||||
{
|
||||
statisticsListView.Columns.Add((twoDim ? columnValues[column] : Strings.Count), 70);
|
||||
statisticsListView.Columns.Add((options.TwoDim ? columnValues[column] : Strings.Count), 70);
|
||||
}
|
||||
|
||||
for (int row = 0; row < rowValues.Count; row++)
|
||||
@@ -197,7 +156,7 @@ namespace ResultsBrowser.Forms
|
||||
table[0, 0] = string.Empty;
|
||||
for (int column = 0; column < columnsCount; column++)
|
||||
{
|
||||
table[0, column + 1] = (twoDim ? columnValues[column] : Strings.Count);
|
||||
table[0, column + 1] = (options.TwoDim ? columnValues[column] : Strings.Count);
|
||||
}
|
||||
|
||||
for (int row = 0; row < rowValues.Count; row++)
|
||||
@@ -234,7 +193,7 @@ namespace ResultsBrowser.Forms
|
||||
{
|
||||
using (TextWriter writer = new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8))
|
||||
{
|
||||
if (twoDim)
|
||||
if (options.TwoDim)
|
||||
{
|
||||
/// Write column headers
|
||||
for (int i = 0; i < columnValues.Count; i++)
|
||||
@@ -245,7 +204,7 @@ namespace ResultsBrowser.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteLine(string.Format("\"{0}\";\"{1}\"", rowItem.Caption, Strings.Count));
|
||||
writer.WriteLine(string.Format("\"{0}\";\"{1}\"", options.RowItem.Caption, Strings.Count));
|
||||
}
|
||||
|
||||
int nrColumns = Math.Max(1, columnValues.Count);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -29,6 +29,7 @@ namespace ResultsBrowser
|
||||
public string Bench3;
|
||||
public string Bench4;
|
||||
public string Bench5;
|
||||
public string Bench6;
|
||||
|
||||
/// Database settings of servers.
|
||||
public string ConnectionString1;
|
||||
@@ -36,12 +37,14 @@ namespace ResultsBrowser
|
||||
public string ConnectionString3;
|
||||
public string ConnectionString4;
|
||||
public string ConnectionString5;
|
||||
public string ConnectionString6;
|
||||
|
||||
public bool Bench1Selected;
|
||||
public bool Bench2Selected;
|
||||
public bool Bench3Selected;
|
||||
public bool Bench4Selected;
|
||||
public bool Bench5Selected;
|
||||
public bool Bench6Selected;
|
||||
|
||||
public string TimePeriodFormat;
|
||||
|
||||
@@ -106,6 +109,21 @@ namespace ResultsBrowser
|
||||
|
||||
public LocalSettings()
|
||||
{
|
||||
#if TURA_IPERL || TURA_SPECIAL
|
||||
Bench1 = "WR10";
|
||||
Bench2 = "WR11";
|
||||
Bench3 = "WR13";
|
||||
Bench4 = "WR14";
|
||||
Bench5 = "WR15";
|
||||
Bench6 = "PT7";
|
||||
ConnectionString1 = "SERVER=10.42.128.93; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString2 = "SERVER=10.42.128.102; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString3 = "SERVER=10.42.128.89; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString4 = "SERVER=10.42.128.213; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString5 = "SERVER=10.42.128.214; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString6 = "SERVER=10.42.129.26; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
Language = "SK";
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+27
-29
@@ -14,25 +14,26 @@ namespace ResultsBrowser
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
static ILog log; /// log4net
|
||||
|
||||
/// Program information
|
||||
public static string Version; /// version string
|
||||
public static DateTime BuildDateTime; /// date and time of program build
|
||||
|
||||
/// Local settings
|
||||
public static readonly string ExecutableDirectory;
|
||||
public static readonly string ConfigDirectory;
|
||||
public static readonly string LogDirectory;
|
||||
public static readonly string LocalSettingsFileName;
|
||||
public static readonly string LocalSettingsBackupName;
|
||||
public static string ExecutableDirectory;
|
||||
public static string ConfigDirectory;
|
||||
public static string LogDirectory;
|
||||
public static string LocalSettingsFileName;
|
||||
public static string LocalSettingsBackupName;
|
||||
public static LocalSettings LocalSettings;
|
||||
|
||||
|
||||
public static System.Globalization.CultureInfo AltCulture;
|
||||
|
||||
static readonly ILog log; /// log4net
|
||||
|
||||
static Program()
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
/// Program version string
|
||||
System.Reflection.Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||
Version ver = thisAssembly.GetName().Version;
|
||||
@@ -41,26 +42,26 @@ namespace ResultsBrowser
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExecutableDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
ConfigDirectory = Path.Combine(ExecutableDirectory, "..\\Cfg\\");
|
||||
#if false
|
||||
/// 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));
|
||||
LogDirectory = Path.Combine(ExecutableDirectory, "..\\Log\\");
|
||||
LocalSettingsFileName = ConfigDirectory + "config.xml";
|
||||
LocalSettingsBackupName = ConfigDirectory + "config.backup.xml";
|
||||
#else
|
||||
/// Config directory is a directory in 'C:\Users\username\AppData\Local' folder
|
||||
ConfigDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
string.Format("ResultsBrowser{0}", (args.Length >= 1) ? args[0] : string.Empty));
|
||||
LogDirectory = "C:\\Temp\\ResultsBrowserLog\\";
|
||||
#endif
|
||||
LocalSettingsFileName = Path.Combine(ConfigDirectory, "config.xml");
|
||||
LocalSettingsBackupName = Path.Combine(ConfigDirectory, "config.backup.xml");
|
||||
|
||||
/// Configue and start logging
|
||||
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(ConfigDirectory + "log4netConfig.xml"));
|
||||
log = LogManager.GetLogger(typeof(Program));
|
||||
log.Fatal("------------------------------------------------------------------------------------------------");
|
||||
log.Fatal("started");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
///
|
||||
|
||||
///
|
||||
/// Load the local settings
|
||||
///
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
@@ -93,7 +94,7 @@ namespace ResultsBrowser
|
||||
|
||||
try
|
||||
{
|
||||
string culture = LocalSettings.Language.Replace('_', '-');
|
||||
string culture = (LocalSettings.Language != null) ? LocalSettings.Language.Replace('_', '-') : "EN";
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(culture);
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -107,9 +108,6 @@ namespace ResultsBrowser
|
||||
new System.Globalization.CultureInfo("en");
|
||||
}
|
||||
|
||||
//AltCulture = null;
|
||||
AltCulture = new System.Globalization.CultureInfo("SK");
|
||||
|
||||
|
||||
/// This belongs to Application.Run(new MainWnd()) ...
|
||||
/// and should be executed before opening 'loginDlg'
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1098.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1098.0")]
|
||||
[assembly: AssemblyVersion("2.18.1146.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1146.0")]
|
||||
|
||||
@@ -240,4 +240,7 @@
|
||||
<data name="Add_data_from_Oracle" xml:space="preserve">
|
||||
<value>Dohledej údaje z Oracle</value>
|
||||
</data>
|
||||
<data name="Histograms" xml:space="preserve">
|
||||
<value>Histogramy</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -828,4 +828,7 @@
|
||||
<data name="Add_data_from_Oracle" xml:space="preserve">
|
||||
<value>Add data from Oracle</value>
|
||||
</data>
|
||||
<data name="Histograms" xml:space="preserve">
|
||||
<value>Histograms</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -1257,6 +1257,15 @@ namespace ResultsBrowser.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Histograms.
|
||||
/// </summary>
|
||||
internal static string Histograms {
|
||||
get {
|
||||
return ResourceManager.GetString("Histograms", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Horizontally.
|
||||
/// </summary>
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Windows.Forms.DataVisualization" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -70,6 +71,13 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Filters\BatchNrFilter.cs" />
|
||||
<Compile Include="Filters\BatchNrFilterUI.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Filters\BatchNrFilterUI.designer.cs">
|
||||
<DependentUpon>BatchNrFilterUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Filters\DateFilterUI.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@@ -107,6 +115,13 @@
|
||||
<Compile Include="Filters\SerialNrFilterUI.Designer.cs">
|
||||
<DependentUpon>SerialNrFilterUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Filters\WMPositionFilter.cs" />
|
||||
<Compile Include="Filters\WMPositionFilterUI.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Filters\WMPositionFilterUI.designer.cs">
|
||||
<DependentUpon>WMPositionFilterUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\AddFilterDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -119,6 +134,24 @@
|
||||
<Compile Include="Forms\DatabaseSettingsDlg.Designer.cs">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\HistogramCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\HistogramCtrl.Designer.cs">
|
||||
<DependentUpon>HistogramCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\HistogramDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\HistogramDlg.Designer.cs">
|
||||
<DependentUpon>HistogramDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\HistogramOptionsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\HistogramOptionsDlg.Designer.cs">
|
||||
<DependentUpon>HistogramOptionsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\NoBenchOrDatabaseDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -161,6 +194,9 @@
|
||||
<Compile Include="ResultsBrowserWnd.Designer.cs">
|
||||
<DependentUpon>ResultsBrowserWnd.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Filters\BatchNrFilterUI.resx">
|
||||
<DependentUpon>BatchNrFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Filters\DateFilterUI.resx">
|
||||
<DependentUpon>DateFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -176,12 +212,24 @@
|
||||
<EmbeddedResource Include="Filters\SerialNrFilterUI.resx">
|
||||
<DependentUpon>SerialNrFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Filters\WMPositionFilterUI.resx">
|
||||
<DependentUpon>WMPositionFilterUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\AddFilterDlg.resx">
|
||||
<DependentUpon>AddFilterDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\DatabaseSettingsDlg.resx">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\HistogramCtrl.resx">
|
||||
<DependentUpon>HistogramCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\HistogramDlg.resx">
|
||||
<DependentUpon>HistogramDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\HistogramOptionsDlg.resx">
|
||||
<DependentUpon>HistogramOptionsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\NoBenchOrDatabaseDlg.resx">
|
||||
<DependentUpon>NoBenchOrDatabaseDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
+387
-331
@@ -28,337 +28,389 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.vSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.hSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.filtersGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.filtersFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.resultsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.resultsListView = new System.Windows.Forms.ListView();
|
||||
this.printerConfigBtn = new System.Windows.Forms.Button();
|
||||
this.statisticsBtn = new System.Windows.Forms.Button();
|
||||
this.printQueryResultsBtn = new System.Windows.Forms.Button();
|
||||
this.exportQueryResultsBtn = new System.Windows.Forms.Button();
|
||||
this.formatOfResultsBtn = new System.Windows.Forms.Button();
|
||||
this.clearFiltersBtn = new System.Windows.Forms.Button();
|
||||
this.settingsBtn = new System.Windows.Forms.Button();
|
||||
this.saveConfigBtn = new System.Windows.Forms.Button();
|
||||
this.loadConfigBtn = new System.Windows.Forms.Button();
|
||||
this.executeQueryBtn = new System.Windows.Forms.Button();
|
||||
this.addFilterBtn = new System.Windows.Forms.Button();
|
||||
this.testBenchesGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox5 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox4 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox3 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox2 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox1 = new System.Windows.Forms.RadioButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).BeginInit();
|
||||
this.vSplitContainer.Panel1.SuspendLayout();
|
||||
this.vSplitContainer.Panel2.SuspendLayout();
|
||||
this.vSplitContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).BeginInit();
|
||||
this.hSplitContainer.Panel1.SuspendLayout();
|
||||
this.hSplitContainer.Panel2.SuspendLayout();
|
||||
this.hSplitContainer.SuspendLayout();
|
||||
this.filtersGroupBox.SuspendLayout();
|
||||
this.resultsGroupBox.SuspendLayout();
|
||||
this.testBenchesGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// vSplitContainer
|
||||
//
|
||||
this.vSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.vSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.vSplitContainer.Name = "vSplitContainer";
|
||||
//
|
||||
// vSplitContainer.Panel1
|
||||
//
|
||||
this.vSplitContainer.Panel1.Controls.Add(this.hSplitContainer);
|
||||
this.vSplitContainer.Panel1MinSize = 100;
|
||||
//
|
||||
// vSplitContainer.Panel2
|
||||
//
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.printerConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.statisticsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.printQueryResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.exportQueryResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.formatOfResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.clearFiltersBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.settingsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.saveConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.loadConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.executeQueryBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.addFilterBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.testBenchesGroupBox);
|
||||
this.vSplitContainer.Panel2MinSize = 100;
|
||||
this.vSplitContainer.Size = new System.Drawing.Size(984, 712);
|
||||
this.vSplitContainer.SplitterDistance = 840;
|
||||
this.vSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// hSplitContainer
|
||||
//
|
||||
this.hSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.hSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.hSplitContainer.Name = "hSplitContainer";
|
||||
this.hSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// hSplitContainer.Panel1
|
||||
//
|
||||
this.hSplitContainer.Panel1.Controls.Add(this.filtersGroupBox);
|
||||
//
|
||||
// hSplitContainer.Panel2
|
||||
//
|
||||
this.hSplitContainer.Panel2.Controls.Add(this.resultsGroupBox);
|
||||
this.hSplitContainer.Size = new System.Drawing.Size(840, 712);
|
||||
this.hSplitContainer.SplitterDistance = 280;
|
||||
this.hSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// filtersGroupBox
|
||||
//
|
||||
this.filtersGroupBox.Controls.Add(this.filtersFlowLayoutPanel);
|
||||
this.filtersGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.filtersGroupBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.filtersGroupBox.Name = "filtersGroupBox";
|
||||
this.filtersGroupBox.Size = new System.Drawing.Size(840, 280);
|
||||
this.filtersGroupBox.TabIndex = 1;
|
||||
this.filtersGroupBox.TabStop = false;
|
||||
this.filtersGroupBox.Text = "Filters";
|
||||
//
|
||||
// filtersFlowLayoutPanel
|
||||
//
|
||||
this.filtersFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.filtersFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
|
||||
this.filtersFlowLayoutPanel.Name = "filtersFlowLayoutPanel";
|
||||
this.filtersFlowLayoutPanel.Size = new System.Drawing.Size(834, 261);
|
||||
this.filtersFlowLayoutPanel.TabIndex = 0;
|
||||
//
|
||||
// resultsGroupBox
|
||||
//
|
||||
this.resultsGroupBox.Controls.Add(this.resultsListView);
|
||||
this.resultsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultsGroupBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.resultsGroupBox.Name = "resultsGroupBox";
|
||||
this.resultsGroupBox.Size = new System.Drawing.Size(840, 428);
|
||||
this.resultsGroupBox.TabIndex = 1;
|
||||
this.resultsGroupBox.TabStop = false;
|
||||
this.resultsGroupBox.Text = "Query results";
|
||||
//
|
||||
// resultsListView
|
||||
//
|
||||
this.resultsListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultsListView.Location = new System.Drawing.Point(3, 16);
|
||||
this.resultsListView.Name = "resultsListView";
|
||||
this.resultsListView.Size = new System.Drawing.Size(834, 409);
|
||||
this.resultsListView.TabIndex = 0;
|
||||
this.resultsListView.UseCompatibleStateImageBehavior = false;
|
||||
this.resultsListView.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// printerConfigBtn
|
||||
//
|
||||
this.printerConfigBtn.Location = new System.Drawing.Point(8, 316);
|
||||
this.printerConfigBtn.Name = "printerConfigBtn";
|
||||
this.printerConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.printerConfigBtn.TabIndex = 11;
|
||||
this.printerConfigBtn.Text = "Configure printer";
|
||||
this.printerConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.printerConfigBtn.Click += new System.EventHandler(this.printerConfigBtn_Click);
|
||||
//
|
||||
// statisticsBtn
|
||||
//
|
||||
this.statisticsBtn.Location = new System.Drawing.Point(8, 621);
|
||||
this.statisticsBtn.Name = "statisticsBtn";
|
||||
this.statisticsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.statisticsBtn.TabIndex = 10;
|
||||
this.statisticsBtn.Text = "Statistics";
|
||||
this.statisticsBtn.UseVisualStyleBackColor = true;
|
||||
this.statisticsBtn.Click += new System.EventHandler(this.statisticsBtn_Click);
|
||||
//
|
||||
// printQueryResultsBtn
|
||||
//
|
||||
this.printQueryResultsBtn.Location = new System.Drawing.Point(8, 548);
|
||||
this.printQueryResultsBtn.Name = "printQueryResultsBtn";
|
||||
this.printQueryResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.printQueryResultsBtn.TabIndex = 9;
|
||||
this.printQueryResultsBtn.Text = "Print query results";
|
||||
this.printQueryResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.printQueryResultsBtn.Click += new System.EventHandler(this.printQueryResultsBtn_Click);
|
||||
//
|
||||
// exportQueryResultsBtn
|
||||
//
|
||||
this.exportQueryResultsBtn.Location = new System.Drawing.Point(8, 508);
|
||||
this.exportQueryResultsBtn.Name = "exportQueryResultsBtn";
|
||||
this.exportQueryResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.exportQueryResultsBtn.TabIndex = 8;
|
||||
this.exportQueryResultsBtn.Text = "Export query results";
|
||||
this.exportQueryResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.exportQueryResultsBtn.Click += new System.EventHandler(this.exportQueryResultsBtn_Click);
|
||||
//
|
||||
// formatOfResultsBtn
|
||||
//
|
||||
this.formatOfResultsBtn.Location = new System.Drawing.Point(8, 276);
|
||||
this.formatOfResultsBtn.Name = "formatOfResultsBtn";
|
||||
this.formatOfResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.formatOfResultsBtn.TabIndex = 7;
|
||||
this.formatOfResultsBtn.Text = "Configure output";
|
||||
this.formatOfResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.formatOfResultsBtn.Click += new System.EventHandler(this.formatOfResultsBtn_Click);
|
||||
//
|
||||
// clearFiltersBtn
|
||||
//
|
||||
this.clearFiltersBtn.Location = new System.Drawing.Point(8, 196);
|
||||
this.clearFiltersBtn.Name = "clearFiltersBtn";
|
||||
this.clearFiltersBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.clearFiltersBtn.TabIndex = 2;
|
||||
this.clearFiltersBtn.Text = "Clear filters";
|
||||
this.clearFiltersBtn.UseVisualStyleBackColor = true;
|
||||
this.clearFiltersBtn.Click += new System.EventHandler(this.clearFiltersBtn_Click);
|
||||
//
|
||||
// settingsBtn
|
||||
//
|
||||
this.settingsBtn.Location = new System.Drawing.Point(8, 12);
|
||||
this.settingsBtn.Name = "settingsBtn";
|
||||
this.settingsBtn.Size = new System.Drawing.Size(125, 33);
|
||||
this.settingsBtn.TabIndex = 0;
|
||||
this.settingsBtn.Text = "Settings";
|
||||
this.settingsBtn.UseVisualStyleBackColor = true;
|
||||
this.settingsBtn.Click += new System.EventHandler(this.settingsBtn_Click);
|
||||
//
|
||||
// saveConfigBtn
|
||||
//
|
||||
this.saveConfigBtn.Location = new System.Drawing.Point(8, 356);
|
||||
this.saveConfigBtn.Name = "saveConfigBtn";
|
||||
this.saveConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.saveConfigBtn.TabIndex = 5;
|
||||
this.saveConfigBtn.Text = "Save configuration";
|
||||
this.saveConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.saveConfigBtn.Click += new System.EventHandler(this.saveConfigBtn_Click);
|
||||
//
|
||||
// loadConfigBtn
|
||||
//
|
||||
this.loadConfigBtn.Location = new System.Drawing.Point(8, 396);
|
||||
this.loadConfigBtn.Name = "loadConfigBtn";
|
||||
this.loadConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.loadConfigBtn.TabIndex = 4;
|
||||
this.loadConfigBtn.Text = "Load configuration";
|
||||
this.loadConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.loadConfigBtn.Click += new System.EventHandler(this.loadConfigBtn_Click);
|
||||
//
|
||||
// executeQueryBtn
|
||||
//
|
||||
this.executeQueryBtn.Location = new System.Drawing.Point(8, 468);
|
||||
this.executeQueryBtn.Name = "executeQueryBtn";
|
||||
this.executeQueryBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.executeQueryBtn.TabIndex = 6;
|
||||
this.executeQueryBtn.Text = "Execute query";
|
||||
this.executeQueryBtn.UseVisualStyleBackColor = true;
|
||||
this.executeQueryBtn.Click += new System.EventHandler(this.executeQueryBtn_Click);
|
||||
//
|
||||
// addFilterBtn
|
||||
//
|
||||
this.addFilterBtn.Location = new System.Drawing.Point(8, 236);
|
||||
this.addFilterBtn.Name = "addFilterBtn";
|
||||
this.addFilterBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.addFilterBtn.TabIndex = 3;
|
||||
this.addFilterBtn.Text = "Add filter";
|
||||
this.addFilterBtn.UseVisualStyleBackColor = true;
|
||||
this.addFilterBtn.Click += new System.EventHandler(this.addFilterBtn_Click);
|
||||
//
|
||||
// testBenchesGroupBox
|
||||
//
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox5);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox4);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox3);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox2);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox1);
|
||||
this.testBenchesGroupBox.Location = new System.Drawing.Point(8, 54);
|
||||
this.testBenchesGroupBox.Name = "testBenchesGroupBox";
|
||||
this.testBenchesGroupBox.Size = new System.Drawing.Size(125, 135);
|
||||
this.testBenchesGroupBox.TabIndex = 1;
|
||||
this.testBenchesGroupBox.TabStop = false;
|
||||
this.testBenchesGroupBox.Text = "Test benches";
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
this.checkBox5.AutoSize = true;
|
||||
this.checkBox5.Location = new System.Drawing.Point(23, 106);
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox5.TabIndex = 4;
|
||||
this.checkBox5.TabStop = true;
|
||||
this.checkBox5.Text = "radioButton5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
this.checkBox4.AutoSize = true;
|
||||
this.checkBox4.Location = new System.Drawing.Point(23, 86);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox4.TabIndex = 3;
|
||||
this.checkBox4.TabStop = true;
|
||||
this.checkBox4.Text = "radioButton4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
this.checkBox3.AutoSize = true;
|
||||
this.checkBox3.Location = new System.Drawing.Point(23, 65);
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox3.TabIndex = 2;
|
||||
this.checkBox3.TabStop = true;
|
||||
this.checkBox3.Text = "radioButton3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(23, 44);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox2.TabIndex = 1;
|
||||
this.checkBox2.TabStop = true;
|
||||
this.checkBox2.Text = "radioButton2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(23, 23);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox1.TabIndex = 0;
|
||||
this.checkBox1.TabStop = true;
|
||||
this.checkBox1.Text = "radioButton1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||
//
|
||||
// ResultsBrowserWnd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(984, 712);
|
||||
this.Controls.Add(this.vSplitContainer);
|
||||
this.Name = "ResultsBrowserWnd";
|
||||
this.Text = "Results Browser";
|
||||
this.Load += new System.EventHandler(this.ResultsBrowserWnd_Load);
|
||||
this.vSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.vSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).EndInit();
|
||||
this.vSplitContainer.ResumeLayout(false);
|
||||
this.hSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.hSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).EndInit();
|
||||
this.hSplitContainer.ResumeLayout(false);
|
||||
this.filtersGroupBox.ResumeLayout(false);
|
||||
this.resultsGroupBox.ResumeLayout(false);
|
||||
this.testBenchesGroupBox.ResumeLayout(false);
|
||||
this.testBenchesGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.vSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.hSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.filtersGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.filtersFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.resultsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.resultsListView = new System.Windows.Forms.ListView();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.histogramBtn = new System.Windows.Forms.Button();
|
||||
this.statisticsBtn = new System.Windows.Forms.Button();
|
||||
this.outputGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.exportQueryResultsBtn = new System.Windows.Forms.Button();
|
||||
this.printQueryResultsBtn = new System.Windows.Forms.Button();
|
||||
this.printerConfigBtn = new System.Windows.Forms.Button();
|
||||
this.formatOfResultsBtn = new System.Windows.Forms.Button();
|
||||
this.clearFiltersBtn = new System.Windows.Forms.Button();
|
||||
this.settingsBtn = new System.Windows.Forms.Button();
|
||||
this.saveConfigBtn = new System.Windows.Forms.Button();
|
||||
this.loadConfigBtn = new System.Windows.Forms.Button();
|
||||
this.executeQueryBtn = new System.Windows.Forms.Button();
|
||||
this.addFilterBtn = new System.Windows.Forms.Button();
|
||||
this.testBenchesGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.checkBox6 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox5 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox4 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox3 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox2 = new System.Windows.Forms.RadioButton();
|
||||
this.checkBox1 = new System.Windows.Forms.RadioButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).BeginInit();
|
||||
this.vSplitContainer.Panel1.SuspendLayout();
|
||||
this.vSplitContainer.Panel2.SuspendLayout();
|
||||
this.vSplitContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).BeginInit();
|
||||
this.hSplitContainer.Panel1.SuspendLayout();
|
||||
this.hSplitContainer.Panel2.SuspendLayout();
|
||||
this.hSplitContainer.SuspendLayout();
|
||||
this.filtersGroupBox.SuspendLayout();
|
||||
this.resultsGroupBox.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.outputGroupBox.SuspendLayout();
|
||||
this.testBenchesGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// vSplitContainer
|
||||
//
|
||||
this.vSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.vSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.vSplitContainer.Name = "vSplitContainer";
|
||||
//
|
||||
// vSplitContainer.Panel1
|
||||
//
|
||||
this.vSplitContainer.Panel1.Controls.Add(this.hSplitContainer);
|
||||
this.vSplitContainer.Panel1MinSize = 100;
|
||||
//
|
||||
// vSplitContainer.Panel2
|
||||
//
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.groupBox1);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.outputGroupBox);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.printerConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.formatOfResultsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.clearFiltersBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.settingsBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.saveConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.loadConfigBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.executeQueryBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.addFilterBtn);
|
||||
this.vSplitContainer.Panel2.Controls.Add(this.testBenchesGroupBox);
|
||||
this.vSplitContainer.Panel2MinSize = 100;
|
||||
this.vSplitContainer.Size = new System.Drawing.Size(984, 712);
|
||||
this.vSplitContainer.SplitterDistance = 840;
|
||||
this.vSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// hSplitContainer
|
||||
//
|
||||
this.hSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.hSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.hSplitContainer.Name = "hSplitContainer";
|
||||
this.hSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// hSplitContainer.Panel1
|
||||
//
|
||||
this.hSplitContainer.Panel1.Controls.Add(this.filtersGroupBox);
|
||||
//
|
||||
// hSplitContainer.Panel2
|
||||
//
|
||||
this.hSplitContainer.Panel2.Controls.Add(this.resultsGroupBox);
|
||||
this.hSplitContainer.Size = new System.Drawing.Size(840, 712);
|
||||
this.hSplitContainer.SplitterDistance = 280;
|
||||
this.hSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// filtersGroupBox
|
||||
//
|
||||
this.filtersGroupBox.Controls.Add(this.filtersFlowLayoutPanel);
|
||||
this.filtersGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.filtersGroupBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.filtersGroupBox.Name = "filtersGroupBox";
|
||||
this.filtersGroupBox.Size = new System.Drawing.Size(840, 280);
|
||||
this.filtersGroupBox.TabIndex = 1;
|
||||
this.filtersGroupBox.TabStop = false;
|
||||
this.filtersGroupBox.Text = "Filters";
|
||||
//
|
||||
// filtersFlowLayoutPanel
|
||||
//
|
||||
this.filtersFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.filtersFlowLayoutPanel.Location = new System.Drawing.Point(3, 16);
|
||||
this.filtersFlowLayoutPanel.Name = "filtersFlowLayoutPanel";
|
||||
this.filtersFlowLayoutPanel.Size = new System.Drawing.Size(834, 261);
|
||||
this.filtersFlowLayoutPanel.TabIndex = 0;
|
||||
//
|
||||
// resultsGroupBox
|
||||
//
|
||||
this.resultsGroupBox.Controls.Add(this.resultsListView);
|
||||
this.resultsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultsGroupBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.resultsGroupBox.Name = "resultsGroupBox";
|
||||
this.resultsGroupBox.Size = new System.Drawing.Size(840, 428);
|
||||
this.resultsGroupBox.TabIndex = 1;
|
||||
this.resultsGroupBox.TabStop = false;
|
||||
this.resultsGroupBox.Text = "Query results";
|
||||
//
|
||||
// resultsListView
|
||||
//
|
||||
this.resultsListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resultsListView.Location = new System.Drawing.Point(3, 16);
|
||||
this.resultsListView.Name = "resultsListView";
|
||||
this.resultsListView.Size = new System.Drawing.Size(834, 409);
|
||||
this.resultsListView.TabIndex = 0;
|
||||
this.resultsListView.UseCompatibleStateImageBehavior = false;
|
||||
this.resultsListView.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.histogramBtn);
|
||||
this.groupBox1.Controls.Add(this.statisticsBtn);
|
||||
this.groupBox1.Location = new System.Drawing.Point(8, 608);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(125, 93);
|
||||
this.groupBox1.TabIndex = 13;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Analysis";
|
||||
//
|
||||
// histogramBtn
|
||||
//
|
||||
this.histogramBtn.Location = new System.Drawing.Point(5, 55);
|
||||
this.histogramBtn.Name = "histogramBtn";
|
||||
this.histogramBtn.Size = new System.Drawing.Size(114, 32);
|
||||
this.histogramBtn.TabIndex = 11;
|
||||
this.histogramBtn.Text = "Histograms";
|
||||
this.histogramBtn.UseVisualStyleBackColor = true;
|
||||
this.histogramBtn.Click += new System.EventHandler(this.histogramBtn_Click);
|
||||
//
|
||||
// statisticsBtn
|
||||
//
|
||||
this.statisticsBtn.Location = new System.Drawing.Point(5, 18);
|
||||
this.statisticsBtn.Name = "statisticsBtn";
|
||||
this.statisticsBtn.Size = new System.Drawing.Size(114, 32);
|
||||
this.statisticsBtn.TabIndex = 10;
|
||||
this.statisticsBtn.Text = "Statistics";
|
||||
this.statisticsBtn.UseVisualStyleBackColor = true;
|
||||
this.statisticsBtn.Click += new System.EventHandler(this.statisticsBtn_Click);
|
||||
//
|
||||
// outputGroupBox
|
||||
//
|
||||
this.outputGroupBox.Controls.Add(this.exportQueryResultsBtn);
|
||||
this.outputGroupBox.Controls.Add(this.printQueryResultsBtn);
|
||||
this.outputGroupBox.Location = new System.Drawing.Point(8, 509);
|
||||
this.outputGroupBox.Name = "outputGroupBox";
|
||||
this.outputGroupBox.Size = new System.Drawing.Size(125, 93);
|
||||
this.outputGroupBox.TabIndex = 12;
|
||||
this.outputGroupBox.TabStop = false;
|
||||
this.outputGroupBox.Text = "Output";
|
||||
//
|
||||
// exportQueryResultsBtn
|
||||
//
|
||||
this.exportQueryResultsBtn.Location = new System.Drawing.Point(5, 18);
|
||||
this.exportQueryResultsBtn.Name = "exportQueryResultsBtn";
|
||||
this.exportQueryResultsBtn.Size = new System.Drawing.Size(114, 32);
|
||||
this.exportQueryResultsBtn.TabIndex = 8;
|
||||
this.exportQueryResultsBtn.Text = "Export query results";
|
||||
this.exportQueryResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.exportQueryResultsBtn.Click += new System.EventHandler(this.exportQueryResultsBtn_Click);
|
||||
//
|
||||
// printQueryResultsBtn
|
||||
//
|
||||
this.printQueryResultsBtn.Location = new System.Drawing.Point(5, 55);
|
||||
this.printQueryResultsBtn.Name = "printQueryResultsBtn";
|
||||
this.printQueryResultsBtn.Size = new System.Drawing.Size(113, 32);
|
||||
this.printQueryResultsBtn.TabIndex = 9;
|
||||
this.printQueryResultsBtn.Text = "Print query results";
|
||||
this.printQueryResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.printQueryResultsBtn.Click += new System.EventHandler(this.printQueryResultsBtn_Click);
|
||||
//
|
||||
// printerConfigBtn
|
||||
//
|
||||
this.printerConfigBtn.Location = new System.Drawing.Point(8, 316);
|
||||
this.printerConfigBtn.Name = "printerConfigBtn";
|
||||
this.printerConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.printerConfigBtn.TabIndex = 11;
|
||||
this.printerConfigBtn.Text = "Configure printer";
|
||||
this.printerConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.printerConfigBtn.Click += new System.EventHandler(this.printerConfigBtn_Click);
|
||||
//
|
||||
// formatOfResultsBtn
|
||||
//
|
||||
this.formatOfResultsBtn.Location = new System.Drawing.Point(8, 276);
|
||||
this.formatOfResultsBtn.Name = "formatOfResultsBtn";
|
||||
this.formatOfResultsBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.formatOfResultsBtn.TabIndex = 7;
|
||||
this.formatOfResultsBtn.Text = "Configure output";
|
||||
this.formatOfResultsBtn.UseVisualStyleBackColor = true;
|
||||
this.formatOfResultsBtn.Click += new System.EventHandler(this.formatOfResultsBtn_Click);
|
||||
//
|
||||
// clearFiltersBtn
|
||||
//
|
||||
this.clearFiltersBtn.Location = new System.Drawing.Point(8, 196);
|
||||
this.clearFiltersBtn.Name = "clearFiltersBtn";
|
||||
this.clearFiltersBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.clearFiltersBtn.TabIndex = 2;
|
||||
this.clearFiltersBtn.Text = "Clear filters";
|
||||
this.clearFiltersBtn.UseVisualStyleBackColor = true;
|
||||
this.clearFiltersBtn.Click += new System.EventHandler(this.clearFiltersBtn_Click);
|
||||
//
|
||||
// settingsBtn
|
||||
//
|
||||
this.settingsBtn.Location = new System.Drawing.Point(8, 12);
|
||||
this.settingsBtn.Name = "settingsBtn";
|
||||
this.settingsBtn.Size = new System.Drawing.Size(125, 33);
|
||||
this.settingsBtn.TabIndex = 0;
|
||||
this.settingsBtn.Text = "Settings";
|
||||
this.settingsBtn.UseVisualStyleBackColor = true;
|
||||
this.settingsBtn.Click += new System.EventHandler(this.settingsBtn_Click);
|
||||
//
|
||||
// saveConfigBtn
|
||||
//
|
||||
this.saveConfigBtn.Location = new System.Drawing.Point(8, 356);
|
||||
this.saveConfigBtn.Name = "saveConfigBtn";
|
||||
this.saveConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.saveConfigBtn.TabIndex = 5;
|
||||
this.saveConfigBtn.Text = "Save configuration";
|
||||
this.saveConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.saveConfigBtn.Click += new System.EventHandler(this.saveConfigBtn_Click);
|
||||
//
|
||||
// loadConfigBtn
|
||||
//
|
||||
this.loadConfigBtn.Location = new System.Drawing.Point(8, 396);
|
||||
this.loadConfigBtn.Name = "loadConfigBtn";
|
||||
this.loadConfigBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.loadConfigBtn.TabIndex = 4;
|
||||
this.loadConfigBtn.Text = "Load configuration";
|
||||
this.loadConfigBtn.UseVisualStyleBackColor = true;
|
||||
this.loadConfigBtn.Click += new System.EventHandler(this.loadConfigBtn_Click);
|
||||
//
|
||||
// executeQueryBtn
|
||||
//
|
||||
this.executeQueryBtn.Location = new System.Drawing.Point(8, 468);
|
||||
this.executeQueryBtn.Name = "executeQueryBtn";
|
||||
this.executeQueryBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.executeQueryBtn.TabIndex = 6;
|
||||
this.executeQueryBtn.Text = "Execute query";
|
||||
this.executeQueryBtn.UseVisualStyleBackColor = true;
|
||||
this.executeQueryBtn.Click += new System.EventHandler(this.executeQueryBtn_Click);
|
||||
//
|
||||
// addFilterBtn
|
||||
//
|
||||
this.addFilterBtn.Location = new System.Drawing.Point(8, 236);
|
||||
this.addFilterBtn.Name = "addFilterBtn";
|
||||
this.addFilterBtn.Size = new System.Drawing.Size(125, 35);
|
||||
this.addFilterBtn.TabIndex = 3;
|
||||
this.addFilterBtn.Text = "Add filter";
|
||||
this.addFilterBtn.UseVisualStyleBackColor = true;
|
||||
this.addFilterBtn.Click += new System.EventHandler(this.addFilterBtn_Click);
|
||||
//
|
||||
// testBenchesGroupBox
|
||||
//
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox6);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox5);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox4);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox3);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox2);
|
||||
this.testBenchesGroupBox.Controls.Add(this.checkBox1);
|
||||
this.testBenchesGroupBox.Location = new System.Drawing.Point(8, 54);
|
||||
this.testBenchesGroupBox.Name = "testBenchesGroupBox";
|
||||
this.testBenchesGroupBox.Size = new System.Drawing.Size(125, 135);
|
||||
this.testBenchesGroupBox.TabIndex = 1;
|
||||
this.testBenchesGroupBox.TabStop = false;
|
||||
this.testBenchesGroupBox.Text = "Test benches";
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
this.checkBox6.AutoSize = true;
|
||||
this.checkBox6.Location = new System.Drawing.Point(23, 110);
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox6.TabIndex = 5;
|
||||
this.checkBox6.TabStop = true;
|
||||
this.checkBox6.Text = "radioButton6";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
this.checkBox6.CheckedChanged += new System.EventHandler(this.checkBox6_CheckedChanged);
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
this.checkBox5.AutoSize = true;
|
||||
this.checkBox5.Location = new System.Drawing.Point(23, 92);
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox5.TabIndex = 4;
|
||||
this.checkBox5.TabStop = true;
|
||||
this.checkBox5.Text = "radioButton5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
this.checkBox4.AutoSize = true;
|
||||
this.checkBox4.Location = new System.Drawing.Point(23, 74);
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox4.TabIndex = 3;
|
||||
this.checkBox4.TabStop = true;
|
||||
this.checkBox4.Text = "radioButton4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
this.checkBox3.AutoSize = true;
|
||||
this.checkBox3.Location = new System.Drawing.Point(23, 55);
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox3.TabIndex = 2;
|
||||
this.checkBox3.TabStop = true;
|
||||
this.checkBox3.Text = "radioButton3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(23, 36);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox2.TabIndex = 1;
|
||||
this.checkBox2.TabStop = true;
|
||||
this.checkBox2.Text = "radioButton2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(23, 17);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(85, 17);
|
||||
this.checkBox1.TabIndex = 0;
|
||||
this.checkBox1.TabStop = true;
|
||||
this.checkBox1.Text = "radioButton1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||
//
|
||||
// ResultsBrowserWnd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(984, 712);
|
||||
this.Controls.Add(this.vSplitContainer);
|
||||
this.Name = "ResultsBrowserWnd";
|
||||
this.Text = "Results Browser";
|
||||
this.Load += new System.EventHandler(this.ResultsBrowserWnd_Load);
|
||||
this.vSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.vSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).EndInit();
|
||||
this.vSplitContainer.ResumeLayout(false);
|
||||
this.hSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.hSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).EndInit();
|
||||
this.hSplitContainer.ResumeLayout(false);
|
||||
this.filtersGroupBox.ResumeLayout(false);
|
||||
this.resultsGroupBox.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.outputGroupBox.ResumeLayout(false);
|
||||
this.testBenchesGroupBox.ResumeLayout(false);
|
||||
this.testBenchesGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@@ -387,5 +439,9 @@
|
||||
private System.Windows.Forms.RadioButton checkBox5;
|
||||
private System.Windows.Forms.RadioButton checkBox4;
|
||||
private System.Windows.Forms.Button printerConfigBtn;
|
||||
private System.Windows.Forms.RadioButton checkBox6;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.GroupBox outputGroupBox;
|
||||
private System.Windows.Forms.Button histogramBtn;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
@@ -62,6 +65,7 @@ namespace ResultsBrowser
|
||||
checkBox3.Checked = Program.LocalSettings.Bench3Selected;
|
||||
checkBox4.Checked = Program.LocalSettings.Bench4Selected;
|
||||
checkBox5.Checked = Program.LocalSettings.Bench5Selected;
|
||||
checkBox6.Checked = Program.LocalSettings.Bench6Selected;
|
||||
|
||||
if (args.Length == 1 && args[0].IndexOf(".qry") == args[0].Length - 4)
|
||||
{
|
||||
@@ -84,19 +88,24 @@ namespace ResultsBrowser
|
||||
checkBox3.Text = Program.LocalSettings.Bench3;
|
||||
checkBox4.Text = Program.LocalSettings.Bench4;
|
||||
checkBox5.Text = Program.LocalSettings.Bench5;
|
||||
checkBox6.Text = Program.LocalSettings.Bench6;
|
||||
|
||||
checkBox1.Visible = !string.IsNullOrEmpty(checkBox1.Text);
|
||||
checkBox2.Visible = !string.IsNullOrEmpty(checkBox2.Text);
|
||||
checkBox3.Visible = !string.IsNullOrEmpty(checkBox3.Text);
|
||||
checkBox4.Visible = !string.IsNullOrEmpty(checkBox4.Text);
|
||||
checkBox5.Visible = !string.IsNullOrEmpty(checkBox5.Text);
|
||||
checkBox6.Visible = !string.IsNullOrEmpty(checkBox6.Text);
|
||||
}
|
||||
|
||||
string BenchName()
|
||||
{
|
||||
return checkBox1.Checked ? Program.LocalSettings.Bench1
|
||||
: checkBox2.Checked ? Program.LocalSettings.Bench2
|
||||
: Program.LocalSettings.Bench3;
|
||||
: checkBox2.Checked ? Program.LocalSettings.Bench2
|
||||
: checkBox3.Checked ? Program.LocalSettings.Bench3
|
||||
: checkBox4.Checked ? Program.LocalSettings.Bench4
|
||||
: checkBox5.Checked ? Program.LocalSettings.Bench5
|
||||
: Program.LocalSettings.Bench6;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
@@ -133,6 +142,7 @@ namespace ResultsBrowser
|
||||
private void checkBox3_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
|
||||
private void checkBox4_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
|
||||
private void checkBox5_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
|
||||
private void checkBox6_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
|
||||
|
||||
void SaveCheckBoxes()
|
||||
{
|
||||
@@ -141,6 +151,7 @@ namespace ResultsBrowser
|
||||
Program.LocalSettings.Bench3Selected = checkBox3.Checked;
|
||||
Program.LocalSettings.Bench4Selected = checkBox4.Checked;
|
||||
Program.LocalSettings.Bench5Selected = checkBox5.Checked;
|
||||
Program.LocalSettings.Bench6Selected = checkBox6.Checked;
|
||||
Program.LocalSettings.Save();
|
||||
}
|
||||
|
||||
@@ -269,7 +280,8 @@ namespace ResultsBrowser
|
||||
(checkBox3.Checked ? Program.LocalSettings.ConnectionString3 :
|
||||
(checkBox4.Checked ? Program.LocalSettings.ConnectionString4 :
|
||||
(checkBox5.Checked ? Program.LocalSettings.ConnectionString5 :
|
||||
Program.LocalSettings.ConnectionString1))));
|
||||
(checkBox6.Checked ? Program.LocalSettings.ConnectionString6 :
|
||||
Program.LocalSettings.ConnectionString1)))));
|
||||
|
||||
ISession[] sessions = new ISession[] { Results.DB.CreateSession() };
|
||||
|
||||
@@ -480,7 +492,7 @@ namespace ResultsBrowser
|
||||
IList<Results.WMeterRsltItemSpec> items = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
|
||||
|
||||
///
|
||||
/// Enter options
|
||||
/// Statistics options
|
||||
///
|
||||
Forms.StatisticsOptionsDlg optionsDlg = new Forms.StatisticsOptionsDlg(items);
|
||||
if (optionsDlg.ShowDialog() != DialogResult.OK) return;
|
||||
@@ -488,16 +500,31 @@ namespace ResultsBrowser
|
||||
///
|
||||
/// Calculate statistics
|
||||
///
|
||||
Forms.StatisticsDlg statisticsDlg = new Forms.StatisticsDlg(waterMeters, optionsDlg.TwoDim,
|
||||
optionsDlg.RowItem, optionsDlg.RowItem2, optionsDlg.RowItem3,
|
||||
optionsDlg.ColumnItem, optionsDlg.ColumnItem2, optionsDlg.ColumnItem3,
|
||||
optionsDlg.RowTestSpecifier, optionsDlg.RowTestSpecifier2, optionsDlg.RowTestSpecifier3,
|
||||
optionsDlg.ColumnTestSpecifier, optionsDlg.ColumnTestSpecifier2, optionsDlg.ColumnTestSpecifier3,
|
||||
timePeriodStart, timePeriodEnd);
|
||||
Forms.StatisticsDlg statisticsDlg = new Forms.StatisticsDlg(waterMeters, optionsDlg, timePeriodStart, timePeriodEnd);
|
||||
statisticsDlg.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
private void histogramBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (waterMeters == null || waterMeters.Count == 0) return;
|
||||
|
||||
IList<Results.WMeterRsltItemSpec> items = Results.WMeterRsltItemSpec.FromStrArray(filtersConfig.ResultItems);
|
||||
|
||||
///
|
||||
/// Histogram options
|
||||
///
|
||||
Forms.HistogramOptionsDlg optionsDlg = new Forms.HistogramOptionsDlg(items);
|
||||
if (optionsDlg.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
///
|
||||
/// Calculate and display histograms
|
||||
///
|
||||
Forms.HistogramDlg histogramDlg = new Forms.HistogramDlg(waterMeters, optionsDlg, "Histogramy");
|
||||
histogramDlg.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Updates component factory
|
||||
/// </summary>
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
namespace Statistics.Forms
|
||||
{
|
||||
partial class ModelessForm
|
||||
{
|
||||
/// <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.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(47, 29);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(35, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// ModelessForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(191, 56);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Name = "ModelessForm";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "ModelessForm";
|
||||
this.Load += new System.EventHandler(this.ModelessForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Statistics.Forms
|
||||
{
|
||||
public partial class ModelessForm : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Called from the state machine when an operation forces a modeless dialog close.
|
||||
/// </summary>
|
||||
public static void CloseForm()
|
||||
{
|
||||
if (CloseFormHandler == null) return;
|
||||
try { CloseFormHandler(null, null); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
public static event EventHandler<EventArgs> CloseFormHandler;
|
||||
|
||||
void OnCloseForm(object sender, EventArgs args)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
public string Title;
|
||||
public string Message;
|
||||
public Color BackgroundColor;
|
||||
public Color TextColor;
|
||||
public Font TextFont;
|
||||
public string FontFamily;
|
||||
public int FontSize;
|
||||
public FontStyle FontStyle;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to be used by the application
|
||||
/// </summary>
|
||||
/// <param name="title">Window title</param>
|
||||
/// <param name="message">Displayed message</param>
|
||||
public ModelessForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
CloseFormHandler += delegate(object sender, EventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<EventArgs>(OnCloseForm), sender, args); }
|
||||
else OnCloseForm(sender, args);
|
||||
};
|
||||
}
|
||||
|
||||
private void ModelessForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Title != null) Text = Title;
|
||||
if (Message != null) label1.Text = Message;
|
||||
if (BackgroundColor != null) BackColor = BackgroundColor;
|
||||
if (TextColor != null) ForeColor = TextColor;
|
||||
if (FontFamily != null) label1.Font = new Font(FontFamily, FontSize, FontStyle);
|
||||
|
||||
float textWidth = Graphics.FromImage(new Bitmap(1, 1)).MeasureString(label1.Text, label1.Font).Width;
|
||||
float textHeight = Graphics.FromImage(new Bitmap(1, 1)).MeasureString(label1.Text, label1.Font).Height;
|
||||
Width = (int)textWidth + 120; /// Form width calculated from the text width
|
||||
Height += (int)textHeight; /// Form height calculated from the text height
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,257 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Statistics
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to be serialized to an XML file...
|
||||
/// Public members are local settings.
|
||||
/// These settings are modified by dialogs invoked by menu items
|
||||
/// Edit->Preferences ... PreferencesDlg ... S1.1(language, etc. local settings), and
|
||||
/// Edit->Advanced settings ... AdvancedSettingsDlg ... S1.2(spec. where bench settings are stored)
|
||||
/// </summary>
|
||||
[XmlRootAttribute("Statistics")]
|
||||
public class LocalSettings
|
||||
{
|
||||
public const int BenchesCount = 6;
|
||||
public const int FlowsCount = 5;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// User interface language (used as CultureInfo(..) constructor argument).
|
||||
/// </summary>
|
||||
public string Language;
|
||||
|
||||
///
|
||||
/// Names of test benches
|
||||
///
|
||||
public string[] BenchNames;
|
||||
///
|
||||
public string GetBenchName(int i)
|
||||
{
|
||||
return ((BenchNames != null) && (i >= 0) && (i < BenchNames.Length)) ? BenchNames[i] : string.Empty;
|
||||
}
|
||||
|
||||
///
|
||||
/// Database settings of servers
|
||||
///
|
||||
public string[] ConnectionStrings;
|
||||
///
|
||||
public string GetConnectionString(int i)
|
||||
{
|
||||
return ((ConnectionStrings != null) && (i >= 0) && (i < ConnectionStrings.Length)) ? ConnectionStrings[i] : string.Empty;
|
||||
}
|
||||
|
||||
///
|
||||
/// Flow settings
|
||||
///
|
||||
public bool[] FlowEnabledWMs;
|
||||
public bool[] FlowEnabledI1;
|
||||
public bool[] FlowEnabledI2;
|
||||
public bool[] FlowEnabledI3;
|
||||
public bool[] FlowEnabledI4;
|
||||
///
|
||||
public bool GetFlowEnabled(UserControls.MidId midId, int i)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
return ((FlowEnabledWMs != null) && (i >= 0) && (i < FlowEnabledWMs.Length)) ? FlowEnabledWMs[i] : false;
|
||||
case UserControls.MidId.I1: return ((FlowEnabledI1 != null) && (i >= 0) && (i < FlowEnabledI1.Length)) ? FlowEnabledI1[i] : false;
|
||||
case UserControls.MidId.I2: return ((FlowEnabledI2 != null) && (i >= 0) && (i < FlowEnabledI2.Length)) ? FlowEnabledI2[i] : false;
|
||||
case UserControls.MidId.I3: return ((FlowEnabledI3 != null) && (i >= 0) && (i < FlowEnabledI3.Length)) ? FlowEnabledI3[i] : false;
|
||||
case UserControls.MidId.I4: return ((FlowEnabledI4 != null) && (i >= 0) && (i < FlowEnabledI4.Length)) ? FlowEnabledI4[i] : false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
///
|
||||
public void SetFlowEnabled(UserControls.MidId midId, int i, bool value)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
if ((FlowEnabledWMs != null) && (i >= 0) && (i < FlowEnabledWMs.Length)) { FlowEnabledWMs[i] = value; };
|
||||
break;
|
||||
case UserControls.MidId.I1: if ((FlowEnabledI1 != null) && (i >= 0) && (i < FlowEnabledI1.Length)) { FlowEnabledI1[i] = value; }; break;
|
||||
case UserControls.MidId.I2: if ((FlowEnabledI2 != null) && (i >= 0) && (i < FlowEnabledI2.Length)) { FlowEnabledI2[i] = value; }; break;
|
||||
case UserControls.MidId.I3: if ((FlowEnabledI3 != null) && (i >= 0) && (i < FlowEnabledI3.Length)) { FlowEnabledI3[i] = value; }; break;
|
||||
case UserControls.MidId.I4: if ((FlowEnabledI4 != null) && (i >= 0) && (i < FlowEnabledI4.Length)) { FlowEnabledI4[i] = value; }; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public double[] FlowFromWMs;
|
||||
public double[] FlowFromI1;
|
||||
public double[] FlowFromI2;
|
||||
public double[] FlowFromI3;
|
||||
public double[] FlowFromI4;
|
||||
///
|
||||
public double GetFlowFrom(UserControls.MidId midId, int i)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
return ((FlowFromWMs != null) && (i >= 0) && (i < FlowFromWMs.Length)) ? FlowFromWMs[i] : 0;
|
||||
case UserControls.MidId.I1: return ((FlowFromI1 != null) && (i >= 0) && (i < FlowFromI1.Length)) ? FlowFromI1[i] : 0;
|
||||
case UserControls.MidId.I2: return ((FlowFromI2 != null) && (i >= 0) && (i < FlowFromI2.Length)) ? FlowFromI2[i] : 0;
|
||||
case UserControls.MidId.I3: return ((FlowFromI3 != null) && (i >= 0) && (i < FlowFromI3.Length)) ? FlowFromI3[i] : 0;
|
||||
case UserControls.MidId.I4: return ((FlowFromI4 != null) && (i >= 0) && (i < FlowFromI4.Length)) ? FlowFromI4[i] : 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
///
|
||||
public void SetFlowFrom(UserControls.MidId midId, int i, double value)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
if ((FlowFromWMs != null) && (i >= 0) && (i < FlowFromWMs.Length)) { FlowFromWMs[i] = value; };
|
||||
break;
|
||||
case UserControls.MidId.I1: if ((FlowFromI1 != null) && (i >= 0) && (i < FlowFromI1.Length)) { FlowFromI1[i] = value; }; break;
|
||||
case UserControls.MidId.I2: if ((FlowFromI2 != null) && (i >= 0) && (i < FlowFromI2.Length)) { FlowFromI2[i] = value; }; break;
|
||||
case UserControls.MidId.I3: if ((FlowFromI3 != null) && (i >= 0) && (i < FlowFromI3.Length)) { FlowFromI3[i] = value; }; break;
|
||||
case UserControls.MidId.I4: if ((FlowFromI4 != null) && (i >= 0) && (i < FlowFromI4.Length)) { FlowFromI4[i] = value; }; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public double[] FlowToWMs;
|
||||
public double[] FlowToI1;
|
||||
public double[] FlowToI2;
|
||||
public double[] FlowToI3;
|
||||
public double[] FlowToI4;
|
||||
///
|
||||
public double GetFlowTo(UserControls.MidId midId, int i)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
return ((FlowToWMs != null) && (i >= 0) && (i < FlowToWMs.Length)) ? FlowToWMs[i] : 0;
|
||||
case UserControls.MidId.I1: return ((FlowToI1 != null) && (i >= 0) && (i < FlowToI1.Length)) ? FlowToI1[i] : 0;
|
||||
case UserControls.MidId.I2: return ((FlowToI2 != null) && (i >= 0) && (i < FlowToI2.Length)) ? FlowToI2[i] : 0;
|
||||
case UserControls.MidId.I3: return ((FlowToI3 != null) && (i >= 0) && (i < FlowToI3.Length)) ? FlowToI3[i] : 0;
|
||||
case UserControls.MidId.I4: return ((FlowToI4 != null) && (i >= 0) && (i < FlowToI4.Length)) ? FlowToI4[i] : 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
///
|
||||
public void SetFlowTo(UserControls.MidId midId, int i, double value)
|
||||
{
|
||||
switch (midId)
|
||||
{
|
||||
case UserControls.MidId.WaterMeters:
|
||||
if ((FlowToWMs != null) && (i >= 0) && (i < FlowToWMs.Length)) { FlowToWMs[i] = value; };
|
||||
break;
|
||||
case UserControls.MidId.I1: if ((FlowToI1 != null) && (i >= 0) && (i < FlowToI1.Length)) { FlowToI1[i] = value; }; break;
|
||||
case UserControls.MidId.I2: if ((FlowToI2 != null) && (i >= 0) && (i < FlowToI2.Length)) { FlowToI2[i] = value; }; break;
|
||||
case UserControls.MidId.I3: if ((FlowToI3 != null) && (i >= 0) && (i < FlowToI3.Length)) { FlowToI3[i] = value; }; break;
|
||||
case UserControls.MidId.I4: if ((FlowToI4 != null) && (i >= 0) && (i < FlowToI4.Length)) { FlowToI4[i] = value; }; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// StatisticsDlg UI
|
||||
public int SelectedRadioButtonNumber;
|
||||
|
||||
|
||||
/// MainWnd
|
||||
public int MainWndLeft;
|
||||
public int MainWndTop;
|
||||
public int MainWndWidth;
|
||||
public int MainWndHeight;
|
||||
public bool ManiWndMaximized;
|
||||
public int SplitterDistance;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor which is used to create default settings
|
||||
/// </summary>
|
||||
public LocalSettings()
|
||||
{
|
||||
Language = "SK";
|
||||
|
||||
BenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "PT7" };
|
||||
|
||||
ConnectionStrings = new string[]
|
||||
{
|
||||
"SERVER=10.42.128.93; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.128.102; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.128.89; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.128.213; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.128.214; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
"SERVER=10.42.129.26; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
|
||||
};
|
||||
|
||||
FlowEnabledWMs = new bool[FlowsCount];
|
||||
FlowEnabledI1 = new bool[FlowsCount];
|
||||
FlowEnabledI2 = new bool[FlowsCount];
|
||||
FlowEnabledI3 = new bool[FlowsCount];
|
||||
FlowEnabledI4 = new bool[FlowsCount];
|
||||
|
||||
FlowFromWMs = new double[FlowsCount];
|
||||
FlowFromI1 = new double[FlowsCount];
|
||||
FlowFromI2 = new double[FlowsCount];
|
||||
FlowFromI3 = new double[FlowsCount];
|
||||
FlowFromI4 = new double[FlowsCount];
|
||||
|
||||
FlowToWMs = new double[FlowsCount];
|
||||
FlowToI1 = new double[FlowsCount];
|
||||
FlowToI2 = new double[FlowsCount];
|
||||
FlowToI3 = new double[FlowsCount];
|
||||
FlowToI4 = new double[FlowsCount];
|
||||
|
||||
SelectedRadioButtonNumber = 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load local settings (public fields of this class) from the XML file.
|
||||
/// </summary>
|
||||
public static LocalSettings Load(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (TextReader reader = new StreamReader(fileName))
|
||||
{
|
||||
LocalSettings ls = (new XmlSerializer(typeof(LocalSettings))).Deserialize(reader) as LocalSettings;
|
||||
// Copy the settings just in case De-serialize() completes OK
|
||||
return ls;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save local settings (public fields of this class) to the XML file.
|
||||
/// </summary>
|
||||
public void Save()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (TextWriter writer = new StreamWriter(Program.LocalSettingsFileName))
|
||||
{
|
||||
(new XmlSerializer(typeof(LocalSettings))).Serialize(writer, this);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+84
-4
@@ -1,18 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using Statistics.Resources;
|
||||
|
||||
namespace Statistics
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// Program information
|
||||
public static string Version; /// version string
|
||||
public static DateTime BuildDateTime; /// date and time of program build
|
||||
|
||||
/// Local settings
|
||||
public static string ExecutableDirectory;
|
||||
public static string ConfigDirectory;
|
||||
public static string LocalSettingsFileName;
|
||||
public static string LocalSettingsBackupName;
|
||||
public static LocalSettings LocalSettings;
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
static void Main(string[] args)
|
||||
{
|
||||
/// Program version string
|
||||
System.Reflection.Assembly thisAssembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||
Version ver = thisAssembly.GetName().Version;
|
||||
Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
|
||||
BuildDateTime = new System.IO.FileInfo(thisAssembly.Location).LastWriteTime;
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExecutableDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
#if false
|
||||
/// 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
|
||||
/// Config directory is a directory in 'C:\Users\username\AppData\Local' folder
|
||||
ConfigDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
string.Format("Statistics{0}", (args.Length >= 1) ? args[0] : string.Empty));
|
||||
#endif
|
||||
LocalSettingsFileName = Path.Combine(ConfigDirectory, "config.xml");
|
||||
LocalSettingsBackupName = Path.Combine(ConfigDirectory, "config.backup.xml");
|
||||
|
||||
///
|
||||
/// Load the local settings
|
||||
///
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
/// Loading local seetings from regular config file failed. Use the backup
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsBackupName);
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
MessageBox.Show(Strings.No_program_settings_found + Strings.Using_default_settings,
|
||||
string.Empty,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
|
||||
/// Create new default settings and save them
|
||||
LocalSettings = new LocalSettings();
|
||||
Directory.CreateDirectory(ConfigDirectory);
|
||||
LocalSettings.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
LocalSettings.Save(); /// Save the settings to overwrite the wrong file
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Loading local seetings from the regular config file was successful. Update the backup
|
||||
File.Copy(Program.LocalSettingsFileName, Program.LocalSettingsBackupName, true);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string culture = LocalSettings.Language.Replace('_', '-');
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(culture);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
MessageBox.Show(Strings.Selected_language_not_supported + Environment.NewLine + Strings.Using_English,
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Asterisk);
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture =
|
||||
new System.Globalization.CultureInfo("en");
|
||||
}
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new StatisticsDlg());
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1088.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1088.0")]
|
||||
[assembly: AssemblyVersion("2.18.1108.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1108.0")]
|
||||
|
||||
Generated
+90
@@ -78,6 +78,69 @@ namespace Statistics.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to From / to.
|
||||
/// </summary>
|
||||
internal static string From_to {
|
||||
get {
|
||||
return ResourceManager.GetString("From_to", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Last 3 months.
|
||||
/// </summary>
|
||||
internal static string Last_3_months {
|
||||
get {
|
||||
return ResourceManager.GetString("Last_3_months", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Last month.
|
||||
/// </summary>
|
||||
internal static string Last_month {
|
||||
get {
|
||||
return ResourceManager.GetString("Last_month", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Last week.
|
||||
/// </summary>
|
||||
internal static string Last_week {
|
||||
get {
|
||||
return ResourceManager.GetString("Last_week", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No program settings found..
|
||||
/// </summary>
|
||||
internal static string No_program_settings_found {
|
||||
get {
|
||||
return ResourceManager.GetString("No_program_settings_found", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to searching....
|
||||
/// </summary>
|
||||
internal static string searching_ {
|
||||
get {
|
||||
return ResourceManager.GetString("searching_", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Selected language is not supported..
|
||||
/// </summary>
|
||||
internal static string Selected_language_not_supported {
|
||||
get {
|
||||
return ResourceManager.GetString("Selected_language_not_supported", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Statistics.
|
||||
/// </summary>
|
||||
@@ -105,6 +168,33 @@ namespace Statistics.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default settings are used..
|
||||
/// </summary>
|
||||
internal static string Using_default_settings {
|
||||
get {
|
||||
return ResourceManager.GetString("Using_default_settings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to English will be used..
|
||||
/// </summary>
|
||||
internal static string Using_English {
|
||||
get {
|
||||
return ResourceManager.GetString("Using_English", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning.
|
||||
/// </summary>
|
||||
internal static string Warning {
|
||||
get {
|
||||
return ResourceManager.GetString("Warning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Water meters.
|
||||
/// </summary>
|
||||
|
||||
@@ -123,6 +123,9 @@
|
||||
<data name="From" xml:space="preserve">
|
||||
<value>From</value>
|
||||
</data>
|
||||
<data name="searching_" xml:space="preserve">
|
||||
<value>searching...</value>
|
||||
</data>
|
||||
<data name="Statistics" xml:space="preserve">
|
||||
<value>Statistics</value>
|
||||
</data>
|
||||
@@ -135,4 +138,31 @@
|
||||
<data name="Water_meters" xml:space="preserve">
|
||||
<value>Water meters</value>
|
||||
</data>
|
||||
<data name="From_to" xml:space="preserve">
|
||||
<value>From / to</value>
|
||||
</data>
|
||||
<data name="Last_3_months" xml:space="preserve">
|
||||
<value>Last 3 months</value>
|
||||
</data>
|
||||
<data name="Last_month" xml:space="preserve">
|
||||
<value>Last month</value>
|
||||
</data>
|
||||
<data name="Last_week" xml:space="preserve">
|
||||
<value>Last week</value>
|
||||
</data>
|
||||
<data name="No_program_settings_found" xml:space="preserve">
|
||||
<value>No program settings found.</value>
|
||||
</data>
|
||||
<data name="Selected_language_not_supported" xml:space="preserve">
|
||||
<value>Selected language is not supported.</value>
|
||||
</data>
|
||||
<data name="Using_default_settings" xml:space="preserve">
|
||||
<value>Default settings are used.</value>
|
||||
</data>
|
||||
<data name="Using_English" xml:space="preserve">
|
||||
<value>English will be used.</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Warning</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -123,6 +123,9 @@
|
||||
<data name="From" xml:space="preserve">
|
||||
<value>Od</value>
|
||||
</data>
|
||||
<data name="searching_" xml:space="preserve">
|
||||
<value>hľadám...</value>
|
||||
</data>
|
||||
<data name="Statistics" xml:space="preserve">
|
||||
<value>Štatistiky</value>
|
||||
</data>
|
||||
@@ -135,4 +138,25 @@
|
||||
<data name="Water_meters" xml:space="preserve">
|
||||
<value>Vodomery</value>
|
||||
</data>
|
||||
<data name="From_to" xml:space="preserve">
|
||||
<value>Od / do</value>
|
||||
</data>
|
||||
<data name="Last_3_months" xml:space="preserve">
|
||||
<value>Posledné 3 mesiace</value>
|
||||
</data>
|
||||
<data name="Last_month" xml:space="preserve">
|
||||
<value>Posledný mesiac</value>
|
||||
</data>
|
||||
<data name="Last_week" xml:space="preserve">
|
||||
<value>Posledný týždeň</value>
|
||||
</data>
|
||||
<data name="No_program_settings_found" xml:space="preserve">
|
||||
<value>Nebola nájdená konfigurácia programu.</value>
|
||||
</data>
|
||||
<data name="Using_default_settings" xml:space="preserve">
|
||||
<value>Použijú sa štandardné nastavenia.</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Upozornenie</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -49,6 +49,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Windows.Forms.DataVisualization" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -59,6 +60,13 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Forms\ModelessForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ModelessForm.designer.cs">
|
||||
<DependentUpon>ModelessForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LocalSettings.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -85,6 +93,9 @@
|
||||
<Compile Include="UserControls\StatisticsCtrl.Designer.cs">
|
||||
<DependentUpon>StatisticsCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Forms\ModelessForm.resx">
|
||||
<DependentUpon>ModelessForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
|
||||
Generated
+96
-51
@@ -29,22 +29,25 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
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.timePeriodGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.timePeriodCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.toLabel1 = new System.Windows.Forms.Label();
|
||||
this.fromLabel1 = new System.Windows.Forms.Label();
|
||||
this.dateTimeFromPicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.dateTimeToPicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.midsTabControl = new System.Windows.Forms.TabControl();
|
||||
this.wr10TabPage = new System.Windows.Forms.TabPage();
|
||||
this.wr11TabPage = new System.Windows.Forms.TabPage();
|
||||
this.wr13TabPage = new System.Windows.Forms.TabPage();
|
||||
this.wr14TabPage = new System.Windows.Forms.TabPage();
|
||||
this.wr15TabPage = new System.Windows.Forms.TabPage();
|
||||
this.wmsBenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
|
||||
this.wr11TabPage = new System.Windows.Forms.TabPage();
|
||||
this.i1BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
|
||||
this.wr13TabPage = new System.Windows.Forms.TabPage();
|
||||
this.i2BbenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
|
||||
this.wr14TabPage = new System.Windows.Forms.TabPage();
|
||||
this.i3BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
|
||||
this.wr15TabPage = new System.Windows.Forms.TabPage();
|
||||
this.i4BenchesControl = new Statistics.UserControls.MidOrWaterMetersCtrl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
@@ -70,6 +73,10 @@
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.radioButton4);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.radioButton3);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.radioButton2);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.radioButton1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.timePeriodGroupBox);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
@@ -79,30 +86,63 @@
|
||||
this.splitContainer1.SplitterDistance = 90;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// radioButton4
|
||||
//
|
||||
this.radioButton4.AutoSize = true;
|
||||
this.radioButton4.Location = new System.Drawing.Point(136, 12);
|
||||
this.radioButton4.Name = "radioButton4";
|
||||
this.radioButton4.Size = new System.Drawing.Size(68, 17);
|
||||
this.radioButton4.TabIndex = 6;
|
||||
this.radioButton4.TabStop = true;
|
||||
this.radioButton4.Text = "From / to";
|
||||
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(12, 58);
|
||||
this.radioButton3.Name = "radioButton3";
|
||||
this.radioButton3.Size = new System.Drawing.Size(91, 17);
|
||||
this.radioButton3.TabIndex = 5;
|
||||
this.radioButton3.TabStop = true;
|
||||
this.radioButton3.Text = "Last 3 months";
|
||||
this.radioButton3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(12, 35);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(77, 17);
|
||||
this.radioButton2.TabIndex = 4;
|
||||
this.radioButton2.TabStop = true;
|
||||
this.radioButton2.Text = "Last month";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(12, 12);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(74, 17);
|
||||
this.radioButton1.TabIndex = 3;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "Last week";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// timePeriodGroupBox
|
||||
//
|
||||
this.timePeriodGroupBox.Controls.Add(this.timePeriodCheckBox);
|
||||
this.timePeriodGroupBox.Controls.Add(this.toLabel1);
|
||||
this.timePeriodGroupBox.Controls.Add(this.fromLabel1);
|
||||
this.timePeriodGroupBox.Controls.Add(this.dateTimeFromPicker);
|
||||
this.timePeriodGroupBox.Controls.Add(this.dateTimeToPicker);
|
||||
this.timePeriodGroupBox.Location = new System.Drawing.Point(12, 10);
|
||||
this.timePeriodGroupBox.Location = new System.Drawing.Point(210, 10);
|
||||
this.timePeriodGroupBox.Name = "timePeriodGroupBox";
|
||||
this.timePeriodGroupBox.Size = new System.Drawing.Size(296, 74);
|
||||
this.timePeriodGroupBox.TabIndex = 2;
|
||||
this.timePeriodGroupBox.TabStop = false;
|
||||
//
|
||||
// timePeriodCheckBox
|
||||
//
|
||||
this.timePeriodCheckBox.AutoSize = true;
|
||||
this.timePeriodCheckBox.Location = new System.Drawing.Point(6, -2);
|
||||
this.timePeriodCheckBox.Name = "timePeriodCheckBox";
|
||||
this.timePeriodCheckBox.Size = new System.Drawing.Size(81, 17);
|
||||
this.timePeriodCheckBox.TabIndex = 4;
|
||||
this.timePeriodCheckBox.Text = "Time period";
|
||||
this.timePeriodCheckBox.UseVisualStyleBackColor = true;
|
||||
this.timePeriodCheckBox.CheckedChanged += new System.EventHandler(this.timePeriodCheckBox_CheckedChanged);
|
||||
//
|
||||
// toLabel1
|
||||
//
|
||||
this.toLabel1.AutoSize = true;
|
||||
@@ -160,6 +200,14 @@
|
||||
this.wr10TabPage.Text = "Water meters";
|
||||
this.wr10TabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// wmsBenchesControl
|
||||
//
|
||||
this.wmsBenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wmsBenchesControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.wmsBenchesControl.Name = "wmsBenchesControl";
|
||||
this.wmsBenchesControl.Size = new System.Drawing.Size(1354, 700);
|
||||
this.wmsBenchesControl.TabIndex = 0;
|
||||
//
|
||||
// wr11TabPage
|
||||
//
|
||||
this.wr11TabPage.Controls.Add(this.i1BenchesControl);
|
||||
@@ -171,6 +219,14 @@
|
||||
this.wr11TabPage.Text = "I1";
|
||||
this.wr11TabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// i1BenchesControl
|
||||
//
|
||||
this.i1BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.i1BenchesControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.i1BenchesControl.Name = "i1BenchesControl";
|
||||
this.i1BenchesControl.Size = new System.Drawing.Size(1354, 700);
|
||||
this.i1BenchesControl.TabIndex = 0;
|
||||
//
|
||||
// wr13TabPage
|
||||
//
|
||||
this.wr13TabPage.Controls.Add(this.i2BbenchesControl);
|
||||
@@ -182,6 +238,14 @@
|
||||
this.wr13TabPage.Text = "I2";
|
||||
this.wr13TabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// i2BbenchesControl
|
||||
//
|
||||
this.i2BbenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.i2BbenchesControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.i2BbenchesControl.Name = "i2BbenchesControl";
|
||||
this.i2BbenchesControl.Size = new System.Drawing.Size(1354, 700);
|
||||
this.i2BbenchesControl.TabIndex = 0;
|
||||
//
|
||||
// wr14TabPage
|
||||
//
|
||||
this.wr14TabPage.Controls.Add(this.i3BenchesControl);
|
||||
@@ -193,6 +257,14 @@
|
||||
this.wr14TabPage.Text = "I3";
|
||||
this.wr14TabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// i3BenchesControl
|
||||
//
|
||||
this.i3BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.i3BenchesControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.i3BenchesControl.Name = "i3BenchesControl";
|
||||
this.i3BenchesControl.Size = new System.Drawing.Size(1354, 700);
|
||||
this.i3BenchesControl.TabIndex = 0;
|
||||
//
|
||||
// wr15TabPage
|
||||
//
|
||||
this.wr15TabPage.Controls.Add(this.i4BenchesControl);
|
||||
@@ -204,38 +276,6 @@
|
||||
this.wr15TabPage.Text = "I4";
|
||||
this.wr15TabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// wmsBenchesControl
|
||||
//
|
||||
this.wmsBenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wmsBenchesControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.wmsBenchesControl.Name = "wmsBenchesControl";
|
||||
this.wmsBenchesControl.Size = new System.Drawing.Size(1354, 700);
|
||||
this.wmsBenchesControl.TabIndex = 0;
|
||||
//
|
||||
// i1BenchesControl
|
||||
//
|
||||
this.i1BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.i1BenchesControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.i1BenchesControl.Name = "i1BenchesControl";
|
||||
this.i1BenchesControl.Size = new System.Drawing.Size(1354, 700);
|
||||
this.i1BenchesControl.TabIndex = 0;
|
||||
//
|
||||
// i2BbenchesControl
|
||||
//
|
||||
this.i2BbenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.i2BbenchesControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.i2BbenchesControl.Name = "i2BbenchesControl";
|
||||
this.i2BbenchesControl.Size = new System.Drawing.Size(1354, 700);
|
||||
this.i2BbenchesControl.TabIndex = 0;
|
||||
//
|
||||
// i3BenchesControl
|
||||
//
|
||||
this.i3BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.i3BenchesControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.i3BenchesControl.Name = "i3BenchesControl";
|
||||
this.i3BenchesControl.Size = new System.Drawing.Size(1354, 700);
|
||||
this.i3BenchesControl.TabIndex = 0;
|
||||
//
|
||||
// i4BenchesControl
|
||||
//
|
||||
this.i4BenchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
@@ -252,8 +292,10 @@
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "StatisticsDlg";
|
||||
this.Text = "Statistics";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.StatisticsDlg_FormClosing);
|
||||
this.Load += new System.EventHandler(this.StatisticsDlg_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
@@ -283,12 +325,15 @@
|
||||
private System.Windows.Forms.DateTimePicker dateTimeToPicker;
|
||||
private System.Windows.Forms.Label toLabel1;
|
||||
private System.Windows.Forms.Label fromLabel1;
|
||||
private System.Windows.Forms.CheckBox timePeriodCheckBox;
|
||||
private UserControls.MidOrWaterMetersCtrl wmsBenchesControl;
|
||||
private UserControls.MidOrWaterMetersCtrl i1BenchesControl;
|
||||
private UserControls.MidOrWaterMetersCtrl i2BbenchesControl;
|
||||
private UserControls.MidOrWaterMetersCtrl i3BenchesControl;
|
||||
private UserControls.MidOrWaterMetersCtrl i4BenchesControl;
|
||||
private System.Windows.Forms.RadioButton radioButton3;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.RadioButton radioButton4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+138
-41
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@@ -14,42 +17,21 @@ using Results;
|
||||
using Results.Entities;
|
||||
using Statistics.Resources;
|
||||
using Statistics.UserControls;
|
||||
using System.Threading;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Statistics
|
||||
{
|
||||
public partial class StatisticsDlg : Form
|
||||
{
|
||||
static string[] testBenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "PT7" };
|
||||
///
|
||||
#if false
|
||||
static string[] connectionStrings = new string[] {
|
||||
"SERVER=10.42.128.197; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR10
|
||||
"SERVER=10.42.128.98; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR11
|
||||
"SERVER=10.42.128.152; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR13
|
||||
"SERVER=10.42.128.143; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR14
|
||||
"SERVER=10.42.128.63; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;", /// WR15
|
||||
"" /// PT7
|
||||
};
|
||||
#else
|
||||
static string[] connectionStrings = new string[] {
|
||||
"SERVER=localhost; DATABASE=st-wr10-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR10
|
||||
"SERVER=localhost; DATABASE=st-wr11-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR11
|
||||
"SERVER=localhost; DATABASE=st-wr13-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR13
|
||||
"SERVER=localhost; DATABASE=st-wr14-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR14
|
||||
"SERVER=localhost; DATABASE=st-wr15-r; UID=root; PASSWORD=; CHARSET=utf8;", /// WR15
|
||||
"" /// PT7
|
||||
};
|
||||
#endif
|
||||
///
|
||||
static ISessionFactory[] sessionFactories = new ISessionFactory[6];
|
||||
|
||||
static ISessionFactory[] sessionFactories = new ISessionFactory[LocalSettings.BenchesCount];
|
||||
|
||||
|
||||
public StatisticsDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ManageCheckGroupBox(timePeriodCheckBox, timePeriodGroupBox);
|
||||
///ManageCheckGroupBox(timePeriodCheckBox, timePeriodGroupBox);
|
||||
|
||||
for (MidId midId = 0; midId < MidId.Count; midId++)
|
||||
{
|
||||
@@ -59,6 +41,9 @@ namespace Statistics
|
||||
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).Parent = this;
|
||||
}
|
||||
midsTabControl.TabPages[0].Text = Strings.Water_meters;
|
||||
|
||||
radioButton1.Checked = true;
|
||||
timePeriodGroupBox.Enabled = false;
|
||||
|
||||
Localize();
|
||||
}
|
||||
@@ -66,29 +51,52 @@ namespace Statistics
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Statistics;
|
||||
timePeriodCheckBox.Text = Strings.Time_period;
|
||||
//timePeriodCheckBox.Text = Strings.Time_period;
|
||||
fromLabel1.Text = Strings.From;
|
||||
toLabel1.Text = Strings.To;
|
||||
radioButton1.Text = Strings.Last_week;
|
||||
radioButton2.Text = Strings.Last_month;
|
||||
radioButton3.Text = Strings.Last_3_months;
|
||||
radioButton4.Text = Strings.From_to;
|
||||
}
|
||||
|
||||
private void StatisticsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < testBenchNames.Length; i++)
|
||||
Statistics.LocalSettings ls = Program.LocalSettings;
|
||||
Width = (ls.MainWndWidth > 0) ? ls.MainWndWidth : 1000;
|
||||
Height = (ls.MainWndHeight > 0) ? ls.MainWndHeight : 750;
|
||||
Left = (ls.MainWndLeft != 0) ? ls.MainWndLeft : 50;
|
||||
Top = (ls.MainWndTop != 0) ? ls.MainWndTop : 50;
|
||||
|
||||
switch (ls.SelectedRadioButtonNumber)
|
||||
{
|
||||
if ((i < connectionStrings.Length) && !string.IsNullOrEmpty(connectionStrings[i]))
|
||||
case 1: radioButton1.Checked = true; break;
|
||||
case 2: radioButton2.Checked = true; break;
|
||||
case 3: radioButton3.Checked = true; break;
|
||||
case 4: radioButton4.Checked = true; break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)MidId.Count; i++)
|
||||
{
|
||||
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).Data2UI();
|
||||
}
|
||||
|
||||
for (int i = 0; i < LocalSettings.BenchesCount; i++)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Program.LocalSettings.GetConnectionString(i)))
|
||||
{
|
||||
sessionFactories[i] = null;
|
||||
try
|
||||
{
|
||||
sessionFactories[i] = Fluently.Configure()
|
||||
.Database(MySQLConfiguration.Standard.ConnectionString(connectionStrings[i]))
|
||||
.Database(MySQLConfiguration.Standard.ConnectionString(Program.LocalSettings.GetConnectionString(i)))
|
||||
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Results.Entities.Batch>())
|
||||
.ExposeConfiguration(BuildSchema)
|
||||
.BuildSessionFactory();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show(string.Format("Cannot open one of database of {0}", testBenchNames[i]), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
MessageBox.Show(string.Format("Cannot open one of database of {0}", Program.LocalSettings.GetBenchName(i)), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,15 +122,15 @@ namespace Statistics
|
||||
grp.Enabled = chk.Checked;
|
||||
}
|
||||
|
||||
private void timePeriodCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
ManageCheckGroupBox(timePeriodCheckBox, timePeriodGroupBox);
|
||||
}
|
||||
//private void timePeriodCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// ManageCheckGroupBox(timePeriodCheckBox, timePeriodGroupBox);
|
||||
//}
|
||||
|
||||
|
||||
public void UpdateRequest(int benchId, MidId midId)
|
||||
public IList<TestRslt> UpdateRequest(int benchId, MidId midId)
|
||||
{
|
||||
if (benchId >= sessionFactories.Length || sessionFactories[benchId] == null || (midId == MidId.WaterMeters))
|
||||
if ((benchId < 0) || (benchId >= LocalSettings.BenchesCount) || (sessionFactories[benchId] == null) || (midId == MidId.WaterMeters))
|
||||
{
|
||||
if (midId == MidId.WaterMeters)
|
||||
{
|
||||
@@ -130,11 +138,28 @@ namespace Statistics
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(string.Format("Cannot load statistics of {0}", (benchId < testBenchNames.Length) ? testBenchNames[benchId] : "XY"));
|
||||
MessageBox.Show(string.Format("Cannot load statistics of {0}", Program.LocalSettings.GetBenchName(benchId)));
|
||||
}
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
Thread thread = new Thread(() => Application.Run(new Forms.ModelessForm()
|
||||
{
|
||||
Title = string.Empty,
|
||||
Message = Strings.searching_,
|
||||
BackgroundColor = Color.LightGreen,
|
||||
FontFamily = "Arial",
|
||||
FontSize = 14,
|
||||
FontStyle = FontStyle.Regular,
|
||||
}));
|
||||
thread.CurrentCulture = CultureInfo.CurrentCulture;
|
||||
thread.CurrentUICulture = CultureInfo.CurrentUICulture;
|
||||
thread.Start();
|
||||
|
||||
DateTime from;
|
||||
DateTime to;
|
||||
GetDateRange(out from, out to);
|
||||
|
||||
try
|
||||
{
|
||||
ISession session = sessionFactories[benchId].OpenSession();
|
||||
@@ -145,18 +170,90 @@ namespace Statistics
|
||||
foreach (var cmpnts in listOfComponentsWithFlowmeter)
|
||||
{
|
||||
var listOfRslts = session.QueryOver<TestRslt>()
|
||||
.Where(x => ((x.EndTime >= dateTimeFromPicker.Value) && (x.EndTime <= dateTimeToPicker.Value)))
|
||||
.Where(x => ((x.EndTime >= from) && (x.EndTime <= to)))
|
||||
.And(x => (x.Components == cmpnts))
|
||||
.List();
|
||||
foreach (var tr in listOfRslts) testRslts.Add(tr);
|
||||
}
|
||||
|
||||
Forms.ModelessForm.CloseForm();
|
||||
session.Close();
|
||||
return testRslts;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(string.Format("Error loading statistics of {0}\r\n{1}", (benchId < testBenchNames.Length) ? testBenchNames[benchId] : "XY", exc.Message));
|
||||
Forms.ModelessForm.CloseForm();
|
||||
MessageBox.Show(string.Format("Error loading statistics of {0}\r\n{1}", Program.LocalSettings.GetBenchName(benchId), exc.Message));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
void GetDateRange(out DateTime from, out DateTime to)
|
||||
{
|
||||
if (radioButton1.Checked)
|
||||
{
|
||||
/// Last week
|
||||
from = DateTime.Now.Date.AddDays(-7);
|
||||
to = DateTime.Now;
|
||||
}
|
||||
else if (radioButton2.Checked)
|
||||
{
|
||||
/// Last month
|
||||
from = DateTime.Now.Date.AddDays(-31);
|
||||
to = DateTime.Now;
|
||||
}
|
||||
else if (radioButton3.Checked)
|
||||
{
|
||||
/// Last 3 months
|
||||
from = DateTime.Now.Date.AddDays(-91);
|
||||
to = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// From / to
|
||||
from = dateTimeFromPicker.Value.Date;
|
||||
to = dateTimeToPicker.Value.Date.AddDays(1).AddTicks(-1);
|
||||
}
|
||||
}
|
||||
|
||||
private void radioButton4_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
timePeriodGroupBox.Enabled = radioButton4.Checked;
|
||||
}
|
||||
|
||||
private void StatisticsDlg_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
|
||||
ls.ManiWndMaximized = (WindowState == FormWindowState.Maximized);
|
||||
if (WindowState == FormWindowState.Normal)
|
||||
{
|
||||
ls.MainWndLeft = Location.X;
|
||||
ls.MainWndTop = Location.Y;
|
||||
ls.MainWndWidth = Size.Width;
|
||||
ls.MainWndHeight = Size.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Maximized or minimized (when restarted, minimized window is restored as normal)
|
||||
ls.MainWndLeft = RestoreBounds.Left;
|
||||
ls.MainWndTop = RestoreBounds.Top;
|
||||
ls.MainWndWidth = RestoreBounds.Width;
|
||||
ls.MainWndHeight = RestoreBounds.Height;
|
||||
}
|
||||
|
||||
if (radioButton1.Checked) ls.SelectedRadioButtonNumber = 1;
|
||||
else if (radioButton2.Checked) ls.SelectedRadioButtonNumber = 2;
|
||||
else if (radioButton3.Checked) ls.SelectedRadioButtonNumber = 3;
|
||||
else if (radioButton4.Checked) ls.SelectedRadioButtonNumber = 4;
|
||||
else ls.SelectedRadioButtonNumber = 0;
|
||||
|
||||
for (int i = 0; i < (int)MidId.Count; i++)
|
||||
{
|
||||
(midsTabControl.TabPages[i].Controls[0] as MidOrWaterMetersCtrl).UI2Data();
|
||||
}
|
||||
|
||||
ls.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+307
-55
@@ -61,16 +61,36 @@
|
||||
this.flow1CheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.benchesTabControl = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.wr10StatisticsCtrl1 = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.wr11StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||
this.wr13StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.tabPage4 = new System.Windows.Forms.TabPage();
|
||||
this.wr14StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.tabPage5 = new System.Windows.Forms.TabPage();
|
||||
this.wr15StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.tabPage6 = new System.Windows.Forms.TabPage();
|
||||
this.flow4GroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.flow4ToExclamation = new System.Windows.Forms.Label();
|
||||
this.flow4FromExclamation = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.toLabel5 = new System.Windows.Forms.Label();
|
||||
this.fromLabel5 = new System.Windows.Forms.Label();
|
||||
this.flow4ToTextBox = new System.Windows.Forms.TextBox();
|
||||
this.flow4FromTextBox = new System.Windows.Forms.TextBox();
|
||||
this.flow4CheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.flow5GroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.flow5ToExclamation = new System.Windows.Forms.Label();
|
||||
this.flow5FromExclamation = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.toLabel6 = new System.Windows.Forms.Label();
|
||||
this.fromLabel6 = new System.Windows.Forms.Label();
|
||||
this.flow5ToTextBox = new System.Windows.Forms.TextBox();
|
||||
this.flow5FromTextBox = new System.Windows.Forms.TextBox();
|
||||
this.flow5CheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.wr10StatisticsCtrl1 = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.wr11StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.wr13StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.wr14StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.wr15StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
this.pt7StatisticsCtrl = new Statistics.UserControls.StatisticsCtrl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
@@ -86,6 +106,8 @@
|
||||
this.tabPage4.SuspendLayout();
|
||||
this.tabPage5.SuspendLayout();
|
||||
this.tabPage6.SuspendLayout();
|
||||
this.flow4GroupBox.SuspendLayout();
|
||||
this.flow5GroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
@@ -99,6 +121,8 @@
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.flow5GroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.flow4GroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.flow3GroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.flow2GroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.flow1GroupBox);
|
||||
@@ -106,7 +130,7 @@
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.benchesTabControl);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1202, 450);
|
||||
this.splitContainer1.SplitterDistance = 90;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
@@ -428,7 +452,7 @@
|
||||
this.benchesTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.benchesTabControl.Name = "benchesTabControl";
|
||||
this.benchesTabControl.SelectedIndex = 0;
|
||||
this.benchesTabControl.Size = new System.Drawing.Size(800, 356);
|
||||
this.benchesTabControl.Size = new System.Drawing.Size(1202, 356);
|
||||
this.benchesTabControl.TabIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
@@ -437,108 +461,312 @@
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(792, 330);
|
||||
this.tabPage1.Size = new System.Drawing.Size(1194, 330);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "WR10";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// wr10StatisticsCtrl1
|
||||
//
|
||||
this.wr10StatisticsCtrl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr10StatisticsCtrl1.Location = new System.Drawing.Point(3, 3);
|
||||
this.wr10StatisticsCtrl1.Name = "wr10StatisticsCtrl1";
|
||||
this.wr10StatisticsCtrl1.Size = new System.Drawing.Size(786, 324);
|
||||
this.wr10StatisticsCtrl1.TabIndex = 0;
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.wr11StatisticsCtrl);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(792, 320);
|
||||
this.tabPage2.Size = new System.Drawing.Size(1194, 330);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "WR11";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// wr11StatisticsCtrl
|
||||
//
|
||||
this.wr11StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr11StatisticsCtrl.Location = new System.Drawing.Point(3, 3);
|
||||
this.wr11StatisticsCtrl.Name = "wr11StatisticsCtrl";
|
||||
this.wr11StatisticsCtrl.Size = new System.Drawing.Size(786, 314);
|
||||
this.wr11StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.wr13StatisticsCtrl);
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Size = new System.Drawing.Size(792, 320);
|
||||
this.tabPage3.Size = new System.Drawing.Size(1194, 330);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "WR13";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// wr13StatisticsCtrl
|
||||
//
|
||||
this.wr13StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr13StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.wr13StatisticsCtrl.Name = "wr13StatisticsCtrl";
|
||||
this.wr13StatisticsCtrl.Size = new System.Drawing.Size(792, 320);
|
||||
this.wr13StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// tabPage4
|
||||
//
|
||||
this.tabPage4.Controls.Add(this.wr14StatisticsCtrl);
|
||||
this.tabPage4.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage4.Name = "tabPage4";
|
||||
this.tabPage4.Size = new System.Drawing.Size(792, 320);
|
||||
this.tabPage4.Size = new System.Drawing.Size(1194, 330);
|
||||
this.tabPage4.TabIndex = 3;
|
||||
this.tabPage4.Text = "WR14";
|
||||
this.tabPage4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// wr14StatisticsCtrl
|
||||
//
|
||||
this.wr14StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr14StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.wr14StatisticsCtrl.Name = "wr14StatisticsCtrl";
|
||||
this.wr14StatisticsCtrl.Size = new System.Drawing.Size(792, 320);
|
||||
this.wr14StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// tabPage5
|
||||
//
|
||||
this.tabPage5.Controls.Add(this.wr15StatisticsCtrl);
|
||||
this.tabPage5.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage5.Name = "tabPage5";
|
||||
this.tabPage5.Size = new System.Drawing.Size(792, 320);
|
||||
this.tabPage5.Size = new System.Drawing.Size(1194, 330);
|
||||
this.tabPage5.TabIndex = 4;
|
||||
this.tabPage5.Text = "WR15";
|
||||
this.tabPage5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// wr15StatisticsCtrl
|
||||
//
|
||||
this.wr15StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr15StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.wr15StatisticsCtrl.Name = "wr15StatisticsCtrl";
|
||||
this.wr15StatisticsCtrl.Size = new System.Drawing.Size(792, 320);
|
||||
this.wr15StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// tabPage6
|
||||
//
|
||||
this.tabPage6.Controls.Add(this.pt7StatisticsCtrl);
|
||||
this.tabPage6.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage6.Name = "tabPage6";
|
||||
this.tabPage6.Size = new System.Drawing.Size(792, 320);
|
||||
this.tabPage6.Size = new System.Drawing.Size(1194, 330);
|
||||
this.tabPage6.TabIndex = 5;
|
||||
this.tabPage6.Text = "PT7";
|
||||
this.tabPage6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// flow4GroupBox
|
||||
//
|
||||
this.flow4GroupBox.Controls.Add(this.flow4ToExclamation);
|
||||
this.flow4GroupBox.Controls.Add(this.flow4FromExclamation);
|
||||
this.flow4GroupBox.Controls.Add(this.label7);
|
||||
this.flow4GroupBox.Controls.Add(this.label8);
|
||||
this.flow4GroupBox.Controls.Add(this.toLabel5);
|
||||
this.flow4GroupBox.Controls.Add(this.fromLabel5);
|
||||
this.flow4GroupBox.Controls.Add(this.flow4ToTextBox);
|
||||
this.flow4GroupBox.Controls.Add(this.flow4FromTextBox);
|
||||
this.flow4GroupBox.Controls.Add(this.flow4CheckBox);
|
||||
this.flow4GroupBox.Location = new System.Drawing.Point(706, 7);
|
||||
this.flow4GroupBox.Name = "flow4GroupBox";
|
||||
this.flow4GroupBox.Size = new System.Drawing.Size(221, 77);
|
||||
this.flow4GroupBox.TabIndex = 7;
|
||||
this.flow4GroupBox.TabStop = false;
|
||||
//
|
||||
// flow4ToExclamation
|
||||
//
|
||||
this.flow4ToExclamation.AutoSize = true;
|
||||
this.flow4ToExclamation.ForeColor = System.Drawing.Color.Red;
|
||||
this.flow4ToExclamation.Location = new System.Drawing.Point(167, 48);
|
||||
this.flow4ToExclamation.Name = "flow4ToExclamation";
|
||||
this.flow4ToExclamation.Size = new System.Drawing.Size(10, 13);
|
||||
this.flow4ToExclamation.TabIndex = 9;
|
||||
this.flow4ToExclamation.Text = "!";
|
||||
this.flow4ToExclamation.Visible = false;
|
||||
//
|
||||
// flow4FromExclamation
|
||||
//
|
||||
this.flow4FromExclamation.AutoSize = true;
|
||||
this.flow4FromExclamation.ForeColor = System.Drawing.Color.Red;
|
||||
this.flow4FromExclamation.Location = new System.Drawing.Point(167, 24);
|
||||
this.flow4FromExclamation.Name = "flow4FromExclamation";
|
||||
this.flow4FromExclamation.Size = new System.Drawing.Size(10, 13);
|
||||
this.flow4FromExclamation.TabIndex = 8;
|
||||
this.flow4FromExclamation.Text = "!";
|
||||
this.flow4FromExclamation.Visible = false;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(178, 48);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(32, 13);
|
||||
this.label7.TabIndex = 6;
|
||||
this.label7.Text = "m3/h";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(177, 23);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(32, 13);
|
||||
this.label8.TabIndex = 5;
|
||||
this.label8.Text = "m3/h";
|
||||
//
|
||||
// toLabel5
|
||||
//
|
||||
this.toLabel5.AutoSize = true;
|
||||
this.toLabel5.Location = new System.Drawing.Point(14, 48);
|
||||
this.toLabel5.Name = "toLabel5";
|
||||
this.toLabel5.Size = new System.Drawing.Size(20, 13);
|
||||
this.toLabel5.TabIndex = 4;
|
||||
this.toLabel5.Text = "To";
|
||||
//
|
||||
// fromLabel5
|
||||
//
|
||||
this.fromLabel5.AutoSize = true;
|
||||
this.fromLabel5.Location = new System.Drawing.Point(14, 23);
|
||||
this.fromLabel5.Name = "fromLabel5";
|
||||
this.fromLabel5.Size = new System.Drawing.Size(30, 13);
|
||||
this.fromLabel5.TabIndex = 3;
|
||||
this.fromLabel5.Text = "From";
|
||||
//
|
||||
// flow4ToTextBox
|
||||
//
|
||||
this.flow4ToTextBox.Location = new System.Drawing.Point(65, 45);
|
||||
this.flow4ToTextBox.Name = "flow4ToTextBox";
|
||||
this.flow4ToTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.flow4ToTextBox.TabIndex = 2;
|
||||
this.flow4ToTextBox.TextChanged += new System.EventHandler(this.flow4ToTextBox_TextChanged);
|
||||
//
|
||||
// flow4FromTextBox
|
||||
//
|
||||
this.flow4FromTextBox.Location = new System.Drawing.Point(65, 20);
|
||||
this.flow4FromTextBox.Name = "flow4FromTextBox";
|
||||
this.flow4FromTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.flow4FromTextBox.TabIndex = 1;
|
||||
this.flow4FromTextBox.TextChanged += new System.EventHandler(this.flow4FromTextBox_TextChanged);
|
||||
//
|
||||
// flow4CheckBox
|
||||
//
|
||||
this.flow4CheckBox.AutoSize = true;
|
||||
this.flow4CheckBox.Location = new System.Drawing.Point(10, 0);
|
||||
this.flow4CheckBox.Name = "flow4CheckBox";
|
||||
this.flow4CheckBox.Size = new System.Drawing.Size(57, 17);
|
||||
this.flow4CheckBox.TabIndex = 0;
|
||||
this.flow4CheckBox.Text = "Flow 4";
|
||||
this.flow4CheckBox.UseVisualStyleBackColor = true;
|
||||
this.flow4CheckBox.CheckedChanged += new System.EventHandler(this.flow4CheckBox_CheckedChanged);
|
||||
//
|
||||
// flow5GroupBox
|
||||
//
|
||||
this.flow5GroupBox.Controls.Add(this.flow5ToExclamation);
|
||||
this.flow5GroupBox.Controls.Add(this.flow5FromExclamation);
|
||||
this.flow5GroupBox.Controls.Add(this.label9);
|
||||
this.flow5GroupBox.Controls.Add(this.label10);
|
||||
this.flow5GroupBox.Controls.Add(this.toLabel6);
|
||||
this.flow5GroupBox.Controls.Add(this.fromLabel6);
|
||||
this.flow5GroupBox.Controls.Add(this.flow5ToTextBox);
|
||||
this.flow5GroupBox.Controls.Add(this.flow5FromTextBox);
|
||||
this.flow5GroupBox.Controls.Add(this.flow5CheckBox);
|
||||
this.flow5GroupBox.Location = new System.Drawing.Point(939, 7);
|
||||
this.flow5GroupBox.Name = "flow5GroupBox";
|
||||
this.flow5GroupBox.Size = new System.Drawing.Size(221, 77);
|
||||
this.flow5GroupBox.TabIndex = 8;
|
||||
this.flow5GroupBox.TabStop = false;
|
||||
//
|
||||
// flow5ToExclamation
|
||||
//
|
||||
this.flow5ToExclamation.AutoSize = true;
|
||||
this.flow5ToExclamation.ForeColor = System.Drawing.Color.Red;
|
||||
this.flow5ToExclamation.Location = new System.Drawing.Point(167, 48);
|
||||
this.flow5ToExclamation.Name = "flow5ToExclamation";
|
||||
this.flow5ToExclamation.Size = new System.Drawing.Size(10, 13);
|
||||
this.flow5ToExclamation.TabIndex = 9;
|
||||
this.flow5ToExclamation.Text = "!";
|
||||
this.flow5ToExclamation.Visible = false;
|
||||
//
|
||||
// flow5FromExclamation
|
||||
//
|
||||
this.flow5FromExclamation.AutoSize = true;
|
||||
this.flow5FromExclamation.ForeColor = System.Drawing.Color.Red;
|
||||
this.flow5FromExclamation.Location = new System.Drawing.Point(167, 24);
|
||||
this.flow5FromExclamation.Name = "flow5FromExclamation";
|
||||
this.flow5FromExclamation.Size = new System.Drawing.Size(10, 13);
|
||||
this.flow5FromExclamation.TabIndex = 8;
|
||||
this.flow5FromExclamation.Text = "!";
|
||||
this.flow5FromExclamation.Visible = false;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(178, 48);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(32, 13);
|
||||
this.label9.TabIndex = 6;
|
||||
this.label9.Text = "m3/h";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(177, 23);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(32, 13);
|
||||
this.label10.TabIndex = 5;
|
||||
this.label10.Text = "m3/h";
|
||||
//
|
||||
// toLabel6
|
||||
//
|
||||
this.toLabel6.AutoSize = true;
|
||||
this.toLabel6.Location = new System.Drawing.Point(14, 48);
|
||||
this.toLabel6.Name = "toLabel6";
|
||||
this.toLabel6.Size = new System.Drawing.Size(20, 13);
|
||||
this.toLabel6.TabIndex = 4;
|
||||
this.toLabel6.Text = "To";
|
||||
//
|
||||
// fromLabel6
|
||||
//
|
||||
this.fromLabel6.AutoSize = true;
|
||||
this.fromLabel6.Location = new System.Drawing.Point(14, 23);
|
||||
this.fromLabel6.Name = "fromLabel6";
|
||||
this.fromLabel6.Size = new System.Drawing.Size(30, 13);
|
||||
this.fromLabel6.TabIndex = 3;
|
||||
this.fromLabel6.Text = "From";
|
||||
//
|
||||
// flow5ToTextBox
|
||||
//
|
||||
this.flow5ToTextBox.Location = new System.Drawing.Point(65, 45);
|
||||
this.flow5ToTextBox.Name = "flow5ToTextBox";
|
||||
this.flow5ToTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.flow5ToTextBox.TabIndex = 2;
|
||||
this.flow5ToTextBox.TextChanged += new System.EventHandler(this.flow5ToTextBox_TextChanged);
|
||||
//
|
||||
// flow5FromTextBox
|
||||
//
|
||||
this.flow5FromTextBox.Location = new System.Drawing.Point(65, 20);
|
||||
this.flow5FromTextBox.Name = "flow5FromTextBox";
|
||||
this.flow5FromTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.flow5FromTextBox.TabIndex = 1;
|
||||
this.flow5FromTextBox.TextChanged += new System.EventHandler(this.flow5FromTextBox_TextChanged);
|
||||
//
|
||||
// flow5CheckBox
|
||||
//
|
||||
this.flow5CheckBox.AutoSize = true;
|
||||
this.flow5CheckBox.Location = new System.Drawing.Point(10, 0);
|
||||
this.flow5CheckBox.Name = "flow5CheckBox";
|
||||
this.flow5CheckBox.Size = new System.Drawing.Size(57, 17);
|
||||
this.flow5CheckBox.TabIndex = 0;
|
||||
this.flow5CheckBox.Text = "Flow 5";
|
||||
this.flow5CheckBox.UseVisualStyleBackColor = true;
|
||||
this.flow5CheckBox.CheckedChanged += new System.EventHandler(this.flow5CheckBox_CheckedChanged);
|
||||
//
|
||||
// wr10StatisticsCtrl1
|
||||
//
|
||||
this.wr10StatisticsCtrl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr10StatisticsCtrl1.Location = new System.Drawing.Point(3, 3);
|
||||
this.wr10StatisticsCtrl1.Name = "wr10StatisticsCtrl1";
|
||||
this.wr10StatisticsCtrl1.Size = new System.Drawing.Size(1188, 324);
|
||||
this.wr10StatisticsCtrl1.TabIndex = 0;
|
||||
//
|
||||
// wr11StatisticsCtrl
|
||||
//
|
||||
this.wr11StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr11StatisticsCtrl.Location = new System.Drawing.Point(3, 3);
|
||||
this.wr11StatisticsCtrl.Name = "wr11StatisticsCtrl";
|
||||
this.wr11StatisticsCtrl.Size = new System.Drawing.Size(1188, 324);
|
||||
this.wr11StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// wr13StatisticsCtrl
|
||||
//
|
||||
this.wr13StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr13StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.wr13StatisticsCtrl.Name = "wr13StatisticsCtrl";
|
||||
this.wr13StatisticsCtrl.Size = new System.Drawing.Size(1194, 330);
|
||||
this.wr13StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// wr14StatisticsCtrl
|
||||
//
|
||||
this.wr14StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr14StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.wr14StatisticsCtrl.Name = "wr14StatisticsCtrl";
|
||||
this.wr14StatisticsCtrl.Size = new System.Drawing.Size(1194, 330);
|
||||
this.wr14StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// wr15StatisticsCtrl
|
||||
//
|
||||
this.wr15StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wr15StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.wr15StatisticsCtrl.Name = "wr15StatisticsCtrl";
|
||||
this.wr15StatisticsCtrl.Size = new System.Drawing.Size(1194, 330);
|
||||
this.wr15StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// pt7StatisticsCtrl
|
||||
//
|
||||
this.pt7StatisticsCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pt7StatisticsCtrl.Location = new System.Drawing.Point(0, 0);
|
||||
this.pt7StatisticsCtrl.Name = "pt7StatisticsCtrl";
|
||||
this.pt7StatisticsCtrl.Size = new System.Drawing.Size(792, 320);
|
||||
this.pt7StatisticsCtrl.Size = new System.Drawing.Size(1194, 330);
|
||||
this.pt7StatisticsCtrl.TabIndex = 0;
|
||||
//
|
||||
// MidOrWaterMetersCtrl
|
||||
@@ -547,7 +775,7 @@
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MidOrWaterMetersCtrl";
|
||||
this.Size = new System.Drawing.Size(800, 450);
|
||||
this.Size = new System.Drawing.Size(1202, 450);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
@@ -565,6 +793,10 @@
|
||||
this.tabPage4.ResumeLayout(false);
|
||||
this.tabPage5.ResumeLayout(false);
|
||||
this.tabPage6.ResumeLayout(false);
|
||||
this.flow4GroupBox.ResumeLayout(false);
|
||||
this.flow4GroupBox.PerformLayout();
|
||||
this.flow5GroupBox.ResumeLayout(false);
|
||||
this.flow5GroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -615,5 +847,25 @@
|
||||
private System.Windows.Forms.Label flow3FromExclamation;
|
||||
private System.Windows.Forms.Label flow2ToExclamation;
|
||||
private System.Windows.Forms.Label flow2FromExclamation;
|
||||
private System.Windows.Forms.GroupBox flow5GroupBox;
|
||||
private System.Windows.Forms.Label flow5ToExclamation;
|
||||
private System.Windows.Forms.Label flow5FromExclamation;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Label toLabel6;
|
||||
private System.Windows.Forms.Label fromLabel6;
|
||||
private System.Windows.Forms.TextBox flow5ToTextBox;
|
||||
private System.Windows.Forms.TextBox flow5FromTextBox;
|
||||
private System.Windows.Forms.CheckBox flow5CheckBox;
|
||||
private System.Windows.Forms.GroupBox flow4GroupBox;
|
||||
private System.Windows.Forms.Label flow4ToExclamation;
|
||||
private System.Windows.Forms.Label flow4FromExclamation;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Label toLabel5;
|
||||
private System.Windows.Forms.Label fromLabel5;
|
||||
private System.Windows.Forms.TextBox flow4ToTextBox;
|
||||
private System.Windows.Forms.TextBox flow4FromTextBox;
|
||||
private System.Windows.Forms.CheckBox flow4CheckBox;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Results.Entities;
|
||||
using Statistics.Resources;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Statistics.UserControls
|
||||
{
|
||||
@@ -15,17 +16,46 @@ namespace Statistics.UserControls
|
||||
public MidId MidId;
|
||||
public StatisticsDlg Parent;
|
||||
|
||||
public bool Flow1Enabled { get { return flow1CheckBox.Checked; } }
|
||||
public double Flow1From { get { return flow1From; } }
|
||||
public double Flow1To { get { return flow1To; } }
|
||||
|
||||
public bool Flow2Enabled { get { return flow2CheckBox.Checked; } }
|
||||
public double Flow2From { get { return flow2From; } }
|
||||
public double Flow2To { get { return flow2To; } }
|
||||
public bool IsFlowEnabled(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1: return flow1CheckBox.Checked;
|
||||
case 2: return flow2CheckBox.Checked;
|
||||
case 3: return flow3CheckBox.Checked;
|
||||
case 4: return flow4CheckBox.Checked;
|
||||
case 5: return flow5CheckBox.Checked;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
public double FlowFrom(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1: return flow1From;
|
||||
case 2: return flow2From;
|
||||
case 3: return flow3From;
|
||||
case 4: return flow4From;
|
||||
case 5: return flow5From;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public double FlowTo(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1: return flow1To;
|
||||
case 2: return flow2To;
|
||||
case 3: return flow3To;
|
||||
case 4: return flow4To;
|
||||
case 5: return flow5To;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Flow3Enabled { get { return flow3CheckBox.Checked; } }
|
||||
public double Flow3From { get { return flow3From; } }
|
||||
public double Flow3To { get { return flow3To; } }
|
||||
|
||||
/// All flows are in m3/h
|
||||
double flow1From;
|
||||
@@ -34,6 +64,10 @@ namespace Statistics.UserControls
|
||||
double flow2To;
|
||||
double flow3From;
|
||||
double flow3To;
|
||||
double flow4From;
|
||||
double flow4To;
|
||||
double flow5From;
|
||||
double flow5To;
|
||||
|
||||
|
||||
StatisticsCtrl GetStatistics(int i)
|
||||
@@ -46,9 +80,9 @@ namespace Statistics.UserControls
|
||||
}
|
||||
|
||||
|
||||
public void UpdateRequest(int benchId)
|
||||
public IList<TestRslt> UpdateRequest(int benchId)
|
||||
{
|
||||
Parent.UpdateRequest(benchId, MidId);
|
||||
return Parent.UpdateRequest(benchId, MidId);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +93,8 @@ namespace Statistics.UserControls
|
||||
ManageCheckGroupBox(flow1CheckBox, flow1GroupBox);
|
||||
ManageCheckGroupBox(flow2CheckBox, flow2GroupBox);
|
||||
ManageCheckGroupBox(flow3CheckBox, flow3GroupBox);
|
||||
ManageCheckGroupBox(flow4CheckBox, flow4GroupBox);
|
||||
ManageCheckGroupBox(flow5CheckBox, flow5GroupBox);
|
||||
|
||||
for (int i = 0; i < benchesTabControl.TabPages.Count; i++ )
|
||||
{
|
||||
@@ -66,7 +102,7 @@ namespace Statistics.UserControls
|
||||
if ((tp.Controls.Count > 0) && (tp.Controls[0] is StatisticsCtrl))
|
||||
{
|
||||
(tp.Controls[0] as StatisticsCtrl).Id = i;
|
||||
(tp.Controls[0] as StatisticsCtrl).BenchesCtrl = this;
|
||||
(tp.Controls[0] as StatisticsCtrl).MidCtrl = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,17 +112,79 @@ namespace Statistics.UserControls
|
||||
flow1CheckBox.Text = string.Format("{0} 1", Strings.Flow);
|
||||
flow2CheckBox.Text = string.Format("{0} 2", Strings.Flow);
|
||||
flow3CheckBox.Text = string.Format("{0} 3", Strings.Flow);
|
||||
flow4CheckBox.Text = string.Format("{0} 4", Strings.Flow);
|
||||
flow5CheckBox.Text = string.Format("{0} 5", Strings.Flow);
|
||||
fromLabel2.Text = Strings.From;
|
||||
fromLabel3.Text = Strings.From;
|
||||
fromLabel4.Text = Strings.From;
|
||||
fromLabel5.Text = Strings.From;
|
||||
fromLabel6.Text = Strings.From;
|
||||
toLabel2.Text = Strings.To;
|
||||
toLabel3.Text = Strings.To;
|
||||
toLabel4.Text = Strings.To;
|
||||
toLabel5.Text = Strings.To;
|
||||
toLabel6.Text = Strings.To;
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
flow1CheckBox.Checked = ls.GetFlowEnabled(MidId, 0);
|
||||
flow2CheckBox.Checked = ls.GetFlowEnabled(MidId, 1);
|
||||
flow3CheckBox.Checked = ls.GetFlowEnabled(MidId, 2);
|
||||
flow4CheckBox.Checked = ls.GetFlowEnabled(MidId, 3);
|
||||
flow5CheckBox.Checked = ls.GetFlowEnabled(MidId, 4);
|
||||
flow1From = ls.GetFlowFrom(MidId, 0);
|
||||
flow2From = ls.GetFlowFrom(MidId, 1);
|
||||
flow3From = ls.GetFlowFrom(MidId, 2);
|
||||
flow4From = ls.GetFlowFrom(MidId, 3);
|
||||
flow5From = ls.GetFlowFrom(MidId, 4);
|
||||
flow1FromTextBox.Text = flow1From.ToString();
|
||||
flow2FromTextBox.Text = flow2From.ToString();
|
||||
flow3FromTextBox.Text = flow3From.ToString();
|
||||
flow4FromTextBox.Text = flow4From.ToString();
|
||||
flow5FromTextBox.Text = flow5From.ToString();
|
||||
flow1To = ls.GetFlowTo(MidId, 0);
|
||||
flow2To = ls.GetFlowTo(MidId, 1);
|
||||
flow3To = ls.GetFlowTo(MidId, 2);
|
||||
flow4To = ls.GetFlowTo(MidId, 3);
|
||||
flow5To = ls.GetFlowTo(MidId, 4);
|
||||
flow1ToTextBox.Text = flow1To.ToString();
|
||||
flow2ToTextBox.Text = flow2To.ToString();
|
||||
flow3ToTextBox.Text = flow3To.ToString();
|
||||
flow4ToTextBox.Text = flow4To.ToString();
|
||||
flow5ToTextBox.Text = flow5To.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns>true when successful</returns>
|
||||
public void UI2Data()
|
||||
{
|
||||
LocalSettings ls = Program.LocalSettings;
|
||||
ls.SetFlowEnabled(MidId, 0, flow1CheckBox.Checked);
|
||||
ls.SetFlowEnabled(MidId, 1, flow2CheckBox.Checked);
|
||||
ls.SetFlowEnabled(MidId, 2, flow3CheckBox.Checked);
|
||||
ls.SetFlowEnabled(MidId, 3, flow4CheckBox.Checked);
|
||||
ls.SetFlowEnabled(MidId, 4, flow5CheckBox.Checked);
|
||||
ls.SetFlowFrom(MidId, 0, flow1From);
|
||||
ls.SetFlowFrom(MidId, 1, flow2From);
|
||||
ls.SetFlowFrom(MidId, 2, flow3From);
|
||||
ls.SetFlowFrom(MidId, 3, flow4From);
|
||||
ls.SetFlowFrom(MidId, 4, flow5From);
|
||||
ls.SetFlowTo(MidId, 0, flow1To);
|
||||
ls.SetFlowTo(MidId, 1, flow2To);
|
||||
ls.SetFlowTo(MidId, 2, flow3To);
|
||||
ls.SetFlowTo(MidId, 3, flow4To);
|
||||
ls.SetFlowTo(MidId, 4, flow5To);
|
||||
}
|
||||
|
||||
private void flow1CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow1CheckBox, flow1GroupBox); }
|
||||
private void flow2CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow2CheckBox, flow2GroupBox); }
|
||||
private void flow3CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow3CheckBox, flow3GroupBox); }
|
||||
private void flow4CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow4CheckBox, flow4GroupBox); }
|
||||
private void flow5CheckBox_CheckedChanged(object sender, EventArgs e) { ManageCheckGroupBox(flow5CheckBox, flow5GroupBox); }
|
||||
|
||||
private void ManageCheckGroupBox(CheckBox chk, GroupBox grp)
|
||||
{
|
||||
@@ -110,7 +208,9 @@ namespace Statistics.UserControls
|
||||
flow1FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow1FromExclamation.Visible = !(double.TryParse(flow1FromTextBox.Text, out flow1From) && (flow1From >= 0));
|
||||
flow1FromExclamation.Visible = !((double.TryParse(flow1FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow1From) ||
|
||||
double.TryParse(flow1FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow1From)) &&
|
||||
(flow1From >= 0));
|
||||
}
|
||||
|
||||
private void flow1ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -121,7 +221,9 @@ namespace Statistics.UserControls
|
||||
flow1ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow1ToExclamation.Visible = !(double.TryParse(flow1ToTextBox.Text, out flow1To) && (flow1To >= 0));
|
||||
flow1ToExclamation.Visible = !((double.TryParse(flow1ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow1To) ||
|
||||
double.TryParse(flow1ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow1To)) &&
|
||||
(flow1To >= 0));
|
||||
}
|
||||
|
||||
private void flow2FromTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -132,7 +234,9 @@ namespace Statistics.UserControls
|
||||
flow2FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow2FromExclamation.Visible = !(double.TryParse(flow2FromTextBox.Text, out flow2From) && (flow2From >= 0));
|
||||
flow2FromExclamation.Visible = !((double.TryParse(flow2FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow2From) ||
|
||||
double.TryParse(flow2FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow2From)) &&
|
||||
(flow2From >= 0));
|
||||
}
|
||||
|
||||
private void flow2ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -143,7 +247,9 @@ namespace Statistics.UserControls
|
||||
flow2ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow2ToExclamation.Visible = !(double.TryParse(flow2ToTextBox.Text, out flow2To) && (flow2To >= 0));
|
||||
flow2ToExclamation.Visible = !((double.TryParse(flow2ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow2To) ||
|
||||
double.TryParse(flow2ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow2To)) &&
|
||||
(flow2To >= 0));
|
||||
}
|
||||
|
||||
private void flow3FromTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -154,7 +260,9 @@ namespace Statistics.UserControls
|
||||
flow3FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow3FromExclamation.Visible = !(double.TryParse(flow3FromTextBox.Text, out flow3From) && (flow3From >= 0));
|
||||
flow3FromExclamation.Visible = !((double.TryParse(flow3FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow3From) ||
|
||||
double.TryParse(flow3FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow3From)) &&
|
||||
(flow3From >= 0));
|
||||
}
|
||||
|
||||
private void flow3ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
@@ -165,7 +273,61 @@ namespace Statistics.UserControls
|
||||
flow3ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow3ToExclamation.Visible = !(double.TryParse(flow3ToTextBox.Text, out flow3To) && (flow3To >= 0));
|
||||
flow3ToExclamation.Visible = !((double.TryParse(flow3ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow3To) ||
|
||||
double.TryParse(flow3ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow3To)) &&
|
||||
(flow3To >= 0));
|
||||
}
|
||||
|
||||
private void flow4FromTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(flow4FromTextBox.Text))
|
||||
{
|
||||
flow4From = 0;
|
||||
flow4FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow4FromExclamation.Visible = !((double.TryParse(flow4FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow4From) ||
|
||||
double.TryParse(flow4FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow4From)) &&
|
||||
(flow4From >= 0));
|
||||
}
|
||||
|
||||
private void flow4ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(flow4ToTextBox.Text))
|
||||
{
|
||||
flow4To = 0;
|
||||
flow4ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow4ToExclamation.Visible = !((double.TryParse(flow4ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow4To) ||
|
||||
double.TryParse(flow4ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow4To)) &&
|
||||
(flow4To >= 0));
|
||||
}
|
||||
|
||||
private void flow5FromTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(flow5FromTextBox.Text))
|
||||
{
|
||||
flow5From = 0;
|
||||
flow5FromExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow5FromExclamation.Visible = !((double.TryParse(flow5FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow5From) ||
|
||||
double.TryParse(flow5FromTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow5From)) &&
|
||||
(flow5From >= 0));
|
||||
}
|
||||
|
||||
private void flow5ToTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(flow5ToTextBox.Text))
|
||||
{
|
||||
flow5To = 0;
|
||||
flow5ToExclamation.Visible = false;
|
||||
}
|
||||
else
|
||||
flow5ToExclamation.Visible = !((double.TryParse(flow5ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out flow5To) ||
|
||||
double.TryParse(flow5ToTextBox.Text, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out flow5To)) &&
|
||||
(flow5To >= 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+103
-5
@@ -28,27 +28,122 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series10 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
this.updateButton = new System.Windows.Forms.Button();
|
||||
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.exportButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// updateButton
|
||||
//
|
||||
this.updateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.updateButton.Location = new System.Drawing.Point(255, 11);
|
||||
this.updateButton.Location = new System.Drawing.Point(3, 7);
|
||||
this.updateButton.Name = "updateButton";
|
||||
this.updateButton.Size = new System.Drawing.Size(122, 43);
|
||||
this.updateButton.Size = new System.Drawing.Size(90, 43);
|
||||
this.updateButton.TabIndex = 4;
|
||||
this.updateButton.Text = "Update";
|
||||
this.updateButton.Text = "Update data";
|
||||
this.updateButton.UseVisualStyleBackColor = true;
|
||||
this.updateButton.Click += new System.EventHandler(this.updateButton_Click);
|
||||
//
|
||||
// chart1
|
||||
//
|
||||
chartArea2.Name = "ChartArea1";
|
||||
this.chart1.ChartAreas.Add(chartArea2);
|
||||
this.chart1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
legend2.Name = "Legend1";
|
||||
this.chart1.Legends.Add(legend2);
|
||||
this.chart1.Location = new System.Drawing.Point(0, 0);
|
||||
this.chart1.Name = "chart1";
|
||||
series6.ChartArea = "ChartArea1";
|
||||
series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series6.Color = System.Drawing.Color.ForestGreen;
|
||||
series6.Legend = "Legend1";
|
||||
series6.Name = "Flow 1";
|
||||
series7.ChartArea = "ChartArea1";
|
||||
series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series7.Color = System.Drawing.Color.Red;
|
||||
series7.Legend = "Legend1";
|
||||
series7.Name = "Flow 2";
|
||||
series8.ChartArea = "ChartArea1";
|
||||
series8.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series8.Color = System.Drawing.Color.Blue;
|
||||
series8.Legend = "Legend1";
|
||||
series8.Name = "Flow 3";
|
||||
series9.ChartArea = "ChartArea1";
|
||||
series9.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series9.Color = System.Drawing.Color.DarkOrange;
|
||||
series9.Legend = "Legend1";
|
||||
series9.Name = "Flow 4";
|
||||
series10.ChartArea = "ChartArea1";
|
||||
series10.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
|
||||
series10.Color = System.Drawing.Color.Fuchsia;
|
||||
series10.Legend = "Legend1";
|
||||
series10.Name = "Flow 5";
|
||||
this.chart1.Series.Add(series6);
|
||||
this.chart1.Series.Add(series7);
|
||||
this.chart1.Series.Add(series8);
|
||||
this.chart1.Series.Add(series9);
|
||||
this.chart1.Series.Add(series10);
|
||||
this.chart1.Size = new System.Drawing.Size(476, 381);
|
||||
this.chart1.TabIndex = 5;
|
||||
this.chart1.Text = "chart1";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.chart1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.exportButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.updateButton);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(577, 381);
|
||||
this.splitContainer1.SplitterDistance = 476;
|
||||
this.splitContainer1.SplitterWidth = 1;
|
||||
this.splitContainer1.TabIndex = 6;
|
||||
//
|
||||
// exportButton
|
||||
//
|
||||
this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.exportButton.Location = new System.Drawing.Point(3, 56);
|
||||
this.exportButton.Name = "exportButton";
|
||||
this.exportButton.Size = new System.Drawing.Size(90, 43);
|
||||
this.exportButton.TabIndex = 5;
|
||||
this.exportButton.Text = "Export";
|
||||
this.exportButton.UseVisualStyleBackColor = true;
|
||||
this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
|
||||
//
|
||||
// StatisticsCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.updateButton);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "StatisticsCtrl";
|
||||
this.Size = new System.Drawing.Size(388, 242);
|
||||
this.Size = new System.Drawing.Size(577, 381);
|
||||
((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -56,5 +151,8 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button updateButton;
|
||||
private System.Windows.Forms.DataVisualization.Charting.Chart chart1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.Button exportButton;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,62 @@
|
||||
using System;
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using Results.Entities;
|
||||
using Statistics.Resources;
|
||||
|
||||
namespace Statistics.UserControls
|
||||
{
|
||||
public partial class StatisticsCtrl : UserControl
|
||||
{
|
||||
public int Id; /// Index of the tab page
|
||||
public MidOrWaterMetersCtrl BenchesCtrl; /// Reference to the parent control
|
||||
public MidOrWaterMetersCtrl MidCtrl; /// Reference to the parent control
|
||||
|
||||
public StatisticsCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "dd.MM.yy";
|
||||
chart1.ChartAreas[0].AxisX.Interval = 1;
|
||||
chart1.ChartAreas[0].AxisX.IntervalType = DateTimeIntervalType.Days;
|
||||
}
|
||||
|
||||
private void updateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BenchesCtrl != null) BenchesCtrl.UpdateRequest(Id);
|
||||
if (MidCtrl != null)
|
||||
{
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
chart1.Series[string.Format("Flow {0}", i)].Points.Clear();
|
||||
}
|
||||
|
||||
IList<TestRslt> results = MidCtrl.UpdateRequest(Id);
|
||||
|
||||
if (results != null)
|
||||
{
|
||||
foreach (var r in results)
|
||||
{
|
||||
if (r.ErrorMaster != 0)
|
||||
{
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
if (MidCtrl.IsFlowEnabled(i) && (MidCtrl.FlowFrom(i) <= r.FlowMean) && (r.FlowMean <= MidCtrl.FlowTo(i)))
|
||||
{
|
||||
chart1.Series[string.Format("Flow {0}", i)].Points.AddXY(r.StartTime, r.ErrorMaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void exportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,16 +27,13 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
|
||||
/// <summary>The state of the measurement</summary>
|
||||
MsrmntState msrmntState;
|
||||
int msrmntTimeStamp;
|
||||
|
||||
///
|
||||
/// Measured values when MsrmntState == MsrmntState.Valid
|
||||
///
|
||||
float temperature; /// [°C]
|
||||
float pressure; /// [bar]
|
||||
float humidity; /// [R%]
|
||||
|
||||
/// <summary>Measurement time stamp when MsrmntState == MsrmntState.Valid</summary>
|
||||
int msrmntTimeStamp;
|
||||
|
||||
public Ambient()
|
||||
{
|
||||
@@ -64,6 +61,7 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
temperature = 20.0f;
|
||||
humidity = 40.0f;
|
||||
pressure = 1.0f;
|
||||
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
return;
|
||||
@@ -73,7 +71,9 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
serialPort = new SerialPort(comPortName, ambientCfg.BaudRate, ambientCfg.Parity, ambientCfg.DataBits, ambientCfg.StopBits);
|
||||
serialPort.Handshake = ambientCfg.Handshake;
|
||||
serialPort.Open();
|
||||
msrmntState = MsrmntState.Busy;
|
||||
|
||||
msrmntTimeStamp = 0;
|
||||
msrmntState = MsrmntState.Busy;
|
||||
|
||||
log.FatalFormat("Successfully initialized device {0}", ToString());
|
||||
}
|
||||
@@ -81,114 +81,102 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
/// <summary>Run this device</summary>
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
if (ambientCfg.DebugLevel == DebugMode.Simulate ||
|
||||
ambientCfg.DebugLevel == DebugMode.FailureDuringOperation)
|
||||
{
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
return;
|
||||
}
|
||||
if ((ambientCfg.DebugLevel == DebugMode.Normal) && (serialPort != null))
|
||||
{
|
||||
///
|
||||
/// Read response
|
||||
///
|
||||
try
|
||||
{
|
||||
int receivedBytes = serialPort.BytesToRead;
|
||||
|
||||
if (serialPort == null)
|
||||
{
|
||||
log.ErrorFormat("{0} - RunDeviceBefore() - serial port closed", Name);
|
||||
return;
|
||||
}
|
||||
if (receivedBytes >= 13)
|
||||
{
|
||||
byte[] byteArr = new byte[receivedBytes];
|
||||
for (int i = 0; i < receivedBytes; i++) byteArr[i] = (byte)serialPort.ReadByte();
|
||||
log.Debug(Telegram.LogTelegram("Received ", byteArr));
|
||||
|
||||
try
|
||||
{
|
||||
int receivedBytes = serialPort.BytesToRead;
|
||||
if ((receivedBytes == 13) && (byteArr[0] == 1) && (byteArr[1] == 3) && (byteArr[2] == 8) && Telegram.VerifyTelegramCRC(byteArr))
|
||||
{
|
||||
int value = (int)byteArr[3] * 256 + (int)byteArr[4];
|
||||
temperature = (float)value / 10.0f;
|
||||
|
||||
if (receivedBytes >= 13)
|
||||
{
|
||||
byte[] byteArr = new byte[receivedBytes];
|
||||
for (int i = 0; i < receivedBytes; i++) byteArr[i] = (byte)serialPort.ReadByte();
|
||||
log.Debug(Telegram.LogTelegram("Received ", byteArr));
|
||||
value = (int)byteArr[5] * 256 + (int)byteArr[6];
|
||||
humidity = (float)value / 10.0f;
|
||||
|
||||
if ((receivedBytes == 13) && (byteArr[0] == 1) && (byteArr[1] == 3) && (byteArr[2] == 8) && Telegram.VerifyTelegramCRC(byteArr))
|
||||
{
|
||||
int value = (int)byteArr[3] * 256 + (int)byteArr[4];
|
||||
temperature = (float)value / 10.0f;
|
||||
value = (int)byteArr[9] * 256 + (int)byteArr[10];
|
||||
pressure = (float)value / 10000.0f;
|
||||
|
||||
value = (int)byteArr[5] * 256 + (int)byteArr[6];
|
||||
humidity = (float)value / 10.0f;
|
||||
|
||||
value = (int)byteArr[9] * 256 + (int)byteArr[10];
|
||||
pressure = (float)value / 10000.0f;
|
||||
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("Ambient: temperature = {0:F1} C, humidity = {1:F1} %, pressure = {2:F0} mbar", temperature, humidity, 1000 * pressure);
|
||||
msrmntTimeStamp = StateMachine.Time;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("Ambient: temperature = {0:F1} C, humidity = {1:F1} %, pressure = {2:F0} mbar", temperature, humidity, 1000 * pressure);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugLevel = DebugMode.FailureDuringOperation;
|
||||
serialPort = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugLevel = DebugMode.FailureDuringOperation;
|
||||
//serialPort.Close(); /// ?
|
||||
serialPort = null;
|
||||
|
||||
log.FatalFormat("Ambient: Serail port read failure : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
}
|
||||
log.FatalFormat("Ambient: Serial port read failure : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Run this device</summary>
|
||||
public void RunDeviceAfter()
|
||||
{
|
||||
if (ambientCfg.DebugLevel == DebugMode.Simulate ||
|
||||
ambientCfg.DebugLevel == DebugMode.FailureDuringOperation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ((ambientCfg.DebugLevel == DebugMode.Normal) && (serialPort != null))
|
||||
{
|
||||
if ((StateMachine.Time % 10) == 0)
|
||||
{
|
||||
///
|
||||
/// Send request once per 10 seconds
|
||||
///
|
||||
try
|
||||
{
|
||||
/// Read four registers: 0x31, 0x32, 0x33, 0x34
|
||||
UInt16 regAddr = 0x0030; /// register addr. = 0x31 (Modbus!)
|
||||
UInt16 count = 4;
|
||||
|
||||
if (serialPort == null)
|
||||
{
|
||||
log.ErrorFormat("{0} - RunDeviceAfter() - serial port closed", Name);
|
||||
return;
|
||||
}
|
||||
/// Prepare data to be sent
|
||||
byte[] msg = new byte[8];
|
||||
msg[0] = 1; /// (byte)ambientCfg.BusAddress;
|
||||
msg[1] = 3; /// CMD = Read registers
|
||||
msg[2] = (byte)(regAddr >> 8); /// Control Word Hi
|
||||
msg[3] = (byte)(regAddr & 0xFF); /// Control Word Lo
|
||||
msg[4] = (byte)(count >> 8); /// Serial Com Reference Hi
|
||||
msg[5] = (byte)(count & 0xFF); /// Serial Com Reference Lo
|
||||
Telegram.UpdateTelegramCRC(msg);
|
||||
|
||||
try
|
||||
{
|
||||
/// Each 10 seconds
|
||||
if ((StateMachine.Time % 10) == 0)
|
||||
{
|
||||
/// Read four registers: 0x31, 0x32, 0x33, 0x34
|
||||
UInt16 regAddr = 0x0030; /// register addr. = 0x31 (Modbus!)
|
||||
UInt16 count = 4;
|
||||
log.Debug(Telegram.LogTelegram("Sending ", msg));
|
||||
serialPort.Write(msg, 0, msg.Length);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugLevel = DebugMode.FailureDuringOperation;
|
||||
//serialPort.Close(); /// ?
|
||||
serialPort = null;
|
||||
|
||||
/// Prepare data to be sent
|
||||
byte[] msg = new byte[8];
|
||||
msg[0] = 1; /// (byte)ambientCfg.BusAddress;
|
||||
msg[1] = 3; /// CMD = Read registers
|
||||
msg[2] = (byte)(regAddr >> 8); /// Control Word Hi
|
||||
msg[3] = (byte)(regAddr & 0xFF); /// Control Word Lo
|
||||
msg[4] = (byte)(count >> 8); /// Serial Com Reference Hi
|
||||
msg[5] = (byte)(count & 0xFF); /// Serial Com Reference Lo
|
||||
Telegram.UpdateTelegramCRC(msg);
|
||||
|
||||
log.Debug(Telegram.LogTelegram("Sending ", msg));
|
||||
serialPort.Write(msg, 0, msg.Length);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugLevel = DebugMode.FailureDuringOperation;
|
||||
serialPort = null;
|
||||
|
||||
log.FatalFormat("Ambient: Serail port read failure : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
}
|
||||
log.FatalFormat("Ambient: Serail port read failure : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Stop this device</summary>
|
||||
public void StopDevice()
|
||||
{
|
||||
if (serialPort != null)
|
||||
if ((ambientCfg.DebugLevel == DebugMode.Normal) && (serialPort != null))
|
||||
{
|
||||
serialPort.Close();
|
||||
serialPort = null;
|
||||
@@ -206,18 +194,18 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
|
||||
public IOperation ReadAmbientOp(FloatBox temperature, FloatBox pressure, FloatBox humidity)
|
||||
{
|
||||
this.tempBox = temperature;
|
||||
this.tempBox = temperature;
|
||||
this.pressureBox = pressure;
|
||||
this.humiBox = humidity;
|
||||
this.humiBox = humidity;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
if (tempBox != null) tempBox.Val = temperature;
|
||||
if (tempBox != null) tempBox.Val = temperature;
|
||||
if (pressureBox != null) pressureBox.Val = pressure;
|
||||
if (humiBox != null) humiBox.Val = humidity;
|
||||
if (humiBox != null) humiBox.Val = humidity;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
@@ -226,9 +214,9 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (tempBox != null) tempBox.Val = temperature;
|
||||
if (tempBox != null) tempBox.Val = temperature;
|
||||
if (pressureBox != null) pressureBox.Val = pressure;
|
||||
if (humiBox != null) humiBox.Val = humidity;
|
||||
if (humiBox != null) humiBox.Val = humidity;
|
||||
return Event.AmbientDone;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,794 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
partial class CycleBeginningForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.checkBox3 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox3 = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox4 = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.checkBox5 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox5 = new System.Windows.Forms.ComboBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.checkBox6 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox6 = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.checkBox7 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox7 = new System.Windows.Forms.ComboBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.checkBox8 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox8 = new System.Windows.Forms.ComboBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.checkBox9 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox9 = new System.Windows.Forms.ComboBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.checkBox10 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox10 = new System.Windows.Forms.ComboBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.checkBox11 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox11 = new System.Windows.Forms.ComboBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.checkBox12 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox12 = new System.Windows.Forms.ComboBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.checkBox13 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox13 = new System.Windows.Forms.ComboBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.checkBox14 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox14 = new System.Windows.Forms.ComboBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.checkBox15 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox15 = new System.Windows.Forms.ComboBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.checkBox16 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox16 = new System.Windows.Forms.ComboBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.checkBox17 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox17 = new System.Windows.Forms.ComboBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.checkBox18 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox18 = new System.Windows.Forms.ComboBox();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.checkBox19 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox19 = new System.Windows.Forms.ComboBox();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.checkBox20 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox20 = new System.Windows.Forms.ComboBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.checkBox21 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox21 = new System.Windows.Forms.ComboBox();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.checkBox22 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox22 = new System.Windows.Forms.ComboBox();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.checkBox23 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox23 = new System.Windows.Forms.ComboBox();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.checkBox24 = new System.Windows.Forms.CheckBox();
|
||||
this.comboBox24 = new System.Windows.Forms.ComboBox();
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// orderGroupBox
|
||||
//
|
||||
this.orderGroupBox.Controls.Add(this.orderComboBox);
|
||||
resources.ApplyResources(this.orderGroupBox, "orderGroupBox");
|
||||
this.orderGroupBox.ForeColor = System.Drawing.Color.Black;
|
||||
this.orderGroupBox.Name = "orderGroupBox";
|
||||
this.orderGroupBox.TabStop = false;
|
||||
//
|
||||
// orderComboBox
|
||||
//
|
||||
this.orderComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.orderComboBox, "orderComboBox");
|
||||
this.orderComboBox.Name = "orderComboBox";
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
resources.ApplyResources(this.clearButton, "clearButton");
|
||||
this.clearButton.ForeColor = System.Drawing.Color.Black;
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
resources.ApplyResources(this.comboBox1, "comboBox1");
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);
|
||||
this.comboBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox1_KeyPress);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
resources.ApplyResources(this.checkBox1, "checkBox1");
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBox2
|
||||
//
|
||||
resources.ApplyResources(this.checkBox2, "checkBox2");
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
resources.ApplyResources(this.comboBox2, "comboBox2");
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
|
||||
this.comboBox2.TextChanged += new System.EventHandler(this.comboBox2_TextChanged);
|
||||
this.comboBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox2_KeyPress);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// checkBox3
|
||||
//
|
||||
resources.ApplyResources(this.checkBox3, "checkBox3");
|
||||
this.checkBox3.Name = "checkBox3";
|
||||
this.checkBox3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox3
|
||||
//
|
||||
resources.ApplyResources(this.comboBox3, "comboBox3");
|
||||
this.comboBox3.FormattingEnabled = true;
|
||||
this.comboBox3.Name = "comboBox3";
|
||||
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
|
||||
this.comboBox3.TextChanged += new System.EventHandler(this.comboBox3_TextChanged);
|
||||
this.comboBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox3_KeyPress);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// checkBox4
|
||||
//
|
||||
resources.ApplyResources(this.checkBox4, "checkBox4");
|
||||
this.checkBox4.Name = "checkBox4";
|
||||
this.checkBox4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox4
|
||||
//
|
||||
resources.ApplyResources(this.comboBox4, "comboBox4");
|
||||
this.comboBox4.FormattingEnabled = true;
|
||||
this.comboBox4.Name = "comboBox4";
|
||||
this.comboBox4.SelectedIndexChanged += new System.EventHandler(this.comboBox4_SelectedIndexChanged);
|
||||
this.comboBox4.TextChanged += new System.EventHandler(this.comboBox4_TextChanged);
|
||||
this.comboBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox4_KeyPress);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// checkBox5
|
||||
//
|
||||
resources.ApplyResources(this.checkBox5, "checkBox5");
|
||||
this.checkBox5.Name = "checkBox5";
|
||||
this.checkBox5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox5
|
||||
//
|
||||
resources.ApplyResources(this.comboBox5, "comboBox5");
|
||||
this.comboBox5.FormattingEnabled = true;
|
||||
this.comboBox5.Name = "comboBox5";
|
||||
this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);
|
||||
this.comboBox5.TextChanged += new System.EventHandler(this.comboBox5_TextChanged);
|
||||
this.comboBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox5_KeyPress);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// checkBox6
|
||||
//
|
||||
resources.ApplyResources(this.checkBox6, "checkBox6");
|
||||
this.checkBox6.Name = "checkBox6";
|
||||
this.checkBox6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox6
|
||||
//
|
||||
resources.ApplyResources(this.comboBox6, "comboBox6");
|
||||
this.comboBox6.FormattingEnabled = true;
|
||||
this.comboBox6.Name = "comboBox6";
|
||||
this.comboBox6.SelectedIndexChanged += new System.EventHandler(this.comboBox6_SelectedIndexChanged);
|
||||
this.comboBox6.TextChanged += new System.EventHandler(this.comboBox6_TextChanged);
|
||||
this.comboBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox6_KeyPress);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// checkBox7
|
||||
//
|
||||
resources.ApplyResources(this.checkBox7, "checkBox7");
|
||||
this.checkBox7.Name = "checkBox7";
|
||||
this.checkBox7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox7
|
||||
//
|
||||
resources.ApplyResources(this.comboBox7, "comboBox7");
|
||||
this.comboBox7.FormattingEnabled = true;
|
||||
this.comboBox7.Name = "comboBox7";
|
||||
this.comboBox7.SelectedIndexChanged += new System.EventHandler(this.comboBox7_SelectedIndexChanged);
|
||||
this.comboBox7.TextChanged += new System.EventHandler(this.comboBox7_TextChanged);
|
||||
this.comboBox7.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox7_KeyPress);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
resources.ApplyResources(this.label7, "label7");
|
||||
this.label7.Name = "label7";
|
||||
//
|
||||
// checkBox8
|
||||
//
|
||||
resources.ApplyResources(this.checkBox8, "checkBox8");
|
||||
this.checkBox8.Name = "checkBox8";
|
||||
this.checkBox8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox8
|
||||
//
|
||||
resources.ApplyResources(this.comboBox8, "comboBox8");
|
||||
this.comboBox8.FormattingEnabled = true;
|
||||
this.comboBox8.Name = "comboBox8";
|
||||
this.comboBox8.SelectedIndexChanged += new System.EventHandler(this.comboBox8_SelectedIndexChanged);
|
||||
this.comboBox8.TextChanged += new System.EventHandler(this.comboBox8_TextChanged);
|
||||
this.comboBox8.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox8_KeyPress);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
resources.ApplyResources(this.label8, "label8");
|
||||
this.label8.Name = "label8";
|
||||
//
|
||||
// checkBox9
|
||||
//
|
||||
resources.ApplyResources(this.checkBox9, "checkBox9");
|
||||
this.checkBox9.Name = "checkBox9";
|
||||
this.checkBox9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox9
|
||||
//
|
||||
resources.ApplyResources(this.comboBox9, "comboBox9");
|
||||
this.comboBox9.FormattingEnabled = true;
|
||||
this.comboBox9.Name = "comboBox9";
|
||||
this.comboBox9.SelectedIndexChanged += new System.EventHandler(this.comboBox9_SelectedIndexChanged);
|
||||
this.comboBox9.TextChanged += new System.EventHandler(this.comboBox9_TextChanged);
|
||||
this.comboBox9.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox9_KeyPress);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
resources.ApplyResources(this.label9, "label9");
|
||||
this.label9.Name = "label9";
|
||||
//
|
||||
// checkBox10
|
||||
//
|
||||
resources.ApplyResources(this.checkBox10, "checkBox10");
|
||||
this.checkBox10.Name = "checkBox10";
|
||||
this.checkBox10.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox10
|
||||
//
|
||||
resources.ApplyResources(this.comboBox10, "comboBox10");
|
||||
this.comboBox10.FormattingEnabled = true;
|
||||
this.comboBox10.Name = "comboBox10";
|
||||
this.comboBox10.SelectedIndexChanged += new System.EventHandler(this.comboBox10_SelectedIndexChanged);
|
||||
this.comboBox10.TextChanged += new System.EventHandler(this.comboBox10_TextChanged);
|
||||
this.comboBox10.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox10_KeyPress);
|
||||
//
|
||||
// label10
|
||||
//
|
||||
resources.ApplyResources(this.label10, "label10");
|
||||
this.label10.Name = "label10";
|
||||
//
|
||||
// checkBox11
|
||||
//
|
||||
resources.ApplyResources(this.checkBox11, "checkBox11");
|
||||
this.checkBox11.Name = "checkBox11";
|
||||
this.checkBox11.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox11
|
||||
//
|
||||
resources.ApplyResources(this.comboBox11, "comboBox11");
|
||||
this.comboBox11.FormattingEnabled = true;
|
||||
this.comboBox11.Name = "comboBox11";
|
||||
this.comboBox11.SelectedIndexChanged += new System.EventHandler(this.comboBox11_SelectedIndexChanged);
|
||||
this.comboBox11.TextChanged += new System.EventHandler(this.comboBox11_TextChanged);
|
||||
this.comboBox11.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox11_KeyPress);
|
||||
//
|
||||
// label11
|
||||
//
|
||||
resources.ApplyResources(this.label11, "label11");
|
||||
this.label11.Name = "label11";
|
||||
//
|
||||
// checkBox12
|
||||
//
|
||||
resources.ApplyResources(this.checkBox12, "checkBox12");
|
||||
this.checkBox12.Name = "checkBox12";
|
||||
this.checkBox12.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox12
|
||||
//
|
||||
resources.ApplyResources(this.comboBox12, "comboBox12");
|
||||
this.comboBox12.FormattingEnabled = true;
|
||||
this.comboBox12.Name = "comboBox12";
|
||||
this.comboBox12.SelectedIndexChanged += new System.EventHandler(this.comboBox12_SelectedIndexChanged);
|
||||
this.comboBox12.TextChanged += new System.EventHandler(this.comboBox12_TextChanged);
|
||||
this.comboBox12.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox12_KeyPress);
|
||||
//
|
||||
// label12
|
||||
//
|
||||
resources.ApplyResources(this.label12, "label12");
|
||||
this.label12.Name = "label12";
|
||||
//
|
||||
// checkBox13
|
||||
//
|
||||
resources.ApplyResources(this.checkBox13, "checkBox13");
|
||||
this.checkBox13.Name = "checkBox13";
|
||||
this.checkBox13.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox13
|
||||
//
|
||||
resources.ApplyResources(this.comboBox13, "comboBox13");
|
||||
this.comboBox13.FormattingEnabled = true;
|
||||
this.comboBox13.Name = "comboBox13";
|
||||
this.comboBox13.SelectedIndexChanged += new System.EventHandler(this.comboBox13_SelectedIndexChanged);
|
||||
this.comboBox13.TextChanged += new System.EventHandler(this.comboBox13_TextChanged);
|
||||
this.comboBox13.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox13_KeyPress);
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
this.label13.Name = "label13";
|
||||
//
|
||||
// checkBox14
|
||||
//
|
||||
resources.ApplyResources(this.checkBox14, "checkBox14");
|
||||
this.checkBox14.Name = "checkBox14";
|
||||
this.checkBox14.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox14
|
||||
//
|
||||
resources.ApplyResources(this.comboBox14, "comboBox14");
|
||||
this.comboBox14.FormattingEnabled = true;
|
||||
this.comboBox14.Name = "comboBox14";
|
||||
this.comboBox14.SelectedIndexChanged += new System.EventHandler(this.comboBox14_SelectedIndexChanged);
|
||||
this.comboBox14.TextChanged += new System.EventHandler(this.comboBox14_TextChanged);
|
||||
this.comboBox14.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox14_KeyPress);
|
||||
//
|
||||
// label14
|
||||
//
|
||||
resources.ApplyResources(this.label14, "label14");
|
||||
this.label14.Name = "label14";
|
||||
//
|
||||
// checkBox15
|
||||
//
|
||||
resources.ApplyResources(this.checkBox15, "checkBox15");
|
||||
this.checkBox15.Name = "checkBox15";
|
||||
this.checkBox15.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox15
|
||||
//
|
||||
resources.ApplyResources(this.comboBox15, "comboBox15");
|
||||
this.comboBox15.FormattingEnabled = true;
|
||||
this.comboBox15.Name = "comboBox15";
|
||||
this.comboBox15.SelectedIndexChanged += new System.EventHandler(this.comboBox15_SelectedIndexChanged);
|
||||
this.comboBox15.TextChanged += new System.EventHandler(this.comboBox15_TextChanged);
|
||||
this.comboBox15.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox15_KeyPress);
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// checkBox16
|
||||
//
|
||||
resources.ApplyResources(this.checkBox16, "checkBox16");
|
||||
this.checkBox16.Name = "checkBox16";
|
||||
this.checkBox16.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox16
|
||||
//
|
||||
resources.ApplyResources(this.comboBox16, "comboBox16");
|
||||
this.comboBox16.FormattingEnabled = true;
|
||||
this.comboBox16.Name = "comboBox16";
|
||||
this.comboBox16.SelectedIndexChanged += new System.EventHandler(this.comboBox16_SelectedIndexChanged);
|
||||
this.comboBox16.TextChanged += new System.EventHandler(this.comboBox16_TextChanged);
|
||||
this.comboBox16.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox16_KeyPress);
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
this.label16.Name = "label16";
|
||||
//
|
||||
// checkBox17
|
||||
//
|
||||
resources.ApplyResources(this.checkBox17, "checkBox17");
|
||||
this.checkBox17.Name = "checkBox17";
|
||||
this.checkBox17.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox17
|
||||
//
|
||||
resources.ApplyResources(this.comboBox17, "comboBox17");
|
||||
this.comboBox17.FormattingEnabled = true;
|
||||
this.comboBox17.Name = "comboBox17";
|
||||
this.comboBox17.SelectedIndexChanged += new System.EventHandler(this.comboBox17_SelectedIndexChanged);
|
||||
this.comboBox17.TextChanged += new System.EventHandler(this.comboBox17_TextChanged);
|
||||
this.comboBox17.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox17_KeyPress);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
resources.ApplyResources(this.label17, "label17");
|
||||
this.label17.Name = "label17";
|
||||
//
|
||||
// checkBox18
|
||||
//
|
||||
resources.ApplyResources(this.checkBox18, "checkBox18");
|
||||
this.checkBox18.Name = "checkBox18";
|
||||
this.checkBox18.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox18
|
||||
//
|
||||
resources.ApplyResources(this.comboBox18, "comboBox18");
|
||||
this.comboBox18.FormattingEnabled = true;
|
||||
this.comboBox18.Name = "comboBox18";
|
||||
this.comboBox18.SelectedIndexChanged += new System.EventHandler(this.comboBox18_SelectedIndexChanged);
|
||||
this.comboBox18.TextChanged += new System.EventHandler(this.comboBox18_TextChanged);
|
||||
this.comboBox18.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox18_KeyPress);
|
||||
//
|
||||
// label18
|
||||
//
|
||||
resources.ApplyResources(this.label18, "label18");
|
||||
this.label18.Name = "label18";
|
||||
//
|
||||
// checkBox19
|
||||
//
|
||||
resources.ApplyResources(this.checkBox19, "checkBox19");
|
||||
this.checkBox19.Name = "checkBox19";
|
||||
this.checkBox19.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox19
|
||||
//
|
||||
resources.ApplyResources(this.comboBox19, "comboBox19");
|
||||
this.comboBox19.FormattingEnabled = true;
|
||||
this.comboBox19.Name = "comboBox19";
|
||||
this.comboBox19.SelectedIndexChanged += new System.EventHandler(this.comboBox19_SelectedIndexChanged);
|
||||
this.comboBox19.TextChanged += new System.EventHandler(this.comboBox19_TextChanged);
|
||||
this.comboBox19.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox19_KeyPress);
|
||||
//
|
||||
// label19
|
||||
//
|
||||
resources.ApplyResources(this.label19, "label19");
|
||||
this.label19.Name = "label19";
|
||||
//
|
||||
// checkBox20
|
||||
//
|
||||
resources.ApplyResources(this.checkBox20, "checkBox20");
|
||||
this.checkBox20.Name = "checkBox20";
|
||||
this.checkBox20.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox20
|
||||
//
|
||||
resources.ApplyResources(this.comboBox20, "comboBox20");
|
||||
this.comboBox20.FormattingEnabled = true;
|
||||
this.comboBox20.Name = "comboBox20";
|
||||
this.comboBox20.SelectedIndexChanged += new System.EventHandler(this.comboBox20_SelectedIndexChanged);
|
||||
this.comboBox20.TextChanged += new System.EventHandler(this.comboBox20_TextChanged);
|
||||
this.comboBox20.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox20_KeyPress);
|
||||
//
|
||||
// label20
|
||||
//
|
||||
resources.ApplyResources(this.label20, "label20");
|
||||
this.label20.Name = "label20";
|
||||
//
|
||||
// checkBox21
|
||||
//
|
||||
resources.ApplyResources(this.checkBox21, "checkBox21");
|
||||
this.checkBox21.Name = "checkBox21";
|
||||
this.checkBox21.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox21
|
||||
//
|
||||
resources.ApplyResources(this.comboBox21, "comboBox21");
|
||||
this.comboBox21.FormattingEnabled = true;
|
||||
this.comboBox21.Name = "comboBox21";
|
||||
this.comboBox21.SelectedIndexChanged += new System.EventHandler(this.comboBox21_SelectedIndexChanged);
|
||||
this.comboBox21.TextChanged += new System.EventHandler(this.comboBox21_TextChanged);
|
||||
this.comboBox21.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox21_KeyPress);
|
||||
//
|
||||
// label21
|
||||
//
|
||||
resources.ApplyResources(this.label21, "label21");
|
||||
this.label21.Name = "label21";
|
||||
//
|
||||
// checkBox22
|
||||
//
|
||||
resources.ApplyResources(this.checkBox22, "checkBox22");
|
||||
this.checkBox22.Name = "checkBox22";
|
||||
this.checkBox22.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox22
|
||||
//
|
||||
resources.ApplyResources(this.comboBox22, "comboBox22");
|
||||
this.comboBox22.FormattingEnabled = true;
|
||||
this.comboBox22.Name = "comboBox22";
|
||||
this.comboBox22.SelectedIndexChanged += new System.EventHandler(this.comboBox22_SelectedIndexChanged);
|
||||
this.comboBox22.TextChanged += new System.EventHandler(this.comboBox22_TextChanged);
|
||||
this.comboBox22.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox22_KeyPress);
|
||||
//
|
||||
// label22
|
||||
//
|
||||
resources.ApplyResources(this.label22, "label22");
|
||||
this.label22.Name = "label22";
|
||||
//
|
||||
// checkBox23
|
||||
//
|
||||
resources.ApplyResources(this.checkBox23, "checkBox23");
|
||||
this.checkBox23.Name = "checkBox23";
|
||||
this.checkBox23.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox23
|
||||
//
|
||||
resources.ApplyResources(this.comboBox23, "comboBox23");
|
||||
this.comboBox23.FormattingEnabled = true;
|
||||
this.comboBox23.Name = "comboBox23";
|
||||
this.comboBox23.SelectedIndexChanged += new System.EventHandler(this.comboBox23_SelectedIndexChanged);
|
||||
this.comboBox23.TextChanged += new System.EventHandler(this.comboBox23_TextChanged);
|
||||
this.comboBox23.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox23_KeyPress);
|
||||
//
|
||||
// label23
|
||||
//
|
||||
resources.ApplyResources(this.label23, "label23");
|
||||
this.label23.Name = "label23";
|
||||
//
|
||||
// checkBox24
|
||||
//
|
||||
resources.ApplyResources(this.checkBox24, "checkBox24");
|
||||
this.checkBox24.Name = "checkBox24";
|
||||
this.checkBox24.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBox24
|
||||
//
|
||||
resources.ApplyResources(this.comboBox24, "comboBox24");
|
||||
this.comboBox24.FormattingEnabled = true;
|
||||
this.comboBox24.Name = "comboBox24";
|
||||
this.comboBox24.SelectedIndexChanged += new System.EventHandler(this.comboBox24_SelectedIndexChanged);
|
||||
this.comboBox24.TextChanged += new System.EventHandler(this.comboBox24_TextChanged);
|
||||
this.comboBox24.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox24_KeyPress);
|
||||
//
|
||||
// label24
|
||||
//
|
||||
resources.ApplyResources(this.label24, "label24");
|
||||
this.label24.Name = "label24";
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.Controls.Add(this.checkBox24);
|
||||
this.Controls.Add(this.comboBox24);
|
||||
this.Controls.Add(this.label24);
|
||||
this.Controls.Add(this.checkBox23);
|
||||
this.Controls.Add(this.comboBox23);
|
||||
this.Controls.Add(this.label23);
|
||||
this.Controls.Add(this.checkBox22);
|
||||
this.Controls.Add(this.comboBox22);
|
||||
this.Controls.Add(this.label22);
|
||||
this.Controls.Add(this.checkBox21);
|
||||
this.Controls.Add(this.comboBox21);
|
||||
this.Controls.Add(this.label21);
|
||||
this.Controls.Add(this.checkBox20);
|
||||
this.Controls.Add(this.comboBox20);
|
||||
this.Controls.Add(this.label20);
|
||||
this.Controls.Add(this.checkBox19);
|
||||
this.Controls.Add(this.comboBox19);
|
||||
this.Controls.Add(this.label19);
|
||||
this.Controls.Add(this.checkBox18);
|
||||
this.Controls.Add(this.comboBox18);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.checkBox17);
|
||||
this.Controls.Add(this.comboBox17);
|
||||
this.Controls.Add(this.label17);
|
||||
this.Controls.Add(this.checkBox16);
|
||||
this.Controls.Add(this.comboBox16);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.checkBox15);
|
||||
this.Controls.Add(this.comboBox15);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.checkBox14);
|
||||
this.Controls.Add(this.comboBox14);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.checkBox13);
|
||||
this.Controls.Add(this.comboBox13);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.checkBox12);
|
||||
this.Controls.Add(this.comboBox12);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.checkBox11);
|
||||
this.Controls.Add(this.comboBox11);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.checkBox10);
|
||||
this.Controls.Add(this.comboBox10);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.checkBox9);
|
||||
this.Controls.Add(this.comboBox9);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.checkBox8);
|
||||
this.Controls.Add(this.comboBox8);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.checkBox7);
|
||||
this.Controls.Add(this.comboBox7);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.checkBox6);
|
||||
this.Controls.Add(this.comboBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.checkBox5);
|
||||
this.Controls.Add(this.comboBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.checkBox4);
|
||||
this.Controls.Add(this.comboBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.checkBox3);
|
||||
this.Controls.Add(this.comboBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.comboBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.clearButton);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox orderGroupBox;
|
||||
private System.Windows.Forms.ComboBox orderComboBox;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox comboBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
private System.Windows.Forms.ComboBox comboBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.CheckBox checkBox3;
|
||||
private System.Windows.Forms.ComboBox comboBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckBox checkBox4;
|
||||
private System.Windows.Forms.ComboBox comboBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.CheckBox checkBox5;
|
||||
private System.Windows.Forms.ComboBox comboBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.CheckBox checkBox6;
|
||||
private System.Windows.Forms.ComboBox comboBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.CheckBox checkBox7;
|
||||
private System.Windows.Forms.ComboBox comboBox7;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.CheckBox checkBox8;
|
||||
private System.Windows.Forms.ComboBox comboBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.CheckBox checkBox9;
|
||||
private System.Windows.Forms.ComboBox comboBox9;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.CheckBox checkBox10;
|
||||
private System.Windows.Forms.ComboBox comboBox10;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.CheckBox checkBox11;
|
||||
private System.Windows.Forms.ComboBox comboBox11;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.CheckBox checkBox12;
|
||||
private System.Windows.Forms.ComboBox comboBox12;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.CheckBox checkBox13;
|
||||
private System.Windows.Forms.ComboBox comboBox13;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.CheckBox checkBox14;
|
||||
private System.Windows.Forms.ComboBox comboBox14;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.CheckBox checkBox15;
|
||||
private System.Windows.Forms.ComboBox comboBox15;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.CheckBox checkBox16;
|
||||
private System.Windows.Forms.ComboBox comboBox16;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.CheckBox checkBox17;
|
||||
private System.Windows.Forms.ComboBox comboBox17;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.CheckBox checkBox18;
|
||||
private System.Windows.Forms.ComboBox comboBox18;
|
||||
private System.Windows.Forms.Label label18;
|
||||
private System.Windows.Forms.CheckBox checkBox19;
|
||||
private System.Windows.Forms.ComboBox comboBox19;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.CheckBox checkBox20;
|
||||
private System.Windows.Forms.ComboBox comboBox20;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.CheckBox checkBox21;
|
||||
private System.Windows.Forms.ComboBox comboBox21;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.CheckBox checkBox22;
|
||||
private System.Windows.Forms.ComboBox comboBox22;
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.CheckBox checkBox23;
|
||||
private System.Windows.Forms.ComboBox comboBox23;
|
||||
private System.Windows.Forms.Label label23;
|
||||
private System.Windows.Forms.CheckBox checkBox24;
|
||||
private System.Windows.Forms.ComboBox comboBox24;
|
||||
private System.Windows.Forms.Label label24;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,494 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public partial class CycleBeginningForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleBeginningForm));
|
||||
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
/// To be retrieved after the form is closed
|
||||
public string PurchaseOrder;
|
||||
public string[] SNText;
|
||||
public bool[] Disabled;
|
||||
|
||||
/// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
int textBoxesCount;
|
||||
Label[] labels;
|
||||
ComboBox[] comboBoxes;
|
||||
CheckBox[] checkBoxes;
|
||||
IList<ComboBox> enabledComboBoxes;
|
||||
|
||||
|
||||
/// <summary> Parameterless constructor for common functionality </summary>
|
||||
public CycleBeginningForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
textBoxesCount = 24;
|
||||
labels = new Label[]
|
||||
{
|
||||
label1, label2, label3, label4, label5, label6, label7, label8, label9, label10,
|
||||
label11, label12, label13, label14, label15, label16, label17, label18, label19, label20,
|
||||
label21, label22, label23, label24,
|
||||
};
|
||||
comboBoxes = new ComboBox[]
|
||||
{
|
||||
comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6,
|
||||
comboBox7, comboBox8, comboBox9, comboBox10, comboBox11, comboBox12,
|
||||
comboBox13, comboBox14, comboBox15, comboBox16, comboBox17, comboBox18,
|
||||
comboBox19, comboBox20, comboBox21, comboBox22, comboBox23, comboBox24,
|
||||
};
|
||||
checkBoxes = new CheckBox[]
|
||||
{
|
||||
checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6,
|
||||
checkBox7, checkBox8, checkBox9, checkBox10, checkBox11, checkBox12,
|
||||
checkBox13, checkBox14, checkBox15, checkBox16, checkBox17, checkBox18,
|
||||
checkBox19, checkBox20, checkBox21, checkBox22, checkBox23, checkBox24,
|
||||
};
|
||||
enabledComboBoxes = new List<ComboBox>();
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(int waterMetersCount)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
SNText = new string[WaterMetersCount];
|
||||
Disabled = new bool[WaterMetersCount];
|
||||
|
||||
ShuffleTextBoxes(Config.Data.WMsCount, Config.Data.LineSize);
|
||||
|
||||
//Height = 147 + WaterMetersCount * 90;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure the layout of labels/text boxes on the screen
|
||||
/// corresponds to the layout of watermeters of the test bench.
|
||||
/// </summary>
|
||||
/// <param name="wmsCount">Number of watermeters</param>
|
||||
/// <param name="lineSize">Number of watermeters in one line</param>
|
||||
void ShuffleTextBoxes(int wmsCount, int lineSize)
|
||||
{
|
||||
if (wmsCount < textBoxesCount && lineSize > 0)
|
||||
{
|
||||
int nrLines = (wmsCount + lineSize - 1) / lineSize;
|
||||
int gap = (textBoxesCount - wmsCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
{
|
||||
for (int i = 0; i < lineSize; i++)
|
||||
{
|
||||
labels[dest] = labels[l * lineSize + l * gap + i];
|
||||
comboBoxes[dest] = comboBoxes[l * lineSize + l * gap + i];
|
||||
checkBoxes[dest] = checkBoxes[l * lineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
textBoxesCount = wmsCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void CycleBeginningForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
PrepareOrderCombo(orderComboBox);
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == textBoxesCount)
|
||||
{
|
||||
comboBoxes[i].Items.Add((Program.LocalSettings.LastSNTexts[i] == null) ? string.Empty : Program.LocalSettings.LastSNTexts[i]);
|
||||
}
|
||||
labels[i].Visible = comboBoxes[i].Visible = checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(comboBoxes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
orderGroupBox.Text = Strings.Purchase_order;
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
labels[i].Text = Strings.Serial_Number + " " + (i + 1).ToString();
|
||||
}
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
clearButton.Text = Strings.ClearBtnText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
/// <param name="orderComboBox">Puchase order ComboBox</param>
|
||||
void PrepareOrderCombo(ComboBox orderComboBox)
|
||||
{
|
||||
for (int i = 0; i < Program.LocalSettings.PurchaseOrderHistoryCount; i++)
|
||||
{
|
||||
orderComboBox.Items.Add(Program.LocalSettings.PurchaseOrderHistory[i]);
|
||||
}
|
||||
|
||||
if (orderComboBox.Items.Count > 0)
|
||||
{
|
||||
orderComboBox.Text = orderComboBox.Items[0].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text,
|
||||
ref Program.LocalSettings.PurchaseOrderHistory
|
||||
#if FUZHOU_150 || FUZHOU_300
|
||||
, 20
|
||||
#endif
|
||||
);
|
||||
|
||||
Program.LocalSettings.LastSNTexts = SNText;
|
||||
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
SNText[i] = comboBoxes[i].Text;
|
||||
Disabled[i] = !checkBoxes[i].Checked;
|
||||
}
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When one combo box is updated using drop-down menu, all combo boxes
|
||||
/// are updated by this function.
|
||||
/// </summary>
|
||||
private void UpdateAllCombos()
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
comboBoxes[i].Text = Program.LocalSettings.LastSNTexts[i];
|
||||
checkBoxes[i].Checked = !string.IsNullOrEmpty(comboBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(WaterMetersCount, textBoxesCount); i++)
|
||||
{
|
||||
comboBoxes[i].Text = string.Empty;
|
||||
checkBoxes[i].Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void comboBox1_TextChanged(object sender, EventArgs e) { checkBox1.Checked = true; }
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox1.Text.Equals(comboBox1.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox2_TextChanged(object sender, EventArgs e) { checkBox2.Checked = true; }
|
||||
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox2.Text.Equals(comboBox2.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox3_TextChanged(object sender, EventArgs e) { checkBox3.Checked = true; }
|
||||
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox3.Text.Equals(comboBox3.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox4_TextChanged(object sender, EventArgs e) { checkBox4.Checked = true; }
|
||||
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox4.Text.Equals(comboBox4.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox5_TextChanged(object sender, EventArgs e) { checkBox5.Checked = true; }
|
||||
private void comboBox5_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox5.Text.Equals(comboBox5.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox6_TextChanged(object sender, EventArgs e) { checkBox6.Checked = true; }
|
||||
private void comboBox6_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox6.Text.Equals(comboBox6.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox7_TextChanged(object sender, EventArgs e) { checkBox7.Checked = true; }
|
||||
private void comboBox7_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox7.Text.Equals(comboBox7.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox8_TextChanged(object sender, EventArgs e) { checkBox8.Checked = true; }
|
||||
private void comboBox8_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox8.Text.Equals(comboBox8.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox9_TextChanged(object sender, EventArgs e) { checkBox9.Checked = true; }
|
||||
private void comboBox9_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox9.Text.Equals(comboBox9.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox10_TextChanged(object sender, EventArgs e) { checkBox10.Checked = true; }
|
||||
private void comboBox10_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox10.Text.Equals(comboBox10.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox11_TextChanged(object sender, EventArgs e) { checkBox11.Checked = true; }
|
||||
private void comboBox11_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox11.Text.Equals(comboBox11.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox12_TextChanged(object sender, EventArgs e) { checkBox12.Checked = true; }
|
||||
private void comboBox12_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox12.Text.Equals(comboBox12.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox13_TextChanged(object sender, EventArgs e) { checkBox13.Checked = true; }
|
||||
private void comboBox13_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox13.Text.Equals(comboBox13.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox14_TextChanged(object sender, EventArgs e) { checkBox14.Checked = true; }
|
||||
private void comboBox14_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox14.Text.Equals(comboBox14.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox15_TextChanged(object sender, EventArgs e) { checkBox15.Checked = true; }
|
||||
private void comboBox15_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox15.Text.Equals(comboBox15.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox16_TextChanged(object sender, EventArgs e) { checkBox16.Checked = true; }
|
||||
private void comboBox16_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox16.Text.Equals(comboBox16.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox17_TextChanged(object sender, EventArgs e) { checkBox17.Checked = true; }
|
||||
private void comboBox17_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox17.Text.Equals(comboBox17.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox18_TextChanged(object sender, EventArgs e) { checkBox18.Checked = true; }
|
||||
private void comboBox18_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox18.Text.Equals(comboBox18.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox19_TextChanged(object sender, EventArgs e) { checkBox19.Checked = true; }
|
||||
private void comboBox19_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox19.Text.Equals(comboBox19.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox20_TextChanged(object sender, EventArgs e) { checkBox20.Checked = true; }
|
||||
private void comboBox20_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox20.Text.Equals(comboBox20.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox21_TextChanged(object sender, EventArgs e) { checkBox21.Checked = true; }
|
||||
private void comboBox21_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox21.Text.Equals(comboBox21.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox22_TextChanged(object sender, EventArgs e) { checkBox22.Checked = true; }
|
||||
private void comboBox22_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox22.Text.Equals(comboBox22.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox23_TextChanged(object sender, EventArgs e) { checkBox23.Checked = true; }
|
||||
private void comboBox23_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox23.Text.Equals(comboBox23.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox24_TextChanged(object sender, EventArgs e) { checkBox24.Checked = true; }
|
||||
private void comboBox24_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount)
|
||||
{
|
||||
if (comboBox24.Text.Equals(comboBox24.Items[0])) UpdateAllCombos();
|
||||
}
|
||||
}
|
||||
|
||||
#region Forced close handling
|
||||
|
||||
public void StartForceCloseHandler()
|
||||
{
|
||||
UiBridge.Bridge.CloseModelessFormHandler += delegate(object sender, EventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<EventArgs>(OnForceClose), sender, args); }
|
||||
else OnForceClose(sender, args);
|
||||
};
|
||||
}
|
||||
|
||||
private void OnForceClose(object sender, EventArgs args)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Process a key press within any enabled text boxe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="currentFocusOwner">TextBox control which received the event</param>
|
||||
private void ProcKeyPress(object sender, KeyPressEventArgs e, ComboBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledComboBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledComboBoxes.Count; i++)
|
||||
{
|
||||
if (enabledComboBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
enabledComboBoxes[(i + 1) % enabledComboBoxes.Count].Focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox1); }
|
||||
private void comboBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox2); }
|
||||
private void comboBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox3); }
|
||||
private void comboBox4_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox4); }
|
||||
private void comboBox5_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox5); }
|
||||
private void comboBox6_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox6); }
|
||||
private void comboBox7_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox7); }
|
||||
private void comboBox8_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox8); }
|
||||
private void comboBox9_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox9); }
|
||||
private void comboBox10_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox10); }
|
||||
private void comboBox11_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox11); }
|
||||
private void comboBox12_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox12); }
|
||||
private void comboBox13_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox13); }
|
||||
private void comboBox14_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox14); }
|
||||
private void comboBox15_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox15); }
|
||||
private void comboBox16_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox16); }
|
||||
private void comboBox17_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox17); }
|
||||
private void comboBox18_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox18); }
|
||||
private void comboBox19_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox19); }
|
||||
private void comboBox20_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox20); }
|
||||
private void comboBox21_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox21); }
|
||||
private void comboBox22_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox22); }
|
||||
private void comboBox23_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox23); }
|
||||
private void comboBox24_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, comboBox24); }
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,652 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.textBox5 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBox6 = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.textBox7 = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.textBox8 = new System.Windows.Forms.TextBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.textBox9 = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.textBox10 = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.textBox11 = new System.Windows.Forms.TextBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.textBox12 = new System.Windows.Forms.TextBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.textBox13 = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.textBox14 = new System.Windows.Forms.TextBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.textBox15 = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.textBox16 = new System.Windows.Forms.TextBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.textBox17 = new System.Windows.Forms.TextBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.textBox18 = new System.Windows.Forms.TextBox();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.textBox19 = new System.Windows.Forms.TextBox();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.textBox20 = new System.Windows.Forms.TextBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.textBox21 = new System.Windows.Forms.TextBox();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.textBox22 = new System.Windows.Forms.TextBox();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.textBox23 = new System.Windows.Forms.TextBox();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.textBox24 = new System.Windows.Forms.TextBox();
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(205, 66);
|
||||
this.textBox2.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox2.TabIndex = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(38, 71);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(62, 18);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Stand:";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(205, 30);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox1.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(38, 35);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(62, 18);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Stand:";
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
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(832, 30);
|
||||
this.okButton.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(90, 60);
|
||||
this.okButton.TabIndex = 7;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(205, 102);
|
||||
this.textBox3.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox3.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(38, 107);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(62, 18);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Stand:";
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(205, 138);
|
||||
this.textBox4.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox4.TabIndex = 1;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(38, 143);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(62, 18);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "Stand:";
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(205, 174);
|
||||
this.textBox5.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox5.TabIndex = 1;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(38, 179);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(62, 18);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "Stand:";
|
||||
//
|
||||
// textBox6
|
||||
//
|
||||
this.textBox6.Location = new System.Drawing.Point(205, 210);
|
||||
this.textBox6.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox6.Name = "textBox6";
|
||||
this.textBox6.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox6.TabIndex = 1;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(38, 215);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(62, 18);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Stand:";
|
||||
//
|
||||
// textBox7
|
||||
//
|
||||
this.textBox7.Location = new System.Drawing.Point(205, 246);
|
||||
this.textBox7.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox7.Name = "textBox7";
|
||||
this.textBox7.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox7.TabIndex = 9;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(38, 251);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(62, 18);
|
||||
this.label7.TabIndex = 8;
|
||||
this.label7.Text = "Stand:";
|
||||
//
|
||||
// textBox8
|
||||
//
|
||||
this.textBox8.Location = new System.Drawing.Point(205, 282);
|
||||
this.textBox8.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox8.Name = "textBox8";
|
||||
this.textBox8.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox8.TabIndex = 11;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(38, 287);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(62, 18);
|
||||
this.label8.TabIndex = 10;
|
||||
this.label8.Text = "Stand:";
|
||||
//
|
||||
// textBox9
|
||||
//
|
||||
this.textBox9.Location = new System.Drawing.Point(205, 318);
|
||||
this.textBox9.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox9.Name = "textBox9";
|
||||
this.textBox9.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox9.TabIndex = 13;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(38, 323);
|
||||
this.label9.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(62, 18);
|
||||
this.label9.TabIndex = 12;
|
||||
this.label9.Text = "Stand:";
|
||||
//
|
||||
// textBox10
|
||||
//
|
||||
this.textBox10.Location = new System.Drawing.Point(205, 354);
|
||||
this.textBox10.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox10.Name = "textBox10";
|
||||
this.textBox10.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox10.TabIndex = 15;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(38, 359);
|
||||
this.label10.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(62, 18);
|
||||
this.label10.TabIndex = 14;
|
||||
this.label10.Text = "Stand:";
|
||||
//
|
||||
// textBox11
|
||||
//
|
||||
this.textBox11.Location = new System.Drawing.Point(205, 390);
|
||||
this.textBox11.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox11.Name = "textBox11";
|
||||
this.textBox11.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox11.TabIndex = 17;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(38, 395);
|
||||
this.label11.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(62, 18);
|
||||
this.label11.TabIndex = 16;
|
||||
this.label11.Text = "Stand:";
|
||||
//
|
||||
// textBox12
|
||||
//
|
||||
this.textBox12.Location = new System.Drawing.Point(205, 426);
|
||||
this.textBox12.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox12.Name = "textBox12";
|
||||
this.textBox12.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox12.TabIndex = 19;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(38, 431);
|
||||
this.label12.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(62, 18);
|
||||
this.label12.TabIndex = 18;
|
||||
this.label12.Text = "Stand:";
|
||||
//
|
||||
// textBox13
|
||||
//
|
||||
this.textBox13.Location = new System.Drawing.Point(623, 30);
|
||||
this.textBox13.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox13.Name = "textBox13";
|
||||
this.textBox13.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox13.TabIndex = 21;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(456, 35);
|
||||
this.label13.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(62, 18);
|
||||
this.label13.TabIndex = 20;
|
||||
this.label13.Text = "Stand:";
|
||||
//
|
||||
// textBox14
|
||||
//
|
||||
this.textBox14.Location = new System.Drawing.Point(623, 66);
|
||||
this.textBox14.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox14.Name = "textBox14";
|
||||
this.textBox14.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox14.TabIndex = 23;
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(456, 71);
|
||||
this.label14.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(62, 18);
|
||||
this.label14.TabIndex = 22;
|
||||
this.label14.Text = "Stand:";
|
||||
//
|
||||
// textBox15
|
||||
//
|
||||
this.textBox15.Location = new System.Drawing.Point(623, 102);
|
||||
this.textBox15.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox15.Name = "textBox15";
|
||||
this.textBox15.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox15.TabIndex = 25;
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Location = new System.Drawing.Point(456, 107);
|
||||
this.label15.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(62, 18);
|
||||
this.label15.TabIndex = 24;
|
||||
this.label15.Text = "Stand:";
|
||||
//
|
||||
// textBox16
|
||||
//
|
||||
this.textBox16.Location = new System.Drawing.Point(623, 138);
|
||||
this.textBox16.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox16.Name = "textBox16";
|
||||
this.textBox16.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox16.TabIndex = 27;
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.AutoSize = true;
|
||||
this.label16.Location = new System.Drawing.Point(456, 143);
|
||||
this.label16.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(62, 18);
|
||||
this.label16.TabIndex = 26;
|
||||
this.label16.Text = "Stand:";
|
||||
//
|
||||
// textBox17
|
||||
//
|
||||
this.textBox17.Location = new System.Drawing.Point(623, 174);
|
||||
this.textBox17.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox17.Name = "textBox17";
|
||||
this.textBox17.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox17.TabIndex = 29;
|
||||
//
|
||||
// label17
|
||||
//
|
||||
this.label17.AutoSize = true;
|
||||
this.label17.Location = new System.Drawing.Point(456, 179);
|
||||
this.label17.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label17.Name = "label17";
|
||||
this.label17.Size = new System.Drawing.Size(62, 18);
|
||||
this.label17.TabIndex = 28;
|
||||
this.label17.Text = "Stand:";
|
||||
//
|
||||
// textBox18
|
||||
//
|
||||
this.textBox18.Location = new System.Drawing.Point(623, 210);
|
||||
this.textBox18.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox18.Name = "textBox18";
|
||||
this.textBox18.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox18.TabIndex = 31;
|
||||
//
|
||||
// label18
|
||||
//
|
||||
this.label18.AutoSize = true;
|
||||
this.label18.Location = new System.Drawing.Point(456, 215);
|
||||
this.label18.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label18.Name = "label18";
|
||||
this.label18.Size = new System.Drawing.Size(62, 18);
|
||||
this.label18.TabIndex = 30;
|
||||
this.label18.Text = "Stand:";
|
||||
//
|
||||
// textBox19
|
||||
//
|
||||
this.textBox19.Location = new System.Drawing.Point(623, 246);
|
||||
this.textBox19.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox19.Name = "textBox19";
|
||||
this.textBox19.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox19.TabIndex = 33;
|
||||
//
|
||||
// label19
|
||||
//
|
||||
this.label19.AutoSize = true;
|
||||
this.label19.Location = new System.Drawing.Point(456, 251);
|
||||
this.label19.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label19.Name = "label19";
|
||||
this.label19.Size = new System.Drawing.Size(62, 18);
|
||||
this.label19.TabIndex = 32;
|
||||
this.label19.Text = "Stand:";
|
||||
//
|
||||
// textBox20
|
||||
//
|
||||
this.textBox20.Location = new System.Drawing.Point(623, 282);
|
||||
this.textBox20.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox20.Name = "textBox20";
|
||||
this.textBox20.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox20.TabIndex = 35;
|
||||
//
|
||||
// label20
|
||||
//
|
||||
this.label20.AutoSize = true;
|
||||
this.label20.Location = new System.Drawing.Point(456, 287);
|
||||
this.label20.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label20.Name = "label20";
|
||||
this.label20.Size = new System.Drawing.Size(62, 18);
|
||||
this.label20.TabIndex = 34;
|
||||
this.label20.Text = "Stand:";
|
||||
//
|
||||
// textBox21
|
||||
//
|
||||
this.textBox21.Location = new System.Drawing.Point(623, 318);
|
||||
this.textBox21.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox21.Name = "textBox21";
|
||||
this.textBox21.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox21.TabIndex = 37;
|
||||
//
|
||||
// label21
|
||||
//
|
||||
this.label21.AutoSize = true;
|
||||
this.label21.Location = new System.Drawing.Point(456, 323);
|
||||
this.label21.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label21.Name = "label21";
|
||||
this.label21.Size = new System.Drawing.Size(62, 18);
|
||||
this.label21.TabIndex = 36;
|
||||
this.label21.Text = "Stand:";
|
||||
//
|
||||
// textBox22
|
||||
//
|
||||
this.textBox22.Location = new System.Drawing.Point(623, 354);
|
||||
this.textBox22.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox22.Name = "textBox22";
|
||||
this.textBox22.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox22.TabIndex = 39;
|
||||
//
|
||||
// label22
|
||||
//
|
||||
this.label22.AutoSize = true;
|
||||
this.label22.Location = new System.Drawing.Point(456, 359);
|
||||
this.label22.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label22.Name = "label22";
|
||||
this.label22.Size = new System.Drawing.Size(62, 18);
|
||||
this.label22.TabIndex = 38;
|
||||
this.label22.Text = "Stand:";
|
||||
//
|
||||
// textBox23
|
||||
//
|
||||
this.textBox23.Location = new System.Drawing.Point(623, 390);
|
||||
this.textBox23.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox23.Name = "textBox23";
|
||||
this.textBox23.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox23.TabIndex = 41;
|
||||
//
|
||||
// label23
|
||||
//
|
||||
this.label23.AutoSize = true;
|
||||
this.label23.Location = new System.Drawing.Point(456, 395);
|
||||
this.label23.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label23.Name = "label23";
|
||||
this.label23.Size = new System.Drawing.Size(62, 18);
|
||||
this.label23.TabIndex = 40;
|
||||
this.label23.Text = "Stand:";
|
||||
//
|
||||
// textBox24
|
||||
//
|
||||
this.textBox24.Location = new System.Drawing.Point(623, 426);
|
||||
this.textBox24.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
this.textBox24.Name = "textBox24";
|
||||
this.textBox24.Size = new System.Drawing.Size(169, 27);
|
||||
this.textBox24.TabIndex = 43;
|
||||
//
|
||||
// label24
|
||||
//
|
||||
this.label24.AutoSize = true;
|
||||
this.label24.Location = new System.Drawing.Point(456, 431);
|
||||
this.label24.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label24.Name = "label24";
|
||||
this.label24.Size = new System.Drawing.Size(62, 18);
|
||||
this.label24.TabIndex = 42;
|
||||
this.label24.Text = "Stand:";
|
||||
//
|
||||
// CycleEndForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 18F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGoldenrod;
|
||||
this.ClientSize = new System.Drawing.Size(959, 489);
|
||||
this.Controls.Add(this.textBox24);
|
||||
this.Controls.Add(this.label24);
|
||||
this.Controls.Add(this.textBox23);
|
||||
this.Controls.Add(this.label23);
|
||||
this.Controls.Add(this.textBox22);
|
||||
this.Controls.Add(this.label22);
|
||||
this.Controls.Add(this.textBox21);
|
||||
this.Controls.Add(this.label21);
|
||||
this.Controls.Add(this.textBox20);
|
||||
this.Controls.Add(this.label20);
|
||||
this.Controls.Add(this.textBox19);
|
||||
this.Controls.Add(this.label19);
|
||||
this.Controls.Add(this.textBox18);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.textBox17);
|
||||
this.Controls.Add(this.label17);
|
||||
this.Controls.Add(this.textBox16);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.textBox15);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.textBox14);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.textBox13);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.textBox12);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.textBox11);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.textBox10);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.textBox9);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.textBox8);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.textBox7);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.textBox6);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.textBox5);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.textBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.textBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Font = new System.Drawing.Font("Verdana", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
|
||||
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.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox textBox5;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox6;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox textBox7;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox textBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.TextBox textBox9;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.TextBox textBox10;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.TextBox textBox11;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.TextBox textBox12;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.TextBox textBox13;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.TextBox textBox14;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.TextBox textBox15;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.TextBox textBox16;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.TextBox textBox17;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.TextBox textBox18;
|
||||
private System.Windows.Forms.Label label18;
|
||||
private System.Windows.Forms.TextBox textBox19;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.TextBox textBox20;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.TextBox textBox21;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.TextBox textBox22;
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.TextBox textBox23;
|
||||
private System.Windows.Forms.Label label23;
|
||||
private System.Windows.Forms.TextBox textBox24;
|
||||
private System.Windows.Forms.Label label24;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public partial class CycleEndForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(CycleEndForm));
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
readonly int lineSize;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public string[] EndStateText;
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
int textBoxesCount;
|
||||
Label[] labels;
|
||||
TextBox[] textBoxes;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleEndForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
labels = new Label[]
|
||||
{
|
||||
label1, label2, label3, label4, label5, label6, label7, label8, label9, label10,
|
||||
label11, label12, label13, label14, label15, label16, label17, label18, label19, label20,
|
||||
label21, label22, label23, label24,
|
||||
};
|
||||
textBoxes = new TextBox[]
|
||||
{
|
||||
textBox1, textBox2, textBox3, textBox4, textBox5, textBox6,
|
||||
textBox7, textBox8, textBox9, textBox10, textBox11, textBox12,
|
||||
textBox13, textBox14, textBox15, textBox16, textBox17, textBox18,
|
||||
textBox19, textBox20, textBox21, textBox22, textBox23, textBox24,
|
||||
};
|
||||
textBoxesCount = textBoxes.Length;
|
||||
this.WaterMetersCount = textBoxesCount;
|
||||
this.lineSize = textBoxesCount / 2;
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary> Parameterless constructor for 3 watermeters </summary>
|
||||
public CycleEndForm(int waterMetersCount, int lineSize)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.lineSize = lineSize;
|
||||
ShuffleTextBoxes(waterMetersCount, lineSize);
|
||||
EndStateText = new string[WaterMetersCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure the layout of labels/text boxes on the screen
|
||||
/// corresponds to the layout of watermeters of the test bench.
|
||||
/// </summary>
|
||||
/// <param name="wmsCount">Number of watermeters</param>
|
||||
/// <param name="lineSize">Number of watermeters in one line</param>
|
||||
void ShuffleTextBoxes(int wmsCount, int lineSize)
|
||||
{
|
||||
if (wmsCount < textBoxesCount && lineSize > 0)
|
||||
{
|
||||
int nrLines = (wmsCount + lineSize - 1) / lineSize;
|
||||
int gap = (textBoxesCount - wmsCount) / nrLines;
|
||||
|
||||
int dest = 0;
|
||||
for (int l = 0; l < nrLines; l++)
|
||||
{
|
||||
for (int i = 0; i < lineSize; i++)
|
||||
{
|
||||
labels[dest] = labels[l * lineSize + l * gap + i];
|
||||
textBoxes[dest] = textBoxes[l * lineSize + l * gap + i];
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
textBoxesCount = wmsCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
Height = 60 + 36 * lineSize;
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
if (i >= WaterMetersCount)
|
||||
{
|
||||
labels[i].Visible = false;
|
||||
textBoxes[i].Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Data;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
labels[i].Text = string.Format("{0} {1}:", Strings.Water_Meter, (i + 1).ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
EndStateText[i] = textBoxes[i].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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,20 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class EntryForm : EntryFormNoStartEnd, IHasWMStatesForm
|
||||
{
|
||||
public EntryForm()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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 bool EnterSerialNrsAtTheEnd;
|
||||
public bool ShowCycleEndForm;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
{
|
||||
Name = "DataEntry-Standard-24";
|
||||
ParentName = string.Empty;
|
||||
EnterSerialNrsAtTheEnd = false;
|
||||
ShowCycleEndForm = false;
|
||||
}
|
||||
|
||||
public EntryFormCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, EnterSNsAtTheEnd={1}, ShowEndForm={2}", Name, EnterSerialNrsAtTheEnd, ShowCycleEndForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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)
|
||||
{
|
||||
Localize();
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
enterSNsAtTheEndCheckBox.Text = Strings.Enter_SNs_at_the_end;
|
||||
showEndStateFormCheckBox.Text = Strings.Show_cycle_end_form;
|
||||
}
|
||||
|
||||
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;
|
||||
enterSNsAtTheEndCheckBox.Checked = config.EnterSerialNrsAtTheEnd;
|
||||
showEndStateFormCheckBox.Checked = config.ShowCycleEndForm;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
enterSNsAtTheEndCheckBox.Enabled = true;
|
||||
showEndStateFormCheckBox.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.EnterSerialNrsAtTheEnd = enterSNsAtTheEndCheckBox.Checked;
|
||||
config.ShowCycleEndForm = showEndStateFormCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
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.showEndStateFormCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.enterSNsAtTheEndCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(99, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(35, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(96, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// showEndStateFormCheckBox
|
||||
//
|
||||
this.showEndStateFormCheckBox.AutoSize = true;
|
||||
this.showEndStateFormCheckBox.Enabled = false;
|
||||
this.showEndStateFormCheckBox.Location = new System.Drawing.Point(99, 112);
|
||||
this.showEndStateFormCheckBox.Name = "showEndStateFormCheckBox";
|
||||
this.showEndStateFormCheckBox.Size = new System.Drawing.Size(151, 17);
|
||||
this.showEndStateFormCheckBox.TabIndex = 4;
|
||||
this.showEndStateFormCheckBox.Text = "Watermeter end state form";
|
||||
this.showEndStateFormCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// enterSNsAtTheEndCheckBox
|
||||
//
|
||||
this.enterSNsAtTheEndCheckBox.AutoSize = true;
|
||||
this.enterSNsAtTheEndCheckBox.Enabled = false;
|
||||
this.enterSNsAtTheEndCheckBox.Location = new System.Drawing.Point(99, 89);
|
||||
this.enterSNsAtTheEndCheckBox.Name = "enterSNsAtTheEndCheckBox";
|
||||
this.enterSNsAtTheEndCheckBox.Size = new System.Drawing.Size(167, 17);
|
||||
this.enterSNsAtTheEndCheckBox.TabIndex = 3;
|
||||
this.enterSNsAtTheEndCheckBox.Text = "Enter serial number at the end";
|
||||
this.enterSNsAtTheEndCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.enterSNsAtTheEndCheckBox);
|
||||
this.Controls.Add(this.showEndStateFormCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.CheckBox showEndStateFormCheckBox;
|
||||
private System.Windows.Forms.CheckBox enterSNsAtTheEndCheckBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,288 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class EntryFormNoStartEnd : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
|
||||
public override string ToString() { return string.Format("DataEntry.Standard24({0})", Cfg.ToString(1)); }
|
||||
|
||||
public bool UsesCameras() { return false; }
|
||||
|
||||
readonly EntryFormCfg entryFormCfg;
|
||||
IRegisterReader[] regReaders;
|
||||
|
||||
/// <summary>
|
||||
/// Properties set by the Begin, End and WMStates form
|
||||
/// </summary>
|
||||
string purchaseOrder;
|
||||
public string PurchaseOrder { get { return purchaseOrder; } }
|
||||
|
||||
bool[] disabled; /// This array is shared between forms
|
||||
|
||||
string[] wmCycleEndState;
|
||||
public string WMCycleEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmCycleEndState.Length) ? wmCycleEndState[wmNr] : string.Empty; }
|
||||
|
||||
double[] wmStartState;
|
||||
public double WMStartState(int wmNr) { return (wmNr >= 0 && wmNr < wmStartState.Length) ? wmStartState[wmNr] : 0; }
|
||||
|
||||
double[] wmEndState;
|
||||
public double WMEndState(int wmNr) { return (wmNr >= 0 && wmNr < wmEndState.Length) ? wmEndState[wmNr] : 0; }
|
||||
|
||||
string[] wmStartStateStr;
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
ShowFormAtCycleBeginning,
|
||||
ShowFormAtCycleEnd,
|
||||
EnterTestStartStates,
|
||||
EnterTestEndStates,
|
||||
}
|
||||
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = refVolume;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
return this;
|
||||
}
|
||||
|
||||
delegate void EntryFormDlgt(EntryFormNoStartEnd myRef);
|
||||
///
|
||||
void OpenBeginningDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(Config.Data.WMsCount);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenEndDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleEndForm(Config.Data.WMsCount, Config.Data.LineSize);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, Config.Data.LineSize, myRef.regReaders, myRef.disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryFormNoStartEnd myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.WMsCount, Config.Data.LineSize, myRef.regReaders, wmStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
resultSaved = false;
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
if (!entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.ShowFormAtCycleEnd:
|
||||
if (entryFormCfg.EnterSerialNrsAtTheEnd)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenEndDlg), this);
|
||||
}
|
||||
break;
|
||||
case CurrentOp.EnterTestStartStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||
break;
|
||||
case CurrentOp.EnterTestEndStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestEndStatesDlg), 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
|
||||
{
|
||||
if ((!entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleBeginning) ||
|
||||
(entryFormCfg.EnterSerialNrsAtTheEnd && currentOp == CurrentOp.ShowFormAtCycleEnd))
|
||||
{
|
||||
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
waterMeters[i].SerialNr = dlg.SNText[i];
|
||||
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (entryFormCfg.ShowCycleEndForm && currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = waterMeters.Length;
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
/// In case entryFormCfg.ShowCycleEndForm == false dlg would be null, values would be string.Empty
|
||||
wmCycleEndState[i] = waterMeters[i].EndState = (dlg != null) ? dlg.EndStateText[i] : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestStartStates)
|
||||
{
|
||||
/// Fixed start test - start
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmStartState[i] = dlg.WMStartState[i];
|
||||
wmStartStateStr[i] = dlg.WMStartStateStr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (modelessDlg is TestStartEndForm && currentOp == CurrentOp.EnterTestEndStates)
|
||||
{
|
||||
/// Fixed start test - end
|
||||
TestStartEndForm dlg = (modelessDlg as TestStartEndForm);
|
||||
if (dlg != null)
|
||||
{
|
||||
for (int i = 0; i < dlg.WaterMetersCount; i++)
|
||||
{
|
||||
if (!(((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null))))
|
||||
{
|
||||
wmEndState[i] = dlg.WMEndState[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates test results with the information collected in watermeters.
|
||||
/// </summary>
|
||||
/// <param name="batchResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(Results.BatchResults batchResults)
|
||||
{
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if ((wm != null) && !wm.Disabled && (PurchaseOrder != null))
|
||||
{
|
||||
wm.PurchaseOrder = PurchaseOrder; /// PurchaseOrder == null if form button OK has not been used => no update
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntry.Single"; } }
|
||||
|
||||
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public class FactoryNoStartEnd : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntry.NoStartEnd.Single"; } }
|
||||
|
||||
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryFormNoStartEnd(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(EntryFormCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,360 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Single
|
||||
{
|
||||
public partial class TestStartEndForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TestStartEndForm));
|
||||
|
||||
// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
readonly IRegisterReader[] regReaders;
|
||||
readonly bool[] disabled;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] WMStartState;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public readonly string[] WMStartStateStr;
|
||||
|
||||
// To be retrieved after the form closes
|
||||
public double[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
bool fixedErrorLimits; /// false in case of calculated error limits
|
||||
|
||||
Button okButton;
|
||||
|
||||
Label[] labels;
|
||||
TextBox[] startTextBoxes;
|
||||
TextBox[] endTextBoxes;
|
||||
Label[] exclamations;
|
||||
///
|
||||
IList<TextBox> enabledTextBoxes;
|
||||
IList<int> enabledWmNrs;
|
||||
|
||||
public TestStartEndForm()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parameterless constructor initializing common part for start and endstate form
|
||||
/// </summary>
|
||||
public TestStartEndForm(int waterMetersCount, int lineSize)
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
|
||||
WaterMetersCount = waterMetersCount;
|
||||
|
||||
okButton = new Button()
|
||||
{
|
||||
};
|
||||
|
||||
labels = new Label[waterMetersCount];
|
||||
startTextBoxes = new TextBox[waterMetersCount];
|
||||
endTextBoxes = new TextBox[waterMetersCount];
|
||||
exclamations = new Label[waterMetersCount];
|
||||
|
||||
for (int i = 0; i < waterMetersCount; i++)
|
||||
{
|
||||
labels[i] = new Label();
|
||||
startTextBoxes[i] = new TextBox();
|
||||
endTextBoxes[i] = new TextBox();
|
||||
exclamations[i] = new Label();
|
||||
}
|
||||
|
||||
enabledTextBoxes = new List<TextBox>();
|
||||
enabledWmNrs = new List<int>();
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to fill in start states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
public TestStartEndForm(int waterMetersCount, int lineSize, IRegisterReader[] regReaders, bool[] disabled)
|
||||
: this(waterMetersCount, lineSize)
|
||||
{
|
||||
endStates = false;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
this.disabled = disabled;
|
||||
|
||||
WMStartState = new double[waterMetersCount];
|
||||
WMStartStateStr = new string[waterMetersCount];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to fill in end states
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of water meters</param>
|
||||
/// <param name="wmStartStateStr">Information entered on test start</param>
|
||||
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
|
||||
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, int lineSize, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this(waterMetersCount, lineSize)
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.regReaders = regReaders;
|
||||
if (wmStartStateStr == null || wmStartStateStr.Length != waterMetersCount)
|
||||
throw (new Exception("Invalid 'wmStartStateStr' argument"));
|
||||
this.WMStartStateStr = wmStartStateStr;
|
||||
this.disabled = disabled;
|
||||
this.refVolume = refVolume;
|
||||
this.warningLimLo = 2 * errLimLo;
|
||||
this.warningLimHi = 2 * errLimHi;
|
||||
this.fixedErrorLimits = (errLimHi > errLimLo);
|
||||
|
||||
WMEndState = new double[waterMetersCount];
|
||||
}
|
||||
|
||||
private void CycleEndForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
//Height = 115 + 90 * WaterMetersCount;
|
||||
|
||||
int firstWmIx = -1;
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (WMStartStateStr != null && i < WMStartStateStr.Length)
|
||||
{
|
||||
startTextBoxes[i].Text = WMStartStateStr[i];
|
||||
}
|
||||
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
endTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
endTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(endTextBoxes[i]);
|
||||
enabledWmNrs.Add(i);
|
||||
if (firstWmIx == -1) firstWmIx = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (((i < disabled.Length) && disabled[i]) || ((i < regReaders.Length) && (regReaders[i] == null)))
|
||||
{
|
||||
startTextBoxes[i].Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
startTextBoxes[i].Enabled = true;
|
||||
enabledTextBoxes.Add(startTextBoxes[i]);
|
||||
enabledWmNrs.Add(i);
|
||||
if (firstWmIx == -1) firstWmIx = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (enabledTextBoxes.Count > 0)
|
||||
{
|
||||
enabledTextBoxes[0].Focus();
|
||||
//largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, firstWmIx + 1, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Water_Meter_States;
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
labels[i].Text = string.Format("{0} {1}", Strings.Water_Meter, i + 1);
|
||||
}
|
||||
//startLabel.Text = startLabel2.Text = Strings.Start;
|
||||
//endLabel.Text = endLabel2.Text = Strings.End;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs eArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (endStates)
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < WaterMetersCount; i++)
|
||||
{
|
||||
if (startTextBoxes[i].Visible && startTextBoxes[i].Enabled)
|
||||
{
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
log.ErrorFormat("Exception: {0}", e.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the approximate error and verify whether it is within limits.
|
||||
/// Make an exclamation mark visible if out of range.
|
||||
/// Similar event handler is implemented for all endTextBoxes (1..24).
|
||||
/// </summary>
|
||||
private void ProcEndTextChanged(object sender, EventArgs e, TextBox endTBox)
|
||||
{
|
||||
int wmIx = -1;
|
||||
for (int i = 0; i < startTextBoxes.Length; i++)
|
||||
{
|
||||
if (endTextBoxes[i] == endTBox)
|
||||
{
|
||||
wmIx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Utils.ParseUDouble(endTextBoxes[wmIx].Text);
|
||||
double startState = Utils.ParseUDouble(startTextBoxes[wmIx].Text);
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
bool errorOoR = fixedErrorLimits ? ((err < warningLimLo) || (warningLimHi < err)) : ((err < -6) || (+6 < err));
|
||||
exclamations[wmIx].Visible = errorOoR;
|
||||
//largeExclamationLabel.Visible = errorOoR;
|
||||
//largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, wmIx + 1, endTextBoxes[wmIx].Text);
|
||||
}
|
||||
|
||||
//private void endTextBox1_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox1); }
|
||||
//private void endTextBox2_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox2); }
|
||||
//private void endTextBox3_TextChanged(object sndr, EventArgs e) { ProcEndTextChanged(sndr, e, endTextBox3); }
|
||||
|
||||
//private void endTextBox1_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox1); }
|
||||
//private void endTextBox2_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox2); }
|
||||
//private void endTextBox3_MouseClick(object sender, MouseEventArgs e) { ProcEndTextChanged(sender, e, endTextBox3); }
|
||||
|
||||
/// <summary>
|
||||
/// Process a key press within any enabled text boxe
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <param name="currentFocusOwner">TextBox control which received the event</param>
|
||||
private void ProcKeyPress(object sender, KeyPressEventArgs e, TextBox currentFocusOwner)
|
||||
{
|
||||
if (e.KeyChar == '+')
|
||||
{
|
||||
/// Process '+' key ..... Form completed
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
if (e.KeyChar == '\r')
|
||||
{
|
||||
/// Process <enter> key ..... Next text field
|
||||
if (enabledTextBoxes.Count < 2) return; /// There is just one enabled textbox
|
||||
|
||||
for (int i = 0; i < enabledTextBoxes.Count; i++)
|
||||
{
|
||||
if (enabledTextBoxes[i] == currentFocusOwner)
|
||||
{
|
||||
/// Change focus to the next enabled text box
|
||||
int newTBIdx = (i + 1) % enabledTextBoxes.Count;
|
||||
enabledTextBoxes[newTBIdx].Focus();
|
||||
//largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, enabledWmNrs[newTBIdx] + 1, enabledTextBoxes[newTBIdx].Text);
|
||||
//largeExclamationLabel.Visible = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//private void startTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox1); }
|
||||
//private void startTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox2); }
|
||||
//private void startTextBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, startTextBox3); }
|
||||
|
||||
//private void endTextBox1_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox1); }
|
||||
//private void endTextBox2_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox2); }
|
||||
//private void endTextBox3_KeyPress(object sndr, KeyPressEventArgs e) { ProcKeyPress(sndr, e, endTextBox3); }
|
||||
|
||||
|
||||
private void ProcStartTextChanged(object sender, EventArgs e, TextBox startTBox)
|
||||
{
|
||||
int wmIx = -1;
|
||||
for (int i = 0; i < startTextBoxes.Length; i++)
|
||||
{
|
||||
if (startTextBoxes[i] == startTBox) { wmIx = i; break; }
|
||||
}
|
||||
//largeTextBox.Text = string.Format("{0} {1}: {2}", Strings.Water_Meter, wmIx + 1, startTextBoxes[wmIx].Text);
|
||||
//largeExclamationLabel.Visible = false;
|
||||
}
|
||||
|
||||
//private void startTextBox1_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox1); }
|
||||
//private void startTextBox2_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox2); }
|
||||
//private void startTextBox3_TextChanged(object sender, EventArgs e) { ProcStartTextChanged(sender, e, startTextBox3); }
|
||||
|
||||
//private void startTextBox1_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox1); }
|
||||
//private void startTextBox2_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox2); }
|
||||
//private void startTextBox3_MouseClick(object sender, MouseEventArgs e) { ProcStartTextChanged(sender, e, startTextBox3); }
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user