Beispiel #1
0
        private void Pressure_FormClosing(object sender, FormClosingEventArgs e)
        {
            File.WriteAllText(PLAYER_DATA_FILE_NAME, _player.ToXmlString());

            PlayerDataMapper.SaveToDatabase(_player);
        }
Beispiel #2
0
        private void AdventureGame2_FormClosing(object sender, FormClosingEventArgs e)
        {
            //File.WriteAllText(PLAYER_DATA_FILE_NAME, player.ToXmlString());

            PlayerDataMapper.SaveToDatabase(player);
        }
Beispiel #3
0
        /// <summary>
        /// Saves the SuperAdventureConsole game data to both:
        /// * an XML save file
        /// * the SuperAdventure database
        /// </summary>
        private static void SaveGameData()
        {
            File.WriteAllText(PLAYER_DATA_FILE_NAME, _player.ToXmlString());

            PlayerDataMapper.SaveToDatabase(_player);
        }
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            File.WriteAllText(PLAYER_DATA_FILE_NAME, _player.ToXmlString());

            PlayerDataMapper.SaveToDatabase(_player);
        }