示例#1
0
 //add message vao khung chat.
 void AddMessage(String s)
 {
     LstMessage.Items.Add(new ListViewItem()
     {
         Text = s
     });
     TxtMessage.Clear();
 }
示例#2
0
 //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();
 }
示例#3
0
        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();
        }
示例#4
0
 private void BtnSend_Click(object sender, RoutedEventArgs e)
 {
     userConnection.SendMessage();
     TxtMessage.Clear();
 }