コード例 #1
0
        internal PropertyVisibleDeepEnumerator(LinkedListNode node) : base(node)
        {
            // We may point to an invisible property so we must find for the first visible one after it

            // First we must ensure that all our ancestors are expanded. If not, this enumerator
            // will initially point to the upper enumerator that is collapsed
            PropertyEnumerator pEnumerator = new PropertyDeepEnumerator(Node);

            while (pEnumerator.HasParent)
            {
                pEnumerator.MoveParent();
                if ((pEnumerator.Property.Expanded == false) || (pEnumerator.Property.Visible == false))
                {
                    Node = pEnumerator.Node;
                }
            }

            if (this != LeftBound)
            {
                // Once we are on an expanded part of the tree we go to a visible property
                while ((this != RightBound) && (Property.Visible == false))
                {
                    MoveNext();
                }
            }
        }
コード例 #2
0
        public bool IsDescendantOf(PropertyEnumerator enumAncestor)
        {
            // This is an agreement that a property is not a descendant of itself
            if (this == enumAncestor)
            {
                return(false);
            }

            PropertyDeepEnumerator currentEnum = GetDeepEnumerator();

            while (currentEnum.HasParent && (enumAncestor != currentEnum))
            {
                currentEnum.MoveParent();
            }

            return(enumAncestor == currentEnum);
        }
コード例 #3
0
        internal PropertyVisibleSiblingEnumerator(LinkedListNode node) : base(node)
        {
            // We may point to an invisible property so we must find for the first visible one after it

            // First we must ensure that all our ancestors are expanded. If not, this enumerator
            // will initially point to RightBound
            PropertyEnumerator pEnumerator = new PropertyDeepEnumerator(Node);

            while (pEnumerator.HasParent)
            {
                pEnumerator.MoveParent();
                if ((pEnumerator.Property.Expanded == false) || (pEnumerator.Property.Visible == false))
                {
                    Node = RightBound.Node;
                    break;
                }
            }

            while ((this != RightBound) && (Property.Visible == false))
            {
                MoveNext();
            }
        }
コード例 #4
0
ファイル: LinkedList.cs プロジェクト: ChrisMoreton/Test3
        internal PropertyVisibleSiblingEnumerator(LinkedListNode node) : base(node)
        {
            // We may point to an invisible property so we must find for the first visible one after it

            // First we must ensure that all our ancestors are expanded. If not, this enumerator
            // will initially point to RightBound
            PropertyEnumerator pEnumerator = new PropertyDeepEnumerator(Node);
            while (pEnumerator.HasParent)
            {
                pEnumerator.MoveParent();
                if ((pEnumerator.Property.Expanded == false) || (pEnumerator.Property.Visible == false))
                {
                    Node = RightBound.Node;
                    break;
                }
            }

            while ((this != RightBound) && (Property.Visible == false))
                MoveNext();
        }
コード例 #5
0
ファイル: LinkedList.cs プロジェクト: ChrisMoreton/Test3
        internal PropertyVisibleDeepEnumerator(LinkedListNode node) : base(node)
        {
            // We may point to an invisible property so we must find for the first visible one after it

            // First we must ensure that all our ancestors are expanded. If not, this enumerator
            // will initially point to the upper enumerator that is collapsed
            PropertyEnumerator pEnumerator = new PropertyDeepEnumerator(Node);
            while (pEnumerator.HasParent)
            {
                pEnumerator.MoveParent();
                if ((pEnumerator.Property.Expanded == false) || (pEnumerator.Property.Visible == false))
                    Node = pEnumerator.Node;
            }

            if (this != LeftBound)
            {
                // Once we are on an expanded part of the tree we go to a visible property
                while ((this != RightBound) && (Property.Visible == false))
                    MoveNext();
            }
        }