C# Class Open.Core.Helpers.TreeHelper

Utility methods for working with Tree data-structures.
Afficher le fichier Open project: philcockfield/Open.TestHarness.SL

Méthodes publiques

Méthode Description
DeselectChildren ( ITreeNode parent ) : int

Deselects all children of the given node.

FirstDescendent ( ITreeNode parent, FuncBool predicate ) : ITreeNode

Gets the first descendent node that matches the given predicate.

FirstRemainingParent ( ITreeNode root, ITreeNode orphan ) : ITreeNode

Retrieves the first ancestor of a node that still exists as a descendent of the root node.

Useful for when a node is removed, and you want to move a view to the reamining parent.

FirstSelectedChild ( ITreeNode parent ) : ITreeNode

Retrieves the first selected child node.

HasSelectedChild ( ITreeNode parent ) : bool

Determines whether at least one of the children of the given node are selected.

Method Details

DeselectChildren() public méthode

Deselects all children of the given node.
public DeselectChildren ( ITreeNode parent ) : int
parent ITreeNode The node to deselect the children of.
Résultat int

FirstDescendent() public méthode

Gets the first descendent node that matches the given predicate.
public FirstDescendent ( ITreeNode parent, FuncBool predicate ) : ITreeNode
parent ITreeNode The parent to look within.
predicate FuncBool The predicate used to match.
Résultat ITreeNode

FirstRemainingParent() public méthode

Retrieves the first ancestor of a node that still exists as a descendent of the root node.
Useful for when a node is removed, and you want to move a view to the reamining parent.
public FirstRemainingParent ( ITreeNode root, ITreeNode orphan ) : ITreeNode
root ITreeNode The root node.
orphan ITreeNode The orphaned node.
Résultat ITreeNode

FirstSelectedChild() public méthode

Retrieves the first selected child node.
public FirstSelectedChild ( ITreeNode parent ) : ITreeNode
parent ITreeNode The node to look within.
Résultat ITreeNode

HasSelectedChild() public méthode

Determines whether at least one of the children of the given node are selected.
public HasSelectedChild ( ITreeNode parent ) : bool
parent ITreeNode The parent to examine.
Résultat bool