public static Profile LoadProfile(string ProfileName) { Profile LoadedProfile = new Profile(); XmlSerializer Serializer = new XmlSerializer(typeof(Profile)); LoadedProfile = (Profile)Serializer.Deserialize(new StreamReader(Directory.GetCurrentDirectory() + @"/Profiles/" + ProfileName + @"/Profile.xml")); return LoadedProfile; }
public void CreateProfile() { Profile P = new Profile(); P.PlayerName = NameBox.Text; P.SaveProfile(); }
public void ToNewProfile() { this.SwitchTo(new ProfileCreationScreen(Parent, GeneralManager.ScreenX, GeneralManager.ScreenY)); Profile Test = new Profile(); Test.PlayerName = "test prof"; Test.SaveProfile(); }