예제 #1
0
 private async void Player_MediaEnded(object sender, Events.MediaEndedEventArgs e)
 {
     await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
     {
         DontUpdatePosition = true;
         CurrentPosition    = 0;
         Player.PlayerState = Repeat ? PlayerState.Stopped : PlayerState.Playing;
         PlayPause();
     });
 }
예제 #2
0
 private async void Player_MediaEnded(object sender, Events.MediaEndedEventArgs e)
 {
     await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async() =>
     {
         DontUpdatePosition = true;
         CurrentPosition    = 0;
         player.PlayerState = PlayerState.Stopped;
         if (!Repeat)
         {
             await player.Pause();
             timer.Stop();
             PlayPauseIcon      = new SymbolIcon(Symbol.Play);
             DontUpdatePosition = false;
         }
         else
         {
             timer.Start();
             DontUpdatePosition = false;
             PlayPauseCommand.Execute(null);
         }
     });
 }
예제 #3
0
 private async void Player_MediaEnded(object sender, Events.MediaEndedEventArgs e)
 {
     if (Repeat == "Repeat List")
     {
         PlayNext();
     }
     else
     {
         await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
         {
             DontUpdatePosition = true;
             CurrentPosition    = 0;
             Player.PlayerState = Repeat == "Repeat Song" ? PlayerState.Stopped : PlayerState.Playing;
             if (Repeat == "No Repeat" && GetPlayingCollection() != null && GetPlayingCollection().Any())
             {
                 PlayNext();
             }
             else
             {
                 PlayPause();
             }
         });
     }
 }