Exemplo n.º 1
0
 private void listBoxGameLobbies_SelectedIndexChanged(object sender, EventArgs e)
 {
     MonopolyDealServiceReference.GameLobby gl = listBoxGameLobbies.SelectedValue as MonopolyDealServiceReference.GameLobby;
     if (gl != null)
     {
         updateLobby(gl);
     }
 }
Exemplo n.º 2
0
 public void updateLobby(Object lobby)
 {
     if (lobby is List <String> )
     {
         //Connect to new lobby
     }
     else
     {
         MonopolyDealServiceReference.GameLobby gl = lobby as MonopolyDealServiceReference.GameLobby;
         listBoxPlayersInLobby.DataSource    = gl.clientsConnectedToGame;
         listBoxPlayersInLobby.DisplayMember = "description";
     }
 }
Exemplo n.º 3
0
 private void button4_Click_1(object sender, EventArgs e)
 {
     if (listBoxGameLobbies.SelectedValue is String)
     {
         //Connect to new lobby
         requestHandlerMD.connectToNewLobby();
         //Update Lobbies state
         button9_Click(null, null);
     }
     else
     {
         MonopolyDealServiceReference.GameLobby gl = listBoxGameLobbies.SelectedValue as MonopolyDealServiceReference.GameLobby;
         requestHandlerMD.connectToExistingLobby(gl.guid);
         //Update Lobbies state
         button9_Click(null, null);
     }
 }