aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/MessageBox.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-05-19 21:33:37 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2017-05-19 21:33:37 +0200
commit37570a2ebed6dfa7ebabc665c688af14b55a894a (patch)
tree671a2f5272f57fe3ad02f55721221264f818d191 /src/GraphicObjects/MessageBox.cs
parente6482e0efc568749f15dd12b91c56150a83a1172 (diff)
CrowMonitor tread loggertestDrmDebugTreading
Diffstat (limited to 'src/GraphicObjects/MessageBox.cs')
-rw-r--r--src/GraphicObjects/MessageBox.cs26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/GraphicObjects/MessageBox.cs b/src/GraphicObjects/MessageBox.cs
index d8ce1dae..88be521e 100644
--- a/src/GraphicObjects/MessageBox.cs
+++ b/src/GraphicObjects/MessageBox.cs
@@ -132,18 +132,20 @@ namespace Crow
close ();
}
public static MessageBox Show (Type msgBoxType, string message, string okMsg = "", string cancelMsg = ""){
- lock (Interface.CurrentInterface.UpdateMutex) {
- MessageBox mb = new MessageBox ();
- mb.Initialize ();
- mb.CurrentInterface.AddWidget (mb);
- mb.MsgType = msgBoxType;
- mb.Message = message;
- if (!string.IsNullOrEmpty(okMsg))
- mb.OkMessage = okMsg;
- if (!string.IsNullOrEmpty(cancelMsg))
- mb.CancelMessage = cancelMsg;
- return mb;
- }
+ MessageBox mb = null;
+ CrowMonitor.Enter (Interface.CurrentInterface.UpdateMutex, "message box show");
+ mb = new MessageBox ();
+ mb.Initialize ();
+ mb.CurrentInterface.AddWidget (mb);
+ mb.MsgType = msgBoxType;
+ mb.Message = message;
+ if (!string.IsNullOrEmpty(okMsg))
+ mb.OkMessage = okMsg;
+ if (!string.IsNullOrEmpty(cancelMsg))
+ mb.CancelMessage = cancelMsg;
+ CrowMonitor.Exit (Interface.CurrentInterface.UpdateMutex);
+ return mb;
+
}
}
}