/// <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 <iManageActivityData>();
     lockTimeoutControl.Initialize(_data.LockTimeouts);
     ConfigureControls(_data);
     assetSelectionControl.Initialize(configuration.Assets, DeviceAttributes);
 }
        /// <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 <iManageActivityData>();

            if (_data.JobType.Equals(iManageJobType.Print))
            {
                return(ExecutePrint(executionData));
            }
            else if (_data.JobType.Equals(iManageJobType.Scan))
            {
                return(ExecuteScan(executionData));
            }

            return(new PluginExecutionResult(PluginResult.Failed, $"Unrecognized IManage Job Type: {_data.JobType}", iManageExceptionCategory.FalseAlarm.GetDescription()));
        }
        /// <summary>
        /// Configuration control with defined value.(Load)
        /// </summary>
        /// <param name="data">LinkScanAppsActivityData form.</param>
        private void ConfigureControls(iManageActivityData data)
        {
            comboBox_SIO.Text    = data.SIO.GetDescription();
            id_TextBox.Text      = data.ID;
            pwd_TextBox.Text     = data.Password;
            comboBox_Logout.Text = data.LogOut.GetDescription();
            path_textBox.Text    = data.FolderPath;
            jobBuildPageCount_numericUpDown.Value = data.PageCount;
            destination_comboBox.Text             = EnumUtil.GetDescription(data.Location);

            if (data.JobType.Equals(iManageJobType.Scan))
            {
                scan_RadioButton.Checked = true;
                _soptions = data.ScanOptions;
            }
            else
            {
                print_RadioButton.Checked = true;
                _poptions = data.PrintOptions;
            }
            lockTimeoutControl.Initialize(data.LockTimeouts);
            assetSelectionControl.SelectionChanged += (s, e) => ConfigurationChanged(s, e);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="iManageScanManager" /> class.
 /// </summary>
 /// <param name="executionData">The execution data.</param>
 /// <param name="scanOptions">The scan options.</param>
 /// <param name="serverName">Name of the server.</param>
 public iManageScanManager(PluginExecutionData executionData, LinkScanOptions scanOptions, LockTimeoutData lockTimeoutData, string serverName)
     : base(executionData, scanOptions, lockTimeoutData, serverName)
 {
     _data = executionData.GetMetadata <iManageActivityData>();
 }
 /// <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 iManageActivityData();
     ConfigureControls(_data);
     assetSelectionControl.Initialize(DeviceAttributes);
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IManagePrintManager" /> class.
 /// </summary>
 /// <param name="executionData">The execution data.</param>
 /// <param name="printOptions">The scan options.</param>
 /// <param name="lockTimeoutData">The lock timeout options.</param>
 public iManagePrintManager(PluginExecutionData executionData, LinkPrintOptions printOptions, LockTimeoutData lockTimeoutData)
     : base(executionData, printOptions, lockTimeoutData)
 {
     _data = executionData.GetMetadata <iManageActivityData>();
 }