private void CommandBinding_OpenFolder1(object sender, ExecutedRoutedEventArgs e) { object obj = e.Parameter; if (obj == null) { return; } try { if (obj.GetType() == typeof(CL_DuplicateFile)) { CL_DuplicateFile df = obj as CL_DuplicateFile; if (File.Exists(df.GetLocalFilePath1())) { Utils.OpenFolderAndSelectFile(df.GetLocalFilePath1()); } else { MessageBox.Show(Shoko.Commons.Properties.Resources.MSG_ERR_FileNotFound, Shoko.Commons.Properties.Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error); } } } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
private void CommandBinding_PlayVideo1(object sender, ExecutedRoutedEventArgs e) { object obj = e.Parameter; if (obj == null) { return; } try { if (obj.GetType() == typeof(CL_DuplicateFile)) { CL_DuplicateFile df = obj as CL_DuplicateFile; Process.Start(new ProcessStartInfo(df.GetLocalFilePath1())); } } catch (Exception ex) { Utils.ShowErrorMessage(ex); } finally { Cursor = Cursors.Arrow; } }