Esempio n. 1
0
 private void AssaProgressBar_FormClosing(object sender, FormClosingEventArgs e)
 {
     _timerRender.Stop();
     Application.DoEvents();
     _videoPlayerContainer?.Pause();
     _videoPlayerContainer?.VideoPlayer?.DisposeVideoPlayer();
 }
Esempio n. 2
0
        private void OpenVideo(string fileName)
        {
            if (File.Exists(fileName))
            {
                var fi = new FileInfo(fileName);
                if (fi.Length < 1000)
                {
                    return;
                }

                if (_videoPlayerContainer.VideoPlayer != null)
                {
                    _videoPlayerContainer.Pause();
                    _videoPlayerContainer.VideoPlayer.DisposeVideoPlayer();
                }

                VideoInfo videoInfo = UiUtil.GetVideoInfo(fileName);
                UiUtil.InitializeVideoPlayerAndContainer(fileName, videoInfo, _videoPlayerContainer, VideoStartLoaded, VideoStartEnded);
            }
        }