コード例 #1
0
ファイル: FEditProfile.cs プロジェクト: damieng/naps2
        public FEditProfile(IScanDriverFactory driverFactory, IErrorOutput errorOutput, ProfileNameTracker profileNameTracker, AppConfigManager appConfigManager)
        {
            this.driverFactory      = driverFactory;
            this.errorOutput        = errorOutput;
            this.profileNameTracker = profileNameTracker;
            this.appConfigManager   = appConfigManager;
            InitializeComponent();
            btnNetwork.Left = btnChooseDevice.Right + 6;
            // TODO: Remove this to reenable
            btnNetwork.Visible = false;

            AddEnumItems <ScanHorizontalAlign>(cmbAlign);
            AddEnumItems <ScanBitDepth>(cmbDepth);
            AddEnumItems <ScanDpi>(cmbResolution);
            AddEnumItems <ScanScale>(cmbScale);
            AddEnumItems <ScanSource>(cmbSource);
            cmbPage.Format += (sender, e) =>
            {
                var item = (PageSizeListItem)e.ListItem;
                e.Value = item.Label;
            };

            rdWIA.Visible   = PlatformCompat.System.IsWiaDriverSupported;
            rdTWAIN.Visible = PlatformCompat.System.IsTwainDriverSupported;
            rdSANE.Visible  = PlatformCompat.System.IsSaneDriverSupported;
        }
コード例 #2
0
ファイル: FDesktop.cs プロジェクト: allanmukhwana/naps2
        public FDesktop(IEmailer emailer, ImageSaver imageSaver, StringWrapper stringWrapper, AppConfigManager appConfigManager, RecoveryManager recoveryManager, IScannedImageImporter scannedImageImporter, AutoUpdaterUI autoUpdaterUI, OcrDependencyManager ocrDependencyManager, IProfileManager profileManager, IScanPerformer scanPerformer, IScannedImagePrinter scannedImagePrinter, ChangeTracker changeTracker, EmailSettingsContainer emailSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, PdfSettingsContainer pdfSettingsContainer, PdfSaver pdfSaver, IErrorOutput errorOutput)
        {
            this.emailer                = emailer;
            this.imageSaver             = imageSaver;
            this.stringWrapper          = stringWrapper;
            this.appConfigManager       = appConfigManager;
            this.recoveryManager        = recoveryManager;
            this.scannedImageImporter   = scannedImageImporter;
            this.autoUpdaterUI          = autoUpdaterUI;
            this.ocrDependencyManager   = ocrDependencyManager;
            this.profileManager         = profileManager;
            this.scanPerformer          = scanPerformer;
            this.scannedImagePrinter    = scannedImagePrinter;
            this.changeTracker          = changeTracker;
            this.emailSettingsContainer = emailSettingsContainer;
            this.fileNamePlaceholders   = fileNamePlaceholders;
            this.imageSettingsContainer = imageSettingsContainer;
            this.pdfSettingsContainer   = pdfSettingsContainer;
            this.pdfSaver               = pdfSaver;
            this.errorOutput            = errorOutput;
            InitializeComponent();

            thumbnailList1.MouseWheel += thumbnailList1_MouseWheel;
            Shown       += FDesktop_Shown;
            FormClosing += FDesktop_FormClosing;
            Closed      += FDesktop_Closed;
        }
コード例 #3
0
 public ImageSaver(IErrorOutput errorOutput, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, IOverwritePrompt overwritePrompt)
 {
     this.errorOutput            = errorOutput;
     this.fileNamePlaceholders   = fileNamePlaceholders;
     this.imageSettingsContainer = imageSettingsContainer;
     this.overwritePrompt        = overwritePrompt;
 }
コード例 #4
0
ファイル: PdfSaver.cs プロジェクト: rprenhol/naps2
 public PdfSaver(IErrorOutput errorOutput, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOverwritePrompt overwritePrompt)
 {
     this.errorOutput = errorOutput;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter = pdfExporter;
     this.overwritePrompt = overwritePrompt;
 }
