Beispiel #1
0
        public static void DumpTAHEntries(Stream source)
        {
            TAHFile tah = new TAHFile(source);

            try
            {
                tah.LoadEntries();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex);
                return;
            }
            foreach (TAHEntry ent in tah.EntrySet.Entries)
            {
                if (ent.FileName != null && Path.GetExtension(ent.FileName).ToLower() == ".tso")
                {
                    byte[]        data = TAHUtil.ReadEntryData(tah.Reader, ent);
                    byte[]        hash = md5.ComputeHash(data);
                    StringBuilder sb   = new StringBuilder();
                    foreach (byte b in hash)
                    {
                        sb.Append(b.ToString("x2"));
                    }
                    string md5sum = sb.ToString();
                    Console.WriteLine("{0} {1}", md5sum, ent.FileName);
                }
            }
        }
Beispiel #2
0
        public void DumpTAHEntries(Stream source)
        {
            TAHFile tah = new TAHFile(source);

            try
            {
                tah.LoadEntries();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex);
                return;
            }
            foreach (TAHEntry ent in tah.EntrySet.Entries)
            {
                if (Path.GetExtension(ent.FileName) == ".tso")
                {
                    Console.WriteLine(ent.FileName);
                    byte[] data = TAHUtil.ReadEntryData(tah.Reader, ent);
                    using (MemoryStream ms = new MemoryStream(data))
                        LoadTSOFile(ms);
                    current_TSOFileName = ent.FileName;
                    AssignCurrentTMOFile(current_TSOFileName);
                    {
                        FrameMove();
                        Render();
                        SaveToBitmap();
                        ClearFigureList();
                        Application.DoEvents();
                    }
                    current_TSOFileName = null;
                }
            }
        }