private void ConnexionButton_Click(object sender, EventArgs e) { string errorMessage = ""; //Console.WriteLine(loginTextBox.Text + " " + passwordTextBox.Text); if (ctm.Login(loginTextBox.Text, passwordTextBox.Text, ref errorMessage)) { this.Hide(); TopicForm topicForm = new TopicForm(this, ctm, new TextChatter(loginTextBox.Text)); topicForm.Show(); } else { if (errorMessage == "incorrect") { ErrorLoginLabel.Show(); } else { ErrorConnexionLabel.Show(); } retryLabel.Show(); } }
int messageCount;//number of message #endregion #region Constructor public ChatroomIHM(ClientChatRoom clientChatRoom, TopicForm topicForm) { this.topicForm = topicForm; this.clientChatRoom = clientChatRoom; InitializeComponent(); topicNameLabel.Text = clientChatRoom.Topic; }