From 629a062b717bdcc03de5a234c85f388f13241887 Mon Sep 17 00:00:00 2001 From: morkt Date: Mon, 1 Jun 2015 12:59:14 +0400 Subject: [PATCH] allow image conversion when multiple files are selected. --- MainWindow.xaml | 2 +- MainWindow.xaml.cs | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index d7b61b69..04f6d7eb 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -366,7 +366,7 @@ - + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 291862a2..852afd3f 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -1056,6 +1056,18 @@ namespace GARbro.GUI e.CanExecute = CurrentDirectory.SelectedIndex != -1; } + private void CanExecuteConvertImage (object sender, CanExecuteRoutedEventArgs e) + { + if (CurrentDirectory.SelectedItems.Count > 1) + { + e.CanExecute = !ViewModel.IsArchive; + } + else + { + CanExecuteOnImage (sender, e); + } + } + private void CanExecuteOnImage (object sender, CanExecuteRoutedEventArgs e) { var entry = CurrentDirectory.SelectedItem as EntryViewModel;