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(); } } }
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); }
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(); } }
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(); }
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(); } }