//add message vao khung chat. void AddMessage(String s) { LstMessage.Items.Add(new ListViewItem() { Text = s }); TxtMessage.Clear(); }
//gui tin cho tat ca client. private void BtnSend_Click(object sender, EventArgs e) { foreach (Socket item in CLientList) { send(item); } // send(); AddMessage(TxtMessage.Text); TxtMessage.Clear(); }
private void ChangerAmis() { LblBlockConversation.Text = null; TxtMessage.Clear(); currentAmis = listAmis[listViewContact.SelectedIndex]; txtEnDiscussionAvec.Text = DISCUSSION_START + currentAmis.firstName + " " + currentAmis.lastName; txtUsernameAmi.Text = USERNAME_SYMBOL + currentAmis.username; if (observable != null) { observable.Dispose(); } observable = coordinateur.SubscribeToStack(this, currentAmis.id); PnlConversation.Visibility = Visibility.Visible; listViewContact.UnselectAll(); }
private void BtnSend_Click(object sender, RoutedEventArgs e) { userConnection.SendMessage(); TxtMessage.Clear(); }