Exemple #1
0
        static HudFolder ParseHudFolder(string path)
        {            
            HudFolder folder = new HudFolder();
            folder.FullName = path;
            var hudFiles = Directory.GetFiles(path, "*.res");
            var folders = Directory.GetDirectories(path);

            for(int i = 0; i < folders.Length; i++)
            {
                HudFolder subFolder = new HudFolder();                
                subFolder.FullName = folders[i];
                if(!subFolder.CopyNoParse)
                    subFolder = ParseHudFolder(subFolder.FullName);
                folder.Add(subFolder);
            }
            if(hudFiles.Length > 0)
            {
                for(int i = 0; i < hudFiles.Length; i++)
                {
                    HudFile file = new HudFile();
                    file.FullName = hudFiles[i];

                    file = ParseHudFile(file.FullName);
                    if(!file.IsNull)
                        folder.Add(file);
                }
            }            
            return folder;
        }