/// <summary> /// Shows an error message to the user when the central exception handler /// (implemented in Bovender.dll) raises the ManageExceptionCallback event. /// </summary> /// <param name="sender">Object where the exception occurred.</param> /// <param name="e">Instance of ManageExceptionEventArgs with additional information.</param> private void CentralHandler_ManageExceptionCallback(object sender, Bovender.ExceptionHandler.ManageExceptionEventArgs e) { Logger.Error(e.Exception); e.IsHandled = true; ExceptionViewModel vm = new ExceptionViewModel(e.Exception); vm.InjectInto <ExceptionView>().ShowDialogInForm(); }
private void Backups_BackupFailed(object sender, Bovender.ExceptionHandler.ManageExceptionEventArgs e) { XLToolbox.Backup.BackupFailedViewModel vm = new XLToolbox.Backup.BackupFailedViewModel(e.Exception); if (!vm.Suppress) { Logger.Info("Backups_BackupFailed: Informing user about failed backup"); vm.InjectInto <XLToolbox.Backup.BackupFailedView>().ShowDialogInForm(); } else { Logger.Info("Backups_BackupFailed: Failure message suppressed by user"); } }