Example #1
0
 private void QuitButton_Click(object sender, EventArgs e)
 {
     if (mode == RunMode.ReadingFrames)
     {
         if (sourceSession != null)
         {
             sourceSession.Dispose();
         }
     }
     Application.Exit();
 }
Example #2
0
        // Display the next frame in the AVI file
        private void timer1_Tick(object sender, EventArgs e)
        {
            // End of AVI?
            if (curFrame >= session.Frames)
            {
                session.Dispose();
                Application.Exit();
                return;
            }

            // Read the frame
            session.ReadFrame(imageViewer1.Image, curFrame);
            progressBar1.Value = (int)curFrame;

            // Increment frame
            curFrame++;
        }