예제 #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            // retrieve parameters
            IDictionary <string, object> pageValues;

            if (QANavigationHelper.PageValues.TryGetValue(this.GetType().Name, out pageValues))
            {
                object removePreviousPageFromHist;
                if (pageValues.TryGetValue(QANavigationHelper.PAGE_PARAM_REMOVE_PREVIOUS_PAGE_FROM_HISTORY, out removePreviousPageFromHist))
                {
                    bool?removePreviousPage = removePreviousPageFromHist as bool?;
                    if (removePreviousPage.HasValue)
                    {
                        if (removePreviousPage == true)
                        {
                            QANavigationHelper.RemoveBackEntry();
                            pageValues.Remove(QANavigationHelper.PAGE_PARAM_REMOVE_PREVIOUS_PAGE_FROM_HISTORY);
                        }
                    }
                }
            }

            //if (e.NavigationMode == NavigationMode.Back)
            //    this.CurrentViewModel.LoadAllDifficultiesAndLevels();


            // Line to call event on view model
            PersistenceManager.Instance.PageNavigated(this.CurrentViewModel);

            EasyTracker.GetTracker().SendView("Levels Screen");
        }
예제 #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            EasyTracker.GetTracker().SendView("Settings View");

            IDictionary <string, object> pageValues;

            if (QANavigationHelper.PageValues.TryGetValue(this.GetType().Name, out pageValues))
            {
                object removePreviousPageFromHist;
                if (pageValues.TryGetValue(QANavigationHelper.PAGE_PARAM_REMOVE_PREVIOUS_PAGE_FROM_HISTORY, out removePreviousPageFromHist))
                {
                    bool?removePreviousPage = removePreviousPageFromHist as bool?;
                    if (removePreviousPage.HasValue)
                    {
                        if (removePreviousPage == true)
                        {
                            QANavigationHelper.RemoveBackEntry();
                        }
                    }
                }
            }

            // Line to call event on view model
            PersistenceManager.Instance.PageNavigated(this.CurrentViewModel);
        }
예제 #3
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            EasyTracker.GetTracker().SendView("Game View");


            // retrieve parameters if any, and set VM value
            IDictionary <string, object> pageValues;

            if (QANavigationHelper.PageValues.TryGetValue(this.GetType().Name, out pageValues))
            {
                object propertyValue;
                if (pageValues.TryGetValue(QuizzApp.WP.ViewModels.Helpers.GamePage.PAGE_PARAM_PACKID, out propertyValue))
                {
                    int packId;
                    if (int.TryParse(propertyValue.ToString(), out packId))
                    {
                        this.CurrentViewModel.CurrentPackId = packId;
                    }
                }


                object removePreviousPageFromHist;
                if (pageValues.TryGetValue(QANavigationHelper.PAGE_PARAM_REMOVE_PREVIOUS_PAGE_FROM_HISTORY, out removePreviousPageFromHist))
                {
                    bool?removePreviousPage = removePreviousPageFromHist as bool?;
                    if (removePreviousPage.HasValue)
                    {
                        if (removePreviousPage == true)
                        {
                            QANavigationHelper.RemoveBackEntry();
                        }
                    }
                }
            }

            // Line to call event on view model
            PersistenceManager.Instance.PageNavigated(this.CurrentViewModel);
        }
예제 #4
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            IDictionary <string, object> pageValues;

            if (QANavigationHelper.PageValues.TryGetValue(this.GetType().Name, out pageValues))
            {
                object propertyValue;
                if (pageValues.TryGetValue(QuizzApp.WP.ViewModels.Helpers.HelpPage.PAGE_PARAM_NEXT_PAGE_NAME, out propertyValue))
                {
                    this.CurrentViewModel.NextPageName = propertyValue.ToString();

                    if (pageValues.TryGetValue(QuizzApp.WP.ViewModels.Helpers.HelpPage.PAGE_PARAM_NEXT_PAGE_PARAMS, out propertyValue))
                    {
                        this.CurrentViewModel.NextPageParams = propertyValue as Dictionary <string, object>;
                    }
                }


                object removePreviousPageFromHist;
                if (pageValues.TryGetValue(QANavigationHelper.PAGE_PARAM_REMOVE_PREVIOUS_PAGE_FROM_HISTORY, out removePreviousPageFromHist))
                {
                    bool?removePreviousPage = removePreviousPageFromHist as bool?;
                    if (removePreviousPage.HasValue)
                    {
                        if (removePreviousPage == true)
                        {
                            QANavigationHelper.RemoveBackEntry();
                        }
                    }
                }
            }

            // Line to call event on view model
            PersistenceManager.Instance.PageNavigated(this.CurrentViewModel);

            EasyTracker.GetTracker().SendView("Help View");
        }