コード例 #5
0
ファイル: PdfSaver.cs プロジェクト: allanmukhwana/naps2
 public PdfSaver(IErrorOutput errorOutput, FileNamePlaceholders fileNamePlaceholders, IPdfExporter pdfExporter, IOverwritePrompt overwritePrompt)
 {
     this.errorOutput          = errorOutput;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.pdfExporter          = pdfExporter;
     this.overwritePrompt      = overwritePrompt;
 }
コード例 #6
0
ファイル: ImageSaver.cs プロジェクト: rprenhol/naps2
 public ImageSaver(IErrorOutput errorOutput, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, IOverwritePrompt overwritePrompt)
 {
     this.errorOutput = errorOutput;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.imageSettingsContainer = imageSettingsContainer;
     this.overwritePrompt = overwritePrompt;
 }
コード例 #7
0
ファイル: FProgress.cs プロジェクト: cyanfish/naps2
        public FProgress(IErrorOutput errorOutput)
        {
            this.errorOutput = errorOutput;
            InitializeComponent();

            RestoreFormState = false;
        }
コード例 #8
0
 public PrMain(IVMain view, IModel model)
 {
     View              = view;
     Model             = model;
     DatabaseGenerator = new DbFileGenerator();
     ErrHandler        = new ErrorOutput();
 }
コード例 #9
0
 public ScanPerformer(IScanDriverFactory driverFactory, IErrorOutput errorOutput, IAutoSave autoSave, AppConfigManager appConfigManager)
 {
     this.driverFactory    = driverFactory;
     this.errorOutput      = errorOutput;
     this.autoSave         = autoSave;
     this.appConfigManager = appConfigManager;
 }
コード例 #10
0
        public FProgress(IErrorOutput errorOutput)
        {
            this.errorOutput = errorOutput;
            InitializeComponent();

            RestoreFormState = false;
        }
コード例 #11
0
ファイル: ScanPerformer.cs プロジェクト: lapuinka/naps2
 public ScanPerformer(IScanDriverFactory driverFactory, IErrorOutput errorOutput, IAutoSave autoSave, AppConfigManager appConfigManager)
 {
     this.driverFactory = driverFactory;
     this.errorOutput = errorOutput;
     this.autoSave = autoSave;
     this.appConfigManager = appConfigManager;
 }
コード例 #12
0
ファイル: FDesktop.cs プロジェクト: allanmukhwana/naps2
        public FDesktop(IEmailer emailer, ImageSaver imageSaver, StringWrapper stringWrapper, AppConfigManager appConfigManager, RecoveryManager recoveryManager, IScannedImageImporter scannedImageImporter, AutoUpdaterUI autoUpdaterUI, OcrDependencyManager ocrDependencyManager, IProfileManager profileManager, IScanPerformer scanPerformer, IScannedImagePrinter scannedImagePrinter, ChangeTracker changeTracker, EmailSettingsContainer emailSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, PdfSettingsContainer pdfSettingsContainer, PdfSaver pdfSaver, IErrorOutput errorOutput)
        {
            this.emailer = emailer;
            this.imageSaver = imageSaver;
            this.stringWrapper = stringWrapper;
            this.appConfigManager = appConfigManager;
            this.recoveryManager = recoveryManager;
            this.scannedImageImporter = scannedImageImporter;
            this.autoUpdaterUI = autoUpdaterUI;
            this.ocrDependencyManager = ocrDependencyManager;
            this.profileManager = profileManager;
            this.scanPerformer = scanPerformer;
            this.scannedImagePrinter = scannedImagePrinter;
            this.changeTracker = changeTracker;
            this.emailSettingsContainer = emailSettingsContainer;
            this.fileNamePlaceholders = fileNamePlaceholders;
            this.imageSettingsContainer = imageSettingsContainer;
            this.pdfSettingsContainer = pdfSettingsContainer;
            this.pdfSaver = pdfSaver;
            this.errorOutput = errorOutput;
            InitializeComponent();

            thumbnailList1.MouseWheel += thumbnailList1_MouseWheel;
            Shown += FDesktop_Shown;
            FormClosing += FDesktop_FormClosing;
            Closed += FDesktop_Closed;
        }
