public void SetUpConnection()
 {
     PlayerConnectionInfo = new PlayerConnectionInfo
     {
         Name = _view.PlayerName,
         RemoteAddress = _view.PlayerIp
     };
 }
Ejemplo n.º 2
0
 public void ReadyConnection(PlayerConnectionInfo playerConnectionInfo)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 3
0
 public void SetPlayerRelatedData()
 {
     var playerConnectionView = new PlayerConnectionView();
     var playerConnectionController = _network.ConnectionType == ConnectionType.Server
         ? new PlayerConnectionController(playerConnectionView, false)
         : new PlayerConnectionController(playerConnectionView, true);
     playerConnectionView.SetController(playerConnectionController);
     if (playerConnectionView.ShowDialog() == DialogResult.OK)
     {
         _playerConnectionInfo = playerConnectionController.PlayerConnectionInfo;
         Common.IpEndPoint = _playerConnectionInfo.RemoteAddress != null
             ? new IPEndPoint(_playerConnectionInfo.RemoteAddress, 2000)
             : new IPEndPoint(IPAddress.Parse("127.0.0.1"), 2000);
     }
     _localPlayer.Name = playerConnectionController.PlayerConnectionInfo.Name;
 }