Esempio n. 1
0
 public BusinessFeatureBadgeViewModel(EditionHelper editionHelper, IWebLinkLauncher webLinkLauncher, ITranslationUpdater translationUpdater)
     : base(translationUpdater)
 {
     _webLinkLauncher = webLinkLauncher;
     ShowBusinessHint = editionHelper.IsFreeEdition;
     RaisePropertyChanged(nameof(ShowBusinessHint));
 }
Esempio n. 2
0
 public BusinessFeatureControlViewModel(EditionHelper editionHelper, IProcessStarter processStarter, ITranslationUpdater translationUpdater)
     : base(translationUpdater)
 {
     _processStarter  = processStarter;
     ShowBusinessHint = editionHelper.ShowOnlyForPlusAndBusiness;
     RaisePropertyChanged(nameof(ShowBusinessHint));
 }
Esempio n. 3
0
 public AddActionCommand(ISelectedProfileProvider selectedProfileProvider, IInteractionRequest interactionRequest, IEventAggregator eventAggregator,
                         IActionOrderHelper actionOrderHelper, EditionHelper editionHelper)
 {
     _selectedProfileProvider = selectedProfileProvider;
     _interactionRequest      = interactionRequest;
     _eventAggregator         = eventAggregator;
     _actionOrderHelper       = actionOrderHelper;
     _editionHelper           = editionHelper;
 }
        public SignatureUserControlViewModel(
            IOpenFileInteractionHelper openFileInteractionHelper, EditionHelper editionHelper,
            ICurrentSettings <Conversion.Settings.Accounts> accountsProvider, ITranslationUpdater translationUpdater,
            ICurrentSettingsProvider currentSettingsProvider,
            ICommandLocator commandLocator, ISignaturePasswordCheck signaturePasswordCheck,
            IFile file, ITokenViewModelFactory tokenViewModelFactory, IDispatcher dispatcher,
            IGpoSettings gpoSettings, ISigningPositionToUnitConverterFactory signingPositionToUnitConverter,
            ICurrentSettings <ApplicationSettings> applicationSettings)
            : base(translationUpdater, currentSettingsProvider, dispatcher)
        {
            _openFileInteractionHelper = openFileInteractionHelper;
            _commandLocator            = commandLocator;

            _signaturePasswordCheck = signaturePasswordCheck;
            _file        = file;
            _gpoSettings = gpoSettings;

            _signingPositionToUnitConverter = signingPositionToUnitConverter;
            ApplicationSettings             = applicationSettings;
            UnitConverter = _signingPositionToUnitConverter?.CreateSigningPositionToUnitConverter(UnitOfMeasurement.Centimeter);

            translationUpdater.RegisterAndSetTranslation(tf => SetTokenViewModels(tokenViewModelFactory));
            currentSettingsProvider.SelectedProfileChanged += (sender, args) => SetTokenViewModels(tokenViewModelFactory);

            if (editionHelper != null)
            {
                OnlyForPlusAndBusiness = editionHelper.ShowOnlyForPlusAndBusiness;
            }

            _timeServerAccounts = accountsProvider?.Settings.TimeServerAccounts;
            if (_timeServerAccounts != null)
            {
                TimeServerAccountsView = new ListCollectionView(_timeServerAccounts);
                TimeServerAccountsView.SortDescriptions.Add(new SortDescription(nameof(TimeServerAccount.AccountInfo), ListSortDirection.Ascending));
            }

            ChooseCertificateFileCommand = new DelegateCommand(ChooseCertificateFileExecute);

            ChangeUnitConverterCommand = new DelegateCommand(ChangeUnitConverterExecute);

            if (Signature != null)
            {
                AskForPasswordLater = string.IsNullOrEmpty(Password);
            }

            _timeServerAccountEditCommand = _commandLocator.GetCommand <TimeServerAccountEditCommand>();

            AddTimeServerAccountCommand = _commandLocator.CreateMacroCommand()
                                          .AddCommand <TimeServerAccountAddCommand>()
                                          .AddCommand(new DelegateCommand(o => SelectNewAccountInView()))
                                          .Build();

            EditTimeServerAccountCommand = _commandLocator.CreateMacroCommand()
                                           .AddCommand(_timeServerAccountEditCommand)
                                           .AddCommand(new DelegateCommand(o => RefreshAccountsView()))
                                           .Build();
        }
 public ForwardToFurtherProfileViewModel(ITranslationUpdater translationUpdater,
                                         ISelectedProfileProvider selectedProfileProvider,
                                         IDispatcher dispatcher,
                                         ICurrentSettings <ObservableCollection <ConversionProfile> > profilesProvider,
                                         EditionHelper editionHelper)
     : base(translationUpdater, selectedProfileProvider, dispatcher)
 {
     IsBusinessEdition = !editionHelper.IsFreeEdition;
     _profilesProvider = profilesProvider;
 }
