Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 public void CreateProfile()
 {
     Profile P = new Profile();
     P.PlayerName = NameBox.Text;
     P.SaveProfile();
 }
Exemplo n.º 3
0
 public void ToNewProfile()
 {
     this.SwitchTo(new ProfileCreationScreen(Parent, GeneralManager.ScreenX, GeneralManager.ScreenY));
     Profile Test = new Profile();
     Test.PlayerName = "test prof";
     Test.SaveProfile();
 }