Example #1
0
        private void timerplayback_Tick(object sender, EventArgs e)
        {
            PlaybackprogressBar.Maximum = 100;
            PlaybackprogressBar.Minimum = 0;

            int iPos = videoCapture.GetPlaybackProgress();

            if ((iPos > PlaybackprogressBar.Minimum) && (iPos < PlaybackprogressBar.Maximum))
            {
                PlaybackprogressBar.Value = iPos;
            }

            if (iPos == 100) //回放结束
            {
                PlaybackprogressBar.Value = iPos;
                videoCapture.StopPlayBack();

                timerplayback.Stop();
            }

            if (iPos == 200) //网络异常,回放失败
            {
                MessageBox.Show("The playback is abnormal for the abnormal network!");
                timerplayback.Stop();
            }
        }