Skip to content

Instantly share code, notes, and snippets.

@Superbil
Created April 12, 2011 08:09
Show Gist options
  • Save Superbil/915142 to your computer and use it in GitHub Desktop.
Save Superbil/915142 to your computer and use it in GitHub Desktop.
private IEnumerable<TreeNode> getAllFileTreeNode(TreeNodeCollection nodes)
{
foreach (TreeNode f in nodes)
{
if (f.Nodes.Count > 0)
{
foreach (TreeNode subNode in getAllFileTreeNode(f.Nodes))
yield return subNode;
}
yield return f;
}
}
foreach (TreeNode node in getAllFileTreeNode(PMTreeView.Nodes))
if (node is FileNode)
OnAfterAddFileNode(new FileNodeArgs(node));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment