diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-05 15:47:33 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-05 15:47:33 +0100 |
| commit | 49346012274739fd39745f9e035ee8853149bc73 (patch) | |
| tree | b8757165c6b31a6d08b7caad2118ed76f463c287 /src/GraphicObjects/Menu.cs | |
| parent | 9c0f77e860a1852ee7de381a82118e6d8c7fb819 (diff) | |
| parent | 40b16003066ad42604fd82dc0eec9cfa0a4abeca (diff) | |
Merge branch 'master' into CrowIDE
Diffstat (limited to 'src/GraphicObjects/Menu.cs')
| -rw-r--r-- | src/GraphicObjects/Menu.cs | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/GraphicObjects/Menu.cs b/src/GraphicObjects/Menu.cs index 765925e9..1a7a3f95 100644 --- a/src/GraphicObjects/Menu.cs +++ b/src/GraphicObjects/Menu.cs @@ -26,10 +26,14 @@ namespace Crow { public class Menu : TemplatedGroup { + #region CTOR + public Menu () : base() {} + #endregion + Orientation orientation; [XmlAttributeAttribute()][DefaultValue(Orientation.Horizontal)] - public virtual Orientation Orientation { + public Orientation Orientation { get { return orientation; } set { if (orientation == value) @@ -38,23 +42,15 @@ namespace Crow NotifyValueChanged ("Orientation", orientation); } } - bool isOpened = false; - public bool IsOpened - { - get { return isOpened; } - set - { - isOpened = value; - System.Diagnostics.Debug.WriteLine ("is opened = " + isOpened); - } - } - - public Menu () : base() + bool autoOpen = false; + [XmlIgnore]public bool AutomaticOpenning { + get { return autoOpen; } + set { autoOpen = value; } } public override void AddItem (GraphicObject g) - { + { base.AddItem (g); if (orientation == Orientation.Horizontal) @@ -65,7 +61,7 @@ namespace Crow public override void onMouseLeave (object sender, MouseMoveEventArgs e) { base.onMouseLeave (sender, e); - IsOpened = false; + AutomaticOpenning = false; } } } |