Ejemplo n.º 1
0
 public void SetCurrentTrackNext()
 {
     if (PlaylistTracks.Count <= 1)
     {
         return;
     }
     Data.CurrentTrack = PlaylistTracks[(PlaylistTracks.IndexOf(Data.CurrentTrack) + 1) % PlaylistTracks.Count];
 }
Ejemplo n.º 2
0
 private void OnEnded()
 {
     if (PlaylistTracks.Count <= 1)
     {
         return;
     }
     Data.CurrentTrack = PlaylistTracks[(PlaylistTracks.IndexOf(Data.CurrentTrack) + 1) % PlaylistTracks.Count];
 }
Ejemplo n.º 3
0
 protected void PreviousTrackClick()
 {
     if (PlaylistTracks.Count <= 1)
     {
         return;
     }
     if (PlaylistTracks.IndexOf(Data.CurrentTrack) == 0)
     {
         Data.CurrentTrack = PlaylistTracks[PlaylistTracks.Count - 1];
     }
     else
     {
         Data.CurrentTrack = PlaylistTracks[(PlaylistTracks.ToList().IndexOf(Data.CurrentTrack) - 1) % PlaylistTracks.Count];
     }
 }