コード例 #1
0
 private void MainMenu_Load(object sender, EventArgs e)
 {
     PlayerSerialize.DeserializePlayer(ref playerList);
     if (playerList == null)
     {
         playerList = new List <Player>();
         playerList.Add(new Player("Jose", "123456", 4, 5, 7));
         playerList.Add(new Player("Jason", "123456", 8, 3, 1));
         playerList.Add(new Player("Ana", "123456", 6, 2, 2));
         playerList.Add(new Player("Luis", "123456", 5, 3, 4));
         playerList.Add(new Player("Mir", "123456", 7, 5, 7));
         PlayerSerialize.SerializePlayer(playerList);
     }
 }
コード例 #2
0
 private void MainMenu_FormClosing(object sender, FormClosingEventArgs e)
 {
     PlayerSerialize.SerializePlayer(playerList);
 }