예제 #1
0
        public WelcomeWindowViewModel(IProcessStarter processStarter, ButtonDisplayOptions buttonDisplayOptions, IUserGuideHelper userGuideHelper, WelcomeWindowTranslation translation)
        {
            Translation           = translation;
            _processStarter       = processStarter;
            _buttonDisplayOptions = buttonDisplayOptions;
            _userGuideHelper      = userGuideHelper;

            WhatsNewCommand   = new DelegateCommand(WhatsNewCommandExecute);
            FacebookCommand   = new DelegateCommand(FacebookCommandExecute);
            GooglePlusCommand = new DelegateCommand(GooglePlusCommandExecute);
        }
예제 #2
0
        public void Setup()
        {
            var commandLocator = Substitute.For <ICommandLocator>();

            _whatsNewCommand = Substitute.For <ICommand>();
            commandLocator.GetInitializedCommand <ShowUserGuideCommand, HelpTopic>(HelpTopic.WhatsNew).Returns(_whatsNewCommand);
            _blogCommand = Substitute.For <ICommand>();
            commandLocator.GetInitializedCommand <UrlOpenCommand, string>(Urls.Blog).Returns(_blogCommand);
            _prioritySupportCommand = Substitute.For <ICommand>();
            commandLocator.GetCommand <PrioritySupportUrlOpenCommand>().Returns(_prioritySupportCommand);

            _welcomeViewModel = new WelcomeViewModel(commandLocator, new DesignTimeTranslationUpdater(), new EditionHintOptionProvider(false, false));

            _translation = new WelcomeWindowTranslation();
        }