Ejemplo n.º 1
0
 void OnFoundBlock(TAPBlock block)
 {
     Blocks.Add(block);
     if (FoundBlock != null)
     {
         FoundBlock(block);
     }
 }
Ejemplo n.º 2
0
        public void Load(string filename)
        {
            CurrentBlock = 0;
            int n = 0;

            using (FileStream fs = new FileStream(filename, FileMode.Open))
            {
                using (BinaryReader br = new BinaryReader(fs))
                {
                    while (br.BaseStream.Position < br.BaseStream.Length)
                    {
                        TAPBlock block = new TAPBlock(br, n++);
                        OnFoundBlock(block);
                    }
                }
            }
        }