diff --git a/Config/Entities/Test.cs b/Config/Entities/Test.cs
index 11afe4b52..61f4a9763 100644
--- a/Config/Entities/Test.cs
+++ b/Config/Entities/Test.cs
@@ -30,7 +30,7 @@ namespace Config.Entities
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; }
- public virtual bool DoZeroing { get; set; }
+ public virtual bool DoDrainingAfter { get; set; }
public virtual bool DoControlWaterTemp { get; set; }
public virtual float TempLimLo { get; set; } /// Lower limit for the controlled temperature
public virtual float TempLimHi { get; set; } /// Upper limit for the controlled temperature
@@ -76,7 +76,7 @@ namespace Config.Entities
DoEvaluate = true;
Repeats = 1;
DoDraining = false;
- DoZeroing = false;
+ DoDrainingAfter = false;
DoControlWaterTemp = false;
TempLimLo = 15.0f;
TempLimHi = 25.0f;
@@ -124,7 +124,7 @@ namespace Config.Entities
result.Uncertainty = Uncertainty;
result.Repeats = Repeats;
result.DoDraining = DoDraining;
- result.DoZeroing = DoZeroing;
+ result.DoDrainingAfter = DoDrainingAfter;
result.DoControlWaterTemp = DoControlWaterTemp;
result.TempLimLo = TempLimLo;
result.TempLimHi = TempLimHi;
@@ -172,7 +172,7 @@ namespace Config.Entities
output.WriteLine(Uncertainty.ToString(ci));
output.WriteLine(Repeats.ToString(ci));
output.WriteLine(DoDraining.ToString());
- output.WriteLine(DoZeroing.ToString());
+ output.WriteLine(DoDrainingAfter.ToString());
output.WriteLine(DoControlWaterTemp.ToString());
output.WriteLine(TempLimLo.ToString(ci));
output.WriteLine(TempLimHi.ToString(ci));
@@ -222,7 +222,7 @@ namespace Config.Entities
tst.Uncertainty = float.Parse(input.ReadLine(), ci);
tst.Repeats = int.Parse(input.ReadLine(), ci);
tst.DoDraining = bool.Parse(input.ReadLine());
- tst.DoZeroing = bool.Parse(input.ReadLine());
+ tst.DoDrainingAfter = bool.Parse(input.ReadLine());
tst.DoControlWaterTemp = bool.Parse(input.ReadLine());
tst.TempLimLo = float.Parse(input.ReadLine(), ci);
tst.TempLimHi = float.Parse(input.ReadLine(), ci);
@@ -280,7 +280,7 @@ namespace Config.Entities
ln = inp.ReadLine(); if (ln != Uncertainty.ToString(ci)) { diff.AppendFormat(fmt, "Uncertainty", Uncertainty.ToString(ci), ln); };
ln = inp.ReadLine(); if (ln != Repeats.ToString(ci)) { diff.AppendFormat(fmt, "Repeats", Repeats.ToString(ci), ln); };
ln = inp.ReadLine(); if (ln != DoDraining.ToString(ci)) { diff.AppendFormat(fmt, "Draining", DoDraining.ToString(ci), ln); };
- ln = inp.ReadLine(); if (ln != DoZeroing.ToString(ci)) { diff.AppendFormat(fmt, "Zeroing", DoZeroing.ToString(ci), ln); };
+ ln = inp.ReadLine(); if (ln != DoDrainingAfter.ToString(ci)) { diff.AppendFormat(fmt, "Zeroing", DoDrainingAfter.ToString(ci), ln); };
ln = inp.ReadLine(); if (ln != DoControlWaterTemp.ToString()) { diff.AppendFormat(fmt, "DoControlWaterTemp", DoControlWaterTemp.ToString(ci), ln); };
ln = inp.ReadLine(); if (ln != TempLimLo.ToString(ci)) { diff.AppendFormat(fmt, "TempLimLo", TempLimLo.ToString(ci), ln); };
ln = inp.ReadLine(); if (ln != TempLimHi.ToString(ci)) { diff.AppendFormat(fmt, "TempLimHi", TempLimHi.ToString(ci), ln); };
diff --git a/Config/Mappings/TestMap.cs b/Config/Mappings/TestMap.cs
index 52c9cb271..97a38eef1 100644
--- a/Config/Mappings/TestMap.cs
+++ b/Config/Mappings/TestMap.cs
@@ -24,7 +24,7 @@ namespace Config.Mappings
Map(x => x.Repeats);
Map(x => x.DoDraining)
.Column("Emptying");
- Map(x => x.DoZeroing)
+ Map(x => x.DoDrainingAfter)
.Column("Zeroing");
Map(x => x.DoControlWaterTemp);
Map(x => x.TempLimLo);
diff --git a/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs
index 2bb027203..f9e1c6983 100644
--- a/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs
+++ b/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs
@@ -608,6 +608,21 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
tMass2 = StateMachine.Time;
TestEndTime = DateTime.Now;
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { goto error; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
/// Read the diverter switch time
switchTimeEnd = 0.001f * (float)cBrd.DivTime(0);
log.WarnFormat("Diverter switch time on test end = {0} ms", cBrd.DivTime(0));
diff --git a/TBF/BenchControl/TestMethods/DiverterTest/DiverterTestSeq.cs b/TBF/BenchControl/TestMethods/DiverterTest/DiverterTestSeq.cs
index e92a44dc6..cd85ca0e8 100644
--- a/TBF/BenchControl/TestMethods/DiverterTest/DiverterTestSeq.cs
+++ b/TBF/BenchControl/TestMethods/DiverterTest/DiverterTestSeq.cs
@@ -645,6 +645,21 @@ namespace TBF.BenchControl.TestMethods.DiverterTest
log.WarnFormat("End mass = {0}kg", EndMass);
TestEndTime = DateTime.Now;
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
//------------------------------------------------
diff --git a/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs
index 8688f4f64..ddf925f27 100644
--- a/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs
+++ b/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs
@@ -490,6 +490,21 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
tMass2 = StateMachine.Time;
TestEndTime = DateTime.Now;
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
State.Create("FixedStartAdvanced : Stopping diverter, gate, etc.")
.AddOperation(checkUiOp)
diff --git a/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs b/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs
index 0ed886b20..903a933ae 100644
--- a/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs
+++ b/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs
@@ -798,6 +798,21 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
tMass2 = StateMachine.Time;
TestEndTime = DateTime.Now;
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)
diff --git a/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
index 4a9e21164..0e8a77614 100644
--- a/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
+++ b/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs
@@ -802,6 +802,21 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
tMass2 = StateMachine.Time;
TestEndTime = DateTime.Now;
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name))
.AddOperation(checkUiOp)
diff --git a/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs
index eddc63655..e6dafb5fa 100644
--- a/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs
+++ b/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs
@@ -703,6 +703,21 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
log.WarnFormat("End mass = {0}kg", EndMass);
}
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
//------------------------------------------------
diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs
index 61d48f0c2..4e5a32f34 100644
--- a/TBF/BenchControl/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs
+++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs
@@ -807,6 +807,36 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
log.WarnFormat("End mass = {0}kg", EndMass);
TestEndTime = DateTime.Now;
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
//------------------------------------------------
diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs
index aefac19e1..a90aedd8b 100644
--- a/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs
+++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs
@@ -701,6 +701,21 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
log.WarnFormat("End mass = {0}kg", EndMass);
TestEndTime = DateTime.Now;
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do
+ {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
//------------------------------------------------
diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs
index e5809feec..29d3f4bbc 100644
--- a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs
+++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs
@@ -693,6 +693,20 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
log.WarnFormat("End mass = {0}kg", EndMass);
TestEndTime = DateTime.Now;
+ if (test.DoDrainingAfter)
+ {
+ State.Create(string.Format("{0}({1}) : Open the drain valve", test.Method, test.Name))
+ .AddOperation(checkUiOp)
+ .AddOperation(StateMachine.ControlBoard.SetValvesOp(scale.DrainValve, null))
+ .AddOperations(readTempPressOps)
+ .EnterState();
+ do {
+ e = StateMachine.WaitRunDevsRunOps();
+ if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
+ }
+ while (e.Contains(Event.ValvesBusy));
+ }
+
//------------------------------------------------
Bridge.OnActivity(this, Strings.Test_completed);
//------------------------------------------------
diff --git a/TBF/Resources/Strings.Designer.cs b/TBF/Resources/Strings.Designer.cs
index 37a402553..fb7b0b23c 100644
--- a/TBF/Resources/Strings.Designer.cs
+++ b/TBF/Resources/Strings.Designer.cs
@@ -1364,7 +1364,7 @@ namespace TBF.Resources {
return ResourceManager.GetString("Drain", resourceCulture);
}
}
-
+
///
/// Looks up a localized string similar to Drift per year.
///
@@ -1373,6 +1373,24 @@ namespace TBF.Resources {
return ResourceManager.GetString("Drift_per_year", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to Draining after.
+ ///
+ internal static string Draining_after {
+ get {
+ return ResourceManager.GetString("Draining_after", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Draining before.
+ ///
+ internal static string Draining_before {
+ get {
+ return ResourceManager.GetString("Draining_before", resourceCulture);
+ }
+ }
///
/// Looks up a localized string similar to Leak duration [s].
diff --git a/TBF/Resources/Strings.cs.resx b/TBF/Resources/Strings.cs.resx
index 9006003f3..aa808efb1 100644
--- a/TBF/Resources/Strings.cs.resx
+++ b/TBF/Resources/Strings.cs.resx
@@ -1506,4 +1506,10 @@
Modifikovat
+
+ Vyprázdnění po
+
+
+ Vyprázdnění před
+
\ No newline at end of file
diff --git a/TBF/Resources/Strings.resx b/TBF/Resources/Strings.resx
index 9b760170a..40e226adb 100644
--- a/TBF/Resources/Strings.resx
+++ b/TBF/Resources/Strings.resx
@@ -2083,4 +2083,10 @@
Update
+
+ Draining after
+
+
+ Draining before
+
\ No newline at end of file
diff --git a/TBF/UI/Procedures/ProcedureDlg.cs b/TBF/UI/Procedures/ProcedureDlg.cs
index 0a5e5f1c2..410e7c214 100644
--- a/TBF/UI/Procedures/ProcedureDlg.cs
+++ b/TBF/UI/Procedures/ProcedureDlg.cs
@@ -917,7 +917,6 @@ namespace TBF.UI.Procedures
{
Name,
Part,
- TankDraining,
Uncertainty,
ControlWaterTemp,
TempLimLo,
@@ -935,7 +934,6 @@ namespace TBF.UI.Procedures
ListViewEx lv = metrology2ListViewEx;
lv.Columns.Add(new ColumnHeader { Text = Strings.Test_chdr, Width = 70 });
lv.Columns.Add(new ColumnHeader { Text = Strings.Part, Width = 40 });
- lv.Columns.Add(new ColumnHeader { Text = Strings.Emptying_chdr, Width = 60 });
lv.Columns.Add(new ColumnHeader { Text = Strings.Uncertainty_pct_chdr, Width = 90 });
lv.Columns.Add(new ColumnHeader { Text = Strings.Control_water_temp_chdr, Width = 110 });
lv.Columns.Add(new ColumnHeader { Text = string.Format("{0} [°C]", Strings.Temp_lim_lo_chdr), Width = 100 });
@@ -953,11 +951,6 @@ namespace TBF.UI.Procedures
publishCBox.Items.Add(pb.ToDescription());
}
-
- ComboBox yesNo1CBox = new ComboBox(); /// control for Emptying
- yesNo1CBox.Items.Add(Strings.yes);
- yesNo1CBox.Items.Add(Strings.no);
-
ComboBox yesNo2CBox = new ComboBox(); /// control for Control water temp.
yesNo2CBox.Items.Add(Strings.yes);
yesNo2CBox.Items.Add(Strings.no);
@@ -970,7 +963,6 @@ namespace TBF.UI.Procedures
{
new TextBox(), /// Name
new TextBox(), /// Part
- yesNo1CBox, /// Emptying
new TextBox(), /// Uncertainty
yesNo2CBox, /// Control water temp.
new TextBox(), /// Temp. lim. lo
@@ -1005,7 +997,6 @@ namespace TBF.UI.Procedures
ListViewItem lvi = new ListViewItem(test.Name); /// Name
lvi.Tag = test;
lvi.SubItems.Add((test.Part == 0) ? "-" : test.Part.ToString()); /// Part
- lvi.SubItems.Add(test.DoDraining ? Strings.yes : Strings.no);
lvi.SubItems.Add(test.Uncertainty.ToString());
lvi.SubItems.Add(test.DoControlWaterTemp ? Strings.yes : Strings.no);
lvi.SubItems.Add(test.TempLimLo.ToString());
@@ -1037,9 +1028,6 @@ namespace TBF.UI.Procedures
entity.Part = part;
}
- if (lvi.SubItems[(int)Mtrlgy2Clmn.TankDraining].Text.Equals(Strings.yes)) entity.DoDraining = true;
- else if (lvi.SubItems[(int)Mtrlgy2Clmn.TankDraining].Text.Equals(Strings.no)) entity.DoDraining = false;
-
if (lvi.SubItems[(int)Mtrlgy2Clmn.ControlWaterTemp].Text.Equals(Strings.yes)) entity.DoControlWaterTemp = true;
else if (lvi.SubItems[(int)Mtrlgy2Clmn.ControlWaterTemp].Text.Equals(Strings.no)) entity.DoControlWaterTemp = false;
@@ -1114,13 +1102,6 @@ namespace TBF.UI.Procedures
}
}
- if ((e.SubItem == (int)Mtrlgy2Clmn.TankDraining) && !(metrology2Editors[(int)Mtrlgy2Clmn.TankDraining] as ComboBox).Items.Contains(e.DisplayText))
- {
- e.DisplayText = e.Item.SubItems[e.SubItem].Text;
- e.Cancel = true;
- return;
- }
-
if ((e.SubItem == (int)Mtrlgy2Clmn.ControlWaterTemp) && !(metrology2Editors[(int)Mtrlgy2Clmn.ControlWaterTemp] as ComboBox).Items.Contains(e.DisplayText))
{
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
@@ -1166,6 +1147,8 @@ namespace TBF.UI.Procedures
{
Name,
Part,
+ DrainingBefore,
+ DrainingAfter,
Feeding,
Bench,
Output,
@@ -1186,6 +1169,8 @@ namespace TBF.UI.Procedures
ListViewEx lv = processListViewEx;
lv.Columns.Add(new ColumnHeader { Text = Strings.Test_chdr, Width = 70 });
lv.Columns.Add(new ColumnHeader { Text = Strings.Part, Width = 40 });
+ lv.Columns.Add(new ColumnHeader { Text = Strings.Draining_before, Width = 90 });
+ lv.Columns.Add(new ColumnHeader { Text = Strings.Draining_after, Width = 90 });
lv.Columns.Add(new ColumnHeader { Text = Strings.Feeding_chdr, Width = 80 });
lv.Columns.Add(new ColumnHeader { Text = Strings.Bench_chdr, Width = 80 });
lv.Columns.Add(new ColumnHeader { Text = Strings.Output_chdr, Width = 80 });
@@ -1197,10 +1182,20 @@ namespace TBF.UI.Procedures
lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionBetween_chdr, Width = 100 });
lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionEnd_chdr, Width = 100 });
+ ComboBox yesNo1CBox = new ComboBox(); /// control for Draining before test
+ yesNo1CBox.Items.Add(Strings.yes);
+ yesNo1CBox.Items.Add(Strings.no);
+
+ ComboBox yesNo2CBox = new ComboBox(); /// control for Draining after test
+ yesNo2CBox.Items.Add(Strings.yes);
+ yesNo2CBox.Items.Add(Strings.no);
+
processEditors = new Control[]
{
new TextBox(), /// Name
new TextBox(), /// Part
+ yesNo1CBox,
+ yesNo2CBox,
new ComboBox(), /// Feeding
new ComboBox(), /// Table
new ComboBox(), /// Output
@@ -1255,40 +1250,39 @@ namespace TBF.UI.Procedures
///
/// Process item with subitems
///
- ListViewItem lvi = new ListViewItem(test.Name); /// Name
+ ListViewItem lvi = new ListViewItem(test.Name); /// Name
lvi.Tag = test;
- lvi.SubItems.Add((test.Part == 0) ? "-" : test.Part.ToString()); /// Part
+ lvi.SubItems.Add((test.Part == 0) ? "-" : test.Part.ToString()); /// Part
if (tm != null && tm.DoTransitions())
{
+ lvi.SubItems.Add(test.DoDraining ? Strings.yes : Strings.no); /// Draining before test
+ lvi.SubItems.Add(test.DoDrainingAfter ? Strings.yes : Strings.no); /// Draining after test
lvi.SubItems.Add(test.FeedingPath);
lvi.SubItems.Add(test.BenchPath);
lvi.SubItems.Add(test.OutputPath);
- }
- else
- {
- lvi.SubItems.Add(string.Empty);
- lvi.SubItems.Add(string.Empty);
- lvi.SubItems.Add(string.Empty);
- }
-
- lvi.SubItems.Add(test.MetersPath);
-
#if HEAT_METERS
- lvi.SubItems.Add(test.HeatMetersPath);
+ lvi.SubItems.Add(test.HeatMetersPath);
#endif
-
- if (tm != null && tm.DoTransitions())
- {
+ lvi.SubItems.Add(test.MetersPath);
lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBefore) ? "---" : test.RelTransBefore);
lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBetween) ? "---" : test.RelTransBetween);
lvi.SubItems.Add(string.IsNullOrEmpty(test.TransitionAfter) ? "---" : test.TransitionAfter);
}
else
{
- lvi.SubItems.Add(string.Empty);
- lvi.SubItems.Add(string.Empty);
- lvi.SubItems.Add(string.Empty);
+ lvi.SubItems.Add(string.Empty); /// Draining before test N/A
+ lvi.SubItems.Add(string.Empty); /// Draining after test N/A
+ lvi.SubItems.Add(string.Empty); /// FeedingPath N/A
+ lvi.SubItems.Add(string.Empty); /// BenchPath N/A
+ lvi.SubItems.Add(string.Empty); /// OutputPath N/A
+#if HEAT_METERS
+ lvi.SubItems.Add(test.HeatMetersPath);
+#endif
+ lvi.SubItems.Add(test.MetersPath);
+ lvi.SubItems.Add(string.Empty); /// RelTransBefore N/A
+ lvi.SubItems.Add(string.Empty); /// RelTransBetween N/A
+ lvi.SubItems.Add(string.Empty); /// TransitionAfter N/A
}
processListViewEx.Items.Add(lvi);
@@ -1314,6 +1308,9 @@ namespace TBF.UI.Procedures
entity.Part = part;
}
+ entity.DoDraining = lvi.SubItems[(int)ProcessClmn.DrainingBefore].Text.Equals(Strings.yes);
+ entity.DoDrainingAfter = lvi.SubItems[(int)ProcessClmn.DrainingAfter].Text.Equals(Strings.yes);
+
int column = (int)ProcessClmn.Feeding;
string subItemText = lvi.SubItems[column].Text;
if (string.IsNullOrEmpty(subItemText) || (processEditors[column] as ComboBox).Items.Contains(subItemText))
@@ -1379,8 +1376,10 @@ namespace TBF.UI.Procedures
ITestMethod tm = TBF.BenchControl.TbfComponents.FindComponent((e.Item.Tag as Test).Method, TbfComponents) as ITestMethod;
- if (tm != null && (tm.DoTransitions() == false) && ((e.SubItem == (int)ProcessClmn.Feeding) ||
- (e.SubItem == (int)ProcessClmn.Bench) ||
+ if (tm != null && (tm.DoTransitions() == false) && ((e.SubItem == (int)ProcessClmn.DrainingBefore) ||
+ (e.SubItem == (int)ProcessClmn.DrainingAfter) ||
+ (e.SubItem == (int)ProcessClmn.Feeding) ||
+ (e.SubItem == (int)ProcessClmn.Bench) ||
(e.SubItem == (int)ProcessClmn.Output) ||
(e.SubItem == (int)ProcessClmn.TrnStart) ||
(e.SubItem == (int)ProcessClmn.TrnBetween) ||
@@ -1445,6 +1444,20 @@ namespace TBF.UI.Procedures
}
}
+ if ((e.SubItem == (int)ProcessClmn.DrainingBefore) && !(processEditors[(int)ProcessClmn.DrainingBefore] as ComboBox).Items.Contains(e.DisplayText))
+ {
+ e.DisplayText = e.Item.SubItems[e.SubItem].Text;
+ e.Cancel = true;
+ return; /// NOK
+ }
+
+ if ((e.SubItem == (int)ProcessClmn.DrainingAfter) && !(processEditors[(int)ProcessClmn.DrainingAfter] as ComboBox).Items.Contains(e.DisplayText))
+ {
+ e.DisplayText = e.Item.SubItems[e.SubItem].Text;
+ e.Cancel = true;
+ return; /// NOK
+ }
+
if (((e.SubItem == (int)ProcessClmn.Feeding) && !(processEditors[(int)ProcessClmn.Feeding] as ComboBox).Items.Contains(e.DisplayText)) ||
((e.SubItem == (int)ProcessClmn.Bench) && !(processEditors[(int)ProcessClmn.Bench] as ComboBox).Items.Contains(e.DisplayText)) ||
((e.SubItem == (int)ProcessClmn.Output) && !(processEditors[(int)ProcessClmn.Output] as ComboBox).Items.Contains(e.DisplayText)) ||