public string GetPath()
        {
            string result = "";

            TreeViewFolderItem node = this;

            while (node != null)
            {
                result = node.Title + "\\" + result;
                node   = node.Parent;
            }

            try
            {
                result = result.Substring(result.IndexOf('\\') + 1);
            }
            catch
            {
                result = "";
            }

            return(result);
        }
 public TreeViewFolderItem(string title, TreeViewFolderItem parent)
 {
     Title  = title;
     Parent = parent;
 }
示例#3
0
 public FolderSelectedEventArgs(TreeViewFolderItem folderItem)
 {
     FolderName = folderItem.Title;
     FolderPath = folderItem.GetPath();
 }
 public TreeViewDriveItem(string title, TreeViewFolderItem parent)
     : base(title, parent)
 {
 }
示例#5
0
 private void Raise_FolderSelected(TreeViewFolderItem folderItem)
 {
     FolderSelected?.Invoke(this, new FolderSelectedEventArgs(folderItem));
 }