コード例 #13
0
 public MapIEmailProvider(IWorkerServiceFactory workerServiceFactory, MapiWrapper mapIWrapper, IErrorOutput errorOutput, IUserConfigManager userConfigManager)
 {
     this.workerServiceFactory = workerServiceFactory;
     this.mapIWrapper          = mapIWrapper;
     this.errorOutput          = errorOutput;
     this.userConfigManager    = userConfigManager;
 }
コード例 #14
0
        public FProgress(IErrorOutput errorOutput, IOperationProgress operationProgress)
        {
            this.errorOutput       = errorOutput;
            this.operationProgress = operationProgress;
            InitializeComponent();

            RestoreFormState = false;
        }
コード例 #15
0
ファイル: PdfSharpImporter.cs プロジェクト: Mebus/naps2
 public PdfSharpImporter(IErrorOutput errorOutput, IPdfPasswordProvider pdfPasswordProvider, ThumbnailRenderer thumbnailRenderer, ScannedImageRenderer scannedImageRenderer, IPdfRenderer pdfRenderer)
 {
     this.errorOutput          = errorOutput;
     this.pdfPasswordProvider  = pdfPasswordProvider;
     this.thumbnailRenderer    = thumbnailRenderer;
     this.scannedImageRenderer = scannedImageRenderer;
     this.pdfRenderer          = pdfRenderer;
 }
コード例 #16
0
 public PrAddRecord(IVAddRecord view, IVMain mainView, IModel model, IPrMain mainPresenter)
 {
     View          = view;
     MainView      = mainView;
     Model         = model;
     MainPresenter = mainPresenter;
     ErrHandler    = new ErrorOutput();
 }
コード例 #17
0
ファイル: GhostscriptPdfRenderer.cs プロジェクト: Mebus/naps2
        public GhostscriptPdfRenderer(IComponentInstallPrompt componentInstallPrompt, AppConfigManager appConfigManager, IErrorOutput errorOutput)
        {
            this.componentInstallPrompt = componentInstallPrompt;
            this.appConfigManager       = appConfigManager;
            this.errorOutput            = errorOutput;

            gsLibBytes = new Lazy <byte[]>(() => File.ReadAllBytes(Dependencies.GhostscriptComponent.Path));
            ExternalComponent.InitBasePath(appConfigManager);
        }
コード例 #18
0
ファイル: ScanPerformer.cs プロジェクト: gas3/twain
 public ScanPerformer(IScanDriverFactory driverFactory, IErrorOutput errorOutput, IAutoSave autoSave, AppConfigManager appConfigManager, IProfileManager profileManager, ScannedImageHelper scannedImageHelper)
 {
     this.driverFactory      = driverFactory;
     this.errorOutput        = errorOutput;
     this.autoSave           = autoSave;
     this.appConfigManager   = appConfigManager;
     this.profileManager     = profileManager;
     this.scannedImageHelper = scannedImageHelper;
 }
コード例 #19
0
        public GhostscriptPdfRenderer(IComponentInstallPrompt componentInstallPrompt, AppConfigManager appConfigManager, IErrorOutput errorOutput, GhostScriptManager ghostScriptManager)
        {
            this.componentInstallPrompt = componentInstallPrompt;
            this.appConfigManager       = appConfigManager;
            this.errorOutput            = errorOutput;
            this.ghostScriptManager     = ghostScriptManager;

            gsLibBytes = new Lazy <byte[]>(() => File.ReadAllBytes(ghostScriptManager.GhostScriptComponent.Path));
        }
コード例 #20
0
ファイル: IAutoSave.cs プロジェクト: royal50911/naps2
 public AutoSave(IOperationFactory operationFactory, IFormFactory formFactory, PdfSettingsContainer pdfSettingsContainer, IUserConfigManager userConfigManager, IErrorOutput errorOutput, AppConfigManager appConfigManager, FileNamePlaceholders fileNamePlaceholders)
 {
     this.operationFactory     = operationFactory;
     this.formFactory          = formFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.userConfigManager    = userConfigManager;
     this.errorOutput          = errorOutput;
     this.appConfigManager     = appConfigManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
 }
