public override PropertyEnumerator MoveNext() { do { // If we are at the far end of the collection, we can't go further if (this == RightBound) { break; } if ((Property != null) && ((Property.Visible == false) || (Property.Expanded == false))) { bool invisible = (Property.Visible == false); // We increment in the current collection PropertyVisibleSiblingEnumerator sEnumerator = new PropertyVisibleSiblingEnumerator(Node); if (!invisible) // If the property was invisible the line above will already have moved next { sEnumerator.MoveNext(); } // Test if the current level is finished while (sEnumerator == sEnumerator.RightBound) { // We can't go further if we are at the end of the root collection sEnumerator.MoveParent(); if (sEnumerator == RightBound) { break; } // Point now to the parent property and go to its next sibling property sEnumerator.MoveNext(); } Node = sEnumerator.Node; } else { base.MoveNext(); } }while ((this != RightBound) && (Property.Visible == false)); return(this); }
public override PropertyEnumerator MoveNext() { do { // If we are at the far end of the collection, we can't go further if (this == RightBound) break; if ((Property != null) && ((Property.Visible == false) || (Property.Expanded == false))) { bool invisible = (Property.Visible == false); // We increment in the current collection PropertyVisibleSiblingEnumerator sEnumerator = new PropertyVisibleSiblingEnumerator(Node); if (!invisible) // If the property was invisible the line above will already have moved next sEnumerator.MoveNext(); // Test if the current level is finished while (sEnumerator == sEnumerator.RightBound) { // We can't go further if we are at the end of the root collection sEnumerator.MoveParent(); if (sEnumerator == RightBound) break; // Point now to the parent property and go to its next sibling property sEnumerator.MoveNext(); } Node = sEnumerator.Node; } else base.MoveNext(); } while ((this != RightBound) && (Property.Visible == false)); return this; }