private void PlayButton(object sender, RoutedEventArgs e) { VideoWindow.Play(); if (timer != null) { timer.Start(); } }
private void MediaOpened(object sender, RoutedEventArgs e) { TimerSlider.Maximum = VideoWindow.NaturalDuration.TimeSpan.TotalSeconds; timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += Timer_Tick; FullTimeOfVideo.Content = VideoWindow.NaturalDuration.TimeSpan.ToString(@"hh\:mm\:ss"); VideoWindow.Play(); VideoWindow.Pause(); }
private void DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e) { VideoWindow.Play(); timer.Start(); }