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)
 {
     _data = configuration.GetMetadata <ScanToSafeQActivityData>();
     _pluginConfigurationData = configuration;
     assetSelectionControl.Initialize(_pluginConfigurationData.Assets, AssetAttributes.None);
     lockTimeoutControl.Initialize(_data.LockTimeouts);
     SetConfiguration();
 }
 public ScanToSafeQScanManager(PluginExecutionData pluginExecutionData, ScanOptions scanOptions) : base(pluginExecutionData)
 {
     _pluginExecutionData = pluginExecutionData;
     _activityData        = _pluginExecutionData.GetMetadata <ScanToSafeQActivityData>();
     if (ScanLog != null)
     {
         ScanLog.Ocr = false;
     }
     ScanOptions = scanOptions;
 }
Example #3
0
        /// <summary>
        /// Executes this plugin's workflow using the specified <see cref="PluginExecutionData" />.
        /// </summary>
        /// <param name="executionData">The execution data.</param>
        /// <returns>A <see cref="PluginExecutionResult" /> indicating the outcome of the execution.</returns>
        public PluginExecutionResult Execute(PluginExecutionData executionData)
        {
            data = executionData.GetMetadata <ScanToSafeQActivityData>();
            UpdateStatus("Starting activity.");

            ScanOptions scanOptions = new ScanOptions()
            {
                LockTimeouts = data.LockTimeouts,
                PageCount    = data.ScanCount,
            };

            var manager = new ScanToSafeQScanManager(executionData, scanOptions);

            manager.ActivityStatusChanged += UpdateStatus;
            manager.DeviceSelected        += UpdateDevice;

            PluginExecutionResult result = manager.RunScanActivity();

            UpdateStatus($"Result = {result.Result}");
            return(result);
        }
Example #4
0
 /// <summary>
 /// Initializes this configuration control to default values.
 /// </summary>
 /// <param name="environment">Information about the plugin environment.</param>
 public void Initialize(PluginEnvironment environment)
 {
     _data = new ScanToSafeQActivityData();
     assetSelectionControl.Initialize(AssetAttributes.None);
     lockTimeoutControl.Initialize(_data.LockTimeouts);
 }