private void JoinSelLobbyButton_Click(object sender, EventArgs e) { if (LobbyList.SelectedIndex != -1) { Send(new JoinLobbyPacket(LobbyList.GetItemText(LobbyList.SelectedItem))); waitingLobby = new WaitingLobby(writer, this, chat); } }
private void CreateLobbyButton_Click(object sender, EventArgs e) { if (NicknameTextbox.Text.Equals("") || NicknameTextbox.Text == string.Empty) { } else { waitingLobby = new WaitingLobby(writer, this, chat); Send(new CreateLobbyPacket(NicknameTextbox.Text)); waitingLobby.Show(); this.Hide(); } }
} = -1; //1 = won, 0 = losser, 3 = draw, -1 = not set. public Game(BinaryWriter writer, WaitingLobby refToLobby) { InitializeComponent(); this.writer = writer; this.refToLobby = refToLobby; }