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); }
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; }