示例#1
0
文件: Form1.cs 项目: MarMar/SeeFlaw
 private void AddCreatedTreeRootNode(RootNode rootNode, bool add)
 {
     runTreeView.BeginUpdate();
     if (!add)
     {
         runTreeView.Nodes.Clear();
     }
     rootNode.Expand();
     runTreeView.Nodes.Add(rootNode);
     runTreeView.EndUpdate();
 }
示例#2
0
 public static void AddDirectory(RootNode rootNode, bool includeSubDirs)
 {
     if (rootNode.CanAddGroup())
     {
         FolderBrowserDialog dialog = new FolderBrowserDialog();
         dialog.SelectedPath = System.IO.Directory.GetCurrentDirectory();
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             RootNode dirNode = AddSubDirs(dialog.SelectedPath, includeSubDirs);
             if (dirNode == null)
             {
                 MessageBox.Show("No xml testfiles in directory");
             }
             else
             {
                 rootNode.Nodes.Add(dirNode);
                 rootNode.Expand();
             }
         }
     }
 }