Esempio n. 1
0
        public void Back(MyWizardNavEventArgs args)
        {
            if (_currentPage == _sequence.Min(s => s.Key))
            {
                ResetWizard();
                return;
            }

            _currentPage--;

            Navigate(args, () => _eventAggregator.GetEvent <MyWizardNavPrevCompletedEvent>().Publish(args));
        }
Esempio n. 2
0
        public void Next(MyWizardNavEventArgs args)
        {
            if (_currentPage == _sequence.Max(s => s.Key))
            {
                ResetWizard();
                return;
            }

            _currentPage++;

            Navigate(args, () => _eventAggregator.GetEvent <MyWizardNavNextCompletedEvent>().Publish(args));
        }
Esempio n. 3
0
        private void Navigate(MyWizardNavEventArgs args, Action callback)
        {
            var region = _regionManager.Regions[_regionName];

            _regionManager.Regions[_regionName].RemoveAll();

            _regionManager.RequestNavigate(_regionName, _sequence[_currentPage], _ => {
                if (_subSequences.ContainsKey(_currentPage))
                {
                    foreach (var subView in _subSequences[_currentPage])
                    {
                        _regionManager.RequestNavigate(subView.Item1, subView.Item2);
                    }
                }

                callback();
            });
        }
Esempio n. 4
0
        private void Back(MyWizardNavEventArgs args)
        {
            _currentPage--;

            Navigate(() => _eventAggregator.GetEvent <MyWizardNavPrevCompletedEvent>().Publish(args));
        }
Esempio n. 5
0
        private void Next(MyWizardNavEventArgs args)
        {
            _currentPage++;

            Navigate(() => _eventAggregator.GetEvent <MyWizardNavNextCompletedEvent>().Publish(args));
        }
Esempio n. 6
0
 private void NavCompleted(MyWizardNavEventArgs args)
 {
     Person = args.Person;
     _eventAggregator.GetEvent <MyWizardNavPrevCompletedEvent>().Unsubscribe(_prevCompletedEventToken);
     _eventAggregator.GetEvent <MyWizardNavNextCompletedEvent>().Unsubscribe(_nextCompletedEventToken);
 }
Esempio n. 7
0
 public void Completed(MyWizardNavEventArgs args)
 {
     Person    = args?.Person;
     HelloText = $"Hello {args?.Person?.Name}, Working in {args?.Person?.Company} as {args?.Person?.Position}";
     _eventAggregator.GetEvent <MyWizardNavNextCompletedEvent>().Unsubscribe(_completedToken);
 }