aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/MessageBox.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-01-30 00:28:05 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-01-30 00:28:05 +0100
commitc29275576f75534c9fd109b3d3717ab52ec8415b (patch)
tree2bb12851411af33988a43ea9a35bfe4ee34eba83 /src/GraphicObjects/MessageBox.cs
parente3c509d4a9a27f663a3a95ab697bfdb2e880172d (diff)
- test with both parameterless ctor and with iface param ctorInCodeInstatiation
- CurrentInterface as field
Diffstat (limited to 'src/GraphicObjects/MessageBox.cs')
-rw-r--r--src/GraphicObjects/MessageBox.cs9
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;