public void Initialize(PluginConfigurationData configuration, PluginEnvironment environment) { _activityData = configuration.GetMetadata <ScanToHpcrActivityData>(); InitHpcrApplications(); ConfigureControls(); assetSelectionControl.Initialize(configuration.Assets, _deviceAttributes); }
public void Initialize(PluginEnvironment environment) { _activityData = new ScanToHpcrActivityData(); InitHpcrApplications(); ConfigureControls(); assetSelectionControl.Initialize(_deviceAttributes); }
/// <summary> /// Initializes a new instance of the <see cref="HpcrScanManager"/> class. /// </summary> public HpcrScanManager(PluginExecutionData executionData, ScanOptions scanOptions) : base(executionData) { _pluginExecutionData = executionData; _activityData = _pluginExecutionData.GetMetadata <ScanToHpcrActivityData>(); _documentName = FilePrefix.ToString(); if (ScanLog != null) { ScanLog.Ocr = false; } ScanOptions = scanOptions; }
public PluginExecutionResult Execute(PluginExecutionData executionData) { ScanToHpcrActivityData data = executionData.GetMetadata <ScanToHpcrActivityData>(); ScanOptions scanOptions = new ScanOptions() { LockTimeouts = data.LockTimeouts, PageCount = data.PageCount, }; var manager = new HpcrScanManager(executionData, scanOptions); manager.ActivityStatusChanged += UpdateStatus; manager.DeviceSelected += UpdateDevice; PluginExecutionResult result = manager.RunScanActivity(); return(result); }
/// <summary> /// Validates the given metadata against the ScanToHpcr Activity data. /// </summary> /// <param name="configurationData">The configuration data.</param> /// <returns>true if valid</returns> public bool ValidateMetadata(ref PluginConfigurationData configurationData) { bool validData = true; ScanToHpcrActivityData activityData = null; try { activityData = configurationData.GetMetadata <ScanToHpcrActivityData>(); } catch { activityData = new ScanToHpcrActivityData(); validData = false; } configurationData = new PluginConfigurationData(activityData, ScanToHpcrConfigControl.Version); return(validData); }