diff --git a/Video2x/MainWindow.xaml.cs b/Video2x/MainWindow.xaml.cs index 5218c13..0d8bf34 100644 --- a/Video2x/MainWindow.xaml.cs +++ b/Video2x/MainWindow.xaml.cs @@ -35,9 +35,18 @@ public MainWindow() private void Button_Click(object sender, RoutedEventArgs e) { - var dialog = new CommonOpenFileDialog(); - CommonFileDialogResult result = dialog.ShowDialog(); - textbox_folder.Text = dialog.FileName; + try + { + var dialog = new CommonOpenFileDialog(); + CommonFileDialogResult result = dialog.ShowDialog(); + textbox_folder.Text = dialog.FileName; + } + catch (System.InvalidOperationException) + { + //MessageBox.Show("Non รจ stato selezionato nessun video"); + //System.Diagnostics.Debug.WriteLine(textbox_folder.Text); + } + } private void Save_button_Click(object sender, RoutedEventArgs e)