Exemple #1
0
        public void Build()
        {
            var home = FormMain.Instance.ConfigEditor.GetHome();

            Root = new Directory(home, null);
            Root.Build(home);
        }
Exemple #2
0
 public void Build(string dir)
 {
     foreach (var path in System.IO.Directory.GetFiles(dir, "*.xml"))
     {
         AddFile(new File(path, this));
     }
     foreach (var path in System.IO.Directory.GetDirectories(dir))
     {
         var directory = new Directory(path, this);
         var err       = Tools.VerifyName(directory.Name, CheckNameType.CheckOnly);
         if (null != err)
         {
             MessageBox.Show($"不正确的名字:{err}\r\n忽略掉这个子目录及一下的所有文件{path}");
             continue;
         }
         if (AddDirectory(directory))
         {
             directory.Build(path);
         }
     }
 }