Esempio n. 1
0
        private void LoadStatistics()
        {
            Statistics stat = new Statistics();
            StringBuilder sb = new StringBuilder();

            foreach (KeyValuePair<string, Int64> pair in stat.TopTen)
            {
                sb.AppendLine("1. " + pair.Key + "\t" + pair.Value);
            }

            topTen.Text = sb.ToString();
        }
Esempio n. 2
0
        /// <summary>
        /// Metoda wywoływana przy kończeniu gry (brak możliwości dalszej gry)
        /// </summary>
        private void EndGame(Int64 score)
        {
            Statistics stat = new Statistics();
            Boolean hs = stat.SaveScore(score);

            if (hs == true)
            {
                MessageBox.Show("Congratulations! New highscore!");
            }

            NavigationService.GoBack();
            this.ClearMemory();
        }