/// <summary> Включить следующую песню </summary> public void NextSong() { MP.Stop(); if (CurrentSong.CurrentIdValue() + 1 > CurrentMusicContainer.Songs.Count) { SetCurrentSong(CurrentSong); return; } var temp = CurrentMusicContainer.Songs.FirstOrDefault(x => x.IdValueInMC(CurrentMusicContainer) == CurrentSong.CurrentIdValue() + 1); SetCurrentSong(temp); }
private void MP_MediaEnded(object sender, EventArgs e) { if (CurrentSong.CurrentIdValue() == CurrentMusicContainer.Songs.Count) { MP.Stop(); return; } if (IsRandomSong == true) { return; } if (IsRepeatSong == true) { SetCurrentSong(CurrentSong); return; } NextSong(); }