private void PlayMP3_Click(object sender, RoutedEventArgs e) { MediaElem.Play(); dispatcherTimer.Tick += new EventHandler(timer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 0, 1); dispatcherTimer.Start(); PlayMP3.Visibility = Visibility.Collapsed; PauseMP3.Visibility = Visibility.Visible; }
void PlayCurrent() { if (voicesIndex == voices.Count) { return; } MediaElem.Source = new Uri(voices[voicesIndex]); MediaElem.Volume = 1; MediaElem.Stop(); MediaElem.Play(); }