Example #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);
        }
Example #2
0
 public KioskActivityData()
 {
     //값 초기화 부분
     LockTimeouts = new LockTimeoutData(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(10));
     CopyOptions  = new KioskCopyOptions();
     PrintOptions = new KioskPrintOptions();
     ScanOptions  = new KioskScanOptions();
 }
Example #3
0
        /// <summary>
        /// Launch with copy
        /// <param name="jobType">JobType</param>
        /// <param name="option">Options for copy</param>
        /// </summary>
        public void Launch(KioskJobType jobType, KioskCopyOptions option)
        {
            bool result = false;

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

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

            if (result)
            {
                VerifyLaunch(jobType, new UiSelector().ResourceId($"{KioskPackageName}:id/start_tab"));
            }
            else
            {
                DeviceWorkflowException e = new DeviceWorkflowException($"Launch failed: Clicking copy object is failed: {jobType.GetDescription()}");
                e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.AppLaunch.GetDescription());
                throw e;
            }
        }
Example #4
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;
            }
        }
Example #5
0
 /// <summary>
 /// Start Job after SetOptions step
 /// <param name="copyOptions">Options for running copy job</param>
 /// </summary>
 public void ExecutionJob(KioskCopyOptions copyOptions)
 {
     CopyScanExecution(copyOptions.JobBuildPageCount);
 }
 /// <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 KioskCopyManager(PluginExecutionData executionData, KioskCopyOptions copyOptions, LockTimeoutData lockTimeoutData)
     : base(executionData, lockTimeoutData)
 {
     _data             = executionData.GetMetadata <KioskActivityData>();
     _kioskCopyOptions = _data.CopyOptions;
 }