コード例 #21
0
ファイル: AutoSave.cs プロジェクト: cyanfish/naps2
 public AutoSave(IOperationFactory operationFactory, IFormFactory formFactory, PdfSettingsContainer pdfSettingsContainer, IUserConfigManager userConfigManager, IErrorOutput errorOutput, AppConfigManager appConfigManager, FileNamePlaceholders fileNamePlaceholders)
 {
     this.operationFactory = operationFactory;
     this.formFactory = formFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.userConfigManager = userConfigManager;
     this.errorOutput = errorOutput;
     this.appConfigManager = appConfigManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
 }
コード例 #22
0
ファイル: SaveImagesOperation.cs プロジェクト: v0id24/naps2
        public SaveImagesOperation(IErrorOutput errorOutput, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, IOverwritePrompt overwritePrompt, ThreadFactory threadFactory)
        {
            this.errorOutput = errorOutput;
            this.fileNamePlaceholders = fileNamePlaceholders;
            this.imageSettingsContainer = imageSettingsContainer;
            this.overwritePrompt = overwritePrompt;
            this.threadFactory = threadFactory;

            ProgressTitle = MiscResources.SaveImagesProgress;
            AllowCancel = true;
        }
コード例 #23
0
        public SaveImagesOperation(IErrorOutput errorOutput, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, IOverwritePrompt overwritePrompt, ThreadFactory threadFactory)
        {
            this.errorOutput            = errorOutput;
            this.fileNamePlaceholders   = fileNamePlaceholders;
            this.imageSettingsContainer = imageSettingsContainer;
            this.overwritePrompt        = overwritePrompt;
            this.threadFactory          = threadFactory;

            ProgressTitle = MiscResources.SaveImagesProgress;
            AllowCancel   = true;
        }
コード例 #24
0
 public AutoSave(IOperationFactory operationFactory, IFormFactory formFactory, PdfSettingsContainer pdfSettingsContainer, OcrDependencyManager ocrDependencyManager, IErrorOutput errorOutput, AppConfigManager appConfigManager, FileNamePlaceholders fileNamePlaceholders, DialogHelper dialogHelper)
 {
     this.operationFactory     = operationFactory;
     this.formFactory          = formFactory;
     this.pdfSettingsContainer = pdfSettingsContainer;
     this.ocrDependencyManager = ocrDependencyManager;
     this.errorOutput          = errorOutput;
     this.appConfigManager     = appConfigManager;
     this.fileNamePlaceholders = fileNamePlaceholders;
     this.dialogHelper         = dialogHelper;
 }
コード例 #25
0
 public FEditScanSettings(IScanDriverFactory driverFactory, IErrorOutput errorOutput)
 {
     this.driverFactory = driverFactory;
     this.errorOutput   = errorOutput;
     InitializeComponent();
     AddEnumItems <ScanHorizontalAlign>(cmbAlign);
     AddEnumItems <ScanBitDepth>(cmbDepth);
     AddEnumItems <ScanPageSize>(cmbPage, FormatPageSize);
     AddEnumItems <ScanDpi>(cmbResolution);
     AddEnumItems <ScanScale>(cmbScale);
     AddEnumItems <ScanSource>(cmbSource);
 }
コード例 #26
0
ファイル: FEditScanSettings.cs プロジェクト: rprenhol/naps2
 public FEditScanSettings(IScanDriverFactory driverFactory, IErrorOutput errorOutput)
 {
     this.driverFactory = driverFactory;
     this.errorOutput = errorOutput;
     InitializeComponent();
     AddEnumItems<ScanHorizontalAlign>(cmbAlign);
     AddEnumItems<ScanBitDepth>(cmbDepth);
     AddEnumItems<ScanPageSize>(cmbPage, FormatPageSize);
     AddEnumItems<ScanDpi>(cmbResolution);
     AddEnumItems<ScanScale>(cmbScale);
     AddEnumItems<ScanSource>(cmbSource);
 }
