public void GoToNext() { if (PlayingSong != null && PlayingSong.Song.Items != null) { var index = PlayingSong.GetCurrentItemIndex(); var offset = PlayingSong.IsZero ? 0 : 1; if (index + offset < PlayingSong.Song.Items.Count) { PlayingSong.CurrentSongItem = PlayingSong.Song.Items[index + offset]; } HandleZeroOnMove(); SendEvent(PresentationEvents.Next, PlayingSong); } }
public void GoToPrevious() { if (PlayingSong != null && PlayingSong.Song != null && PlayingSong.Song.Items != null && !PlayingSong.IsZero) { var index = PlayingSong.GetCurrentItemIndex(); var offset = PlayingSong.IsZero ? 0 : 1; if (index - offset >= 0) { PlayingSong.CurrentSongItem = PlayingSong.Song.Items[index - offset]; HandleZeroOnMove(); } else { PlayingSong.IsZero = true; } SendEvent(PresentationEvents.Previous, PlayingSong); } }