diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-06 08:01:25 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-06 08:01:25 +0100 |
| commit | 6577bc6e136c7440117bd7bb49cb4a4fd3fbcfa3 (patch) | |
| tree | cf104fa3c2430f286848133cf1c20d7b34382581 /src/GraphicObjects/GenericStack.cs | |
| parent | 643d44f381962d6814d3676cee322c41018406eb (diff) | |
use LayoutingType Enum everywhere instead of casting to (int)
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
| -rw-r--r-- | src/GraphicObjects/GenericStack.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index e2bdcf7a..7bdb3b56 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -31,13 +31,13 @@ namespace Crow public override T addChild<T> (T child) { T tmp = base.addChild (child); - this.RegisterForLayouting ((int)LayoutingType.PositionChildren); + this.RegisterForLayouting (LayoutingType.PositionChildren); return tmp; } public override void removeChild (GraphicObject child) { base.removeChild (child); - this.RegisterForLayouting ((int)LayoutingType.PositionChildren); + this.RegisterForLayouting (LayoutingType.PositionChildren); } #region Public Properties @@ -96,13 +96,13 @@ namespace Crow foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) { c.Slot.X = d; d += c.Slot.Width + Spacing; - c.RegisterForLayouting ((int)LayoutingType.Y); + c.RegisterForLayouting (LayoutingType.Y); } } else { foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) { c.Slot.Y = d; d += c.Slot.Height + Spacing; - c.RegisterForLayouting ((int)LayoutingType.X); + c.RegisterForLayouting (LayoutingType.X); } } bmp = null; @@ -177,9 +177,9 @@ namespace Crow if (Orientation == Orientation.Horizontal){ if(layoutType == LayoutingType.Width) - this.RegisterForLayouting ((int)LayoutingType.PositionChildren); + this.RegisterForLayouting (LayoutingType.PositionChildren); }else if (layoutType == LayoutingType.Height) - this.RegisterForLayouting ((int)LayoutingType.PositionChildren); + this.RegisterForLayouting (LayoutingType.PositionChildren); } public override void OnChildLayoutChanges (object sender, LayoutChangeEventArgs arg) { @@ -194,15 +194,15 @@ namespace Crow case LayoutingType.Width: if (Orientation == Orientation.Horizontal) { if (this.Bounds.Width < 0) - this.RegisterForLayouting ((int)LayoutingType.Width); - this.RegisterForLayouting ((int)LayoutingType.PositionChildren); + this.RegisterForLayouting (LayoutingType.Width); + this.RegisterForLayouting (LayoutingType.PositionChildren); } break; case LayoutingType.Height: if (Orientation == Orientation.Vertical) { if (this.Bounds.Height < 0) - this.RegisterForLayouting ((int)LayoutingType.Height); - this.RegisterForLayouting ((int)LayoutingType.PositionChildren); + this.RegisterForLayouting (LayoutingType.Height); + this.RegisterForLayouting (LayoutingType.PositionChildren); } break; } |