Solves issue with an opened CycleBeginForm after abort and re-selection in Israel:
- CloseCycleBeginForm() -> WaitBeginFormClosed() - CloseBeginForm() added to SequenceBase(forced dialog close) - CloseModellFormHandler added to UiBridge.Bridge
This commit is contained in:
@@ -240,7 +240,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stopTest;
|
||||
if (WaitBeginFormClosed()) goto stopTest;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
{
|
||||
public partial class WMErrorsForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(WMErrorsForm));
|
||||
|
||||
/// <summary> Number of text boxes for serial numbers </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
|
||||
Entities.TestResult tr;
|
||||
@@ -167,5 +170,24 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
g.FillPolygon(blackBrush, triangle);
|
||||
}
|
||||
}
|
||||
|
||||
#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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stopTest;
|
||||
if (WaitBeginFormClosed()) goto stopTest;
|
||||
}
|
||||
|
||||
/// Optionally supress pulses from the large water meter
|
||||
|
||||
+1
-1
@@ -541,7 +541,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stop;
|
||||
if (WaitBeginFormClosed()) goto stop;
|
||||
}
|
||||
|
||||
/// Optionally supress pulses from the large water meter
|
||||
|
||||
+1
-1
@@ -462,7 +462,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stopTest;
|
||||
if (WaitBeginFormClosed()) goto stopTest;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stopTest;
|
||||
if (WaitBeginFormClosed()) goto stopTest;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
+1
-1
@@ -347,7 +347,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stopTest;
|
||||
if (WaitBeginFormClosed()) goto stopTest;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -253,7 +253,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stopTest;
|
||||
if (WaitBeginFormClosed()) goto stopTest;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stopTest;
|
||||
if (WaitBeginFormClosed()) goto stopTest;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
+1
-1
@@ -326,7 +326,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
|
||||
if (cycleBeginFormOpened)
|
||||
{
|
||||
cycleBeginFormOpened = false;
|
||||
if (CloseCycleBeginForm()) goto stopTest;
|
||||
if (WaitBeginFormClosed()) goto stopTest;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user