示例#1
0
 private void FillMapleDataEntitys(string lroot, WzDirectoryEntry wzdir)
 {
     foreach (var filepath in new DirectoryInfo(lroot).GetFileSystemInfos())
     {
         if (Directory.Exists(filepath.FullName) && !filepath.Name.EndsWith(".img"))
         {
             var newDir = new WzDirectoryEntry(filepath.Name, 0, 0, wzdir);
             wzdir.AddDirectory(newDir);
             FillMapleDataEntitys(filepath.FullName, newDir);
         }
         else if (filepath.Name.EndsWith(".xml"))
         {
             // get the real size here?
             wzdir.AddFile(new WzFileEntry(Path.GetFileNameWithoutExtension(filepath.Name), 0, 0, wzdir));
         }
     }
 }
示例#2
0
 public XmlwzFile(string filepath)
 {
     m_mRoot = filepath;
     m_mRootForNavigation = new WzDirectoryEntry(filepath, 0, 0, null);
     FillMapleDataEntitys(m_mRoot, m_mRootForNavigation);
 }