Пример #1
0
        public virtual void OnDetached(bool recursive)
        {
            /* detach children */
            if (recursive && IsCompound)
            {
                foreach (DockObject child in Children)
                {
                    child.Detach(recursive);
                }
            }

            /* detach the object itself */
            flags &= ~(DockObjectFlags.Attached);
            DockObject parent = ParentObject;

            if (Parent != null && Parent is Container)
            {
                ((Container)Parent).Remove(this);
            }

            if (parent != null)
            {
                parent.Reduce();
            }
        }
Пример #2
0
        public virtual void OnDetached(bool recursive)
        {
            /* detach children */
            if (recursive && IsCompound) {
                foreach (DockObject child in Children) {
                    child.Detach (recursive);
                }
            }

            /* detach the object itself */
            flags &= ~(DockObjectFlags.Attached);
            DockObject parent = ParentObject;
            if (Parent != null && Parent is Container)
                ((Container)Parent).Remove (this);

            if (parent != null)
                parent.Reduce ();
        }