예제 #1
0
        /// <summary>
        /// Set options for the copy job.
        /// </summary>
        protected void SetOptions(RegusKioskOptionsManager regusKioskOptionsManager)
        {
            try
            {
                UpdateStatus($"Select option activity with Original Size {_regusKioskScanOptions.OriginalSize.GetDescription()} is being started");
                regusKioskOptionsManager.SetOriginalSize(_regusKioskScanOptions.OriginalSize);
                UpdateStatus($"Select option activity with Original Size {_regusKioskScanOptions.OriginalSize.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with Original Orientation {_regusKioskScanOptions.OriginalOrientation.GetDescription()} is being started");
                regusKioskOptionsManager.SetOriginalOrientation(_regusKioskScanOptions.OriginalOrientation);
                UpdateStatus($"Select option activity with Original Orientation {_regusKioskScanOptions.OriginalOrientation.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with N-Up {_regusKioskScanOptions.Duplex.GetDescription()} is being started");
                regusKioskOptionsManager.SetDuplexOriginal(_regusKioskScanOptions.Duplex);
                UpdateStatus($"Select option activity with N-Up {_regusKioskScanOptions.Duplex.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with ImageRotation {_regusKioskScanOptions.ImageRotation.GetDescription()} is being started");
                regusKioskOptionsManager.SetImageRotation(_regusKioskScanOptions.ImageRotation);
                UpdateStatus($"Select option activity with ImageRotation {_regusKioskScanOptions.Duplex.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with Color Mode {_regusKioskScanOptions.ColorMode.GetDescription()} is being started");
                regusKioskOptionsManager.SetColorMode(_regusKioskScanOptions.ColorMode);
                UpdateStatus($"Select option activity with Color Mode {_regusKioskScanOptions.ColorMode.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with File Format {_regusKioskScanOptions.FileFormat.GetDescription()} is being started");
                regusKioskOptionsManager.SetFileFormat(_regusKioskScanOptions.FileFormat);
                UpdateStatus($"Select option activity with File Format {_regusKioskScanOptions.FileFormat.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with Resolution {_regusKioskScanOptions.Resolution.GetDescription()} is being started");
                regusKioskOptionsManager.SetResolution(_regusKioskScanOptions.Resolution);
                UpdateStatus($"Select option activity with Resolution {_regusKioskScanOptions.Resolution.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with File Name / To Address {_regusKioskScanOptions.StringField} - {_regusKioskScanOptions.ScanDestination} is being started");
                if (!String.IsNullOrEmpty(_regusKioskScanOptions.StringField))
                {
                    switch (_regusKioskScanOptions.ScanDestination)
                    {
                    case RegusKioskScanDestination.USB:
                        regusKioskOptionsManager.SetFileName(_regusKioskScanOptions.StringField);
                        break;

                    case RegusKioskScanDestination.Email:
                        regusKioskOptionsManager.SetToAddress(_regusKioskScanOptions.StringField);
                        break;
                    }
                }
                else
                {
                    UpdateStatus($"There is no value for file name / To Address. It will use default value.");
                }

                UpdateStatus($"Select option activity with File Name / To Address {_regusKioskScanOptions.StringField} - {_regusKioskScanOptions.ScanDestination} is being completed");
            }
            catch (DeviceWorkflowException ex)
            {
                DeviceWorkflowException e = new DeviceWorkflowException(ex.Message + $" :: {_data.JobType.GetDescription()}", ex);
                e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.SelectOptions.GetDescription());
                throw e;
            }
        }
