コード例 #1
0
 public UacAssistant(ITranslator translator, IInteractionInvoker invoker, IShellExecuteHelper shellExecuteHelper, IPDFCreatorNameProvider pdfCreatorNameProvider)
 {
     _translator             = translator;
     _invoker                = invoker;
     _shellExecuteHelper     = shellExecuteHelper;
     _pdfCreatorNameProvider = pdfCreatorNameProvider;
 }
コード例 #2
0
ファイル: UacAssistant.cs プロジェクト: lorddev/PDFCreator
 public UacAssistant(ApplicationSettingsWindowTranslation translation, IInteractionInvoker invoker, IShellExecuteHelper shellExecuteHelper, IPDFCreatorNameProvider pdfCreatorNameProvider)
 {
     _translation            = translation;
     _invoker                = invoker;
     _shellExecuteHelper     = shellExecuteHelper;
     _pdfCreatorNameProvider = pdfCreatorNameProvider;
 }
コード例 #3
0
ファイル: UacAssistant.cs プロジェクト: wholesky/PDFCreator
        public UacAssistant(ITranslationUpdater translationUpdater, IInteractionInvoker invoker, IShellExecuteHelper shellExecuteHelper, IPDFCreatorNameProvider pdfCreatorNameProvider)
        {
            _invoker                = invoker;
            _shellExecuteHelper     = shellExecuteHelper;
            _pdfCreatorNameProvider = pdfCreatorNameProvider;

            translationUpdater.RegisterAndSetTranslation(tf => _translation = tf.UpdateOrCreateTranslation(_translation));
        }
コード例 #4
0
 public RepairPrinterAssistant(IInteractionInvoker interactionInvoker, IPrinterHelper printerHelper, IShellExecuteHelper shellExecuteHelper, IFile file, IAssemblyHelper assemblyHelper, IPDFCreatorNameProvider nameProvider, ITranslationFactory iTranslationFactory)
 {
     _interactionInvoker = interactionInvoker;
     _printerHelper      = printerHelper;
     _translation        = iTranslationFactory.CreateTranslation <ApplicationTranslation>();;
     _shellExecuteHelper = shellExecuteHelper;
     _file           = file;
     _assemblyHelper = assemblyHelper;
     _nameProvider   = nameProvider;
 }
コード例 #5
0
        public void Setup()
        {
            var exeName = "PDFCreator.exe";

            _assemblyFolder    = @"X:\Programs\My Folder";
            _pdfcreatorPath    = Path.Combine(_assemblyFolder, exeName);
            _printerHelperPath = Path.Combine(_assemblyFolder, "PrinterHelper.exe");

            _assemblyHelper = Substitute.For <IAssemblyHelper>();
            _assemblyHelper.GetPdfforgeAssemblyDirectory().Returns(_assemblyFolder);

            _interactionInvoker = Substitute.For <IInteractionInvoker>();
            _printerHelper      = Substitute.For <IPrinterHelper>();
            _shellExecuteHelper = Substitute.For <IShellExecuteHelper>();
            _file         = Substitute.For <IFile>();
            _nameProvider = Substitute.For <IPDFCreatorNameProvider>();
            _nameProvider.GetExeName().Returns(exeName);
            _nameProvider.GetExePath().Returns(_pdfcreatorPath);
            _nameProvider.GetPortApplicationPath().Returns(_pdfcreatorPath);
        }