Exemple #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();
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="genericModel">This is the instance created by the WizardViewModel</param>
        /// <returns></returns>
        private static List <CompleteStep <MonoberryProjectObject> > CreateMonoberryProjectSteps(MonoberryProjectObject genericModel)
        {
            /// 2.1) Create a view model for each step.
            ///     Each of these descend from WizardStepViewModelBase
            var step1ViewModel = new WelcomeStepViewModel(genericModel);

            /// This ViewModel contains a RouteOptionGroupViewModel (a group of options that may alter the workflow of the wizard).
            /// See TypeSizeStepViewModel.CreateAvailableDrinkSizes.
            var step2ViewModel = new SDKConfigurationViewModel(genericModel);
            var step3ViewModel = new DeviceSetupViewModel(genericModel);
            var step4ViewModel = new ApplicationInfoViewModel(genericModel);
            var step5ViewModel = new FinishStepViewModel(genericModel);

            /// 2.2) Create a list of steps.
            ///     We pass the same type param (CupOfCoffee) that we passed to WizardViewModel in Button_Click above.
            return(new List <CompleteStep <MonoberryProjectObject> >()
            {
                /// Each step contains a ViewModel and a View type (the type representing the actual Xaml to be shown).
                new CompleteStep <MonoberryProjectObject>()
                {
                    ViewModel = step1ViewModel, ViewType = typeof(WelcomeView), Visited = true
                },
                new CompleteStep <MonoberryProjectObject>()
                {
                    ViewModel = step2ViewModel, ViewType = typeof(SDKConfigurationView)
                },
                new CompleteStep <MonoberryProjectObject>()
                {
                    ViewModel = step3ViewModel, ViewType = typeof(DeviceSetupView)
                },
                new CompleteStep <MonoberryProjectObject>()
                {
                    ViewModel = step4ViewModel, ViewType = typeof(ApplicationInfoView)
                },
                new CompleteStep <MonoberryProjectObject>()
                {
                    ViewModel = step5ViewModel, ViewType = typeof(FinishView)
                },
            });
        }