示例#1
0
 protected virtual void LayoutChild(IWindowsElement child, Rectangle bounds)
 {
     if ((child != null) && child.GetVisible())
     {
         child.Layout(Control.DisplayRectangle);
     }
 }
示例#2
0
 protected override void RemoveChild(INode child)
 {
     base.RemoveChild(child);
     if (child == _rootElement)
     {
         _rootElement = null;
     }
 }
示例#3
0
 protected override void AddChild(INode child)
 {
     base.AddChild(child);
     if (child is IWindowsElement)
     {
         _rootElement = (IWindowsElement)child;
     }
 }
示例#4
0
        protected override void LayoutChild(IWindowsElement child, Rectangle bounds)
        {
            if ((child != null) && child.GetVisible())
            {
                switch (TitleAlignment)
                {
                case TitleAlignment.Top: bounds.Height -= _labelPixelSize.Height + LabelVSpacing; break;

                case TitleAlignment.Left: bounds.Width -= _labelPixelSize.Width + LabelHSpacing; break;
                }
                child.Layout(new Rectangle(Control.DisplayRectangle.Location, bounds.Size - (Control.Size - Control.DisplayRectangle.Size)));
            }
        }
示例#5
0
 protected override void RemoveChild(INode child)
 {
     _child = null;
     base.RemoveChild(child);
 }
示例#6
0
 protected override void AddChild(INode child)
 {
     base.AddChild(child);
     _child = (IWindowsElement)child;
 }
示例#7
0
 private void UpdateActiveControl(IWindowsElement node)
 {
     _form.SetHintText((node != null) ? node.GetHint() : String.Empty);
     _form.UpdateStatusText();
 }
示例#8
0
 public FocusChangedEvent(IWindowsElement node)
 {
     _node = node;
 }