Ejemplo n.º 1
0
 public void PerformBatchScan(BatchSettings settings, FormBase batchForm, Action<ScannedImage> imageCallback, Func<string, bool> progressCallback)
 {
     var state = new BatchState(scanPerformer, profileManager, fileNamePlaceholders, pdfExporter, operationFactory, pdfSettingsContainer, userConfigManager, formFactory)
     {
         Settings = settings,
         ProgressCallback = progressCallback,
         BatchForm = batchForm,
         LoadImageCallback = imageCallback
     };
     state.Do();
 }
Ejemplo n.º 2
0
        public void PerformBatchScan(BatchSettings settings, FormBase batchForm, Action <ScannedImage> imageCallback, Func <string, bool> progressCallback)
        {
            var state = new BatchState(scanPerformer, profileManager, fileNamePlaceholders, pdfExporter, operationFactory, pdfSettingsContainer, ocrDependencyManager, formFactory)
            {
                Settings          = settings,
                ProgressCallback  = progressCallback,
                BatchForm         = batchForm,
                LoadImageCallback = imageCallback
            };

            state.Do();
        }
Ejemplo n.º 3
0
 public async Task PerformBatchScan(BatchSettings settings, FormBase batchForm, Action <ScannedImage> imageCallback, Action <string> progressCallback, CancellationToken cancelToken)
 {
     var state = new BatchState(scanPerformer, profileManager, fileNamePlaceholders, pdfExporter, operationFactory, pdfSettingsContainer, ocrManager, formFactory)
     {
         Settings          = settings,
         ProgressCallback  = progressCallback,
         CancelToken       = cancelToken,
         BatchForm         = batchForm,
         LoadImageCallback = imageCallback
     };
     await state.Do();
 }
Ejemplo n.º 4
0
        protected override void OnLoad(object sender, EventArgs eventArgs)
        {
            new LayoutManager(this)
                .Bind(groupboxScanConfig, groupboxOutput,
                      panelSaveSeparator, panelSaveTo, panelSaveType, panelScanDetails, panelScanType,
                      comboProfile, txtFilePath, lblStatus)
                    .WidthToForm()
                .Bind(btnEditProfile, btnAddProfile, btnStart, btnCancel, btnChooseFolder)
                    .RightToForm()
                .Activate();

            btnAddProfile.Enabled = !(appConfigManager.Config.NoUserProfiles && profileManager.Profiles.Any(x => x.IsLocked));

            ConditionalControls.LockHeight(this);

            BatchSettings = userConfigManager.Config.LastBatchSettings ?? new BatchSettings();
            UpdateUIFromSettings();
        }