/// <summary> /// Initializes an instance of the widget class /// </summary> /// <param name="control">The .NET Control that represents this widget</param> public Widget(Control control) { UIControl = control; _children = new List <Widget>(); Visible = true; Value = String.Empty; Command = String.Empty; SubClass = String.Empty; Panel = String.Empty; Colors = null; graphicsPath = null; LayoutXmlNode = null; _layout = null; Parent = null; IsCommand = false; AddForAnimation = true; IsHighlightOn = false; DrawBorder = false; IsSelectedHighlightOn = false; _enabled = true; EnabledState = EnabledStates.Enabled; _contextualWidgets = new List <Widget>(); _finder = new WidgetFinder(this); if (control != null) { widgetName = UIControl.Name; if (this is IButtonWidget) { control.MouseClick += control_MouseClick; } control.Resize += control_Resize; } else { widgetName = string.Empty; } }
/// <summary> /// Initializes an instance of the widget class /// </summary> /// <param name="control">The .NET Control that represents this widget</param> public Widget(Control control) { UIControl = control; _children = new List<Widget>(); Value = String.Empty; SubClass = String.Empty; Panel = String.Empty; Colors = null; graphicsPath = null; LayoutXmlNode = null; _layout = null; Parent = null; AddForAnimation = true; IsHighlightOn = false; DrawBorder = false; IsSelectedHighlightOn = false; _enabled = true; EnabledState = EnabledStates.Enabled; _contextualWidgets = new List<Widget>(); _finder = new WidgetFinder(this); if (control != null) { widgetName = UIControl.Name; if (this is IButtonWidget) { control.MouseClick += control_MouseClick; } control.Resize += control_Resize; } else { widgetName = string.Empty; } }