}//end constructor

        //When the page has been navigated to...
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            //first make sure page is displayed in portrait
            DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;

            con = new SQLiteConnection("GameDatabase.db");                  //Instantiate an SQLite connection for the Game database
            con.CreateTable<HighScore>();                                   //Create a table for the connection using HighScore objects
            scoreHolder = e.Parameter as ScoreInformationPasser;       //Receive information (score, game being played) from Game.xaml
            score = scoreHolder.score;                                 //Get score information from scoreholder object
            gameType = scoreHolder.gameType;                           //Get score information from scoreholder object
            id = getrowCount(gameType);                         //Use gametype to decide which query to excute, returns amount of rows
                                                                //in table for the highscores for the game
            txtScore.Text = score.ToString();                   //output users score to the screen
        }
示例#2
0
        }//end constructor

        //When the page has been navigated to...
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            //first make sure page is displayed in portrait
            DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;

            con = new SQLiteConnection("GameDatabase.db");       //Instantiate an SQLite connection for the Game database
            con.CreateTable <HighScore>();                       //Create a table for the connection using HighScore objects
            scoreHolder = e.Parameter as ScoreInformationPasser; //Receive information (score, game being played) from Game.xaml
            score       = scoreHolder.score;                     //Get score information from scoreholder object
            gameType    = scoreHolder.gameType;                  //Get score information from scoreholder object
            id          = getrowCount(gameType);                 //Use gametype to decide which query to excute, returns amount of rows
                                                                 //in table for the highscores for the game
            txtScore.Text = score.ToString();                    //output users score to the screen
        }