Esempio n. 1
0
        private void SendMessage()
        {
            Message M = new Message(client.LocalClientInfo.Name, Name, txtMessage.Text);

            client.SendMessageUDP(M, RemoteEP);
            txtConversation.Text      += client.LocalClientInfo.Name + ": " + txtMessage.Text + '\n';
            txtMessage.Text            = string.Empty;
            txtConversation.CaretIndex = txtConversation.Text.Length;
            txtConversation.ScrollToEnd();
            txtMessage.Focus();
        }
Esempio n. 2
0
        private void SendMessage(bool isCallNotify = false)
        {
            Message M;

            if (!isCallNotify)
            {
                M = new Message(client.LocalClientInfo.Name, Name, txtMessage.Text);
                client.SendMessageTCP(M);
                txtConversation.Text += client.LocalClientInfo.Name + ": " + txtMessage.Text + '\n';
                txtMessage.Text       = string.Empty;
            }
            else
            {
                string message = ": Call request!" + '\n';
                M = new Message(client.LocalClientInfo.Name, Name, message);
                client.SendMessageUDP(M, RemoteEP);
                txtConversation.Text += client.LocalClientInfo.Name + ": " + "Call Request sended!" + '\n';
            }
            txtConversation.CaretIndex = txtConversation.Text.Length;
            txtConversation.ScrollToEnd();
            txtMessage.Focus();
        }