Esempio n. 1
0
 public PdfSharpExporter(OcrManager ocrManager, ScannedImageRenderer scannedImageRenderer, AppConfigManager appConfigManager, OcrRequestQueue ocrRequestQueue)
 {
     this.ocrManager           = ocrManager;
     this.scannedImageRenderer = scannedImageRenderer;
     this.appConfigManager     = appConfigManager;
     this.ocrRequestQueue      = ocrRequestQueue;
 }
Esempio n. 2
0
 public ScannedImageHelper(ThumbnailRenderer thumbnailRenderer, IOperationFactory operationFactory, IOperationProgress operationProgress, AppConfigManager appConfigManager, IUserConfigManager userConfigManager, OcrRequestQueue ocrRequestQueue, OcrManager ocrManager)
 {
     this.thumbnailRenderer = thumbnailRenderer;
     this.operationFactory  = operationFactory;
     this.operationProgress = operationProgress;
     this.appConfigManager  = appConfigManager;
     this.userConfigManager = userConfigManager;
     this.ocrRequestQueue   = ocrRequestQueue;
     this.ocrManager        = ocrManager;
 }
 public BatchState(IScanPerformer scanPerformer, IProfileManager profileManager, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOperationFactory operationFactory, PdfSettingsContainer pdfSettingsContainer, OcrManager ocrManager, IFormFactory formFactory)
 {
     this.scanPerformer        = scanPerformer;
     this.profileManager       = profileManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter          = pdfExporter;
     this.operationFactory     = operationFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.ocrManager           = ocrManager;
     this.formFactory          = formFactory;
 }
 public WinFormsExportHelper(PdfSettingsContainer pdfSettingsContainer,
                             ImageSettingsContainer imageSettingsContainer, DialogHelper dialogHelper, ChangeTracker changeTracker,
                             IOperationFactory operationFactory, OcrManager ocrManager, IOperationProgress operationProgress)
 {
     this.pdfSettingsContainer   = pdfSettingsContainer;
     this.imageSettingsContainer = imageSettingsContainer;
     this.dialogHelper           = dialogHelper;
     this.changeTracker          = changeTracker;
     this.operationFactory       = operationFactory;
     this.ocrManager             = ocrManager;
     this.operationProgress      = operationProgress;
 }
Esempio n. 5
0
 public AutoSave(IOperationFactory operationFactory, IFormFactory formFactory, PdfSettingsContainer pdfSettingsContainer, OcrManager ocrManager, IErrorOutput errorOutput, AppConfigManager appConfigManager, FileNamePlaceholders fileNamePlaceholders, DialogHelper dialogHelper, IOperationProgress operationProgress)
 {
     this.operationFactory     = operationFactory;
     this.formFactory          = formFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.ocrManager           = ocrManager;
     this.errorOutput          = errorOutput;
     this.appConfigManager     = appConfigManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.dialogHelper         = dialogHelper;
     this.operationProgress    = operationProgress;
 }
Esempio n. 6
0
 public WinFormsExportHelper(PdfSettingsContainer pdfSettingsContainer, ImageSettingsContainer imageSettingsContainer, EmailSettingsContainer emailSettingsContainer, DialogHelper dialogHelper, FileNamePlaceholders fileNamePlaceholders, ChangeTracker changeTracker, IOperationFactory operationFactory, IFormFactory formFactory, OcrManager ocrManager, IEmailProviderFactory emailProviderFactory, IOperationProgress operationProgress, IUserConfigManager userConfigManager)
 {
     this.pdfSettingsContainer   = pdfSettingsContainer;
     this.imageSettingsContainer = imageSettingsContainer;
     this.emailSettingsContainer = emailSettingsContainer;
     this.dialogHelper           = dialogHelper;
     this.fileNamePlaceholders   = fileNamePlaceholders;
     this.changeTracker          = changeTracker;
     this.operationFactory       = operationFactory;
     this.formFactory            = formFactory;
     this.ocrManager             = ocrManager;
     this.emailProviderFactory   = emailProviderFactory;
     this.operationProgress      = operationProgress;
     this.userConfigManager      = userConfigManager;
 }
Esempio n. 7
0
        public FOcrSetup(OcrManager ocrManager, AppConfigManager appConfigManager)
        {
            this.ocrManager       = ocrManager;
            this.appConfigManager = appConfigManager;
            InitializeComponent();

            comboOcrMode.Format += (sender, e) => e.Value = ((Enum)e.ListItem).Description();
            availableModes       = ocrManager.ActiveEngine?.SupportedModes?.ToList();
            if (availableModes != null)
            {
                foreach (var mode in availableModes)
                {
                    comboOcrMode.Items.Add(mode);
                }
            }
        }
Esempio n. 8
0
 public AutomatedScanning(AutomatedScanningOptions options, IProfileManager profileManager, IScanPerformer scanPerformer, IErrorOutput errorOutput, IEmailProviderFactory emailProviderFactory, IScannedImageImporter scannedImageImporter, IUserConfigManager userConfigManager, PdfSettingsContainer pdfSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, IOperationFactory operationFactory, AppConfigManager appConfigManager, OcrManager ocrManager, IFormFactory formFactory, GhostscriptManager ghostscriptManager)
 {
     this.options                = options;
     this.profileManager         = profileManager;
     this.scanPerformer          = scanPerformer;
     this.errorOutput            = errorOutput;
     this.emailProviderFactory   = emailProviderFactory;
     this.scannedImageImporter   = scannedImageImporter;
     this.userConfigManager      = userConfigManager;
     this.pdfSettingsContainer   = pdfSettingsContainer;
     this.fileNamePlaceholders   = fileNamePlaceholders;
     this.imageSettingsContainer = imageSettingsContainer;
     this.operationFactory       = operationFactory;
     this.appConfigManager       = appConfigManager;
     this.ocrManager             = ocrManager;
     this.formFactory            = formFactory;
     this.ghostscriptManager     = ghostscriptManager;
 }
Esempio n. 9
0
        public FOcrLanguageDownload(OcrManager ocrManager)
        {
            this.ocrManager = ocrManager;
            engineToInstall = ocrManager.EngineToInstall;
            InitializeComponent();

            var initialSelection = new HashSet <string>();

            if (ocrManager.InstalledEngine != null && ocrManager.InstalledEngine != engineToInstall)
            {
                // Upgrading from an old version, so pre-select previously used languages
                foreach (var lang in ocrManager.InstalledEngine.LanguageComponents.Where(x => x.IsInstalled))
                {
                    initialSelection.Add(lang.Id);
                }
            }

            if (!engineToInstall.InstalledLanguages.Any())
            {
                // Fresh install, so pre-select English as a sensible default
                initialSelection.Add("ocr-eng");
            }

            // Populate the list of language options
            // Special case for English: sorted to the top of the list
            var languageOptions = engineToInstall.NotInstalledLanguages
                                  .OrderBy(x => x.Code == "eng" ? "AAA" : x.Name);

            foreach (var languageOption in languageOptions)
            {
                var item = new ListViewItem {
                    Text = languageOption.Name, Tag = languageOption.Code
                };
                if (initialSelection.Contains($"ocr-{languageOption.Code}"))
                {
                    item.Checked = true;
                }
                lvLanguages.Items.Add(item);
            }

            UpdateView();
        }