Esempio n. 6
0
        public WelcomeViewModel(ICommandLocator commandLocator, ITranslationUpdater translationUpdater,
                                EditionHelper editionHelper, IVersionHelper versionHelper, ApplicationNameProvider applicationNameProvider)
            : base(translationUpdater)
        {
            _editionHelper           = editionHelper;
            _versionHelper           = versionHelper;
            _applicationNameProvider = applicationNameProvider;

            WhatsNewCommand        = commandLocator.GetInitializedCommand <ShowUserGuideCommand, HelpTopic>(HelpTopic.WhatsNew);
            PrioritySupportCommand = commandLocator.GetCommand <IPrioritySupportUrlOpenCommand>();
        }
Esempio n. 7
0
        public WelcomeViewModel(ICommandLocator commandLocator, ITranslationUpdater translationUpdater,
                                EditionHelper editionHelper, IVersionHelper versionHelper, ApplicationNameProvider applicationNameProvider)
            : base(translationUpdater)
        {
            _versionHelper           = versionHelper;
            _applicationNameProvider = applicationNameProvider;
            AllowPrioritySupport     = !editionHelper?.ShowOnlyForPlusAndBusiness ?? true;

            WhatsNewCommand        = commandLocator.GetInitializedCommand <ShowUserGuideCommand, HelpTopic>(HelpTopic.WhatsNew);
            PrioritySupportCommand = commandLocator.GetCommand <PrioritySupportUrlOpenCommand>();
        }
Esempio n. 8
0
 public CoverUserControlViewModel(IOpenFileInteractionHelper openFileInteractionHelper, ITranslationUpdater translationUpdater,
                                  ISelectedProfileProvider selectedProfile, ITokenHelper tokenHelper,
                                  ITokenViewModelFactory tokenViewModelFactory, IDispatcher dispatcher,
                                  EditionHelper editionHelper, IPdfVersionHelper pdfVersionHelper) : base(translationUpdater, selectedProfile, dispatcher)
 {
     _openFileInteractionHelper = openFileInteractionHelper;
     _tokenHelper           = tokenHelper;
     _tokenViewModelFactory = tokenViewModelFactory;
     _editionHelper         = editionHelper;
     _pdfVersionHelper      = pdfVersionHelper;
 }
Esempio n. 9
0
        public SaveTabViewModel(ITokenButtonFunctionProvider buttonFunctionProvider, ISelectedProfileProvider selectedProfileProvider,
                                ITranslationUpdater translationUpdater, EditionHelper editionHelper, ITokenHelper tokenHelper,
                                ITokenViewModelFactory tokenViewModelFactory, IDispatcher dispatcher)
            : base(translationUpdater, selectedProfileProvider, dispatcher)
        {
            AllowSkipPrintDialog    = !editionHelper.ShowOnlyForPlusAndBusiness;
            _buttonFunctionProvider = buttonFunctionProvider;
            _tokenHelper            = tokenHelper;
            _tokenViewModelFactory  = tokenViewModelFactory;

            translationUpdater.RegisterAndSetTranslation(tf => SetTokenViewModels());
        }
        public EncryptUserControlViewModel
        (
            IInteractionRequest interactionRequest,
            EditionHelper editionHelper,
            ITranslationUpdater translationUpdater,
            ISelectedProfileProvider selectedProfile,
            IDispatcher dispatcher
        )
            : base(translationUpdater, selectedProfile, dispatcher)
        {
            _interactionRequest = interactionRequest;
            _editionHelper      = editionHelper;

            SecurityPasswordCommand = new DelegateCommand(SecurityPasswordExecute);
        }
