Esempio n. 1
0
        private string MapStringFromGameFile(IArchiveReader reader)
        {
            List <string> maps = new List <string>();

            IEnumerable <IArchiveEntry> wadEntries = GetEntriesByExtension(reader, ".wad");

            foreach (IArchiveEntry entry in wadEntries)
            {
                string extractFile = Util.ExtractTempFile(TempDirectory.GetFullPath(), entry);
                string mapString   = Util.GetMapStringFromWad(extractFile);
                if (!string.IsNullOrEmpty(mapString))
                {
                    maps.Add(mapString);
                }
            }

            return(string.Join(", ", maps.ToArray()));
        }
        private string MapStringFromGameFile(ZipArchive za)
        {
            StringBuilder sb = new StringBuilder();

            IEnumerable <ZipArchiveEntry> wadEntries = GetEntriesByExtension(za, ".wad");

            foreach (ZipArchiveEntry zae in wadEntries)
            {
                string extractFile = Util.ExtractTempFile(TempDirectory.GetFullPath(), zae);
                sb.Append(Util.GetMapStringFromWad(extractFile));
            }

            if (sb.Length > 2)
            {
                sb.Remove(sb.Length - 2, 2);
            }

            return(sb.ToString());
        }