Exemple #1
0
        public void StopClick(object parameter)
        {
            timer.Stop();
            vlcPlayer.LengthChanged -= OnMediaLengthChanged;


            Task.Run(() =>
            {
                vlcPlayer.RebuildPlayer();
            });

            player.StopEnabled  = false;
            player.PauseEnabled = false;
            player.PlayEnabled  = true;
        }
Exemple #2
0
 /// <summary>
 /// Loads a new video.
 /// </summary>
 private async Task LoadNewVideo()
 {
     try
     {
         VlcPlayer.RebuildPlayer();
         await Task.Run(() =>
         {
             VlcPlayer.Stop();
             VlcPlayer.LoadMedia(_imagePathList[_currentImageIndex].FullName);
             VlcPlayer.Play();
             CurrentImage = null;
         });
     }
     catch (Exception ex)
     {
         HandleError(ex);
     }
 }