Пример #1
0
 public IndexFile ParseIndexFile(string indexFile)
 {
     IndexFile result = new IndexFile();
     using (var fs = File.OpenRead(indexFile))
     {
         using (var br = new BinaryReader(fs))
         {
             result.Indexes = new List<IndexInfo>();
             int count = br.ReadInt32();
             for (int i = 1; i < count; i++)
             {
                 IndexInfo item = new IndexInfo();
                 item.SeqNum = br.ReadInt32();
                 item.Unknown = br.ReadInt32();
                 item.Name = ConvertToString(br.ReadBytes(48));
                 item.Instrument = ConvertToString(br.ReadBytes(48));
                 item.GelSize = br.ReadInt32();
                 item.Unknown1 = br.ReadInt32();
                 result.Indexes.Add(item);
             }
         }
     }
     return result;
 }