Exemplo n.º 1
0
 public SeDbArchiveListing Read()
 {
     using (Stream input = _accessor.ExtractHeaders())
     {
         SeDbResHeader      header = input.ReadContent <SeDbResHeader>();
         SeDbArchiveListing result = new SeDbArchiveListing(_accessor, header.Count);
         result.AddRange(header.Entries);
         return(result);
     }
 }
Exemplo n.º 2
0
 public WpdArchiveListing Read()
 {
     using (Stream input = _accessor.ExtractHeaders())
     {
         WpdHeader         header = input.ReadContent <WpdHeader>();
         WpdArchiveListing result = new WpdArchiveListing(_accessor, header.Count);
         if (header.Entries != null)
         {
             result.AddRange(header.Entries);
         }
         return(result);
     }
 }
Exemplo n.º 3
0
        private UiNode[] ExpandTrbChilds()
        {
            ImgbArchiveAccessor imgbAccessor = new ImgbArchiveAccessor(_listing, _indices, _binary);

            SeDbArchiveListing sedbListing = SeDbArchiveListingReader.Read(imgbAccessor);
            UiNode[] result = new UiNode[sedbListing.Count];
            int offset = sedbListing.Count * 16 + 0x40;
            using (Stream headers = imgbAccessor.ExtractHeaders())
            using (BinaryReader br = new BinaryReader(headers))
            {
                for (int i = 0; i < result.Length; i++)
                {
                    SeDbResEntry entry = sedbListing[i];
                    String name = entry.Index.ToString();

                    SectionType type;
                    if (TryReadSectionType(br, offset, entry, out type))
                        name = name + "." + type.ToString().ToLower();

                    result[i] = new UiSeDbTableLeaf(name, entry, sedbListing) {Parent = this};
                }
            }
            return result;
        }