当弹框给中控时,设备是否暂停

master
lhiven 1 year ago
parent d7ec501d05
commit 308b46764b

@ -22,17 +22,17 @@ namespace Rs.MotionPlat.Commom
resultMessageBox = new Dictionary<int, SchedulingMessageBox>(); resultMessageBox = new Dictionary<int, SchedulingMessageBox>();
} }
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) lock(msgLock)
{ {
Show(id, message, button, null); Show(id, message, button, null,bNeedStop);
} }
} }
public static void Show(int id,string message,ETipButton button,Dictionary<ETipButton,string> buttonTexts) public static void Show(int id,string message,ETipButton button,Dictionary<ETipButton,string> buttonTexts,bool bNeedStop=false)
{ {
lock (msgLock) lock (msgLock)
{ {
@ -44,7 +44,15 @@ namespace Rs.MotionPlat.Commom
msgBox.Instruction = EInstruction.ShowMessage; msgBox.Instruction = EInstruction.ShowMessage;
msgBox.ID = id; msgBox.ID = id;
TestCenter.Instance.ShowMsgBox(msgBox); TestCenter.Instance.ShowMsgBox(msgBox);
msgSentEvent.Add(id, new ManualResetEvent(false)); if(!msgSentEvent.ContainsKey(id))
{
msgSentEvent.Add(id, new ManualResetEvent(false));
}
if(bNeedStop)
{
Ops.Stop();
}
} }
} }

Loading…
Cancel
Save