/// <summary> /// Gets the player. /// </summary> /// <returns>The player.</returns> public Player GetPlayer() { XmlFileObject <PlayerEntity> xml = new XmlFileObject <PlayerEntity>(); string path = Path.Combine(ApplicationPaths.UserDataDirectory, "Player.xml"); PlayerEntity playerEntity = xml.Read(path); return(playerEntity.ToDomainModel()); }
/// <summary> /// Loads the settings. /// </summary> public void LoadContent() { if (!File.Exists(ApplicationPaths.SettingsFile)) { //string logMessage = "Settings file is missing. Using default settings."; // TODO: Log error SaveContent(); return; } XmlFileObject <SettingsManager> xmlManager = new XmlFileObject <SettingsManager>(); SettingsManager storedSettings = xmlManager.Read(ApplicationPaths.SettingsFile); instance = storedSettings; }