Exemplo n.º 1
0
 /// <summary>Form load event -- this window was just created</summary>
 private void FrmChat_Load(object sender, EventArgs e)
 {
     encoderRTT = new RealTimeText.Encoder(_jabberClient.Document, true);
     groupBoxParticipant1.Text     = JID.Bare;
     groupBoxParticipantLocal.Text = _jabberClient.User;
     SendBox.Focus();
 }
 public void ReciveMessage(String msg)
 {
     ReciveBox.AppendText(m_PrivateNick + ": " + msg + "\n");
     // Auto scroll
     ReciveBox.SelectionStart = ReciveBox.TextLength;
     ReciveBox.Focus();
     ReciveBox.ScrollToCaret();
     SendBox.Focus();
 }
 private void SendMessage()
 {
     ReciveBox.AppendText(m_MyNick + ": " + SendBox.Text + "\n");
     m_ParentMsg.SendMsg(m_PrivateNick, SendBox.Text);
     SendBox.Clear();
     // Auto scroll
     ReciveBox.SelectionStart = ReciveBox.TextLength;
     ReciveBox.Focus();
     ReciveBox.ScrollToCaret();
     SendBox.Focus();
 }
Exemplo n.º 4
0
        /// <summary>Keypress event in the Send Message text box.
        /// Monitor for Enter keypresses for sending messages.
        /// If Shift+Enter is done, don't transmit, and just treat it as an embedded newline in the message</summary>
        private void textboxSendMsg_KeyDown(object sender, KeyEventArgs e)
        {
            if ((e.KeyCode == Keys.Return) &&
                (0 == (e.Modifiers & Keys.Shift)))
            {
                if (SendBox.Text.Length > 0)
                {
                    timerRTTsend.Stop();

                    // Send message
                    string sentText = SendBox.Text;
                    SendBox.Text = "";
                    JabberSendMessage(sentText);

                    // Display sent message
                    AppendConversation(_jabberClient.User, sentText, Color.DarkRed);
                    UpdateConversationWindow();

                    SendBox.Focus();
                    this.ReceiveFlag = false;
                }
                e.Handled = true;
            }
        }
Exemplo n.º 5
0
 private void textboxRealTime_KeyPress(object sender, KeyPressEventArgs e)
 {
     SendBox.Focus();
 }
Exemplo n.º 6
0
 private void textboxConversation2_KeyPress(object sender, KeyPressEventArgs e)
 {
     SendBox.Focus();
 }
Exemplo n.º 7
0
 private void textboxParticipant1_KeyPress(object sender, KeyPressEventArgs e)
 {
     SendBox.Focus();
 }
Exemplo n.º 8
0
 // Reset the cursor to the send message box upon any repeated clicks on any tab
 private void tabControl_MouseClick(object sender, MouseEventArgs e)
 {
     SendBox.Focus();
 }
Exemplo n.º 9
0
 /// <summary>Window activation event</summary>
 private void FrmChat_Activated(object sender, EventArgs e)
 {
     this.BringToFront();
     SendBox.Focus();
     UpdateMenuCheckmarks();
 }
 private void PrivateMessage_Enter(object sender, EventArgs e)
 {
     SendBox.Focus();
 }