Example #1
0
        /// <summary>
        /// Funkcja wczytująca z pamięci telefonu dziesięć najlepszych wyników
        /// </summary>
        private void LoadTopTen()
        {
            AppMemory am = new AppMemory();

            TopTen = new List<KeyValuePair<string, Int64>>();

            for (int i = 1; i <= _amountOfPlaces; i++)
            {
                string playerName = am.GetValueOrDefault<string>("playerName" + Convert.ToString(i), "Player");
                Int64 score = am.GetValueOrDefault<Int64>("score" + Convert.ToString(i), 0);

                TopTen.Add(new KeyValuePair<string, long>(playerName, score));
            }
        }
Example #2
0
        /// <summary>
        /// Metoda odczytuje ustawienia z pamięci
        /// </summary>
        private void LoadSettings()
        {
            AppMemory am = new AppMemory();

            nameBox.Text = am.GetValueOrDefault("playerName", "Player");
        }
Example #3
0
        private void LoadPlayerName()
        {
            AppMemory am = new AppMemory();

            _playerName = am.GetValueOrDefault("playerName", "Player");
        }