Exemple #1
0
        private void InitAboutViewModel(ButtonDisplayOptions buttonDisplayOptions = null)
        {
            if (buttonDisplayOptions == null)
            {
                buttonDisplayOptions = new ButtonDisplayOptions(false, false);
            }

            _aboutViewModel = new AboutViewModel(_versionHelper, buttonDisplayOptions, _translationUpdater, _commandLocator, new DesignTimeApplicationNameProvider());
        }
        private AboutWindowViewModel BuildAboutWindowViewModel(ButtonDisplayOptions buttonDisplayOptions = null)
        {
            if (buttonDisplayOptions == null)
            {
                buttonDisplayOptions = new ButtonDisplayOptions(false, false);
            }

            return(new AboutWindowViewModel(_process, new ApplicationNameProvider("PDFCreator"),
                                            _versionHelper, _userGuideHelper, buttonDisplayOptions, new AboutWindowTranslation()));
        }
        public WelcomeViewModel(IProcessStarter processStarter, ButtonDisplayOptions buttonDisplayOptions, IUserGuideHelper userGuideHelper, ITranslationUpdater translationUpdater)
            : base(translationUpdater)
        {
            _processStarter       = processStarter;
            _buttonDisplayOptions = buttonDisplayOptions;
            _userGuideHelper      = userGuideHelper;

            WhatsNewCommand   = new DelegateCommand(WhatsNewCommandExecute);
            FacebookCommand   = new DelegateCommand(FacebookCommandExecute);
            GooglePlusCommand = new DelegateCommand(GooglePlusCommandExecute);
        }
Exemple #4
0
        public AboutViewModel(IVersionHelper versionHelper
                              , ButtonDisplayOptions buttonDisplayOptions, ITranslationUpdater translationUpdater
                              , ICommandLocator commandLocator, ApplicationNameProvider applicationNameProvider) : base(translationUpdater)
        {
            ApplicationNameProvider = applicationNameProvider;
            HideSocialMediaButtons  = buttonDisplayOptions.HideSocialMediaButtons;
            VersionText             = versionHelper.FormatWithBuildNumber();

            ShowManualCommand  = commandLocator.GetInitializedCommand <ShowUserGuideCommand, HelpTopic>(HelpTopic.General);
            ShowLicenseCommand = commandLocator.GetInitializedCommand <ShowUserGuideCommand, HelpTopic>(HelpTopic.License);

            PdfforgeWebsiteCommand = commandLocator.GetInitializedCommand <UrlOpenCommand, string>(Urls.PdfforgeWebsiteUrl);
            FacebookCommand        = commandLocator.GetInitializedCommand <UrlOpenCommand, string>(Urls.Facebook);
            GooglePlusCommand      = commandLocator.GetInitializedCommand <UrlOpenCommand, string>(Urls.GooglePlus);
        }