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 | 71d2eb36a346afa72fae5f425dc1862c919e7407 (patch) | |
| tree | 2bb12851411af33988a43ea9a35bfe4ee34eba83 /src/GraphicObjects/MessageBox.cs | |
| parent | e3c509d4a9a27f663a3a95ab697bfdb2e880172d (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; |