private void FolderTreeView_DoubleClick(object sender, System.EventArgs e)
        {
            FolderTreeNode ftn = this.SelectedNode as FolderTreeNode;

            //			ftn.Open();
            ftn.Expand();
        }
Ejemplo n.º 2
0
 private void treeView_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         FolderTreeNode ftn = tvFolders.SelectedNode as FolderTreeNode;
         ReplaceListViewContents(ftn);
     }
 }
 private void FolderTreeView_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
 {
     if (e.KeyChar == '\n')
     {
         FolderTreeNode ftn = this.SelectedNode as FolderTreeNode;
         //				ftn.Open();
         ftn.Expand();
     }
 }
        private void FolderTreeView_BeforeCollapse(object sender, System.Windows.Forms.TreeViewCancelEventArgs e)
        {
            TreeNode       node       = e.Node;
            FolderTreeNode folderNode = node as FolderTreeNode;

            if (folderNode != null)
            {
                folderNode.RemoveSubFolders();
            }
        }
Ejemplo n.º 5
0
        private void ReplaceListViewContents(FolderTreeNode ftn)
        {
            string path = ftn.FolderPath;

            lvFiles.Items.Clear();
            DirectoryInfo info = new DirectoryInfo(ftn.FolderPath);

            foreach (FileInfo file in info.GetFiles())
            {
                lvFiles.Items.Add(file.Name);
            }
        }
Ejemplo n.º 6
0
        private void treeView_DoubleClick(object sender, System.EventArgs e)
        {
            FolderTreeNode ftn = tvFolders.SelectedNode as FolderTreeNode;

            ReplaceListViewContents(ftn);
        }