Example #1
0
 public PdfSaver(IErrorOutput errorOutput, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOverwritePrompt overwritePrompt)
 {
     this.errorOutput = errorOutput;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter = pdfExporter;
     this.overwritePrompt = overwritePrompt;
 }
Example #2
0
 public virtual void SetUp()
 {
     pdfExporter = GetPdfExporter();
     settings    = new PdfSettings
     {
         Metadata =
         {
             Author   = "Test Author",
             Creator  = "Test Creator",
             Keywords = "Test Keywords",
             Subject  = "Test Subject",
             Title    = "Test Title"
         }
     };
     images = new List <Bitmap> {
         ColorBitmap(100, 100, Color.Red),
         ColorBitmap(100, 100, Color.Yellow),
         ColorBitmap(200, 100, Color.Green),
     }.Select(bitmap =>
     {
         using (bitmap)
         {
             return(new ScannedImage(bitmap, ScanBitDepth.C24Bit, false, -1));
         }
     }).ToList();
     if (!Directory.Exists("test"))
     {
         Directory.CreateDirectory("test");
     }
     if (File.Exists(PDF_PATH))
     {
         File.Delete(PDF_PATH);
     }
 }
Example #3
0
 public PdfSaver(IErrorOutput errorOutput, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOverwritePrompt overwritePrompt)
 {
     this.errorOutput          = errorOutput;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter          = pdfExporter;
     this.overwritePrompt      = overwritePrompt;
 }
Example #4
0
 public virtual void SetUp()
 {
     pdfExporter = GetPdfExporter();
     settings = new PdfSettings
     {
         Metadata =
         {
             Author = "Test Author",
             Creator = "Test Creator",
             Keywords = "Test Keywords",
             Subject = "Test Subject",
             Title = "Test Title"
         }
     };
     images = new List<Bitmap> {
         ColorBitmap(100, 100, Color.Red),
         ColorBitmap(100, 100, Color.Yellow),
         ColorBitmap(200, 100, Color.Green),
     }.Select(bitmap =>
     {
         using (bitmap)
         {
             return (IScannedImage)new ScannedImage(bitmap, ScanBitDepth.C24Bit, false, -1);
         }
     }).ToList();
     if (!Directory.Exists("test"))
     {
         Directory.CreateDirectory("test");
     }
     if (File.Exists(PDF_PATH))
     {
         File.Delete(PDF_PATH);
     }
 }
Example #5
0
 public WatchedMoviesByUser(IAlphaCinemaConsole cinemaConsole,
                            IWatchedMovieServices watchedMovieServices, IUserServices userServices, IPdfExporter pdfExporter)
 {
     this.cinemaConsole        = cinemaConsole;
     this.pdfExporter          = pdfExporter;
     this.watchedMovieServices = watchedMovieServices;
     this.userServices         = userServices;
 }
Example #6
0
        public SavePdfOperation(FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOverwritePrompt overwritePrompt, ThreadFactory threadFactory)
        {
            this.fileNamePlaceholders = fileNamePlaceholders;
            this.pdfExporter = pdfExporter;
            this.overwritePrompt = overwritePrompt;
            this.threadFactory = threadFactory;

            AllowCancel = true;
        }
Example #7
0
        public SavePdfOperation(FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOverwritePrompt overwritePrompt, ThreadFactory threadFactory)
        {
            this.fileNamePlaceholders = fileNamePlaceholders;
            this.pdfExporter          = pdfExporter;
            this.overwritePrompt      = overwritePrompt;
            this.threadFactory        = threadFactory;

            AllowCancel = true;
        }
Example #8
0
 public void TearDown()
 {
     pdfExporter = null;
     settings = null;
     foreach (IScannedImage img in images)
     {
         img.Dispose();
     }
     images = null;
 }
Example #9
0
        public SavePdfOperation(FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOverwritePrompt overwritePrompt, IEmailProviderFactory emailProviderFactory)
        {
            this.fileNamePlaceholders = fileNamePlaceholders;
            this.pdfExporter          = pdfExporter;
            this.overwritePrompt      = overwritePrompt;
            this.emailProviderFactory = emailProviderFactory;

            AllowCancel     = true;
            AllowBackground = true;
        }
