예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }