public PlayerPage() { InitializeComponent(); MediaElem.Stop(); File.Delete(@"F:\PlayDemo.mp3"); CreateFileMP3(); MediaElem.Source = new Uri(@"F:\PlayDemo.mp3", UriKind.Relative); }
void PlayCurrent() { if (voicesIndex == voices.Count) { return; } MediaElem.Source = new Uri(voices[voicesIndex]); MediaElem.Volume = 1; MediaElem.Stop(); MediaElem.Play(); }
private void StopMP3_Click(object sender, RoutedEventArgs e) { MediaElem.Stop(); PauseMP3.Visibility = Visibility.Collapsed; PlayMP3.Visibility = Visibility.Visible; }
private void StopPlay_Click(object sender, RoutedEventArgs e) { MediaElem.Stop(); }