Exemplo n.º 1
0
 public void StopVideo()
 {
     if (_player != null)
     {
         _player.Stop();
     }
 }
Exemplo n.º 2
0
 private void Btn_Click(object sender, RoutedEventArgs e)
 {
     CurrentPlayer.Stop();
     CurrentPlayer.LoadMedia(@"F:\Kugou\Anya Marina - Whatever You Like.mp3");
     CurrentPlayer.Play();
     //if (this.WindowState == WindowState.Maximized)
     //{
     //    this.WindowState = WindowState.Normal;
     //}
     //else
     //{
     //    this.WindowState = WindowState.Maximized;
     //}
 }
 private void OnPlay(object obj, string media)
 {
     try
     {
         if (_videoView.IsPlaying)
         {
             _videoView.Stop();
         }
         _videoView.Play(Android.Net.Uri.Parse(media));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemplo n.º 4
0
        private async Task RemoveCurrentImage()
        {
            await Task.Run(() =>
            {
                VlcPlayer.Stop();

                RecycleOption recycleOption = RecycleOption.DeletePermanently;
                if (SettingsViewModel.SendToRecycleBin)
                {
                    recycleOption = RecycleOption.SendToRecycleBin;
                }

                FileSystem.DeleteFile(_imagePathList[_currentImageIndex].FullName, UIOption.OnlyErrorDialogs, recycleOption);
                Logging.LogInfo(recycleOption == RecycleOption.DeletePermanently ? "Deleted permanently: " : "Send to recycle bin: " + _imagePathList[_currentImageIndex].FullName);
            });
        }
Exemplo n.º 5
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);
     }
 }
Exemplo n.º 6
0
 private void Button_Click_Stop(object sender, RoutedEventArgs e)
 {
     VlcPlayer.Stop();
     VlcPlayer.Dispose();
     Close();
 }
Exemplo n.º 7
0
 public void StopVideo()
 {
     _player.Stop();
 }
Exemplo n.º 8
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     VlcPlayer.Stop();
 }
 public void Stop()
 {
     CleanManagements();
     _vlcPlayer.Stop();
 }