diff --git a/Rs.SkyLine/Commom/TestCenterMessageBox.cs b/Rs.SkyLine/Commom/TestCenterMessageBox.cs index c19d0c8..3bc3392 100644 --- a/Rs.SkyLine/Commom/TestCenterMessageBox.cs +++ b/Rs.SkyLine/Commom/TestCenterMessageBox.cs @@ -22,17 +22,17 @@ namespace Rs.MotionPlat.Commom resultMessageBox = new Dictionary(); } - public static void Show(int id, string message, ETipButton button) + public static void Show(int id, string message, ETipButton button,bool bNeedStop=false) { lock(msgLock) { - Show(id, message, button, null); + Show(id, message, button, null,bNeedStop); } } - public static void Show(int id,string message,ETipButton button,Dictionary buttonTexts) + public static void Show(int id,string message,ETipButton button,Dictionary buttonTexts,bool bNeedStop=false) { lock (msgLock) { @@ -44,7 +44,15 @@ namespace Rs.MotionPlat.Commom msgBox.Instruction = EInstruction.ShowMessage; msgBox.ID = id; TestCenter.Instance.ShowMsgBox(msgBox); - msgSentEvent.Add(id, new ManualResetEvent(false)); + if(!msgSentEvent.ContainsKey(id)) + { + msgSentEvent.Add(id, new ManualResetEvent(false)); + } + if(bNeedStop) + { + Ops.Stop(); + } + } }