Exemplo n.º 1
0
        private void performLogon()
        {
            int rs = chatClient.LogOn();

            switch (rs)
            {
            case 0:    //Success
                chatClient.StartListener();
                SelRoomForm selroomform1 = new SelRoomForm(chatClient);
                this.Hide();
                selroomform1.Show();
                break;

            case 1:    //Already logged on
                MessageBox.Show("Already logged on");
                break;

            case 2:    //Invalid login/pass
                MessageBox.Show("Invalid login/pass");
                break;

            case 3:
                MessageBox.Show("Invalid response from server");
                break;

            case 4:
                MessageBox.Show("Network Socket exception");
                break;

            default:    //Error
                MessageBox.Show("Logon error");
                break;
            }
        }
Exemplo n.º 2
0
 private void bJoinAnRoom_Click(object sender, EventArgs e)
 {
     SelRoomForm selroomform1 = new SelRoomForm(chatClient);
     selroomform1.Show();
 }
Exemplo n.º 3
0
 private void performLogon()
 {
     int rs = chatClient.LogOn();
     switch (rs)
     {
         case 0://Success
             chatClient.StartListener();
             SelRoomForm selroomform1 = new SelRoomForm(chatClient);
             this.Hide();
             selroomform1.Show();
             break;
         case 1://Already logged on
             MessageBox.Show("Already logged on");
             break;
         case 2://Invalid login/pass
             MessageBox.Show("Invalid login/pass");
             break;
         case 3:
             MessageBox.Show("Invalid response from server");
             break;
         case 4:
             MessageBox.Show("Network Socket exception");
             break;
         default://Error
             MessageBox.Show("Logon error");
             break;
     }
 }
Exemplo n.º 4
0
        private void bJoinAnRoom_Click(object sender, EventArgs e)
        {
            SelRoomForm selroomform1 = new SelRoomForm(chatClient);

            selroomform1.Show();
        }