예제 #1
0
 private static List <FileInfo> PreTreatRom(FileInfo pRomFile)
 {
     if (BQSpecs.CompressionFileExtension.Contains(pRomFile.Extension))
     {
         BQCompression.UnCompressionFile(pRomFile, new DirectoryInfo(BQDirectory.TempDir));
         return(BQIO.GetRomFile(new DirectoryInfo(BQDirectory.TempDir)));
     }
     else
     {
         return(new List <FileInfo>()
         {
             pRomFile
         });
     }
 }
예제 #2
0
        public static List <FileInfo> FiledRomFile(FileInfo pRomFile)
        {
            List <FileInfo> lResult = new List <FileInfo>();

            if (BQSpecs.RomFileExtension.Contains(pRomFile.Extension.ToLower()))
            {
                BQCompression.UnCompressionFile(pRomFile, new DirectoryInfo(BQDirectory.TempDir));
                List <FileInfo> lUnCompressionFiles = BQIO.GetRomFile(new DirectoryInfo(BQDirectory.TempDir));
                if (lUnCompressionFiles.Count == 0)
                {
                    lResult = lUnCompressionFiles;
                }
            }
            else
            {
                lResult.Add(pRomFile);
            }

            return(lResult);
        }
예제 #3
0
        public static List <RomInformation> LoadRom(FileInfo pRomFile, bool isCNRom = false)
        {
            List <RomInformation> lRomInformationList = new List <RomInformation>();

            if (BQSpecs.CompressionFileExtension.Contains(pRomFile.Extension))
            {
                BQCompression.UnCompressionFile(pRomFile, new DirectoryInfo(BQDirectory.TempDir));
                List <FileInfo> lFileList = BQIO.GetRomFile(new DirectoryInfo(BQDirectory.TempDir));
                foreach (var file in lFileList)
                {
                    RomInformation tRomInformation = ParseRom(pRomFile, isCNRom);
                    lRomInformationList.Add(tRomInformation);
                }
            }
            else
            {
                RomInformation tRomInformation = ParseRom(pRomFile, isCNRom);
                lRomInformationList.Add(tRomInformation);
            }

            return(lRomInformationList);
        }