Exemplo n.º 1
0
        public virtual bool Remove(Drawable drawable, bool dispose = true)
        {
            if (drawable == null)
            {
                return(false);
            }

            if (AddTarget != this)
            {
                return(AddTarget.Remove(drawable, dispose));
            }

            bool result = children.Remove(drawable);

            drawable.Parent = null;

            if (dispose && drawable.IsDisposable)
            {
                drawable.Dispose();
            }
            else
            {
                drawable.Invalidate();
            }

            return(result);
        }
Exemplo n.º 2
0
        protected bool Remove(Drawable p, bool dispose = true)
        {
            if (p == null)
            {
                return(false);
            }

            bool result = internalChildren.Remove(p);

            Invalidate();
            p.Parent = null;

            if (dispose && p.IsDisposable)
            {
                p.Dispose();
            }
            else
            {
                p.Invalidate();
            }

            return(result);
        }
Exemplo n.º 3
0
        public virtual bool Remove(Drawable p, bool dispose = true)
        {
            if (p == null)
            {
                return(false);
            }

            bool result = children.Remove(p);

            p.Parent = null;

            if (dispose && p.IsDisposable)
            {
                p.Dispose();
            }
            else
            {
                p.Invalidate();
            }

            return(result);
        }