예제 #1
0
		public LoginInfo GetLoginInfo(PlayerInfo player)
		{
			using (WebClient webClient = new WebClient())
			{
				Stream locationsStream = webClient.OpenRead("http://192.168.0.105:54321/login?email=" + player.Email + "&password=password");
				return XmlHelper.DeserialiseLoginInfo(locationsStream);
			}
		}
예제 #2
0
		protected override void DrawDetail()
		{
			if (_playerInfo != null)
			{
				DrawString(_headingFont, _playerInfo.Name);
				DrawString(_paragraphFont, _playerInfo.Email);
			}
			else
			{
				DrawString(_headingFont, "Login as:");
				foreach (PlayerInfo player in _playerInfos)
					if (DrawString(_paragraphFont, "   " + player.Email, true))
					{
						IPlayerDataService playerData = this.Game.Services.GetService<IPlayerDataService>();
						playerData.GetLoginInfo(player);
						_playerInfo = player;
					}
			}
		}
예제 #3
0
 public static void SerialisePlayer(PlayerInfo player, Stream stream)
 {
     XmlSerializer xs = new XmlSerializer(typeof(PlayerInfo));
     xs.Serialize(stream, player);
 }
예제 #4
0
 public MessageInfo(int id, int toPlayerId, int fromPlayerId, string subject, string body, PlayerInfo fromPlayer, PlayerInfo toPlayer)
     : this(id, toPlayerId, fromPlayerId, subject, body)
 {
     FromPlayer = fromPlayer;
     ToPlayer = ToPlayer;
 }