public ProfileSettingsWindow(ProfileSettingsViewModel profileSettingsViewModel, ActionControlsBundle actionControls, IUserGuideHelper userGuideHelper)
 {
     _userGuideHelper = userGuideHelper;
     DataContext      = profileSettingsViewModel;
     InitializeComponent();
     AddActions(actionControls);
 }
        public PrintJobViewModel(ISettingsManager settingsManager, IJobInfoQueue jobInfoQueue, ITranslator translator, DragAndDropEventHandler dragAndDrop, IInteractionInvoker interactionInvoker, IUserGuideHelper userGuideHelper, ApplicationNameProvider applicationNameProvider)
        {
            Title = applicationNameProvider.ApplicationName;

            _currentThreadDispatcher = Dispatcher.CurrentDispatcher;
            _translator         = translator;
            _dragAndDrop        = dragAndDrop;
            _interactionInvoker = interactionInvoker;
            _userGuideHelper    = userGuideHelper;
            _settingsManager    = settingsManager;
            _jobInfoQueue       = jobInfoQueue;

            _jobInfoQueue.OnNewJobInfo += OnNewJobInfo;

            _settingsProvider = settingsManager.GetSettingsProvider();

            SaveCommand            = new DelegateCommand(ExecuteSave);
            EmailCommand           = new DelegateCommand(ExecuteMail);
            ManagePrintJobsCommand = new DelegateCommand(ExecuteManagePrintJobs);
            ShowSettingsCommand    = new DelegateCommand(ExecuteShowSettings);
            WindowClosingCommand   = new DelegateCommand(OnWindowClosing);
            DragEnterCommand       = new DelegateCommand <DragEventArgs>(OnDragEnter);
            DropCommand            = new DelegateCommand <DragEventArgs>(OnDrop);
            KeyDownCommand         = new DelegateCommand <KeyEventArgs>(OnKeyDown);
        }
Пример #3
0
        public LicenseWindowViewModel(LicenseTabViewModel licenseTabViewModel, ApplicationNameProvider applicationNameProvider, IVersionHelper versionHelper, IUserGuideHelper userGuideHelper)
        {
            LicenseTabViewModel = licenseTabViewModel;
            _userGuideHelper    = userGuideHelper;
            Title = applicationNameProvider.ApplicationName + " " + versionHelper.FormatWithThreeDigits();

            ShowHelpCommand = new DelegateCommand <KeyEventArgs>(ShowHelpCommandExecute);

            licenseTabViewModel.CloseLicenseWindowEvent += CloseWhenLicenseValid;
        }
Пример #4
0
        public WelcomeWindowViewModel(IProcessStarter processStarter, ButtonDisplayOptions buttonDisplayOptions, IUserGuideHelper userGuideHelper)
        {
            _processStarter       = processStarter;
            _buttonDisplayOptions = buttonDisplayOptions;
            _userGuideHelper      = userGuideHelper;

            WhatsNewCommand   = new DelegateCommand(WhatsNewCommandExecute);
            FacebookCommand   = new DelegateCommand(FacebookCommandExecute);
            GooglePlusCommand = new DelegateCommand(GooglePlusCommandExecute);
        }
        public ApplicationSettingsWindow(ApplicationSettingsViewModel applicationSettingsViewModel, IUserGuideHelper userGuideHelper, TranslationFactory translationFactory)
        {
            _userGuideHelper              = userGuideHelper;
            _translationFactory           = translationFactory;
            DataContext                   = applicationSettingsViewModel;
            _applicationSettingsViewModel = applicationSettingsViewModel;

            InitializeComponent();

            GeneralTabUserControl.PreviewLanguageAction = UpdateTranslations;
        }
Пример #6
0
        public ApplicationSettingsWindow(ITranslator translator, ApplicationSettingsViewModel applicationSettingsViewModel, IUserGuideHelper userGuideHelper)
        {
            _userGuideHelper = userGuideHelper;
            _translator      = translator;
            DataContext      = applicationSettingsViewModel;

            InitializeComponent();

            GeneralTabUserControl.PreviewLanguageAction = UpdateTranslations;

            _translator.Translate(this);
        }
        public OfflineActivationViewModel(IProcessStarter process, IUserGuideHelper userGuideHelper, IActivationHelper activationHelper, ITranslator translator)
        {
            _processStarter   = process;
            _userGuideHelper  = userGuideHelper;
            _activationHelper = activationHelper;
            _invalidLicenseKeySyntaxMessage = translator.GetTranslation("OfflineActivationViewModel",
                                                                        "InvalidLicenseKeySyntax");

            OkCommand = new DelegateCommand(OkCommandExecute, OkCommandCanExecute);
            OpenOfflineActivationUrlCommand = new DelegateCommand(OpenOfflineActivationUrlCommandExecute);
            ShowHelpCommand = new DelegateCommand <KeyEventArgs>(ShowHelpCommandExecute);
        }
Пример #8
0
        public OfflineActivationViewModel(IProcessStarter process, IUserGuideHelper userGuideHelper, IOfflineActivator offlineActivator, OfflineActivationViewModelTranslation translation)
        {
            _processStarter   = process;
            _userGuideHelper  = userGuideHelper;
            _offlineActivator = offlineActivator;
            Translation       = translation;
            _invalidLicenseKeySyntaxMessage = translation.InvalidLicenseKeySyntax;

            OkCommand = new DelegateCommand(OkCommandExecute, OkCommandCanExecute);
            OpenOfflineActivationUrlCommand = new DelegateCommand(OpenOfflineActivationUrlCommandExecute);
            ShowHelpCommand = new DelegateCommand <KeyEventArgs>(ShowHelpCommandExecute);
        }
