SIL.FieldWorks.Common.Framework.DetailControls.SemanticDomainSelectionUtility.RecursivelyAdjustTreeNode C# (CSharp) Méthode

RecursivelyAdjustTreeNode() private static méthode

Check/Uncheck the TreeView node and recursively do this to any children nodes if the node matches the 'tag' object.
private static RecursivelyAdjustTreeNode ( DomainNode node, object tag, bool check ) : bool
node DomainNode
tag object
check bool
Résultat bool
		private static bool RecursivelyAdjustTreeNode(DomainNode node, object tag, bool check)
		{
			if ((node.Tag as ObjectLabel).Object == tag)
			{
				node.Checked = check;
				return true;
			}
			return node.Nodes.Cast<DomainNode>().Any(child => RecursivelyAdjustTreeNode(child, tag, check));
		}