/// <summary> /// Marks a folder with the warning or deleted icon /// </summary> /// <param name="path"></param> /// <param name="iconKey"></param> internal void UpdateItemIcon(string path, DirectoryIcons iconKey) { var treeNode = this.findOrCreateDirectoryNodeByPath(path); treeNode.ImageKey = iconKey.ToString(); treeNode.SelectedImageKey = iconKey.ToString(); treeNode.EnsureVisible(); }
/// <summary> /// Marks a folder with the warning or deleted icon /// </summary> /// <param name="path"></param> /// <param name="iconKey"></param> internal void UpdateItemIcon(string path, DirectoryIcons iconKey) { var treeNode = this.findOrCreateDirectoryNodeByPath(path); treeNode.ImageKey = iconKey.ToString(); treeNode.SelectedImageKey = iconKey.ToString(); treeNode.EnsureVisible(); }
internal void AddRootNode(DirectoryInfo directory, DirectoryIcons imageKey) { this.rootPath = directory.FullName.Trim('\\'); rootNode = new TreeNode(directory.Name); rootNode.Tag = directory; rootNode.ImageKey = imageKey.ToString(); rootNode.SelectedImageKey = imageKey.ToString(); directoryToTreeNodeMapping = new Dictionary<String, TreeNode>(); directoryToTreeNodeMapping.Add(directory.FullName, rootNode); this.treeView.Nodes.Add(rootNode); }
internal void AddRootNode(DirectoryInfo directory, DirectoryIcons imageKey) { this.rootPath = directory.FullName.Trim('\\'); rootNode = new TreeNode(directory.Name); rootNode.Tag = directory; rootNode.ImageKey = imageKey.ToString(); rootNode.SelectedImageKey = imageKey.ToString(); directoryToTreeNodeMapping = new Dictionary <String, TreeNode>(); directoryToTreeNodeMapping.Add(directory.FullName, rootNode); this.treeView.Nodes.Add(rootNode); }
internal void CreateRootNode(DirectoryInfo directory, DirectoryIcons imageKey) { this.rootPath = directory.FullName.Trim('\\'); this.rootNode = new TreeNode(directory.Name) { Tag = directory, ImageKey = imageKey.ToString(), SelectedImageKey = imageKey.ToString() }; this.directoryToTreeNodeMapping = new Dictionary <String, TreeNode> { { directory.FullName, this.rootNode } }; if (this.UpdateUi) { this.AddRootNode(); } }