示例#1
0
        private void UpdateInputFileProperties(ReadPdfDesigner designer, IFunctionData data)
        {
            designer.Properties[PropertyNames.PdfFilePath].Value = data.Properties["Pdf filename"].Value;

            AuthenticationType authenticationType = data.Properties["Authentication type"].GetValue <AuthenticationType>();

            designer.Properties[PropertyNames.AuthenticationType].Value = authenticationType;
            switch (authenticationType)
            {
            case AuthenticationType.Password:
                designer.Properties[PropertyNames.PdfPassword].Value = data.Properties["Pdf password"].Value;
                break;

            case AuthenticationType.Certificate:
                CertificateSource certificateSource = data.Properties["Certificate source"].GetValue <CertificateSource>();
                designer.Properties[PropertyNames.CertificateSource].Value = certificateSource;
                switch (certificateSource)
                {
                case CertificateSource.File:
                    designer.Properties[PropertyNames.CertificateFilePath].Value     = data.Properties["Certificate file path"].Value;
                    designer.Properties[PropertyNames.CertificateFilePassword].Value = data.Properties["Certificate file password"].Value;
                    break;

                case CertificateSource.Store:
                    designer.Properties[PropertyNames.Certificate].Value = data.Properties["Certificate"].Value;
                    break;
                }
                break;
            }
        }
示例#2
0
        private void UpdateReadTextProperties(ReadPdfDesigner designer, IFunctionData data)
        {
            bool readText = data.Properties["Read text"].GetValue <bool>();

            designer.Properties[PropertyNames.ReadText].Value = readText;
            if (readText)
            {
                designer.Properties[PropertyNames.SplitText].Value = data.Properties["Split text"].Value;
            }
        }
示例#3
0
        private void UpdateReadFormDataProperties(ReadPdfDesigner designer, IFunctionData data)
        {
            bool readFormData = data.Properties["Read form data"].GetValue <bool>();

            designer.Properties[PropertyNames.ReadFormData].Value = readFormData;
            if (readFormData)
            {
                FormExtraction formExtraction = data.Properties["Return form data as"].GetValue <FormExtraction>();
                designer.Properties[PropertyNames.ReturnFormDataAs].Value = formExtraction;
                switch (formExtraction)
                {
                case FormExtraction.CustomType:
                    designer.Properties[PropertyNames.FormDataType].Value = data.Properties["Form data type"].Value;
                    break;

                case FormExtraction.Infer:
                    designer.Properties[PropertyNames.SamplePdf].Value = data.Properties["Sample pdf"].Value;
                    break;
                }
            }
        }
示例#4
0
 private void UpdateReadSignatureProperties(ReadPdfDesigner designer, IFunctionData data)
 {
     designer.Properties[PropertyNames.ReadSignature].Value = data.Properties["Read signature"].Value;
 }