Esempio n. 1
0
 internal bool IsParentRecursive(DiscSpaceRectangle rectangle)
 {
     if (rectangle == null)
     {
         return(false);
     }
     if (this == rectangle)
     {
         return(true);
     }
     if (rectangle.IsVisibleRoot)
     {
         return(false);
     }
     return(IsParentRecursive(rectangle.ParentRectangle));
 }
Esempio n. 2
0
        public override void Create(DiscSpace space)
        {
            base.Create(space);
            if (_uiContext == null)
            {
                _uiContext = System.Threading.SynchronizationContext.Current;
            }

            var rectangle = (DiscSpaceRectangle)space;

            if (VisibleRoot == null || VisibleRoot.IsParentRecursive(rectangle))
            {
                if (!Rectangles.Contains(rectangle))
                {
                    Rectangles.Add(rectangle);
                }
            }
            if (space.Parent == null)
            {
                _VisibleRoot = rectangle;
            }
            Debug.Assert(rectangle.ManagerRectangle != null);
        }