diff --git a/Source/Hurl.BrowserSelector/Windows/MainWindow.xaml.cs b/Source/Hurl.BrowserSelector/Windows/MainWindow.xaml.cs index 59557a06..c176e9bd 100644 --- a/Source/Hurl.BrowserSelector/Windows/MainWindow.xaml.cs +++ b/Source/Hurl.BrowserSelector/Windows/MainWindow.xaml.cs @@ -92,7 +92,14 @@ async private void Window_KeyEvents(object sender, KeyEventArgs e) break; } case Key.C: - Clipboard.SetText(UriGlobal.Value); + try + { + Clipboard.SetText(UriGlobal.Value); + } + catch (Exception err) + { + System.Windows.MessageBox.Show(err.Message); + } break; case Key.R: MinimizeWindow(); @@ -107,7 +114,18 @@ async private void Window_KeyEvents(object sender, KeyEventArgs e) } - private void LinkCopyBtnClick(object sender, RoutedEventArgs e) => Clipboard.SetText(UriGlobal.Value); + private void LinkCopyBtnClick(object sender, RoutedEventArgs e) + { + try + { + Clipboard.SetText(UriGlobal.Value); + } + catch (Exception err) + { + System.Windows.MessageBox.Show(err.Message); + } + } + private void SettingsBtnClick(object sender, RoutedEventArgs e) => Process.Start("explorer", "\"" + Constants.APP_SETTINGS_MAIN + "\""); private void Draggable(object sender, MouseButtonEventArgs e) => this.DragMove(); private void CloseBtnClick(object sender, RoutedEventArgs e) => MinimizeWindow();