예제 #1
0
        // STEP: Add a Navigate method accepting a page name
        public void NavigateToPackagePage(Pack pack)
        {
            //if (pack.IsTerminated)
            //{
            //    Dictionary<string, object> parameters = new Dictionary<string, object>();
            //    parameters.Add(PackageCompletedPage.PAGE_PARAM_PACKID, pack.Id);
            //    NavigationHelper.Navigate(typeof(PackageCompletedPage).Name, parameters);
            //}
            //else
            //{

            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add(GamePage.PAGE_PARAM_PACKID, pack.Id);

            if (AppSettings.Instance.HasHelpPageAlreadyBeSeen)
            {
                QANavigationHelper.Navigate(GamePage.PAGE_NAME, parameters);
            }
            else
            {
                Dictionary <string, object> parametersHelp = new Dictionary <string, object>();
                parametersHelp.Add(HelpPage.PAGE_PARAM_NEXT_PAGE_NAME, typeof(GamePage).Name);
                parametersHelp.Add(HelpPage.PAGE_PARAM_NEXT_PAGE_PARAMS, parameters);
                QANavigationHelper.Navigate(typeof(HelpPage).Name, parametersHelp);
                AppSettings.Instance.HasHelpPageAlreadyBeSeen = true;
            }
            //}
        }
예제 #2
0
        // STEP: Add a Navigate method accepting a page name
        public void NavigateToPacksListPage(int levelId)
        {
            Dictionary <string, object> par = new Dictionary <string, object>();

            par.Add(PacksListPage.PAGE_PARAM_LEVEL_ID_INT, levelId);

            QANavigationHelper.Navigate(PacksListPage.PAGE_NAME, par);
        }
예제 #3
0
        public void NavigateToPacksListPage(bool removePreviousPageFromHistory)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add(PacksListPage.PAGE_PARAM_LEVEL_ID_INT, (int)this.Pack.LevelId);
            parameters.Add(QANavigationHelper.PAGE_PARAM_REMOVE_PREVIOUS_PAGE_FROM_HISTORY, (bool)removePreviousPageFromHistory);
            QANavigationHelper.Navigate(PacksListPage.PAGE_NAME, parameters);
        }
예제 #4
0
        public void NavigateToHelpPage()
        {
            Dictionary <string, object> pageParams = new Dictionary <string, object>();

            pageParams.Add(HelpPage.PAGE_PARAM_NEXT_PAGE_NAME, SettingsPage.PAGE_NAME);

            Dictionary <string, object> pageParams2 = new Dictionary <string, object>();

            pageParams2.Add("essai", "toto");
            pageParams.Add(HelpPage.PAGE_PARAM_NEXT_PAGE_PARAMS, pageParams2);

            QANavigationHelper.Navigate(HelpPage.PAGE_NAME, pageParams);
        }
예제 #5
0
 public void GoToPreviousPage()
 {
     if (this.NextPageName != null && !string.IsNullOrEmpty(NextPageName))
     {
         nextPageParams.Add(QANavigationHelper.PAGE_PARAM_REMOVE_PREVIOUS_PAGE_FROM_HISTORY, true);
         QANavigationHelper.Navigate(nextPageName, nextPageParams);
     }
     else
     {
         Dictionary <string, object> parameters = new Dictionary <string, object>();
         parameters.Add(QANavigationHelper.PAGE_PARAM_REMOVE_PREVIOUS_PAGE_FROM_HISTORY, true);
         QANavigationHelper.Navigate(MainPage.PAGE_NAME, parameters);
     }
 }
예제 #6
0
 public void NavigateToLevelsPage()
 {
     //NavigationHelper.Navigate(LevelsPage.PAGE_NAME);
     QANavigationHelper.Navigate(LevelsPage.PAGE_NAME);
 }
예제 #7
0
 public void NavigateToAllPacksListPage()
 {
     //NavigationHelper.Navigate(LevelsPage.PAGE_NAME);
     QANavigationHelper.Navigate("LevelsPage3");
 }
예제 #8
0
 public void NavigateToSettingsPage()
 {
     QANavigationHelper.Navigate(SettingsPage.PAGE_NAME);
 }