示例#1
0
        private void ViewModelOnNavigationRequested(ForumsPageIndex page, object args)
        {
            switch (page)
            {
            case ForumsPageIndex.PageIndex:
                MainForumContentFrame.Navigate(typeof(ForumIndexPage), args);
                break;

            case ForumsPageIndex.PageBoard:
                MainForumContentFrame.Navigate(typeof(ForumBoardPage), args);
                break;

            case ForumsPageIndex.PageTopic:
                MainForumContentFrame.Navigate(typeof(ForumTopicPage), args);
                break;

            case ForumsPageIndex.PageNewTopic:
                MainForumContentFrame.Navigate(typeof(ForumNewTopicPage), args);
                break;

            case ForumsPageIndex.PageStarred:
                MainForumContentFrame.Navigate(typeof(ForumStarredMessagesPage), args);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(page), page, null);
            }
        }
示例#2
0
        private void ViewModelOnNavigationRequested(ForumsPageIndex page, object args)
        {
            Fragment fragment;

            switch (page)
            {
            case ForumsPageIndex.PageIndex:
                fragment = new ForumIndexPageFragment();
                break;

            case ForumsPageIndex.PageBoard:
                fragment = new ForumBoardPageFragment(args as ForumsBoardNavigationArgs);
                break;

            case ForumsPageIndex.PageTopic:
                fragment = new ForumTopicPageFragment(args as ForumsTopicNavigationArgs);
                break;

            case ForumsPageIndex.PageNewTopic:
                fragment = new ForumNewTopicPageFragment(args as ForumsNewTopicNavigationArgs);
                break;

            case ForumsPageIndex.PageStarred:
                return;

            default:
                throw new ArgumentOutOfRangeException(nameof(page), page, null);
            }

            var trans = ChildFragmentManager.BeginTransaction();

            trans.SetCustomAnimations(Resource.Animator.animation_slide_btm,
                                      Resource.Animator.animation_fade_out,
                                      Resource.Animator.animation_slide_btm,
                                      Resource.Animator.animation_fade_out);
            trans.Replace(Resource.Id.ForumsContentFrame, fragment);
            try
            {
                trans.Commit();
            }
            catch (Exception)
            {
                //random exception that does not affect anything
                //#justandroidthings
            }
        }
示例#3
0
        public void TelemetryTrackNavigation(ForumsPageIndex page)
        {
#if !DEBUG
            HockeyClient.Current.TrackPageView(page.ToString());
#endif
        }
示例#4
0
        public void TelemetryTrackNavigation(ForumsPageIndex page)
        {
#if !DEBUG
            //MetricsManager.TrackEvent($"Navigation: {page}");
#endif
        }