Esempio n. 1
0
        /// <summary>
        /// Filles the treenode.
        /// </summary>
        /// <param name="treeView">Which treeview to fill</param>
        private void ListDirectory(TreeView treeView)
        {
            // Get the TreeView ready for node creation.
            treeView.BeginUpdate();
            treeView.Nodes.Clear();
            TreeNode[] nodes = _fileSystemInterface.UpdateDirectoryTree();
            treeView.Nodes.AddRange(nodes);

            // Notify the TreeView to resume painting.
            treeView.EndUpdate();
        }
Esempio n. 2
0
        private void CreateNodes()
        {
            // Get the TreeView ready for node creation.
            dirTreeView.BeginUpdate();
            dirTreeView.Nodes.Clear();

            var nodes = fsi.UpdateDirectoryTree(new DirectoryProvider(_config));

            dirTreeView.Nodes.AddRange(nodes);

            // Notify the TreeView to resume painting.
            dirTreeView.EndUpdate();
            dirTreeView.SelectedNode = FindTreeNodeText(dirTreeView.Nodes, Path.GetFileName(_config["PassDirectory"]));
            FillFileList(_config["PassDirectory"]);
        }
Esempio n. 3
0
        /// <summary>
        /// Filles the treenode.
        /// </summary>
        /// <param name="treeView">Which treeview to fill</param>
        /// <param name="rootDirectoryInfo">Which directory</param>
        private void ListDirectory(TreeView treeView, DirectoryInfo rootDirectoryInfo)
        {
            // Get the TreeView ready for node creation.
            treeView.BeginUpdate();
            treeView.Nodes.Clear();
            FileSystemInterface fsi = new FileSystemInterface(rootDirectoryInfo.FullName);
            TreeNode[] nodes = fsi.UpdateDirectoryTree(rootDirectoryInfo);
            treeView.Nodes.AddRange(nodes);

            // Notify the TreeView to resume painting.
            treeView.EndUpdate();
        }