private void button1_Click(object sender, EventArgs e) { if (listBox1.SelectedItem == null) return; string line = (string)listBox1.SelectedItem; string name = line.Split('-')[0].Trim(); proxy.lobby_name = name; GameLobby gamelobby = new GameLobby(proxy); gamelobby.Show(); proxy.joinLobby(); gamelobby.refreshLobbyPlayerList(proxy.getPlayers()); this.Close(); }
/// <summary> /// sets the lobby form for the client /// </summary> /// <param name="form"></param> public void setGameLobbyForm(GameLobby form) { checkForm(form); this.lobby = form; }
public Client() { game = null; lobby = null; }