Пример #1
0
        /// <summary>
        /// Initializes this configuration control with the specified <see cref="PluginConfigurationData" />.
        /// </summary>
        /// <param name="configuration">The configuration data.</param>
        /// <param name="environment">Information about the plugin environment.</param>
        public void Initialize(PluginConfigurationData configuration, PluginEnvironment environment)
        {
            var data = configuration.GetMetadata <KioskActivityData>();

            ConfigureControls(data);
            _coptions = data.CopyOptions;
            _poptions = data.PrintOptions;
            _soptions = data.ScanOptions;
            lockTimeoutControl.Initialize(data.LockTimeouts);

            //JobType Enum
            if (data.JobType.Equals(KioskJobType.Copy))
            {
                copy_RadioButton.Checked  = true;
                print_RadioButton.Checked = false;
                scan_RadioButton.Checked  = false;
            }
            else if (data.JobType.Equals(KioskJobType.Print))
            {
                copy_RadioButton.Checked  = false;
                print_RadioButton.Checked = true;
                scan_RadioButton.Checked  = false;
            }
            else if (data.JobType.Equals(KioskJobType.Scan))
            {
                copy_RadioButton.Checked  = false;
                print_RadioButton.Checked = false;
                scan_RadioButton.Checked  = true;
            }

            assetSelectionControl.Initialize(configuration.Assets, DeviceAttributes);
        }
Пример #2
0
 public KioskActivityData()
 {
     //값 초기화 부분
     LockTimeouts = new LockTimeoutData(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(10));
     CopyOptions  = new KioskCopyOptions();
     PrintOptions = new KioskPrintOptions();
     ScanOptions  = new KioskScanOptions();
 }
Пример #3
0
        private void options_Button_Click(object sender, EventArgs e)
        {
            if (copy_RadioButton.Checked)
            {
                using (var preferences = new KioskCopyOptionsForm(_coptions))
                {
                    if (preferences.ShowDialog() == DialogResult.OK)
                    {
                        _coptions = preferences.KioskCopyOptions;
                    }
                }
            }
            else if (print_RadioButton.Checked)
            {
                _poptions.PrintSource = EnumUtil.GetByDescription <KioskPrintSource>(printSource_comboBox.Text);

                using (var preferences = new KioskPrintOptionsForm(_poptions))
                {
                    if (preferences.ShowDialog() == DialogResult.OK)
                    {
                        _poptions = preferences.KioskPrintOptions;
                    }
                }
            }
            else if (scan_RadioButton.Checked)
            {
                _soptions.ScanDestination = EnumUtil.GetByDescription <KioskScanDestination>(scanDestination_comboBox.Text);

                using (var preferences = new KioskScanOptionsForm(_soptions))
                {
                    if (preferences.ShowDialog() == DialogResult.OK)
                    {
                        _soptions = preferences.KioskScanOptions;
                    }
                }
            }
            else
            {
                return;
            }
        }
Пример #4
0
        /// <summary>
        /// Launch with scan
        /// <param name="jobType">JobType</param>
        /// <param name="option">Options for scan</param>
        /// </summary>
        public void Launch(KioskJobType jobType, KioskScanOptions option)
        {
            bool result = false;

            UpdateStatus($"Launch start: {jobType.GetDescription()}");

            result = LinkUI.Controller.Click(new UiSelector().ResourceId($"{KioskPackageName}:id/homeScanButton"));

            if (result)
            {
                switch (option.ScanDestination)
                {
                case KioskScanDestination.USB:
                    result = LinkUI.Controller.Click(new UiSelector().ResourceId($"{KioskPackageName}:id/scan_main_usb_btn"));
                    break;

                case KioskScanDestination.Email:
                    result = LinkUI.Controller.Click(new UiSelector().ResourceId($"{KioskPackageName}:id/scan_main_email_btn"));
                    break;

                default:
                    UpdateStatus($"Scan destination is invalid: {option.ScanDestination.GetDescription()}");
                    result = false;
                    break;
                }
            }

            if (result)
            {
                VerifyLaunch(jobType, new UiSelector().ResourceId($"{KioskPackageName}:id/start_tab"));
            }
            else
            {
                DeviceWorkflowException e = new DeviceWorkflowException($"Launch failed: Selecting scan destination is failed: {option.ScanDestination.GetDescription()}");
                e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.AppLaunch.GetDescription());
                throw e;
            }
        }
Пример #5
0
 /// <summary>
 /// Start Job after SetOptions step
 /// <param name="scanOptions">Options for running scan job</param>
 /// </summary>
 public void ExecutionJob(KioskScanOptions scanOptions)
 {
     CopyScanExecution(scanOptions.JobBuildPageCount);
 }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CloudConnectorPrintManager" /> class.
 /// </summary>
 /// <param name="executionData">The execution data.</param>
 /// <param name="printOptions">The scan options.</param>
 public KioskScanManager(PluginExecutionData executionData, KioskScanOptions scanOptions, LockTimeoutData lockTimeoutData)
     : base(executionData, lockTimeoutData)
 {
     _data             = executionData.GetMetadata <KioskActivityData>();
     _kioskScanOptions = _data.ScanOptions;
 }