Esempio n. 1
0
        private bool ProcessWorkflow()
        {
            bool success = false;

            ScanExecutionOptions seo = new ScanExecutionOptions();
            string appWaitForm       = "OxpUIAppMainForm800X600"; // "EmailForm";

            if (ExecutionOptions.ImagePreview)
            {
                seo.ImagePreview = ImagePreviewOption.GeneratePreview;
                appWaitForm      = "ImagePreviewForm";
            }
            seo.JobBuildSegments = ExecutionOptions.JobBuildSegments;

            JediWindjammerJobExecutionManager jwMgr = new JediWindjammerJobExecutionManager(_device);

            jwMgr.WorkflowLogger = WorkflowLogger;

            success = jwMgr.ExecuteScanJob(seo, appWaitForm); //OxpUIAppMainForm800X600"
            string curForm = _controlPanel.CurrentForm();

            if (curForm.Equals("ImagePreviewForm"))
            {
                success = ProcessScanJob();
            }
            return(success);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediWindjammerEmailApp" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediWindjammerEmailApp(JediWindjammerDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device           = device;
            _controlPanel     = _device.ControlPanel;
            _optionsManager   = new JediWindjammerEmailJobOptions(device);
            _executionManager = new JediWindjammerJobExecutionManager(device);
            Pacekeeper        = new Pacekeeper(TimeSpan.Zero);
        }