public Wrapper(DirectoryInfo di, Atf.Tree<FileSystemInfo> filesAndFolders) { Directory = di; FilesAndFolders = filesAndFolders; }
private int GenerateId(System.Windows.Forms.Control control, Atf.Applications.ControlInfo controlInfo, Atf.Applications.IControlHostClient client) { int clientType = client.GetType().Name.GetHashCode(); int controlType = control.GetType().Name.GetHashCode(); int controlName = controlInfo.Name.GetHashCode(); return clientType ^ controlType ^ controlName; }
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); } }