Exemplo n.º 1
0
        public MasterForm LoadMasterForm(string attributesFileName, string fieldsFileName)
        {
            FormProcessingEngine tempProcessingEngine = new FormProcessingEngine();

            tempProcessingEngine.OcrEngine = OcrEngine;
            //tempProcessingEngine.BarcodeEngine = null;

            MasterForm form = new MasterForm();

            if (File.Exists(attributesFileName))
            {
                byte[] formData = File.ReadAllBytes(attributesFileName);
                form.Attributes.SetData(formData);
                form.Properties = RecognitionEngine.GetFormProperties(form.Attributes);
            }

            if (File.Exists(fieldsFileName))
            {
                tempProcessingEngine.LoadFields(fieldsFileName);
                form.Resolution      = tempProcessingEngine.Pages[0].DpiX;
                form.ProcessingPages = tempProcessingEngine.Pages;
            }

            return(form);
        }