/// <summary> /// Save updates into the file. /// </summary> private void NextFile() { int currentIndex = Musics.IndexOf(SelectedMusic) + 1; if (currentIndex >= Musics.Count) { currentIndex = 0; } SelectedMusic = Musics[currentIndex]; }
/// <summary> /// Save updates into the file. /// </summary> private void PreviousFile() { int currentIndex = Musics.IndexOf(SelectedMusic) - 1; if (currentIndex < 0) { currentIndex = Musics.Count - 1; } SelectedMusic = Musics[currentIndex]; }