コード例 #1
0
 public QuickActionViewModel(ITranslationUpdater translationUpdater, ICommandLocator commandLocator, IReadableFileSizeFormatter readableFileSizeHelper, ICurrentSettingsProvider currentSettingsProvider) : base(translationUpdater)
 {
     _commandLocator          = commandLocator;
     _readableFileSizeHelper  = readableFileSizeHelper;
     _currentSettingsProvider = currentSettingsProvider;
     StartQuickActionCommand  = new DelegateCommand(StartQuickActionCommandExecute);
     FinishCommand            = new DelegateCommand(OnFinish);
     InitList();
 }
コード例 #2
0
 public UpdateDownloadWindowViewModel(
     ITranslationUpdater translationUpdater, IReadableFileSizeFormatter readableFileSizeFormatter, ApplicationNameProvider applicationNameProvider, IUpdateDownloader updateDownloader, IDispatcher dispatcher)
     : base(translationUpdater)
 {
     _readableFileSizeFormatter = readableFileSizeFormatter;
     _applicationNameProvider   = applicationNameProvider;
     _updateDownloader          = updateDownloader;
     Dispatcher    = dispatcher;
     CancelCommand = new DelegateCommand(ExecuteCancel);
 }
コード例 #3
0
        public QuickActionViewModel(ITranslationUpdater translationUpdater, ICommandLocator commandLocator, IReadableFileSizeFormatter readableFileSizeHelper,
                                    ICurrentSettings <ObservableCollection <ConversionProfile> > profilesProvider, ICurrentSettingsProvider currentSettingsProvider) : base(translationUpdater)
        {
            _saveChangedSettingsCommand = commandLocator.GetCommand <ISaveChangedSettingsCommand>();

            _commandLocator          = commandLocator;
            _readableFileSizeHelper  = readableFileSizeHelper;
            _profilesProvider        = profilesProvider;
            _currentSettingsProvider = currentSettingsProvider;
            FinishCommand            = new DelegateCommand(OnFinish);
            InitList();
        }
コード例 #4
0
        public UpdateDownloadWindowViewModel(IDirectory directory, IFile file, ITempFolderProvider tempFolderProvider,
                                             ITranslationUpdater translationUpdater, IReadableFileSizeFormatter readableFileSizeFormatter, ApplicationNameProvider applicationNameProvider)
            : base(translationUpdater)
        {
            _directory                 = directory;
            _file                      = file;
            _tempFolderProvider        = tempFolderProvider;
            _readableFileSizeFormatter = readableFileSizeFormatter;
            _applicationNameProvider   = applicationNameProvider;
            _dispatcher                = Dispatcher.CurrentDispatcher;

            CancelCommand = new DelegateCommand(ExecuteCancel);
        }
コード例 #5
0
        public void Setup()
        {
            _commandLocator = Substitute.For <ICommandLocator>();
            _testCommand    = Substitute.For <ICommand>();
            _commandLocator.GetCommand <QuickActionOpenWithPdfArchitectCommand>().Returns(_testCommand);
            _fileSizeFormater = Substitute.For <IReadableFileSizeFormatter>();
            _job = new Job(null, null, null, null);
            _currentSettingsProvider = Substitute.For <ICurrentSettingsProvider>();
            _profile      = new ConversionProfile();
            _profile.Guid = "SomeGuid";
            var settings = new PdfCreatorSettings(null);

            settings.ConversionProfiles.Add(_profile);
            _currentSettingsProvider.Profiles.Returns(settings.ConversionProfiles);
            _currentSettingsProvider.Settings.Returns(settings);
            _job.Profile     = _profile;
            _job.OutputFiles = new List <string> {
                "FirstFile.pdf"
            };
        }