public SmtpAccountEditCommand(IInteractionRequest interactionRequest, ICurrentSettings <Accounts> accountsProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _accountsProvider = accountsProvider; }
protected ProfileCommandBase(IInteractionRequest interactionRequest, ICurrentSettingsProvider currentSettingsProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { InteractionRequest = interactionRequest; CurrentSettingsProvider = currentSettingsProvider; translationUpdater.RegisterAndSetTranslation(this); }
public SignUserControlViewModel(IInteractionRequest interactionRequest, IFile file, IOpenFileInteractionHelper openFileInteractionHelper, EditionHintOptionProvider editionHintOptionProvider, ITranslationUpdater translationUpdater, ISelectedProfileProvider selectedProfile, ICurrentSettingsProvider currentSettingsProvider, ICommandLocator commandLocator) : base(translationUpdater, selectedProfile) { _file = file; _openFileInteractionHelper = openFileInteractionHelper; _interactionRequest = interactionRequest; _currentSettingsProvider = currentSettingsProvider; if (editionHintOptionProvider != null) { OnlyForPlusAndBusiness = editionHintOptionProvider.ShowOnlyForPlusAndBusinessHint; } if (currentSettingsProvider?.Settings != null) { _timeServerAccounts = currentSettingsProvider.Settings.ApplicationSettings.Accounts.TimeServerAccounts; TimeServerAccountsView = new ListCollectionView(_timeServerAccounts); TimeServerAccountsView.SortDescriptions.Add(new SortDescription(nameof(TimeServerAccount.AccountInfo), ListSortDirection.Ascending)); } ChooseCertificateFileCommand = new DelegateCommand(ChooseCertificateFileExecute); SignaturePasswordCommand = new DelegateCommand(SignaturePasswordExecute); AddTimeServerAccountCommand = commandLocator.GetMacroCommand() .AddCommand <TimeServerAccountAddCommand>() .AddCommand(new DelegateCommand(o => SelectNewAccountInView())); EditTimeServerAccountCommand = commandLocator.GetMacroCommand() .AddCommand <TimeServerAccountEditCommand>() .AddCommand(new DelegateCommand(o => RefreshAccountsView())); }
public SaveAndContinueEvaluationCommand(IInteractionRequest interactionRequest, ICurrentSettingsProvider settingsProvider, ISettingsProvider mainSettingsProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _settingsProvider = settingsProvider; _mainSettingsProvider = mainSettingsProvider; }
public PrinterActionsAssistant(IPrinterHelper printerHelper, IUacAssistant uacAssistant, ITranslationUpdater translationUpdater, IInteractionRequest interactionRequest) : base(translationUpdater) { _printerHelper = printerHelper; _uacAssistant = uacAssistant; _interactionRequest = interactionRequest; }
public override void SetValue(object value) { InteractionRequestTrigger trigger = (InteractionRequestTrigger)Target; IInteractionRequest request = (IInteractionRequest)value; trigger.Attach(request); }
public AddActionViewModel( ICommandLocator commandLocator, IInteractionRequest interactionRequest, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; OpenAddActionOverviewCommand = new DelegateCommand(OpenAddActionOverview); }
public DropboxAccountAddCommand(IInteractionInvoker interactionInvoker, IInteractionRequest interactionRequest, ICurrentSettingsProvider currentSettingsProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionInvoker = interactionInvoker; _interactionRequest = interactionRequest; _droboxAccounts = currentSettingsProvider?.Settings?.ApplicationSettings?.Accounts.DropboxAccounts; }
public BrowseFileCommandBuilder(IDirectoryHelper directoryHelper, IFileNameQuery fileNameQuery, IInteractionRequest interactionRequest, ITranslationFactory translationFactory) { _directoryHelper = directoryHelper; _fileNameQuery = fileNameQuery; _interactionRequest = interactionRequest; _translationFactory = translationFactory; }
public SmtpActionViewModel(IInteractionRequest interactionRequest, ISmtpTest smtpTest, ITranslationUpdater updater, ICurrentSettingsProvider currentSettingsProvider, ICommandLocator commandLocator, ITokenViewModelFactory tokenViewModelFactory, IDispatcher dispatcher) : base(updater, currentSettingsProvider, dispatcher) { _interactionRequest = interactionRequest; _smtpTest = smtpTest; _currentSettingsProvider = currentSettingsProvider; SetTokenViewModel(tokenViewModelFactory); if (currentSettingsProvider?.Settings != null) { _smtpAccounts = currentSettingsProvider.Settings.ApplicationSettings.Accounts.SmtpAccounts; SmtpAccountsView = new ListCollectionView(_smtpAccounts); SmtpAccountsView.SortDescriptions.Add(new SortDescription(nameof(SmtpAccount.AccountInfo), ListSortDirection.Ascending)); } AddAccountCommand = commandLocator.CreateMacroCommand() .AddCommand <SmtpAccountAddCommand>() .AddCommand(new DelegateCommand(o => SelectNewAccountInView())) .Build(); EditAccountCommand = commandLocator.CreateMacroCommand() .AddCommand <SmtpAccountEditCommand>() .AddCommand(new DelegateCommand(o => RefreshAccountsView())) .Build(); EditMailTextCommand = new DelegateCommand(EditMailTextExecute); TestSmtpCommand = new DelegateCommand(TextSmtpExecute); }
public WorkflowEditorCommand(ISelectedProfileProvider selectedProfileProvider, IInteractionRequest interactionRequest, ITranslationFactory translationFactory, IEventAggregator eventAggregator) { _selectedProfileProvider = selectedProfileProvider; _interactionRequest = interactionRequest; _translationFactory = translationFactory; _eventAggregator = eventAggregator; }
public ProfileRemoveCommand(IInteractionRequest interactionRequest, ICurrentSettingsProvider currentSettingsProvider, ITranslationUpdater translationUpdater, IDispatcher dispatcher) : base(interactionRequest, currentSettingsProvider, translationUpdater) { _dispatcher = dispatcher; CurrentSettingsProvider.SelectedProfileChanged += CurrentSettingsProviderOnSelectedProfileChanged; }
public SmtpAccountEditCommand(IInteractionRequest interactionRequest, ICurrentSettingsProvider currentSettingsProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _smtpAccounts = currentSettingsProvider.Settings?.ApplicationSettings?.Accounts?.SmtpAccounts ?? new ObservableCollection <SmtpAccount>(); _smtpAccounts.CollectionChanged += (sender, args) => RaiseCanExecuteChanged(); }
public CheckProfileCommand(IProfileChecker profileChecker, ICurrentSettingsProvider currentSettingsProvider, IInteractionRequest interactionRequest, ErrorCodeInterpreter errorCodeInterpreter) { _profileChecker = profileChecker; _currentSettingsProvider = currentSettingsProvider; _interactionRequest = interactionRequest; _errorCodeInterpreter = errorCodeInterpreter; CanExecuteChanged?.Invoke(this, EventArgs.Empty); }
public RestoreSettingsViewModel(IInteractionRequest request, ITranslationUpdater translationUpdater, ISettingsProvider settingsProvider, IGpoSettings gpoSettings, IDefaultSettingsBuilder defaultSettingsBuilder) : base(translationUpdater, gpoSettings) { _request = request; _settingsProvider = settingsProvider; _defaultSettingsBuilder = defaultSettingsBuilder; RestoreDefaultSettingsCommand = new DelegateCommand(RestoreDefaultSettingsExecute); }
public InteractiveProfileChecker(IProfileChecker profileChecker, IInteractionRequest interactionRequest, IInteractionInvoker interactionInvoker, ITranslationFactory translationFactory) { _profileChecker = profileChecker; _interactionRequest = interactionRequest; _interactionInvoker = interactionInvoker; _translationFactory = translationFactory; }
public TimeServerAccountAddCommand(IInteractionRequest interactionRequest, ICurrentSettings <Accounts> accountsProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _accountsProvider = accountsProvider; }
public EvaluateSavingRelevantSettingsAndNotifyUserCommand( IInteractionRequest interactionRequest, ITranslationUpdater translationUpdater, ITabSwitchSettingsCheck tabSwitchSettingsCheck) : base(interactionRequest, translationUpdater) { _tabSwitchSettingsCheck = tabSwitchSettingsCheck; }
public SwitchLayoutCommand(IRegionManager regionManager, IInteractionRequest interactionRequest, ICurrentSettings <ObservableCollection <ConversionProfile> > profiles, IActionOrderHelper actionOrderHelper, ITranslationUpdater translationUpdater, ICurrentSettingsProvider currentSettingsProvider, IEventAggregator eventAggregator) : base(translationUpdater) { _regionManager = regionManager; _interactionRequest = interactionRequest; _profiles = profiles; _actionOrderHelper = actionOrderHelper; _currentSettingsProvider = currentSettingsProvider; _eventAggregator = eventAggregator; }
public PrintJobViewModel( ISettingsProvider settingsProvider, ITranslationUpdater translationUpdater, IJobInfoQueue jobInfoQueue, IFileNameQuery saveFileQuery, IInteractionRequest interactionRequest, IProfileChecker profileChecker, ErrorCodeInterpreter errorCodeInterpreter, ICommandLocator commandsLocator, IEventAggregator eventAggregator, ISelectedProfileProvider selectedProfileProvider, ITempFolderProvider tempFolderProvider, IPathUtil pathUtil, IFile file, IGpoSettings gpoSettings) : base(translationUpdater) { GpoSettings = gpoSettings; _settingsProvider = settingsProvider; _saveFileQuery = saveFileQuery; _profileChecker = profileChecker; _interactionRequest = interactionRequest; _errorCodeInterpreter = errorCodeInterpreter; _selectedProfileProvider = selectedProfileProvider; _file = file; _tempFolderProvider = tempFolderProvider; _pathUtil = pathUtil; SaveCommand = new DelegateCommand(SaveExecute); SendByEmailCommand = new DelegateCommand(EmailExecute); MergeCommand = new DelegateCommand(MergeExecute); CancelCommand = new DelegateCommand(CancelExecute); SetOutputFormatCommand = new DelegateCommand <OutputFormat>(SetOutputFormatExecute); BrowseFileCommand = new DelegateCommand(BrowseFileExecute); SetupEditProfileCommand(commandsLocator, eventAggregator); var settings = settingsProvider.Settings?.CopyAndPreserveApplicationSettings(); Profiles = settings?.ConversionProfiles; jobInfoQueue.OnNewJobInfo += (sender, args) => UpdateNumberOfPrintJobsHint(jobInfoQueue.Count); UpdateNumberOfPrintJobsHint(jobInfoQueue.Count); var profileListView = CollectionViewSource.GetDefaultView(Profiles); if (profileListView != null) { profileListView.CurrentChanged += (sender, args) => { if (Job != null) { OutputFormat = ((ConversionProfile)profileListView.CurrentItem).OutputFormat; } }; } }
public InteractiveFileExistsChecker( ITranslationFactory translationFactory, IFile file, IInteractionRequest interactionRequest) { _translationFactory = translationFactory; _file = file; _interactionRequest = interactionRequest; }
public SmtpAccountRemoveCommand(IInteractionRequest interactionRequest, ICurrentSettings <Accounts> accountsProvider, ICurrentSettings <ObservableCollection <ConversionProfile> > profilesProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _accountsProvider = accountsProvider; _profilesProvider = profilesProvider; }
public void Setup() { _printerHelper = Substitute.For <IPrinterHelper>(); _uacAssistant = Substitute.For <IUacAssistant>(); _interactionRequest = Substitute.For <IInteractionRequest>(); PrinterActionsAssistant = new PrinterActionsAssistant(_printerHelper, _uacAssistant, new DesignTimeTranslationUpdater(), _interactionRequest); ; }
public TimeServerAccountEditCommand(IInteractionRequest interactionRequest, ICurrentSettingsProvider currentSettingsProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _currentSettingsProvider = currentSettingsProvider; TimeServerAccounts.CollectionChanged += (sender, args) => RaiseCanExecuteChanged(); }
public AddActionCommand(ISelectedProfileProvider selectedProfileProvider, IInteractionRequest interactionRequest, IEventAggregator eventAggregator, IActionOrderHelper actionOrderHelper, EditionHelper editionHelper) { _selectedProfileProvider = selectedProfileProvider; _interactionRequest = interactionRequest; _eventAggregator = eventAggregator; _actionOrderHelper = actionOrderHelper; _editionHelper = editionHelper; }
public SelectFilesUserControlViewModelFactory(ITranslationUpdater translationUpdater, ISelectedProfileProvider selectedProfileProvider, IDispatcher dispatcher, IInteractionRequest interactionRequest) { _translationUpdater = translationUpdater; _selectedProfileProvider = selectedProfileProvider; _dispatcher = dispatcher; _interactionRequest = interactionRequest; }
public FtpAccountRemoveCommand(IInteractionRequest interactionRequest, ICurrentSettingsProvider currentSettingsProvider, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _ftpAccounts = currentSettingsProvider?.Settings?.ApplicationSettings?.Accounts?.FtpAccounts; _profiles = currentSettingsProvider?.Profiles; _ftpAccounts = currentSettingsProvider?.Settings?.ApplicationSettings?.Accounts?.FtpAccounts ?? new ObservableCollection <FtpAccount>(); _ftpAccounts.CollectionChanged += (sender, args) => RaiseCanExecuteChanged(); }
public ProgressViewModel(IJobRunner jobRunner, IInteractionRequest interactionRequest, IDispatcher dispatcher, ITranslationUpdater translationUpdater, InteractiveOutputFileMover outputFileMover) : base(translationUpdater) { _jobRunner = jobRunner; _interactionRequest = interactionRequest; _dispatcher = dispatcher; _outputFileMover = outputFileMover; translationUpdater.RegisterAndSetTranslation(tf => _passwordOverlayTranslation = tf.UpdateOrCreateTranslation(_passwordOverlayTranslation)); }
internal InteractionRequestTestHelper(IInteractionRequest <T> request) { request.Raised += (s, e) => { IsRequestRaised = true; NumberOfRequests += 1; Context = e.Notification; Callback = e.Callback; }; }
public ProfileRenameCommand( IInteractionRequest interactionRequest, ICurrentSettings <ObservableCollection <ConversionProfile> > profilesProvider, ICurrentSettingsProvider currentSettingsProvider, ITranslationUpdater translationUpdater, IDispatcher dispatcher) : base(interactionRequest, currentSettingsProvider, profilesProvider, translationUpdater) { _dispatcher = dispatcher; CurrentSettingsProvider.SelectedProfileChanged += CurrentSettingsProviderOnSelectedProfileChanged; }
public void Attach(IInteractionRequest request) { AssociatedObject = request; OnAttached(); }
public void Detach() { OnDetaching(); AssociatedObject = null; }