示例#1
0
 public virtual void RemoveChild(ParentedElement child, bool destroy)
 {
     if (destroy)
     {
         child.Destroy();
     }
     child.Resized -= new ElementEventHandler(childResized);
     child.Moved   -= new ElementEventHandler(childMoved);
     if (ActiveChild == child)
     {
         ActiveChild = null;
     }
     Children.Remove(child);
 }
示例#2
0
        public virtual void AddChild(ParentedElement child, bool makeActive)
        {
            Children.Add(child);
            child.setParent(this);
            this.ActiveChild = child;

            child.Resized += new ElementEventHandler(childResized);
            child.Moved   += new ElementEventHandler(childMoved);

            if (makeActive)
            {
                this.ActiveChild = child;
            }
        }
示例#3
0
 /// <summary>
 /// Destroys child as well
 /// </summary>
 public void RemoveChild(ParentedElement child)
 {
     RemoveChild(child, true);
 }
示例#4
0
 public void AddChild(ParentedElement child)
 {
     AddChild(child, true);
 }