Beispiel #1
0
        private static string DeriveNextPage(PageActivity pageActivity)
        {
            string nextPage = "";

            switch (pageActivity.ViewModelName)
            {
            case nameof(Page1ViewModel):
                if (pageActivity.UserActivityList.Last().CommandName == nameof(Page1ViewModel.NextButton))
                {
                    nextPage = nameof(Page2ViewModel);
                }
                break;

            case nameof(Page2ViewModel):
                if (pageActivity.UserActivityList.Last().CommandName == nameof(Page2ViewModel.NextButton))
                {
                    nextPage = nameof(Page3ViewModel);
                }
                break;

            case nameof(Page3ViewModel):
                if (pageActivity.UserActivityList.Last().CommandName == nameof(Page3ViewModel.NextButton))
                {
                    nextPage = nameof(Page1ViewModel);
                }
                break;

            default:
                break;
            }
            return(nextPage);
        }
Beispiel #2
0
        internal static string GetNextPageName()
        {
            var          navigationHistoryRepository = Singleton <NavigationHistoryRepository> .Instance;
            PageActivity LatestPageActivity          = navigationHistoryRepository.History.Last();

            return(DeriveNextPage(LatestPageActivity));
        }