public void Back(MyWizardNavEventArgs args) { if (_currentPage == _sequence.Min(s => s.Key)) { ResetWizard(); return; } _currentPage--; Navigate(args, () => _eventAggregator.GetEvent <MyWizardNavPrevCompletedEvent>().Publish(args)); }
public void Next(MyWizardNavEventArgs args) { if (_currentPage == _sequence.Max(s => s.Key)) { ResetWizard(); return; } _currentPage++; Navigate(args, () => _eventAggregator.GetEvent <MyWizardNavNextCompletedEvent>().Publish(args)); }
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(); }); }
private void Back(MyWizardNavEventArgs args) { _currentPage--; Navigate(() => _eventAggregator.GetEvent <MyWizardNavPrevCompletedEvent>().Publish(args)); }
private void Next(MyWizardNavEventArgs args) { _currentPage++; Navigate(() => _eventAggregator.GetEvent <MyWizardNavNextCompletedEvent>().Publish(args)); }
private void NavCompleted(MyWizardNavEventArgs args) { Person = args.Person; _eventAggregator.GetEvent <MyWizardNavPrevCompletedEvent>().Unsubscribe(_prevCompletedEventToken); _eventAggregator.GetEvent <MyWizardNavNextCompletedEvent>().Unsubscribe(_nextCompletedEventToken); }
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); }