Esempio n. 1
0
        public void AddRecord(string playerName, int playerScore)
        {
            Score s = new Score(playerName, playerScore);

            scores.Add(s);
            scores = scores.OrderByDescending(o => o.points).ToList();

            if (scores.Count() > 10)
            {
                scores.RemoveAt(scores.Count - 1);
            }
            XmlList = new ListSerializer <Score>(rankingPath + song.GetTitle(), song.GetTitle() + ".xml", scores);
            XmlList.PushData();
            return;
        }