From: jpbruyere Date: Wed, 16 Sep 2015 13:17:15 +0000 (+0200) Subject: add Checked and Unchecked events X-Git-Tag: 0.2~5 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=92f6458d4b4935762cb60afbc0750d2c9c1e5497;p=jp%2Fcrow.git add Checked and Unchecked events --- diff --git a/src/GraphicObjects/Checkbox.cs b/src/GraphicObjects/Checkbox.cs index b6796659..ede5d520 100644 --- a/src/GraphicObjects/Checkbox.cs +++ b/src/GraphicObjects/Checkbox.cs @@ -29,6 +29,8 @@ namespace go } #endregion + public event EventHandler Checked; + public event EventHandler Unchecked; #region GraphicObject overrides // [XmlAttributeAttribute()][DefaultValue(-1)] @@ -74,10 +76,13 @@ namespace go isChecked = value; NotifyValueChanged ("IsChecked", value); - if (isChecked) + if (isChecked) { NotifyValueChanged ("SvgSub", "checked"); - else + Checked.Raise (this, null); + } else { NotifyValueChanged ("SvgSub", "unchecked"); + Unchecked.Raise (this, null); + } } } public override void onMouseClick (object sender, MouseButtonEventArgs e)