Exemplo n.º 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)
 {
     _activityData            = configuration.GetMetadata <GeniusBytesScanActivityData>();
     _pluginConfigurationData = configuration;
     assetSelectionControl.Initialize(_pluginConfigurationData.Assets, _deviceAttributes);
     SetConfiguration();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GeniusBytesScanManager"/> class.
 /// </summary>
 /// <param name="pluginExecutionData">The plugin execution data.</param>
 /// <param name="scanOptions">The activity data.</param>
 public GeniusBytesScanManager(PluginExecutionData pluginExecutionData, ScanOptions scanOptions) : base(pluginExecutionData)
 {
     _pluginExecutionData = pluginExecutionData;
     _activityData        = _pluginExecutionData.GetMetadata <GeniusBytesScanActivityData>();
     if (ScanLog != null)
     {
         ScanLog.Ocr = false;
     }
     ScanOptions = scanOptions;
 }
Exemplo n.º 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)
        {
            GeniusBytesScanActivityData data = executionData.GetMetadata <GeniusBytesScanActivityData>();

            UpdateStatus("Starting activity.");

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

            GeniusBytesScanManager manager = new GeniusBytesScanManager(executionData, scanOptions);

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

            PluginExecutionResult result = manager.RunScanActivity();

            UpdateStatus($"Result = {result.Result}");
            UpdateStatus("Finished activity.");
            return(result);
        }
Exemplo n.º 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)
 {
     _activityData = new GeniusBytesScanActivityData();
     assetSelectionControl.Initialize(_deviceAttributes);
     lockTimeoutControl.Initialize(_activityData.LockTimeouts);
 }