From 308b46764b0d2ed215e250f444b43e47ce63d27a Mon Sep 17 00:00:00 2001 From: lhiven <2366881222@qq.com> Date: Thu, 28 Dec 2023 13:01:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E5=BC=B9=E6=A1=86=E7=BB=99=E4=B8=AD?= =?UTF-8?q?=E6=8E=A7=E6=97=B6=EF=BC=8C=E8=AE=BE=E5=A4=87=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=9A=82=E5=81=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Commom/TestCenterMessageBox.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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(); + } + } }