Пример #1
0
        protected override void DoWorkflowWork(Job job)
        {
            job.OutputFileTemplate = _targetFilePathComposer.ComposeTargetFilePath(job);

            if (job.Profile.SkipPrintDialog)
            {
                if (_interactiveProfileChecker.CheckWithErrorResultInWindow(job))
                {
                    _commandLocator.GetCommand <SkipPrintDialogCommand>().Execute(job);
                }
                else
                {
                    //Enable PrintJobView for invalid profiles
                    job.Profile.SkipPrintDialog = false;
                }
            }

            _logger.Debug("Starting PrintJobWindow");

            try
            {
                _shellManager.ShowPrintJobShell(job);
                _settingsProvider.Settings.CreatorAppSettings.LastUsedProfileGuid = job.Profile.Guid;

                if (job.IsSuccessful)
                {
                    _lastSaveDirectoryHelper.Save(job);
                }
            }
            finally
            {
                _directoryHelper.DeleteCreatedDirectories();
            }
        }
Пример #2
0
 /// <summary>
 ///     Clean up all temporary files that have been generated during the Job
 /// </summary>
 private void CleanUp(Job job)
 {
     _logger.Debug("Cleaning up after the job");
     _jobClean.DoCleanUp(job.JobTempFolder, job.JobInfo.SourceFiles, job.JobInfo.InfFile);
     _directoryHelper.DeleteCreatedDirectories();
 }