コード例 #27
0
ファイル: FBatchScan.cs プロジェクト: gas3/twain
        public FBatchScan(IProfileManager profileManager, AppConfigManager appConfigManager, IUserConfigManager userConfigManager, BatchScanPerformer batchScanPerformer, IErrorOutput errorOutput, DialogHelper dialogHelper)
        {
            this.profileManager     = profileManager;
            this.appConfigManager   = appConfigManager;
            this.userConfigManager  = userConfigManager;
            this.batchScanPerformer = batchScanPerformer;
            this.errorOutput        = errorOutput;
            this.dialogHelper       = dialogHelper;
            InitializeComponent();

            RestoreFormState = false;
        }
コード例 #28
0
ファイル: UpdateOperation.cs プロジェクト: gas3/twain
        public UpdateOperation(IErrorOutput errorOutput)
        {
            this.errorOutput = errorOutput;

            ProgressTitle   = MiscResources.UpdateProgress;
            AllowBackground = true;
            AllowCancel     = true;
            Status          = new OperationStatus
            {
                StatusText   = MiscResources.Updating,
                ProgressType = OperationProgressType.MB
            };
        }
コード例 #29
0
ファイル: FBatchScan.cs プロジェクト: lapuinka/naps2
        public FBatchScan(IProfileManager profileManager, AppConfigManager appConfigManager, IconButtonSizer iconButtonSizer, IScanPerformer scanPerformer, IUserConfigManager userConfigManager, BatchScanPerformer batchScanPerformer, IErrorOutput errorOutput, ThreadFactory threadFactory)
        {
            this.profileManager = profileManager;
            this.appConfigManager = appConfigManager;
            this.iconButtonSizer = iconButtonSizer;
            this.scanPerformer = scanPerformer;
            this.userConfigManager = userConfigManager;
            this.batchScanPerformer = batchScanPerformer;
            this.errorOutput = errorOutput;
            this.threadFactory = threadFactory;
            InitializeComponent();

            RestoreFormState = false;
        }
コード例 #30
0
ファイル: FEditScanSettings.cs プロジェクト: v0id24/naps2
 public FEditScanSettings(IScanDriverFactory driverFactory, IErrorOutput errorOutput, ProfileNameTracker profileNameTracker, AppConfigManager appConfigManager)
 {
     this.driverFactory = driverFactory;
     this.errorOutput = errorOutput;
     this.profileNameTracker = profileNameTracker;
     this.appConfigManager = appConfigManager;
     InitializeComponent();
     AddEnumItems<ScanHorizontalAlign>(cmbAlign);
     AddEnumItems<ScanBitDepth>(cmbDepth);
     AddEnumItems<ScanPageSize>(cmbPage, FormatPageSize);
     AddEnumItems<ScanDpi>(cmbResolution);
     AddEnumItems<ScanScale>(cmbScale);
     AddEnumItems<ScanSource>(cmbSource);
 }
コード例 #31
0
ファイル: AutomatedScanning.cs プロジェクト: lapuinka/naps2
 public AutomatedScanning(AutomatedScanningOptions options, IProfileManager profileManager, IScanPerformer scanPerformer, IErrorOutput errorOutput, IEmailer emailer, IScannedImageImporter scannedImageImporter, IUserConfigManager userConfigManager, PdfSettingsContainer pdfSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, IOperationFactory operationFactory)
 {
     this.options = options;
     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.operationFactory = operationFactory;
 }
コード例 #32
0
ファイル: AutomatedScanning.cs プロジェクト: semtle/naps2
 public AutomatedScanning(AutomatedScanningOptions options, IProfileManager profileManager, IScanPerformer scanPerformer, IErrorOutput errorOutput, IEmailer emailer, IScannedImageImporter scannedImageImporter, IUserConfigManager userConfigManager, PdfSettingsContainer pdfSettingsContainer, FileNamePlaceholders fileNamePlaceholders, ImageSettingsContainer imageSettingsContainer, IOperationFactory operationFactory, AppConfigManager appConfigManager)
 {
     this.options                = options;
     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.operationFactory       = operationFactory;
     this.appConfigManager       = appConfigManager;
 }
