public ApplicationWindowViewModel(Window window) { mWindow = window; basePageInstance = this; // ShowSideBarCommand = new RelayCommand(() => ShowSideBar()); ExitCommand = new RelayCommand(() => mWindow.Close()); }
private void Grid_Drop(object sender, System.Windows.DragEventArgs e) { ApplicationWindowViewModel.GoToPage("Player"); string[] FileName = (string[])e.Data.GetData(DataFormats.FileDrop, false); VideoDisplay.myElement.Source = new System.Uri(FileName[0]); PlayerListViewModel.GetFilesInfo(FileName); VideoDisplay.myElement.Play(); }
private void OpenFile() { OpenFileDialog opnDlg = new OpenFileDialog(); opnDlg.ShowDialog(); ApplicationWindowViewModel.GoToPage("Player"); if (opnDlg.FileName == String.Empty) { return; } path = new Uri(opnDlg.FileName); try { VideoDisplay.myElement.Source = path; VideoDisplay.myElement.Play(); } catch { } }