diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 58b518ac2..a5aec0077 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -9,9 +9,19 @@ using TBF.UiBridge; namespace TBF.BenchControl.TestMethods.Adjustment { - public class FlyingStartSeq : Sequences.SequenceBase + public class AdjustmentSeq : Sequences.SequenceBase { - private static readonly ILog log = LogManager.GetLogger(typeof(FlyingStartSeq)); + private static readonly ILog log = LogManager.GetLogger(typeof(AdjustmentSeq)); + + System.Windows.Forms.Form modelessDlg; + /// + delegate void ErrorsFormDlgt(AdjustmentSeq myRef); + /// + void OpenWMErrorsForm(AdjustmentSeq myRef) + { + myRef.modelessDlg = new WMErrorsForm(Program.WMsCount); + modelessDlg.Show(); + } /// /// Flying start mass collection method sequence @@ -25,7 +35,6 @@ namespace TBF.BenchControl.TestMethods.Adjustment /// public IList Execute(Entities.Test test) { - System.Windows.Forms.Form modelessDlg = null; Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; @@ -109,8 +118,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment /// /// Show the modeless dialog with error indication /// - modelessDlg = new WMErrorsForm(Program.WMsCount); - modelessDlg.Show(); + Program.MainWnd.Invoke(new ErrorsFormDlgt(OpenWMErrorsForm), this); flow_set: loop: diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs index 99940ce63..c85a8ad21 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs @@ -18,7 +18,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment public IList Execute(Entities.Test test) { - return (new FlyingStartSeq()).Execute(test); + return (new AdjustmentSeq()).Execute(test); } } }