Created
April 12, 2011 08:09
-
-
Save Superbil/915142 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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