private static void AddFilesAndFoldersToRoot(TreeNode rootNode, Atf.Tree <FileSystemInfo> filesAndFolders) { foreach (var child in filesAndFolders.Children) { var childNode = new TreeNode(child.Value.Name) { Tag = child.Value, ToolTipText = child.Value.FullName }; rootNode.Nodes.Add(childNode); if (child.Value.IsDirectory()) { childNode.ImageIndex = s_folderImageIdx; childNode.SelectedImageIndex = childNode.ImageIndex; } else { childNode.ImageKey = GetImageKeyFromExtension(child.Value.Extension); childNode.SelectedImageKey = childNode.ImageKey; } AddFilesAndFoldersToRoot(childNode, child); } }
public Wrapper(DirectoryInfo di, Atf.Tree <FileSystemInfo> filesAndFolders) { Directory = di; FilesAndFolders = filesAndFolders; }