Exemple #1
0
 private void bOK_Click(object sender, EventArgs e)
 {
     string room;
     if (this.rbNew.Checked)
     {
         room = this.tbRoom.Text;
     }
     else if (this.rbExisting.Checked)
     {
         room = this.cbRoomList.Text;
     }
     else throw new Exception("Radio buttons dont work");
     if (chatClient.performJoinRoom(room, this.tbPass.Text))
     {
         var chatForm1 = new ChatForm(this.chatClient, room);
         chatForm1.Show();
         this.Close();
     }
     else MessageBox.Show("Can't enter room:\n Probably invalid password");
 }