private void btnInstall_Click(object sender, RoutedEventArgs e) { MessageBoxResult choice = MessageBox.Show(strings.Updater_BackupMessage, strings.Updater_BackupTitle, MessageBoxButton.YesNoCancel, MessageBoxImage.Question); if (choice == MessageBoxResult.Yes) { try { Backup backForm = new Backup(); backForm.OnEnd = EndBackup; backForm.Show(); } catch (Exception backupException) { MessageBox.Show(backupException.Message); } } else if (choice == MessageBoxResult.No) LaunchInstall(); }
private void miCreateBackup_Click(object sender, RoutedEventArgs e) { try { Backup backForm = new Backup(); backForm.OnEnd = EndBackup; backForm.Owner = this; backForm.Show(); } catch (Exception backupException) { MessageBox.Show(backupException.Message, "CIV", MessageBoxButton.OK, MessageBoxImage.Error); } }