Example #1
0
        public StartupWizardViewModel(ISettingsService settingsService,
                                      IMessageService messageService,
                                      WelcomeStepViewModel welcome,
                                      DevicesStepViewModel devices,
                                      LayoutStepViewModel layout,
                                      SettingsStepViewModel settings,
                                      FinishStepViewModel finish)
        {
            _settingsService = settingsService;
            _messageService  = messageService;
            Items.Add(welcome);
            Items.Add(devices);
            Items.Add(layout);
            Items.Add(settings);
            Items.Add(finish);

            ActiveItem = Items.First();
        }
        public void SetUp()
        {
            _settingGateway = new SettingGatewayForTests();
            _settingGateway.SetWorkingDirectory(InitialWorkingDirectory);

            var safeProvider = new SafeProvider();

            safeProvider.SettingGateway = _settingGateway;
            _hasWorkingDirectory        = safeProvider;


            _settingsStepViewModel = new SettingsStepViewModel(_hasWorkingDirectory, () => { });

            _saveCommandObserver    = _settingsStepViewModel.SaveCommand.GetDelegateCommandObserver();
            _discardCommandObserver = _settingsStepViewModel.DiscardCommand.GetDelegateCommandObserver();
            _okayCommandObserver    = _settingsStepViewModel.OkCommand.GetDelegateCommandObserver();

            _workSpaceDirectoryObserver = _settingsStepViewModel
                                          .GetPropertyObserver <string>(nameof(_settingsStepViewModel.WorkSpaceDirectory));
        }