Example #10
0
 public void TearDown()
 {
     pdfExporter = null;
     settings    = null;
     foreach (ScannedImage img in images)
     {
         img.Dispose();
     }
     images = null;
 }
 public BatchScanPerformer(IScanPerformer scanPerformer, IProfileManager profileManager, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOperationFactory operationFactory, PdfSettingsContainer pdfSettingsContainer, UserConfigManager userConfigManager, IFormFactory formFactory)
 {
     this.scanPerformer        = scanPerformer;
     this.profileManager       = profileManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter          = pdfExporter;
     this.operationFactory     = operationFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.userConfigManager    = userConfigManager;
     this.formFactory          = formFactory;
 }
Example #12
0
 public BatchState(IScanPerformer scanPerformer, IProfileManager profileManager, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOperationFactory operationFactory, PdfSettingsContainer pdfSettingsContainer, OcrDependencyManager ocrDependencyManager, IFormFactory formFactory)
 {
     this.scanPerformer        = scanPerformer;
     this.profileManager       = profileManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter          = pdfExporter;
     this.operationFactory     = operationFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.ocrDependencyManager = ocrDependencyManager;
     this.formFactory          = formFactory;
 }
Example #13
0
 public BatchState(IScanPerformer scanPerformer, IProfileManager profileManager, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOperationFactory operationFactory, PdfSettingsContainer pdfSettingsContainer, UserConfigManager userConfigManager, IFormFactory formFactory)
 {
     this.scanPerformer = scanPerformer;
     this.profileManager = profileManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter = pdfExporter;
     this.operationFactory = operationFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.userConfigManager = userConfigManager;
     this.formFactory = formFactory;
 }
Example #14
0
 public AutomatedScanning(AutomatedScanningOptions options, ImageSaver imageSaver, IPdfExporter pdfExporter, IProfileManager profileManager, IScanPerformer scanPerformer, IErrorOutput errorOutput, IEmailer emailer, IScannedImageImporter scannedImageImporter, IUserConfigManager userConfigManager, PdfSettingsContainer pdfSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, PdfSaver pdfSaver)
 {
     this.options                = options;
     this.imageSaver             = imageSaver;
     this.pdfExporter            = pdfExporter;
     this.profileManager         = profileManager;
     this.scanPerformer          = scanPerformer;
     this.errorOutput            = errorOutput;
     this.emailer                = emailer;
     this.scannedImageImporter   = scannedImageImporter;
     this.userConfigManager      = userConfigManager;
     this.pdfSettingsContainer   = pdfSettingsContainer;
     this.fileNamePlaceholders   = fileNamePlaceholders;
     this.imageSettingsContainer = imageSettingsContainer;
     this.pdfSaver               = pdfSaver;
 }
Example #15
0
 public AutomatedScanning(AutomatedScanningOptions options, ImageSaver imageSaver, IPdfExporter pdfExporter, IProfileManager profileManager, IScanPerformer scanPerformer, IErrorOutput errorOutput, IEmailer emailer, IScannedImageImporter scannedImageImporter, IUserConfigManager userConfigManager, PdfSettingsContainer pdfSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, PdfSaver pdfSaver)
 {
     this.options = options;
     this.imageSaver = imageSaver;
     this.pdfExporter = pdfExporter;
     this.profileManager = profileManager;
     this.scanPerformer = scanPerformer;
     this.errorOutput = errorOutput;
     this.emailer = emailer;
     this.scannedImageImporter = scannedImageImporter;
     this.userConfigManager = userConfigManager;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.imageSettingsContainer = imageSettingsContainer;
     this.pdfSaver = pdfSaver;
 }
Example #16
0
 public PdfController(ISelectedTaskDAO selectedTaskDAO, IFootnotesService footnotesService, IPdfExporter pdfExporter)
 {
     _selectedTaskDAO  = selectedTaskDAO;
     _footnotesService = footnotesService;
     _pdfExporter      = pdfExporter;
 }
 public ExportAllAuthorsCommand(IDTOFactory DTOFactory, IAuthorService authorService, IPdfExporter pdfExporter) : base(DTOFactory)
 {
     this.authorService = authorService;
     this.pdfExporter   = pdfExporter;
 }