Exemple #1
0
        public RoomTab(InfoUser infoUser,IChatroom iChatRoom)
        {
            this.infoUser = infoUser;
            this.iChatRoom = iChatRoom;
            initTab();
            initButtonQuitter();
            initTextBox();
            initButtonEnvoyer();
            initRichTextBox();

            Controls.Add(buttonQuitter);
            Controls.Add(textBoxConv);
            Controls.Add(buttonEnvoyer);
            Controls.Add(richTextBoxMsg);
        }
Exemple #2
0
        private void buttonConnexion_Click(object sender, EventArgs e)
        {
            try {

                clientGT.authentify(textBoxLogin.Text, textBoxPassword.Text);

                user = new User(textBoxLogin.Text, textBoxPassword.Text);
                InfoUser info = new InfoUser(user,this);
                info.Show();
                this.Hide();
            }
            catch(WrongPasswordException)
            {
                labelErreur.Text = "Le password est incorrect !";
            }
            catch(UserUnknownException)
            {
                labelErreur.Text = "Ce compte n'existe pas !";
            }
        }