#endregion
#region GraphicObject Overrides
- public override bool ArrangeChildren { get { return true; } }
- public override void ChildrenLayoutingConstraints (ref LayoutingType layoutType) {
+ public override bool ArrangeChildren => true;
+ public override void ChildrenLayoutingConstraints (ILayoutable layoutable, ref LayoutingType layoutType) {
//Prevent child repositionning in the direction of stacking
if (Orientation == Orientation.Horizontal)
layoutType &= (~LayoutingType.X);
return base.UpdateLayout (layoutType);
}
+ //force computed slot for child
+ protected void setChildWidth (Widget w, int newW) {
+ if (w.MaximumSize.Width > 0)
+ newW = Math.Min (newW, w.MaximumSize.Width);
+
+ if (newW == w.Slot.Width)
+ return;
+
+ w.Slot.Width = newW;
+ w.IsDirty = true;
+ w.LayoutChanged -= OnChildLayoutChanges;
+ w.OnLayoutChanges (LayoutingType.Width);
+ w.LayoutChanged += OnChildLayoutChanges;
+ w.LastSlots.Width = w.Slot.Width;
+ }
+ protected void setChildHeight (Widget w, int newH) {
+ if (w.MaximumSize.Height > 0)
+ newH = Math.Min (newH, w.MaximumSize.Height);
+
+ if (newH == w.Slot.Height)
+ return;
+ w.Slot.Height = newH;
+ w.IsDirty = true;
+ w.LayoutChanged -= OnChildLayoutChanges;
+ w.OnLayoutChanges (LayoutingType.Height);
+ w.LayoutChanged += OnChildLayoutChanges;
+ w.LastSlots.Height = w.Slot.Height;
+ }
void adjustStretchedGo (LayoutingType lt) {
if (stretchedGO == null)
return;
- if (lt == LayoutingType.Width) {
- int newW = Math.Max (
- this.ClientRectangle.Width - contentSize.Width - Spacing * (Children.Count - 1),
- stretchedGO.MinimumSize.Width);
- if (stretchedGO.MaximumSize.Width > 0)
- newW = Math.Min (newW, stretchedGO.MaximumSize.Width);
- if (newW != stretchedGO.Slot.Width) {
- stretchedGO.Slot.Width = newW;
- stretchedGO.IsDirty = true;
- stretchedGO.LayoutChanged -= OnChildLayoutChanges;
- stretchedGO.OnLayoutChanges (LayoutingType.Width);
- stretchedGO.LayoutChanged += OnChildLayoutChanges;
- stretchedGO.LastSlots.Width = stretchedGO.Slot.Width;
- }
- } else {
- int newH = Math.Max (
- this.ClientRectangle.Height - contentSize.Height - Spacing * (Children.Count - 1),
- stretchedGO.MinimumSize.Height);
- if (stretchedGO.MaximumSize.Height > 0)
- newH = Math.Min (newH, stretchedGO.MaximumSize.Height);
- if (newH != stretchedGO.Slot.Height) {
- stretchedGO.Slot.Height = newH;
- stretchedGO.IsDirty = true;
- stretchedGO.LayoutChanged -= OnChildLayoutChanges;
- stretchedGO.OnLayoutChanges (LayoutingType.Height);
- stretchedGO.LayoutChanged += OnChildLayoutChanges;
- stretchedGO.LastSlots.Height = stretchedGO.Slot.Height;
- }
- }
+ if (lt == LayoutingType.Width)
+ setChildWidth (stretchedGO, Math.Max (
+ ClientRectangle.Width - contentSize.Width - Spacing * (Children.Count - 1), stretchedGO.MinimumSize.Width));
+ else
+ setChildHeight (stretchedGO, Math.Max (
+ ClientRectangle.Height - contentSize.Height - Spacing * (Children.Count - 1), stretchedGO.MinimumSize.Height));
}
public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) {
//
// return tmp;
// }
- public override void ChildrenLayoutingConstraints (ref LayoutingType layoutType)
+ public override void ChildrenLayoutingConstraints (ILayoutable layoutable, ref LayoutingType layoutType)
{
//Prevent child repositionning
layoutType &= (~LayoutingType.Positioning);
-// Copyright (c) 2013-2020 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+// Copyright (c) 2013-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
bool _multiSelect = false;
List<Widget> children = new List<Widget>();
- public virtual List<Widget> Children {
- get { return children; }
- }
+ public virtual List<Widget> Children => children;
[DefaultValue(false)]
public bool MultiSelect
{
- get { return _multiSelect; }
+ get => _multiSelect;
set { _multiSelect = value; }
}
public virtual void AddChild(Widget g){
protected override void UpdateCache (Context ctx)
{
if (!Clipping.IsEmpty) {
- Context gr = new Context (bmp);
- for (int i = 0; i < Clipping.NumRectangles; i++)
- gr.Rectangle(Clipping.GetRectangle(i));
- gr.ClipPreserve();
- gr.Operator = Operator.Clear;
- gr.Fill();
- gr.Operator = Operator.Over;
-
- base.onDraw (gr);
-
- if (ClipToClientRect) {
- CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
- gr.Clip ();
- }
+ using (Context gr = new Context (bmp)) {
+ for (int i = 0; i < Clipping.NumRectangles; i++)
+ gr.Rectangle(Clipping.GetRectangle(i));
+ gr.ClipPreserve();
+ gr.Operator = Operator.Clear;
+ gr.Fill();
+ gr.Operator = Operator.Over;
+
+ base.onDraw (gr);
+
+ if (ClipToClientRect) {
+ CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
+ gr.Clip ();
+ }
+
+ childrenRWLock.EnterReadLock ();
+
+ foreach (Widget c in Children) {
+ if (!c.Visible)
+ continue;
+ if (Clipping.Contains (c.Slot + ClientRectangle.Position) == RegionOverlap.Out)
+ continue;
+ c.Paint (gr);
+ }
- childrenRWLock.EnterReadLock ();
+ childrenRWLock.ExitReadLock ();
- foreach (Widget c in Children) {
- if (!c.Visible)
- continue;
- if (Clipping.Contains (c.Slot + ClientRectangle.Position) == RegionOverlap.Out)
- continue;
- c.Paint (gr);
+ #if DEBUG_CLIP_RECTANGLE
+ /*gr.LineWidth = 1;
+ gr.SetSourceColor(Color.DarkMagenta.AdjustAlpha (0.8));
+ for (int i = 0; i < Clipping.NumRectangles; i++)
+ gr.Rectangle(Clipping.GetRectangle(i));
+ gr.Stroke ();*/
+ #endif
}
-
- childrenRWLock.ExitReadLock ();
-
- #if DEBUG_CLIP_RECTANGLE
- /*gr.LineWidth = 1;
- gr.SetSourceColor(Color.DarkMagenta.AdjustAlpha (0.8));
- for (int i = 0; i < Clipping.NumRectangles; i++)
- gr.Rectangle(Clipping.GetRectangle(i));
- gr.Stroke ();*/
- #endif
- gr.Dispose ();
Clipping.Reset ();
}/*else
Console.WriteLine("GROUP REPAINT WITH EMPTY CLIPPING");*/
[XmlIgnore]
public override Orientation Orientation
{
- get { return Orientation.Horizontal; }
+ get => Orientation.Horizontal;
+ set { base.Orientation = Orientation.Horizontal; }
}
}
}
-//
-// ILayoutable.cs
+// Copyright (c) 2013-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
using System;
using System.Collections.Generic;
bool ArrangeChildren { get; }
LayoutingType RegisteredLayoutings { get; set; }
+ void ChildrenLayoutingConstraints(ILayoutable layoutable, ref LayoutingType layoutType);
void RegisterForLayouting(LayoutingType layoutType);
void RegisterClip(Rectangle clip);
bool UpdateLayout(LayoutingType layoutType);
/// Top container to use as ItemTemplate's root for TemplatedGroups (lists, treeviews, ...) that add selection
/// status and events
/// </summary>
- public class ListItem : Container
+ public class ListItem : Container, ISelectable
{
#region CTOR
public ListItem (){}
if (value != null) {
GenericStack gs = value as GenericStack;
if (gs == null)
- throw new Exception ("Splitter may only be chil of stack");
+ throw new Exception ("Splitter may only be child of stack");
}
base.Parent = value;
-// Copyright (c) 2019 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+// Copyright (c) 2019-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
using System;
+using System.ComponentModel;
+using System.Linq;
+using Crow.Cairo;
+
namespace Crow
{
/// <summary>
#endregion
string caption;
- Measure width = Measure.Inherit;
+ Measure width = Measure.Fit;
+ //public int ComputedWidth;
+ public Widget LargestWidget;
public string Caption {
get => caption;
}
}
- //public string Data {
-
- //}
+ public static Column Parse (string str) {
+ if (string.IsNullOrEmpty (str))
+ return null;
+ Column c = new Column();
+ string[] tmp = str.Split (',');
+ c.Caption = tmp[0];
+ if (tmp.Length > 1)
+ c.Width = Measure.Parse (tmp[1]);
+ return c;
+ }
}
- public class Table : TemplatedGroup
+ public class Table : VerticalStack
{
#region CTOR
public Table () {}
public Table (Interface iface, string style = null) : base (iface, style) { }
#endregion
- public ObservableList<Column> Columns = new ObservableList<Column> ();
- }
+ //int lineWidth;
+ ObservableList<Column> columns = new ObservableList<Column>();
+
+ /*[DefaultValue (1)]
+ public int LineWidth {
+ get => lineWidth;
+ set {
+ if (lineWidth == value)
+ return;
+ lineWidth = value;
+ NotifyValueChangedAuto (lineWidth);
+ RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren);
+ }
+ }*/
+
+ public ObservableList<Column> Columns {
+ get => columns;
+ set {
+ if (columns == value)
+ return;
+ columns = value;
+ NotifyValueChangedAuto(columns);
+ }
+ }
+ public override void AddChild (Widget child) {
+ TableRow tr = child as TableRow;
+ if (tr == null)
+ throw new Exception ("Table widget accept only TableRow as child.");
+ base.AddChild (child);
+ }
+ /*public override void ChildrenLayoutingConstraints(ILayoutable layoutable, ref LayoutingType layoutType)
+ {
+ //trigger layouting for width only in the first row, the other will be set at the same horizontal position and width.
+ if (layoutable == Children[0])
+ layoutType &= (~LayoutingType.X);
+ else
+ layoutType &= (~(LayoutingType.X|LayoutingType.Width));
+ }*/
+
+ public override void ComputeChildrenPositions () {
+ int d = 0;
+ childrenRWLock.EnterReadLock();
+ foreach (Widget c in Children) {
+ if (!c.Visible)
+ continue;
+ c.Slot.Y = d;
+ d += c.Slot.Height + Spacing;
+ }
+ childrenRWLock.ExitReadLock();
+ IsDirty = true;
+ }
+ public override bool UpdateLayout(LayoutingType layoutType)
+ {
+ RegisteredLayoutings &= (~layoutType);
+
+ if (layoutType == LayoutingType.Width) {
+ foreach (TableRow row in Children) {
+ for (int i = 0; i < Columns.Count && i < row.Children.Count; i++)
+ row.Children[i].Width = Columns[i].Width;
+ }
+ }
+ return base.UpdateLayout(layoutType);
+ }
+
+ /*public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) {
+ TableRow row = sender as TableRow;
+ TableRow firstRow = Children[0] as TableRow;
+
+ if (arg.LayoutType == LayoutingType.Width) {
+ if (row == firstRow) {
+ base.OnChildLayoutChanges (sender, arg);
+ foreach (TableRow r in Children.Skip(1)) {
+ r.contentSize = firstRow.contentSize;
+ setChildWidth (r, firstRow.Slot.Width);
+ }
+ }
+ }
+
+ base.OnChildLayoutChanges (sender, arg);
+ }*/
+ /*protected override void onDraw (Context gr) {
+ DbgLogger.StartEvent (DbgEvtType.GODraw, this);
+
+ base.onDraw (gr);
+
+ if (Children.Count > 0) {
+
+ Rectangle cb = ClientRectangle;
+ TableRow fr = Children[0] as TableRow;
+
+
+ gr.LineWidth = lineWidth;
+ Foreground.SetAsSource (IFace, gr, cb);
+ CairoHelpers.CairoRectangle (gr, cb, CornerRadius, lineWidth);
+ double x = 0.5 + cb.Left + fr.Margin + 0.5 * fr.Spacing + fr.Children[0].Slot.Width;
+ for (int i = 1; i < fr.Children.Count ; i++)
+ {
+ gr.MoveTo (x, cb.Y);
+ gr.LineTo (x, cb.Bottom);
+ x += fr.Spacing + fr.Children[i].Slot.Width ;
+ }
+
+ //horizontal lines
+ x = 0.5 + cb.Top + 0.5 * Spacing + Children[0].Slot.Height;
+ for (int i = 0; i < Children.Count - 1; i++)
+ {
+ gr.MoveTo (cb.Left, x);
+ gr.LineTo (cb.Right, x);
+ x += Spacing + Children[i].Slot.Height ;
+ }
+ gr.Stroke ();
+ }
+
+ DbgLogger.EndEvent (DbgEvtType.GODraw);
+ }*/
+ }
}
--- /dev/null
+using System.Linq;
+// Copyright (c) 2019-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+using System;
+using System.ComponentModel;
+
+namespace Crow
+{
+ public class TableRow : HorizontalStack, ISelectable {
+ #region ISelectable implementation
+ bool isSelected;
+
+ public event EventHandler Selected;
+ public event EventHandler Unselected;
+
+ [DefaultValue (false)]
+ public virtual bool IsSelected {
+ get { return isSelected; }
+ set {
+ if (isSelected == value)
+ return;
+ isSelected = value;
+
+ if (isSelected)
+ Selected.Raise (this, null);
+ else
+ Unselected.Raise (this, null);
+
+ NotifyValueChangedAuto (isSelected);
+ }
+ }
+ #endregion
+
+ int spacing;
+
+ public Table Table => Parent as Table;
+
+ /*public override void ChildrenLayoutingConstraints(ILayoutable layoutable, ref LayoutingType layoutType)
+ {
+ //trigger layouting for width only in the first row, the other will be set at the same horizontal position and width.
+ if (Table == null) {
+ base.ChildrenLayoutingConstraints (layoutable, ref layoutType);
+ return;
+ }
+ if (this == Table.Children[0])
+ layoutType &= (~LayoutingType.X);
+ else
+ layoutType &= (~(LayoutingType.X|LayoutingType.Width));
+ }*/
+
+ public override void ComputeChildrenPositions () {
+ if (Children.Count == 0)
+ return;
+ int spacing = Table.Spacing;
+ ObservableList<Column> cols = Table.Columns;
+
+ //int d = 0;
+ Widget first = Children[0];
+ TableRow firstRow = Table.Children[0] as TableRow;
+ if (firstRow == this) {
+ base.ComputeChildrenPositions();
+ return;
+ }
+ childrenRWLock.EnterReadLock();
+ for (int i = 0; i < Children.Count && i < firstRow.Children.Count; i++)
+ {
+ Widget w = Children[i];
+ w.Slot.X = firstRow.Children[i].Slot.X;
+ setChildWidth (w, firstRow.Children[i].Slot.Width);
+ //d += spacing + firstRow.Children[i].Slot.Width;
+ }
+
+ childrenRWLock.ExitReadLock();
+ IsDirty = true;
+ }
+
+ public override bool UpdateLayout(LayoutingType layoutType)
+ {
+ RegisteredLayoutings &= (~layoutType);
+
+ if (Table == null)
+ return false;
+ TableRow firstRow = Table.Children[0] as TableRow;
+ if (layoutType == LayoutingType.Width) {
+ if (firstRow.RegisteredLayoutings.HasFlag (LayoutingType.Width))
+ return false;
+ if (this != firstRow) {
+ //contentSize = firstRow.contentSize;
+ Slot.Width = firstRow.Slot.Width;
+ if (Slot.Width != LastSlots.Width) {
+ IsDirty = true;
+ OnLayoutChanges (layoutType);
+ LastSlots.Width = Slot.Width;
+ }
+ if (RegisteredLayoutings == LayoutingType.None && IsDirty)
+ IFace.EnqueueForRepaint (this);
+
+ return true;
+ }
+ }
+
+ return base.UpdateLayout(layoutType);
+ }
+ /*public override int measureRawSize (LayoutingType lt) {
+ if (lt == LayoutingType.Width) {
+ if (Table == null)
+ return -1;
+ TableRow firstRow = Table.Children[0] as TableRow;
+ if (this != firstRow) {
+ if (firstRow.RegisteredLayoutings.HasFlag (LayoutingType.Width))
+ return -1;
+ contentSize = firstRow.contentSize;
+ return firstRow.measureRawSize (lt);
+ }
+
+ }
+ return base.measureRawSize (lt);
+ }*/
+ public override void OnLayoutChanges(LayoutingType layoutType)
+ {
+ base.OnLayoutChanges(layoutType);
+ }
+ /*public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) {
+ Widget go = sender as Widget;
+ TableRow row = go.Parent as TableRow;
+ TableRow firstRow = Table.Children[0] as TableRow;
+
+ if (arg.LayoutType == LayoutingType.Width) {
+ if (row == firstRow) {
+ base.OnChildLayoutChanges (sender, arg);
+ int idx = Children.IndexOf (go);
+ foreach (TableRow r in Table.Children.Skip(1)) {
+ if (idx < r.Children.Count)
+ r.setChildWidth (r.Children[idx], go.Slot.Width);
+ r.contentSize = firstRow.contentSize;
+ }
+ } //else
+ this.RegisterForLayouting (LayoutingType.ArrangeChildren);
+ return;
+ }
+
+ base.OnChildLayoutChanges (sender, arg);
+ }*/
+ }
+}
}
internal virtual void itemClick(object sender, MouseButtonEventArgs e){
//SelectedIndex = (int)((IList)data)?.IndexOf((sender as Widget).DataSource);
- if (selectedItemContainer is ListItem li)
+ if (selectedItemContainer is ISelectable li)
li.IsSelected = false;
selectedItemContainer = sender as Widget;
- if (selectedItemContainer is ListItem nli)
+ if (selectedItemContainer is ISelectable nli)
nli.IsSelected = true;
if (selectedItemContainer == null)
return;
-// Copyright (c) 2013-2020 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+// Copyright (c) 2013-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
[XmlIgnore]
public override Orientation Orientation {
- get => Orientation.Vertical;
+ get => Orientation.Vertical;
+ set { base.Orientation = Orientation.Vertical; }
}
}
}
/// <summary>
/// If true, rendering of GraphicObject is clipped inside client rectangle
/// </summary>
- [DesignCategory ("Appearance")][DefaultValue(true)]
+ [DesignCategory ("Appearance")][DefaultValue(false)]
public virtual bool ClipToClientRect {
get { return clipToClientRect; }
set {
return lt == LayoutingType.Width ?
contentSize.Width + 2 * margin: contentSize.Height + 2 * margin;
}
- /// <summary> By default in groups, LayoutingType.ArrangeChildren is reset </summary>
- public virtual void ChildrenLayoutingConstraints(ref LayoutingType layoutType){
- }
internal bool firstUnresolvedFitWidth (out Widget ancestorInUnresolvedFit)
{
}
public virtual bool ArrangeChildren { get { return false; } }
+ /// <summary>
+ /// Used to prevent some layouting type in children. For example, in the GenericStack,
+ /// x layouting is dismissed in the direction of the stacking to let the parent
+ /// arrange children in the x direction.
+ /// </summary>
+ /// <param name="layoutable">The children that is calling the constraints</param>
+ /// <param name="layoutType">The currently registering layouting types</param>
+ public virtual void ChildrenLayoutingConstraints(ILayoutable layoutable, ref LayoutingType layoutType){ }
/// <summary> Query a layouting for the type pass as parameter, redraw only if layout changed. </summary>
public virtual void RegisterForLayouting(LayoutingType layoutType){
-#if DEBUG
+#if DEBUG_LOG
if (disposed) {
- System.Diagnostics.Debug.WriteLine ($"RegisterForLayouting({layoutType}) for disposed Widget: {this}\n{System.Environment.StackTrace}");
+ DbgLogger.AddEvent (DbgEvtType.GORegisterLayouting | DbgEvtType.AlreadyDisposed, this);
return;
}
#endif
layoutType &= (~LayoutingType.ArrangeChildren);
//apply constraints depending on parent type
- if (Parent is Widget)
- (Parent as Widget).ChildrenLayoutingConstraints (ref layoutType);
+ Parent.ChildrenLayoutingConstraints (this, ref layoutType);
// //prevent queueing same LayoutingType for this
layoutType &= (~RegisteredLayoutings);
return false;
//size constrain
- if (Slot.Width < minimumSize.Width) {
- Slot.Width = minimumSize.Width;
- //NotifyValueChanged ("WidthPolicy", Measure.Stretched);
- } else if (Slot.Width > maximumSize.Width && maximumSize.Width > 0) {
+ if (Slot.Width < minimumSize.Width)
+ Slot.Width = minimumSize.Width;
+ else if (maximumSize.Width > 0 && Slot.Width > maximumSize.Width)
Slot.Width = maximumSize.Width;
- //NotifyValueChanged ("WidthPolicy", Measure.Stretched);
- }
+
} else
Slot.Width = 0;
return false;
//size constrain
- if (Slot.Height < minimumSize.Height) {
+ if (Slot.Height < minimumSize.Height)
Slot.Height = minimumSize.Height;
- //NotifyValueChanged ("HeightPolicy", Measure.Stretched);
- } else if (Slot.Height > maximumSize.Height && maximumSize.Height > 0) {
+ else if (maximumSize.Height > 0 && Slot.Height > maximumSize.Height)
Slot.Height = maximumSize.Height;
- //NotifyValueChanged ("HeightPolicy", Measure.Stretched);
- }
+
} else
Slot.Height = 0;
Console.ForegroundColor = ConsoleColor.Magenta;
if (!isVisible)
System.Diagnostics.Debug.WriteLine ($"Paint invisible widget: {this}");
- Console.ForegroundColor = ConsoleColor.Gray;
+ Console.ResetColor ();
#endif
DbgLogger.AddEvent (DbgEvtType.Warning);
DbgLogger.EndEvent (DbgEvtType.GOPaint);
#endregion
#region Group Overrides
- public override void ChildrenLayoutingConstraints (ref LayoutingType layoutType)
+ public override void ChildrenLayoutingConstraints (ILayoutable layoutable, ref LayoutingType layoutType)
{
layoutType &= (~LayoutingType.Positioning);
}
crowContainer.SetChild (g);
g.DataSource = this;
}
- } catch (InstantiatorException itorex) {
- //Console.WriteLine (itorex);
+ } catch (InstantiatorException itorex) {
+ Console.ForegroundColor = ConsoleColor.DarkRed;
+ Console.WriteLine (itorex);
+ Console.ResetColor();
showError (itorex.InnerException);
} catch (Exception ex) {
- //Console.WriteLine (ex);
+ Console.ForegroundColor = ConsoleColor.DarkRed;
+ Console.WriteLine (ex);
+ Console.ResetColor();
showError (ex);
}
}