コード例 #1
0
 private void btnOpen_Click(object sender, RoutedEventArgs e)
 {
     if (tbxFile.Text.Contains(Game.newGame.GameInfo.Gamer.Name))
     {
         SerializationGameActions actions = new SerializationGameActions();
         Game.newGame = actions.DeserializeObject(tbxFile.Text);
         Game.LoadGame();
     }
     else
     {
         MessageBox.Show("ERROR!\nNot your save!");
     }
     this.Close();
 }
コード例 #2
0
        private void MenuItemFileSaveGame_Click(object sender, RoutedEventArgs e)
        {
            SerializationGameActions actions = new SerializationGameActions();

            actions.SerializeObject(newGame.GameInfo.Gamer.Name.ToString() + ".xml", newGame);
        }