private void okBttn_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(usernameTxtBox.Text)) { ChatForm chatForm = new ChatForm(usernameTxtBox.Text); _chatForms.Add(chatForm); chatForm.ChatForms = _chatForms; usernameTxtBox.Clear(); chatForm.Show(); } else { MessageBox.Show("Please enter a name!"); } }
public ChatMessage(ChatForm chat) { _chatForm = chat; }