private void ClearFields() { WriteMsgTextBox.Clear(); ChatTextBox.Clear(); ChatListBox.Items.Clear(); UserTextBox.Text = null; CurrentChatTextBox.Text = null; }
private void ExitChat() { byte[] data = Encoding.UTF8.GetBytes($"{NameTextBox.Text} Покинул чат"); client.Send(data, data.Length, ipEndPoint); client.DropMulticastGroup(groupAddress); isConnect = false; client.Close(); ChatTextBox.Clear(); SendButton.IsEnabled = true; ExitButton.IsEnabled = false; SendButton.IsEnabled = false; }
private void SelectChat_Click(object sender, RoutedEventArgs e) { if (ChatListBox.SelectedIndex != -1) { ListBoxItem listItm = (ListBoxItem)ChatListBox.SelectedItem; chatMenager.SetCurrentChatId(listItm.Content.ToString()); CurrentChatTextBox.Text = listItm.Content.ToString(); if (ChatTextBox.Text != null && ChatTextBox.Text != "") { ChatTextBox.Clear(); } } }
private void CliearButton_Click(object sender, EventArgs e) { ChatTextBox.Clear(); }
private void ClearClick(object sender, RoutedEventArgs e) { ChatTextBox.Clear(); }