diff options
| author | j-p <jp.bruyere@live.be> | 2018-01-30 01:28:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-30 01:28:26 +0100 |
| commit | d51e2cb08b0d2b113297e0201b88ac0b2657ac95 (patch) | |
| tree | f2fb49513036527178b5ad33109622cfce3dfbff /src/GraphicObjects/MessageBox.cs | |
| parent | 9015042f06059cef3f8880bf1dea19be310ec286 (diff) | |
iface param ctor #38
Diffstat (limited to 'src/GraphicObjects/MessageBox.cs')
| -rw-r--r-- | src/GraphicObjects/MessageBox.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/GraphicObjects/MessageBox.cs b/src/GraphicObjects/MessageBox.cs index d8ce1dae..0e308bf9 100644 --- a/src/GraphicObjects/MessageBox.cs +++ b/src/GraphicObjects/MessageBox.cs @@ -32,13 +32,17 @@ namespace Crow { public class MessageBox : Window { + #region CTOR + public MessageBox () : base(){} + public MessageBox (Interface iface) : base(iface){} + #endregion + public enum Type { Information, YesNo, Alert, Error } - public MessageBox (): base(){} protected override void loadTemplate (GraphicObject template) { @@ -133,8 +137,7 @@ namespace Crow } public static MessageBox Show (Type msgBoxType, string message, string okMsg = "", string cancelMsg = ""){ lock (Interface.CurrentInterface.UpdateMutex) { - MessageBox mb = new MessageBox (); - mb.Initialize (); + MessageBox mb = new MessageBox (Interface.CurrentInterface); mb.CurrentInterface.AddWidget (mb); mb.MsgType = msgBoxType; mb.Message = message; |