/// <summary>
 /// CloudPrintOptionsForm constructor with CloudPrintOptions as parameter
 /// </summary>
 /// <param name="linkScanOptions"></param>
 public LinkScanOptionsForm(LinkScanOptions linkScanOptions)
 {
     InitializeComponent();
     LinkScanOption = linkScanOptions;
     originalSides_comboBox.DataSource      = EnumUtil.GetDescriptions <LinkScanOriginalSides>().ToList();
     fileType_comboBox.DataSource           = EnumUtil.GetDescriptions <LinkScanFileType>().ToList();
     resolution_comboBox.DataSource         = EnumUtil.GetDescriptions <LinkScanResolution>().ToList();
     colorBlack_comboBox.DataSource         = EnumUtil.GetDescriptions <LinkScanColorBlack>().ToList();
     originalSize_comboBox.DataSource       = EnumUtil.GetDescriptions <LinkScanOriginalSize>().ToList();
     contentOrientation_comboBox.DataSource = EnumUtil.GetDescriptions <LinkScanContentOrientation>().ToList();
 }
Beispiel #2
0
        protected LinkScanActivityManager(PluginExecutionData executionData, LinkScanOptions linkScanOptions, LockTimeoutData lockTimeoutData)
        {
            if (executionData == null)
            {
                throw new ArgumentNullException(nameof(executionData));
            }

            if (linkScanOptions == null)
            {
                throw new ArgumentNullException(nameof(linkScanOptions));
            }

            ExecutionData    = executionData;
            FilePrefix       = new ScanFilePrefix(executionData.SessionId, executionData.Credential.UserName, LinkJobType);
            WorkflowLogger   = new DeviceWorkflowLogger(executionData);
            ConnectorLog     = new ConnectorJobInputLog(executionData, LinkJobType);
            _linkScanOptions = linkScanOptions;
            _lockTimeoutData = lockTimeoutData;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="LinkPrintOptions"/> class.
 /// </summary>
 public LinkScanOptionsForm()
 {
     InitializeComponent();
     LinkScanOption = new LinkScanOptions();
 }
Beispiel #4
0
        /// <summary>
        /// Set options for the scan job.
        /// </summary>
        /// <param name="scanOptionsManager">The JetAdvantageLinkScanOptionManager.</param>
        /// <param name="scanOptions">The LinkScanOptions.</param>
        /// <returns>The result of the scan.</returns>
        protected virtual void SetOptions(JetAdvantageLinkScanOptionManager scanOptionsManager, LinkScanOptions scanOptions)
        {
            UpdateStatus($"Select option activity with File Name {FilePrefix.ToString().ToLowerInvariant()} is being started");
            scanOptionsManager.SetFileName(FilePrefix.ToString().ToLowerInvariant());
            UpdateStatus($"Select option activity with File Name {FilePrefix.ToString().ToLowerInvariant()} is being completed");

            UpdateStatus($"Set the options screen");
            scanOptionsManager.SetOptionsScreen();

            if (scanOptions.UseFileTypeandResolution)
            {
                UpdateStatus($"Select option activity with File Type {scanOptions.FileType.GetDescription()}, Resolution {scanOptions.Resolution.GetDescription()} is being started");
                scanOptionsManager.SetFileTypeAndResolution(scanOptions.FileType, scanOptions.Resolution);
                UpdateStatus($"Select option activity with File Type {scanOptions.FileType.GetDescription()}, Resolution {scanOptions.Resolution.GetDescription()} is being completed");
            }

            if (scanOptions.UseOriginalSides)
            {
                UpdateStatus($"Select option activity with Original Sides {scanOptions.OriginalSides.GetDescription()} is being started");
                scanOptionsManager.SetOriginalSides(scanOptions.OriginalSides);
                UpdateStatus($"Select option activity with Original Sides {scanOptions.OriginalSides.GetDescription()} is being completed");
            }

            if (scanOptions.UseColorBlack)
            {
                UpdateStatus($"Select option activity with Color/Black {scanOptions.ColorBlack.GetDescription()} is being started");
                scanOptionsManager.SetColorBlack(scanOptions.ColorBlack);
                UpdateStatus($"Select option activity with Color/Black {scanOptions.ColorBlack.GetDescription()} is being completed");
            }

            if (scanOptions.UseOriginalSize)
            {
                UpdateStatus($"Select option activity with Original Size {scanOptions.OriginalSize.GetDescription()} is being started");
                scanOptionsManager.SetOriginalSize(scanOptions.OriginalSize);
                UpdateStatus($"Select option activity with Original Size {scanOptions.OriginalSize.GetDescription()} is being completed");
            }

            if (scanOptions.UseContentOrientation)
            {
                UpdateStatus($"Select option activity with ContentOrientation {scanOptions.ContentOrientation.GetDescription()} is being started");
                scanOptionsManager.SetOrientation(scanOptions.ContentOrientation);
                UpdateStatus($"Select option activity with ContentOrientation {scanOptions.ContentOrientation.GetDescription()} is being completed");
            }
        }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LinkPrintActivityManager" /> class.
 /// </summary>
 /// <param name="executionData">The execution data.</param>
 /// <param name="linkScanOptions">The cloud print configuration.</param>
 /// <param name="lockTimeoutData"></param>
 /// <param name="server">The server to log with the scan.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="executionData" /> is null.
 /// <para>or</para>
 /// <paramref name="linkScanOptions" /> is null.
 /// </exception>
 protected LinkScanActivityManager(PluginExecutionData executionData, LinkScanOptions linkScanOptions, LockTimeoutData lockTimeoutData, ServerInfo server)
     : this(executionData, linkScanOptions, lockTimeoutData)
 {
     _serverName = server?.HostName;
 }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LinkPrintActivityManager" /> class.
 /// </summary>
 /// <param name="executionData">The execution data.</param>
 /// <param name="linkScanOptions">The cloud print configuration.</param>
 /// <param name="lockTimeoutData"></param>
 /// <param name="serverName">The server to log with the scan.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="executionData" /> is null.
 /// <para>or</para>
 /// <paramref name="linkScanOptions" /> is null.
 /// </exception>
 protected LinkScanActivityManager(PluginExecutionData executionData, LinkScanOptions linkScanOptions, LockTimeoutData lockTimeoutData, string serverName)
     : this(executionData, linkScanOptions, lockTimeoutData)
 {
     _serverName = serverName;
 }