Esempio n. 11
0
        public SaveTabViewModel(ITokenButtonFunctionProvider buttonFunctionProvider, ISelectedProfileProvider selectedProfileProvider,
                                ITranslationUpdater translationUpdater, EditionHelper editionHelper, ITokenHelper tokenHelper,
                                ITokenViewModelFactory tokenViewModelFactory, IDispatcher dispatcher)
            : base(translationUpdater, selectedProfileProvider, dispatcher)
        {
            AllowSkipPrintDialog    = !editionHelper.IsFreeEdition;
            _buttonFunctionProvider = buttonFunctionProvider;
            _tokenHelper            = tokenHelper;
            _tokenViewModelFactory  = tokenViewModelFactory;

            translationUpdater?.RegisterAndSetTranslation(tf => SetTokenViewModels());

            CurrentProfile?.MountRaiseConditionsForNotSupportedFeatureSections((s, a) =>
            {
                RaisePropertyChanged(nameof(HasNotSupportedSettingsForSavingTempOnly));
            });
        }
Esempio n. 12
0
        public ConvertPdfViewModel(ITranslationUpdater translationUpdater, ISelectedProfileProvider selectedProfile,
                                    EditionHelper editionHelper, IDispatcher dispatcher) : base(translationUpdater, selectedProfile, dispatcher)
        {
            _editionHelper = editionHelper;
            CurrentProfileChanged += (sender, args) =>
            {
                RaiseIsPdfOutputChanged();
                CurrentProfile.PropertyChanged += RaiseIsPdfOutputChanged;
                CurrentProfile.SetRaiseConditionsForNotSupportedFeatureSections(RaiseIsPdfOutputChanged);
            };

            if (CurrentProfile == null)
                return;

            CurrentProfile.PropertyChanged += RaiseIsPdfOutputChanged;
            CurrentProfile.SetRaiseConditionsForNotSupportedFeatureSections(RaiseIsPdfOutputChanged);
        }
        public EncryptUserControlViewModel
        (
            IInteractionRequest interactionRequest,
            EditionHelper editionHelper,
            ITranslationUpdater translationUpdater,
            ISelectedProfileProvider selectedProfile,
            IDispatcher dispatcher
        )
            : base(translationUpdater, selectedProfile, dispatcher)
        {
            _interactionRequest = interactionRequest;

            if (editionHelper != null)
            {
                OnlyForPlusAndBusiness = editionHelper.ShowOnlyForPlusAndBusiness;
            }

            SecurityPasswordCommand = new DelegateCommand(SecurityPasswordExecute);
        }
Esempio n. 14
0
        public AboutViewModel(
            IVersionHelper versionHelper,
            ITranslationUpdater translationUpdater,
            ICommandLocator commandLocator,
            ApplicationNameProvider applicationNameProvider,
            EditionHelper editionHelper)
            : base(translationUpdater)
        {
            _commandLocator         = commandLocator;
            _editionHelper          = editionHelper;
            ApplicationNameProvider = applicationNameProvider;
            VersionText             = versionHelper.FormatWithBuildNumber();

            ShowManualCommand   = _commandLocator.GetInitializedCommand <ShowUserGuideCommand, HelpTopic>(HelpTopic.General);
            _showLicenseCommand = _commandLocator.GetInitializedCommand <ShowUserGuideCommand, HelpTopic>(HelpTopic.License);

            PdfforgeWebsiteCommand = _commandLocator.GetInitializedCommand <UrlOpenCommand, string>(Urls.PdfforgeWebsiteUrl);
            PrioritySupportCommand = _commandLocator.GetCommand <IPrioritySupportUrlOpenCommand>();
        }
        public UpdateIntervalSettingsViewModel(IUpdateAssistant updateAssistant, IProcessStarter processStarter, ApplicationNameProvider applicationNameProvider,
                                               ICurrentSettingsProvider currentSettingsProvider, IGpoSettings gpoSettings, ITranslationUpdater translationUpdater,
                                               IEventAggregator eventAggregator, IInteractionRequest interactionRequest, ICurrentSettings <UpdateInterval> updateIntervalProvider, EditionHelper editionHelper,
                                               IUpdateLauncher updateLauncher) :
            base(translationUpdater, currentSettingsProvider, gpoSettings)
        {
            _processStarter          = processStarter;
            _applicationNameProvider = applicationNameProvider;
            _updateAssistant         = updateAssistant;
            _interactionRequest      = interactionRequest;
            _updateIntervalProvider  = updateIntervalProvider;
            _editionHelper           = editionHelper;
            _updateLauncher          = updateLauncher;

            ShowUpdate       = updateAssistant.ShowUpdate;
            _showUpdateEvent = eventAggregator.GetEvent <SetShowUpdateEvent>();
            _showUpdateEvent.Subscribe(SetShowDialog);
            currentSettingsProvider.SettingsChanged += (sender, args) =>
            {
                RaisePropertyChanged(nameof(CurrentUpdateInterval));
                RaisePropertyChanged(nameof(DisplayUpdateWarning));
            };
        }
