Example #1
0
        private void btnLoadSrcDir_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(tbSourceDir.Text) || !Directory.Exists(tbSourceDir.Text))
            {
                MessageBox.Show("Enter valid path into Source Directory Box", "Invalid Path", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            _srcFolder = new FolderItem(new DirectoryInfo(tbSourceDir.Text));
            _FillDirectoryTree(tvwSource, _srcFolder, FolderItem.FolderDepth);
        }
Example #2
0
 private void _FillDirectoryTree(TreeView tvw, FolderItem folderItem, int nodeDepth)
 {
     tvw.Nodes.Clear();
     tvw.Nodes.Add(_GetTreeNodes(folderItem.GetDirInfo, nodeDepth));
 }
Example #3
0
 public void TestFolderItemCreate()
 {
     var folderItem = new FolderItem(new DirectoryInfo(@"c:\temp"));
     Assert.IsTrue(folderItem.GetDirInfo.Exists);
 }