ReadFrame() public method

public ReadFrame ( BinaryReader reader ) : void
reader System.IO.BinaryReader
return void
Example #1
0
        public void LoadFile( string sFileName )
        {
            m_FileName = sFileName;

            if ( File.Exists( sFileName ) )
            {
                using ( m_BinaryReader = new BinaryReader( File.Open( sFileName, FileMode.Open ) ) )
                {
                    ReadHeader();

                    m_Frames = new List<SLPFrame>((int)m_NumFrames);

                    for (uint i = 0; i < m_NumFrames; i++) {
                        var frame = new SLPFrame();
                        frame.ReadHeader(m_BinaryReader);
                        m_Frames.Add(frame);
                    }

                    foreach (SLPFrame frame in m_Frames)
                    {
                        frame.ReadFrame(m_BinaryReader);
                    }

                }
            }
            else
            {
                throw new FileNotFoundException( "File not found.", sFileName );
            }
        }
Example #2
0
        public void LoadFile(string sFileName)
        {
            m_FileName = sFileName;

            if (File.Exists(sFileName))
            {
                using (m_BinaryReader = new BinaryReader(File.Open(sFileName, FileMode.Open)))
                {
                    ReadHeader();

                    m_Frames = new List <SLPFrame>((int)m_NumFrames);

                    for (uint i = 0; i < m_NumFrames; i++)
                    {
                        var frame = new SLPFrame();
                        frame.ReadHeader(m_BinaryReader);
                        m_Frames.Add(frame);
                    }

                    foreach (SLPFrame frame in m_Frames)
                    {
                        frame.ReadFrame(m_BinaryReader);
                    }
                }
            }
            else
            {
                throw new FileNotFoundException("File not found.", sFileName);
            }
        }