Esempio n. 16
0
        public UpdateIntervalSettingsViewModel(IUpdateHelper updateHelper, ICommandLocator commandLocator, ApplicationNameProvider applicationNameProvider,
                                               ICurrentSettingsProvider currentSettingsProvider, IGpoSettings gpoSettings, ITranslationUpdater translationUpdater,
                                               IEventAggregator eventAggregator, IInteractionRequest interactionRequest, ICurrentSettings <UpdateInterval> updateIntervalProvider, EditionHelper editionHelper,
                                               IUpdateLauncher updateLauncher, IOnlineVersionHelper onlineVersionHelper) :
            base(translationUpdater, currentSettingsProvider, gpoSettings)
        {
            _applicationNameProvider = applicationNameProvider;
            _updateHelper            = updateHelper;
            _commandLocator          = commandLocator;
            _interactionRequest      = interactionRequest;
            _updateIntervalProvider  = updateIntervalProvider;
            _editionHelper           = editionHelper;
            _updateLauncher          = updateLauncher;
            _onlineVersionHelper     = onlineVersionHelper;

            ShouldShowUpdate = updateHelper.UpdateShouldBeShown();
            _showUpdateEvent = eventAggregator.GetEvent <SetShowUpdateEvent>();
            _showUpdateEvent.Subscribe(SetShowDialog);
            currentSettingsProvider.SettingsChanged += (sender, args) =>
            {
                RaisePropertyChanged(nameof(CurrentUpdateInterval));
                RaisePropertyChanged(nameof(DisplayUpdateWarning));
            };
        }
 public NotificationsLevelSettingsViewModel(ICurrentSettingsProvider settingsProvider,
                                            IGpoSettings gpoSettings, ITranslationUpdater translationUpdater, EditionHelper editionHelper, IDispatcher dispatcher) :
     base(translationUpdater, settingsProvider, dispatcher)
 {
     AllowNotifications = !editionHelper.IsFreeEdition;
 }
 public UserTokenUserControlViewModel(ITranslationUpdater translationUpdater, ISelectedProfileProvider profile, IUserGuideLauncher userGuideLauncher, IDispatcher dispatcher, EditionHelper editionHelper) : base(translationUpdater, profile, dispatcher)
 {
     IsBusinessEdition    = !editionHelper.IsFreeEdition;
     OpenUserGuideCommand = new DelegateCommand(o => userGuideLauncher?.ShowHelpTopic(HelpTopic.UserTokens));
 }
 public NotificationsLevelSettingsViewModel(ICurrentSettingsProvider settingsProvider,
                                            IGpoSettings gpoSettings, ITranslationUpdater translationUpdater, EditionHelper editionHelper, IDispatcher dispatcher) :
     base(translationUpdater, settingsProvider, dispatcher)
 {
     AllowNotifications = !editionHelper.ShowOnlyForPlusAndBusiness;
 }