/// <summary> Остановка воспроизведения </summary> public void Stop() { if (MP.Source != null) { MP.Stop(); timer.Stop(); IsPlaying = false; OnPropertyChanged(); } }
private void MP_Tick(object sender, EventArgs e) { if (Process_Handle("iw4mp")) { } else { MP.Stop(); GameRunning GameRunningCheck = new GameRunning(); GameRunningCheck.ShowDialog(); Close(); } }
/// <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, RoutedEventArgs e) { if (game.final == true) { game.Close(); } if (game.final == false) { MP.Stop(); this.Hide(); FinalTimer.Start(); Thread.Sleep(1000); if (MessageBox.Show("Я спал, когда снаружи послышались какие-то крики(а может петух). \n" + " Так как рядом с моим домом только располагалась деревенская tavern, взяв первое, что попалось под руку," + " я решил направиться туда", "\n", MessageBoxButton.OK) == MessageBoxResult.OK) { game.ShowDialog(); } } }
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(); }
private void MP_MediaEnded(object sender, RoutedEventArgs e) { MP.Stop(); }