public void DisplayRepairFailedMessage()
        {
            var title   = _translation.SpoolFolderAccessDenied;
            var message = _translation.GetSpoolFolderUnableToRepairMessage(_tempFolder);

            ShowMessage(message, title, MessageOptions.OK, MessageIcon.Exclamation);
        }
Exemple #2
0
        public StartupConditionResult Check()
        {
            if (_spoolFolderAccess.CanAccess())
            {
                return(StartupConditionResult.BuildSuccess());
            }

            _repairSpoolFolderAssistant.TryRepairSpoolPath();

            _logger.Debug("Now we'll check again, if the spool folder is not accessible");

            if (!_spoolFolderAccess.CanAccess())
            {
                _logger.Info("The spool folder could not be repaired.");
                _repairSpoolFolderAssistant.DisplayRepairFailedMessage();
                var message = _translation.GetSpoolFolderUnableToRepairMessage(_spoolerProvider.SpoolFolder);
                return(StartupConditionResult.BuildErrorWithMessage((int)ExitCode.SpoolFolderInaccessible, message));
            }
            _logger.Info("The spool folder was repaired successfully.");
            return(StartupConditionResult.BuildSuccess());
        }