Beispiel #1
0
        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();
        }
Beispiel #2
0
 /// <summary>
 /// sets the lobby form for the client
 /// </summary>
 /// <param name="form"></param>
 public void setGameLobbyForm(GameLobby form)
 {
     checkForm(form);
     this.lobby = form;
 }
Beispiel #3
0
 public Client()
 {
     game = null;
     lobby = null;
 }