Пример #9
0
 public PdfTabViewModel(PdfTabTranslation translation, IInteractionInvoker interactionInvoker, IFile file,
                        IOpenFileInteractionHelper openFileInteractionHelper, EditionHintOptionProvider editionHintOptionProvider,
                        IPdfProcessor pdfProcessor, IUserGuideHelper userGuideHelper)
 {
     _file = file;
     _openFileInteractionHelper = openFileInteractionHelper;
     _pdfProcessor                = pdfProcessor;
     Translation                  = translation;
     _interactionInvoker          = interactionInvoker;
     _userGuideHelper             = userGuideHelper;
     OnlyForPlusAndBusiness       = editionHintOptionProvider.ShowOnlyForPlusAndBusinessHint;
     SecurityPasswordCommand      = new DelegateCommand(SecurityPasswordExecute);
     ChooseCertificateFileCommand = new DelegateCommand(ChooseCertificateFileExecute);
     DefaultTimeServerCommand     = new DelegateCommand(DefaultTimeServerExecute);
 }
        public AboutWindowViewModel(IProcessStarter processStarter, ApplicationNameProvider applicationNameProvider, IVersionHelper versionHelper, IUserGuideHelper userGuideHelper, ButtonDisplayOptions buttonDisplayOptions)
        {
            _processStarter       = processStarter;
            _userGuideHelper      = userGuideHelper;
            _buttonDisplayOptions = buttonDisplayOptions;

            _applicationNameProvider = applicationNameProvider;
            VersionText = versionHelper.FormatWithBuildNumber();

            ShowManualCommand      = new DelegateCommand(ShowManualCommandExecute);
            ShowLicenseCommand     = new DelegateCommand(ShowLicenseCommandExecute);
            DonateCommand          = new DelegateCommand(DonateCommandExecute);
            PdfforgeWebsiteCommand = new DelegateCommand(PdfforgeWebsiteCommandExecute);
            FacebookCommand        = new DelegateCommand(FacebookCommandExecute);
            GooglePlusCommand      = new DelegateCommand(GooglePlusCommandExecute);
        }
Пример #11
0
        public EncryptUserControlViewModel
        (
            IInteractionRequest interactionRequest,
            EditionHintOptionProvider editionHintOptionProvider,
            IUserGuideHelper userGuideHelper,
            ITranslationUpdater translationUpdater,
            ISelectedProfileProvider selectedProfile
        )
            : base(translationUpdater, selectedProfile)
        {
            _interactionRequest = interactionRequest;
            _userGuideHelper    = userGuideHelper;

            if (editionHintOptionProvider != null)
            {
                OnlyForPlusAndBusiness = editionHintOptionProvider.ShowOnlyForPlusAndBusinessHint;
            }

            SecurityPasswordCommand = new DelegateCommand(SecurityPasswordExecute);
        }
        public MainWindowViewModel(ISettingsManager settingsManager, IInteractionInvoker interactionInvoker, IUserGuideHelper userGuideHelper,
                                   IVersionHelper versionHelper, DragAndDropEventHandler dragAndDrop, WelcomeCommand welcomeCommand, ApplicationNameProvider applicationNameProvider)
        {
            _settingsManager         = settingsManager;
            _interactionInvoker      = interactionInvoker;
            _userGuideHelper         = userGuideHelper;
            _versionHelper           = versionHelper;
            _applicationNameProvider = applicationNameProvider;

            ApplicationSettingsCommand = new DelegateCommand(ExecuteApplicationSettingsCommand);
            ProfileSettingsCommand     = new DelegateCommand(ExecuteProfileSettings);
            WelcomeCommand             = welcomeCommand;
            AboutWindowCommand         = new DelegateCommand(ExecuteAboutWindow);
            HelpCommand = new DelegateCommand <KeyEventArgs>(ExecuteHelpCommand);

            DragEnterCommand = new DelegateCommand <DragEventArgs>(dragAndDrop.HandleDragEnter);
            DragDropCommand  = new DelegateCommand <DragEventArgs>(dragAndDrop.HandleDropEvent);

            _settingsProvider          = _settingsManager.GetSettingsProvider();
            ApplicationSettingsEnabled = _settingsProvider.GpoSettings?.DisableApplicationSettings == false;
        }
Пример #13
0
 public ShowUserGuideCommand(IUserGuideHelper userGuideHelper)
 {
     _userGuideHelper = userGuideHelper;
 }
Пример #14
0
 public HelpCommandHandler(IUserGuideHelper userGuideHelper)
 {
     _userGuideHelper = userGuideHelper;
 }
Пример #15
0
 public StaticPropertiesHack(ITranslator translator, IUserGuideHelper userGuideHelper, IActivationHelper activationHelper)
 {
     _translator       = translator;
     _userGuideHelper  = userGuideHelper;
     _activationHelper = activationHelper;
 }
Пример #16
0
 public StaticPropertiesHack(IUserGuideHelper userGuideHelper, ILicenseChecker licenseChecker, ITranslationFactory translationFactory)
 {
     _userGuideHelper    = userGuideHelper;
     _licenseChecker     = licenseChecker;
     _translationFactory = translationFactory;
 }
Пример #17
0
 public void SetUp()
 {
     _userGuideHelper      = Substitute.For <IUserGuideHelper>();
     _showUserGuideCommand = new ShowUserGuideCommand(_userGuideHelper);
 }