private void AddChildToTree(string FullFilePath) { DocumentTreeItem DTI = new DocumentTreeItem(); DTI.FileName = System.IO.Path.GetFileName(FullFilePath); DTI.Path = FullFilePath; ITreeViewItem addTreeViewItem = mTreeView.Tree.AddChildItemAndSelect(this, DTI); mTreeView.Tree.RefreshHeader(addTreeViewItem); }
List <ITreeViewItem> ITreeViewItem.Childrens() { List <ITreeViewItem> Childrens = new List <ITreeViewItem>(); AddSubFolders(Path, Childrens); //Add Current folder Docs foreach (string f in Directory.GetFiles(Path)) { DocumentTreeItem DTI = new DocumentTreeItem(); DTI.FileName = System.IO.Path.GetFileName(f); DTI.Path = f; Childrens.Add(DTI); } return(Childrens); }
List <ITreeViewItem> ITreeViewItem.Childrens() { List <ITreeViewItem> Childrens = new List <ITreeViewItem>(); AddsubFolders(Path, Childrens); if (!Directory.Exists(Path)) { Directory.CreateDirectory(Path); } //Add Docs foreach (string f in Directory.GetFiles(Path)) { DocumentTreeItem DTI = new DocumentTreeItem(); DTI.FileName = System.IO.Path.GetFileName(f); DTI.Path = f; Childrens.Add(DTI); } return(Childrens); }