CLosing modeless forms Adjustment.WMErrorsForm and PulsesTest.WMPulsesForm.
This commit is contained in:
parent
9cffd9e5c8
commit
296198550a
@ -85,7 +85,6 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
|
||||
int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
if (sensPath != null && sensPath.RegisterReaders != null)
|
||||
{
|
||||
@ -115,7 +114,11 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
int flowSetTime = 0;
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
|
||||
/// Read pressure and temperature once before calling Bridge.OnTestSelected(...)
|
||||
State.Create(string.Format("{0}({1}) : Measuring process data", test.Method, test.Name))
|
||||
@ -129,13 +132,9 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
}
|
||||
while (e.Contains(Event.Busy));
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
TestStartTime = DateTime.Now;
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
TestStartTime = DateTime.Now;
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Starting_the_pump);
|
||||
@ -241,7 +240,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
flow_set:
|
||||
|
||||
int flowSetTime = StateMachine.Time - flowSetTime0;
|
||||
flowSetTime = StateMachine.Time - flowSetTime0;
|
||||
|
||||
if (test.DoControlWaterTemp && benchPath.TempMtrUp != null && benchPath.TempMtrDown != null)
|
||||
{
|
||||
@ -488,7 +487,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
/// Update modeless dialog error information
|
||||
Bridge.OnAdjustmentInProgress(this, new AdjustmentInProgressEventArgs(testName));
|
||||
|
||||
/// Test 'Quit'
|
||||
/// Close the modeless form
|
||||
if ((modelessDlg is GenericDevices.IHasCompleted) && !(modelessDlg as GenericDevices.IHasCompleted).Completed)
|
||||
{
|
||||
goto loop; /// Modeless dilaog not closed, keep looping
|
||||
@ -500,6 +499,13 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
stopTest:
|
||||
|
||||
/// Close the modeless form
|
||||
if ((modelessDlg is GenericDevices.IHasCompleted) && !(modelessDlg as GenericDevices.IHasCompleted).Completed)
|
||||
{
|
||||
goto loop; /// Modeless dilaog not closed, keep looping
|
||||
}
|
||||
modelessDlg = null; /// Modeless dialog is closed now
|
||||
|
||||
///
|
||||
/// Quit this sequence
|
||||
///
|
||||
@ -517,8 +523,6 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
}
|
||||
|
||||
stopTestWOStoppingDivGateEtc:
|
||||
|
||||
return new List<Event> { retVal };
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,6 +67,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
completed = false;
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.AdjustmentInProgressHandler += delegate(object sender, UiBridge.AdjustmentInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@ -72,6 +72,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
completed = false;
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.AdjustmentInProgressHandler += delegate(object sender, UiBridge.AdjustmentInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@ -76,6 +76,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
|
||||
completed = false;
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.AdjustmentInProgressHandler += delegate(object sender, UiBridge.AdjustmentInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@ -115,6 +115,10 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
|
||||
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
|
||||
/// Read pressure and temperature once before calling Bridge.OnTestSelected(...)
|
||||
State.Create(string.Format("{0}({1}) : Measuring process data", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
@ -127,13 +131,9 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
}
|
||||
while (e.Contains(Event.Busy));
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, heatMetersPath, totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
TestStartTime = DateTime.Now;
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting));
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
TestStartTime = DateTime.Now;
|
||||
int flowSetTime0 = StateMachine.Time;
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Starting_the_pump);
|
||||
@ -483,7 +483,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
/// Update modeless dialog error information
|
||||
Bridge.OnPulsesTestInProgress(this, new PulsesTestInProgressEventArgs(testName, (double)testParams.MinPulsesCount));
|
||||
|
||||
/// Test 'Quit'
|
||||
/// Close the modeless form
|
||||
if ((modelessDlg is GenericDevices.IHasCompleted) && !(modelessDlg as GenericDevices.IHasCompleted).Completed)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null); /// Close the modeless dialog
|
||||
@ -497,6 +497,13 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
|
||||
stopTest:
|
||||
|
||||
/// Close the modeless form
|
||||
if ((modelessDlg is GenericDevices.IHasCompleted) && !(modelessDlg as GenericDevices.IHasCompleted).Completed)
|
||||
{
|
||||
UiBridge.Bridge.OnCloseModelessForm(this, null); /// Close the modeless dialog
|
||||
}
|
||||
modelessDlg = null; /// Modeless dialog is closed now
|
||||
|
||||
///
|
||||
/// Quit this sequence
|
||||
///
|
||||
@ -514,8 +521,6 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
}
|
||||
|
||||
stopTestWOStoppingDivGateEtc:
|
||||
|
||||
return new List<Event> { retVal };
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,6 +62,8 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
completed = false;
|
||||
minPulsesCount = 1; /// Must be >0 so that initially the indication is RED
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.PulsesTestInProgressHandler += delegate(object sender, UiBridge.PulsesTestInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@ -72,6 +72,8 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
completed = false;
|
||||
minPulsesCount = 1; /// Must be >0 so that initially the indication is RED
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.PulsesTestInProgressHandler += delegate(object sender, UiBridge.PulsesTestInProgressEventArgs args)
|
||||
{
|
||||
|
||||
@ -78,6 +78,8 @@ namespace TBF.BenchControl.TestMethods.PulsesTest
|
||||
completed = false;
|
||||
minPulsesCount = 1; /// Must be >0 so that initially the indication is RED
|
||||
|
||||
StartForceCloseHandler();
|
||||
|
||||
/// Attach to 'AdjustmentInProgress' handler
|
||||
UiBridge.Bridge.PulsesTestInProgressHandler += delegate(object sender, UiBridge.PulsesTestInProgressEventArgs args)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user