aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/MessageBox.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-02-28 19:06:13 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-02-28 19:06:13 +0100
commit843d129c544c0664f37fd8cf408653517a920b24 (patch)
tree60a494783c1883be16ce4b6c9fbd603120373e5d /src/GraphicObjects/MessageBox.cs
parentcb1d5e6ce6c9f61bef0e9b2c0db23cdc7d101920 (diff)
parentdc2ac1f53a079a8daa7c1342b17a8dcefcc62362 (diff)
Merge branch 'master' of https://github.com/jpbruyere/Crow
Diffstat (limited to 'src/GraphicObjects/MessageBox.cs')
-rw-r--r--src/GraphicObjects/MessageBox.cs42
1 files changed, 10 insertions, 32 deletions
diff --git a/src/GraphicObjects/MessageBox.cs b/src/GraphicObjects/MessageBox.cs
index 18c4afb3..cae43d9f 100644
--- a/src/GraphicObjects/MessageBox.cs
+++ b/src/GraphicObjects/MessageBox.cs
@@ -23,25 +23,17 @@ using System.ComponentModel;
namespace Crow
{
+ [DefaultStyle("#Crow.Styles.MessageBox.style")]
[DefaultTemplate("#Crow.Templates.MessageBox.goml")]
public class MessageBox : Window
{
public MessageBox ():base(){}
- string title;
string message;
- [XmlAttributeAttribute][DefaultValue("Message box")]
- public virtual string Title
- {
- get { return title; }
- set {
- if (title == value)
- return;
- title = value;
- NotifyValueChanged ("Title", title);
- }
- }
+ public event EventHandler Ok;
+ public event EventHandler Cancel;
+
[XmlAttributeAttribute][DefaultValue("Informations")]
public virtual string Message
{
@@ -53,30 +45,16 @@ namespace Crow
NotifyValueChanged ("Message", message);
}
}
- #region GraphicObject overrides
- [XmlAttributeAttribute][DefaultValue(250)]
- public override int Width {
- get { return base.Width; }
- set { base.Width = value; }
- }
-// [XmlAttributeAttribute][DefaultValue(80)]
-// public override int Height {
-// get { return base.Height; }
-// set { base.Height = value; }
-// }
- [XmlAttributeAttribute()][DefaultValue(true)]
- public override bool Focusable
+
+ void onOkButtonClick (object sender, EventArgs e)
{
- get { return base.Focusable; }
- set { base.Focusable = value; }
+ Ok.Raise (this, null);
}
- [XmlAttributeAttribute()][DefaultValue("150;80")]
- public override Size MinimumSize
+ void onCancelButtonClick (object sender, EventArgs e)
{
- get { return base.MinimumSize; }
- set { base.MinimumSize = value; }
+ Ok.Raise (this, null);
}
- #endregion
+
}
}