コード例 #33
0
        public FBatchScan(IProfileManager profileManager, AppConfigManager appConfigManager, IconButtonSizer iconButtonSizer, IScanPerformer scanPerformer, IUserConfigManager userConfigManager, BatchScanPerformer batchScanPerformer, IErrorOutput errorOutput, ThreadFactory threadFactory, DialogHelper dialogHelper)
        {
            this.profileManager     = profileManager;
            this.appConfigManager   = appConfigManager;
            this.iconButtonSizer    = iconButtonSizer;
            this.scanPerformer      = scanPerformer;
            this.userConfigManager  = userConfigManager;
            this.batchScanPerformer = batchScanPerformer;
            this.errorOutput        = errorOutput;
            this.threadFactory      = threadFactory;
            this.dialogHelper       = dialogHelper;
            InitializeComponent();

            RestoreFormState = false;
        }
コード例 #34
0
ファイル: FComment.cs プロジェクト: bmttek/App_DeskStats
 public FComment(string label, string valType, IFormFactory formFactory, IStatProvider statProvider, IErrorOutput errorOutput, IIlsProvider ilsProvider, IConfigManager configManager, NotificationManager notify, IOperationProgress operationProgress, ChangeTracker changeTracker)
 {
     this.configManager = configManager;
     this.valType       = valType;
     this.label         = label;
     InitializeComponent();
     this.notify            = notify;
     this.operationProgress = operationProgress;
     this.statProvider      = statProvider;
     this.changeTracker     = changeTracker;
     notify.ParentForm      = this;
     this.formFactory       = formFactory;
     this.errorOutput       = errorOutput;
     this.ilsProvider       = ilsProvider;
     FormClosing           += FComment_FormClosing;
     Closed += FComment_Closed;
 }
コード例 #35
0
ファイル: FEditProfile.cs プロジェクト: cyanfish/naps2
 public FEditProfile(IScanDriverFactory driverFactory, IErrorOutput errorOutput, ProfileNameTracker profileNameTracker, AppConfigManager appConfigManager)
 {
     this.driverFactory = driverFactory;
     this.errorOutput = errorOutput;
     this.profileNameTracker = profileNameTracker;
     this.appConfigManager = appConfigManager;
     InitializeComponent();
     AddEnumItems<ScanHorizontalAlign>(cmbAlign);
     AddEnumItems<ScanBitDepth>(cmbDepth);
     AddEnumItems<ScanDpi>(cmbResolution);
     AddEnumItems<ScanScale>(cmbScale);
     AddEnumItems<ScanSource>(cmbSource);
     cmbPage.Format += (sender, e) =>
     {
         var item = (PageSizeListItem)e.ListItem;
         e.Value = item.Label;
     };
 }
コード例 #36
0
        public LocalDatabaseManager(INetworkSourceSettings networkSourceSettings, IFileSourceSettings fileSourceSettings, IErrorOutput errorOutput)
        {
            _networkSourceSettings = networkSourceSettings;
            _fileSourceSettings    = fileSourceSettings;
            _errorOutput           = errorOutput;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls |
                                                   SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
            var clientHandler = new HttpClientHandler
            {
                UseProxy = false
            };

            _httpClient = new HttpClient(clientHandler);
            var assemlyName = Assembly.GetExecutingAssembly().GetName();

            _httpClient.DefaultRequestHeaders.UserAgent.ParseAdd($"{assemlyName.Name}/{assemlyName.Version.ToString(3)}");
            _httpClient.Timeout = TimeSpan.FromSeconds(30);
        }
コード例 #37
0
ファイル: FDesktop.cs プロジェクト: bmttek/App_DeskStats
 public FDesktop(IFormFactory formFactory, IStatProvider statProvider, IErrorOutput errorOutput, IIlsProvider ilsProvider, IConfigManager configManager, NotificationManager notify, IOperationProgress operationProgress, ChangeTracker changeTracker)
 {
     this.configManager = configManager;
     InitializeComponent();
     this.notify            = notify;
     this.operationProgress = operationProgress;
     this.statProvider      = statProvider;
     this.changeTracker     = changeTracker;
     notify.ParentForm      = this;
     this.formFactory       = formFactory;
     this.errorOutput       = errorOutput;
     this.ilsProvider       = ilsProvider;
     statUser       = new StatUser();
     locations      = new List <Location>();
     apiStatWrapper = new ApiStatsWrapper(errorOutput, configManager, formFactory);
     FormClosing   += FDesktop_FormClosing;
     Closed        += FDesktop_Closed;
 }
