private void CloseButton_Click(object sender, RoutedEventArgs e) { trace("Close"); dispatcherTimer.Stop(); mediaPlayer.Close(); traceState(); }
private void ClearPlayer() { textSongName.Text = textSongTime.Text = null; if (songPlay) { bPlay.Visibility = Visibility.Visible; bPause.Visibility = Visibility.Hidden; mediaPlayer.Pause(); mediaPlayer.Close(); timer.Stop(); songPlay = false; } }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void StopButton_Click(object sender, RoutedEventArgs e) { Main.ImageSource = new BitmapImage(new Uri(@StopDirectory)); MainImage.Fill = Main; timer.Start(); MusicHasPause = false; TimeText.Text = "00:00 / 00:00"; Media.Close(); timer.Stop(); Material.Kind = MaterialDesignThemes.Wpf.PackIconKind.Play; SliderVolume.Value = 0; }
private void MenuItemExit_Click(object sender, RoutedEventArgs e) { Application.Current.Shutdown(); mp.Close(); }