Exemple #1
0
 public TpkBase this[TpkChunk id]
 {
     get
     {
         foreach (TpkBase block in _blocks)
         {
             if (block.Header.Id == id)
             {
                 return(block);
             }
         }
         return(null);
     }
 }
Exemple #2
0
 public TpkBase FindByChunk(TpkChunk id)
 {
     foreach (TpkBase block in _blocks)
     {
         if (block is TpkBaseBlock)
         {
             TpkBase ret = (block as TpkBaseBlock).FindByChunk(id);
             if (ret != null)
             {
                 return(ret);
             }
         }
         else
         {
             if (block.Header.Id == id)
             {
                 return(block);
             }
         }
     }
     return(null);
 }
Exemple #3
0
 public TpkBase(TpkChunk id)
 {
     _header.Id = id;
 }
Exemple #4
0
 public void Read(BinaryReader br)
 {
     Id     = (TpkChunk)br.ReadUInt32();
     Length = br.ReadUInt32();
 }
Exemple #5
0
 public TpkBaseBlock(TpkChunk id)
 {
     _header.Id = id;
     _blocks    = new ArrayList();
 }