コード例 #38
0
 public FEditProfile(IScanDriverFactory driverFactory, IErrorOutput errorOutput, ProfileNameTracker profileNameTracker, AppConfigManager appConfigManager)
 {
     this.driverFactory      = driverFactory;
     this.errorOutput        = errorOutput;
     this.profileNameTracker = profileNameTracker;
     this.appConfigManager   = appConfigManager;
     InitializeComponent();
     AddEnumItems <ScanHorizontalAlign>(cmbAlign);
     AddEnumItems <ScanBitDepth>(cmbDepth);
     AddEnumItems <ScanDpi>(cmbResolution);
     AddEnumItems <ScanScale>(cmbScale);
     AddEnumItems <ScanSource>(cmbSource);
     cmbPage.Format += (sender, e) =>
     {
         var item = (PageSizeListItem)e.ListItem;
         e.Value = item.Label;
     };
 }
コード例 #39
0
 public ConsoleOverwritePrompt(IErrorOutput errorOutput)
 {
     this.errorOutput = errorOutput;
 }
コード例 #40
0
ファイル: PdfSharpImporter.cs プロジェクト: cyanfish/naps2
 public PdfSharpImporter(IErrorOutput errorOutput, IPdfPasswordProvider pdfPasswordProvider, ThumbnailRenderer thumbnailRenderer)
 {
     this.errorOutput = errorOutput;
     this.pdfPasswordProvider = pdfPasswordProvider;
     this.thumbnailRenderer = thumbnailRenderer;
 }
コード例 #41
0
 public FormEditRecord(IModel model, IPrMain mainPresenter)
 {
     InitializeComponent();
     Presenter  = new PrEditRecord(this, Application.OpenForms["FormMain"] as FormMain, model, mainPresenter);
     ErrHandler = new ErrorOutput();
 }
コード例 #42
0
 public PdfSharpImporter(IScannedImageFactory scannedImageFactory, IErrorOutput errorOutput, IPdfPasswordProvider pdfPasswordProvider)
 {
     this.scannedImageFactory = scannedImageFactory;
     this.errorOutput = errorOutput;
     this.pdfPasswordProvider = pdfPasswordProvider;
 }
コード例 #43
0
ファイル: ConsoleOverwritePrompt.cs プロジェクト: gas3/twain
 public ConsoleOverwritePrompt(IErrorOutput errorOutput)
 {
     this.errorOutput = errorOutput;
 }
コード例 #44
0
ファイル: MapiEmailer.cs プロジェクト: lapuinka/naps2
 public MapiEmailer(IErrorOutput errorOutput)
 {
     this.errorOutput = errorOutput;
 }
コード例 #45
0
ファイル: MapiEmailer.cs プロジェクト: royal50911/naps2
 public MapiEmailer(IErrorOutput errorOutput)
 {
     this.errorOutput = errorOutput;
 }
コード例 #46
0
ファイル: MapiEmailProvider.cs プロジェクト: tozehu/naps2
 public MapiEmailProvider(IWorkerServiceFactory workerServiceFactory, MapiWrapper mapiWrapper, IErrorOutput errorOutput)
 {
     this.workerServiceFactory = workerServiceFactory;
     this.mapiWrapper          = mapiWrapper;
     this.errorOutput          = errorOutput;
 }
コード例 #47
0
 public ConsolePdfPasswordProvider(IErrorOutput errorOutput)
 {
     this.errorOutput = errorOutput;
 }
コード例 #48
0
ファイル: PdfSharpImporter.cs プロジェクト: v0id24/naps2
 public PdfSharpImporter(IErrorOutput errorOutput, IPdfPasswordProvider pdfPasswordProvider)
 {
     this.errorOutput = errorOutput;
     this.pdfPasswordProvider = pdfPasswordProvider;
 }
コード例 #49
0
ファイル: ScanPerformer.cs プロジェクト: rprenhol/naps2
 public ScanPerformer(IScanDriverFactory driverFactory, IErrorOutput errorOutput)
 {
     this.driverFactory = driverFactory;
     this.errorOutput = errorOutput;
 }