private void action_Stop(object sender, ActionClickArgs e) { if (MediaElm.Source != null) { MediaElm.Stop(); _seekerTimer.Stop(); SeekerSlider.Value = 0; } }
private void action_Pause(object sender, ActionClickArgs e) { MediaElm.Pause(); _seekerTimer.Stop(); }
private void action_Play(object sender, ActionClickArgs e) { if (MediaElm.Source == null) return; MediaElm.Play(); (DataContext as MW_ViewModel).IsPlaying = true; _seekerTimer.Start(); }
private Tuple<bool, String> action_Open(object sender, ActionClickArgs e) { OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = "c:\\"; openFileDialog1.Filter = "Image Files|*.bmp;*.jpg;*.gif;*.png;*.jpeg|Audio Files|*.aac;*.wav;*.mp3;*.wma|Video Files|*.avi;*.mp4;*.wmv;*.m4v;*.mov|All Media|*.mp3;*.wma;*.aac;*.wav;*.avi;*.wmv;*.mp4;*.m4v;*.mov;*.png;*.jpg;*.bmp;*.gif;*.jpeg"; openFileDialog1.FilterIndex = 4; openFileDialog1.RestoreDirectory = true; if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { return (new Tuple<bool, String>(true, openFileDialog1.FileName)); } else return (new Tuple<bool, String>(false, null)); }