예제 #2
0
        /// <summary>
        /// Set options for the copy job.
        /// </summary>
        protected void SetOptions(RegusKioskOptionsManager regusKioskOptionsManager)
        {
            try
            {
                UpdateStatus($"Select option activity with Color Mode {_regusKioskPrintOptions.ColorMode.GetDescription()} is being started");
                regusKioskOptionsManager.SetColorMode(_regusKioskPrintOptions.ColorMode);
                UpdateStatus($"Select option activity with Color Mode {_regusKioskPrintOptions.ColorMode.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with Duplex {_regusKioskPrintOptions.Duplex.GetDescription()} is being started");
                regusKioskOptionsManager.SetDuplexPrint(_regusKioskPrintOptions.Duplex);
                UpdateStatus($"Select option activity with Duplex {_regusKioskPrintOptions.Duplex.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with N-Up {_regusKioskPrintOptions.Duplex.GetDescription()} is being started");
                regusKioskOptionsManager.SetPaperSource(_regusKioskPrintOptions.PaperSource);
                UpdateStatus($"Select option activity with N-Up {_regusKioskPrintOptions.Duplex.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with auto fit {_regusKioskPrintOptions.AutoFit} is being started");
                regusKioskOptionsManager.SetAutoFit(_regusKioskPrintOptions.AutoFit);
                UpdateStatus($"Select option activity with auto fit {_regusKioskPrintOptions.AutoFit} is being completed");

                UpdateStatus($"Select option activity with Copies {_regusKioskPrintOptions.PageCount} is being started");
                regusKioskOptionsManager.SetPrintCopies(_regusKioskPrintOptions.PageCount);
                UpdateStatus($"Select option activity with Copies {_regusKioskPrintOptions.PageCount} is being completed");
            }
            catch (DeviceWorkflowException ex)
            {
                DeviceWorkflowException e = new DeviceWorkflowException(ex.Message + $" :: {_data.JobType.GetDescription()}", ex);
                e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.SelectOptions.GetDescription());
                throw e;
            }
        }
        /// <summary>
        /// Set options for the copy job.
        /// </summary>
        protected void SetOptions(RegusKioskOptionsManager regusKioskOptionsManager)
        {
            try
            {
                UpdateStatus($"Select option activity with Color Mode {_regusKioskCopyOptions.ColorMode.GetDescription()} is being started");
                regusKioskOptionsManager.SetColorMode(_regusKioskCopyOptions.ColorMode);
                UpdateStatus($"Select option activity with Color Mode {_regusKioskCopyOptions.ColorMode.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with Original Size {_regusKioskCopyOptions.OriginalSize.GetDescription()} is being started");
                regusKioskOptionsManager.SetOriginalSize(_regusKioskCopyOptions.OriginalSize);
                UpdateStatus($"Select option activity with Original Size {_regusKioskCopyOptions.OriginalSize.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with N-Up {_regusKioskCopyOptions.Nup.GetDescription()} is being started");
                regusKioskOptionsManager.SetNUp(_regusKioskCopyOptions.Nup);
                UpdateStatus($"Select option activity with N-Up {_regusKioskCopyOptions.Nup.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with Original Orientation {_regusKioskCopyOptions.OriginalOrientation.GetDescription()} is being started");
                regusKioskOptionsManager.SetOriginalOrientation(_regusKioskCopyOptions.OriginalOrientation);
                UpdateStatus($"Select option activity with Original Orientation {_regusKioskCopyOptions.OriginalOrientation.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with Duplex Original {_regusKioskCopyOptions.DuplexOriginal.GetDescription()} is being started");
                regusKioskOptionsManager.SetDuplexOriginal(_regusKioskCopyOptions.DuplexOriginal);
                UpdateStatus($"Select option activity with Duplex Original {_regusKioskCopyOptions.DuplexOriginal.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with Duplex Output {_regusKioskCopyOptions.DuplexOutput.GetDescription()} is being started");
                regusKioskOptionsManager.SetDuplexOutput(_regusKioskCopyOptions.DuplexOutput);
                UpdateStatus($"Select option activity with Duplex Output {_regusKioskCopyOptions.DuplexOutput.GetDescription()} is being completed");

                UpdateStatus($"Select option activity with ReduceEnlarge {_regusKioskCopyOptions.ReduceEnlarge} is being started");
                regusKioskOptionsManager.SetReduceEnlarge(_regusKioskCopyOptions.ReduceEnlarge);
                UpdateStatus($"Select option activity with ReduceEnlarge {_regusKioskCopyOptions.ReduceEnlarge} is being completed");

                UpdateStatus($"Select option activity with Number of Copies {_regusKioskCopyOptions.NumberOfCopies} is being started");
                regusKioskOptionsManager.SetCopyCopies(_regusKioskCopyOptions.NumberOfCopies);
                UpdateStatus($"Select option activity with Number of Copies {_regusKioskCopyOptions.NumberOfCopies} is being completed");
            }
            catch (DeviceWorkflowException ex)
            {
                DeviceWorkflowException e = new DeviceWorkflowException(ex.Message + $" :: {_data.JobType.GetDescription()}", ex);
                e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.SelectOptions.GetDescription());
                throw e;
            }
        }