コード例 #1
0
ファイル: FrmChat.cs プロジェクト: Flowdalic/realjabber
 /// <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();
 }
コード例 #2
0
 public void ReciveMessage(String msg)
 {
     ReciveBox.AppendText(m_PrivateNick + ": " + msg + "\n");
     // Auto scroll
     ReciveBox.SelectionStart = ReciveBox.TextLength;
     ReciveBox.Focus();
     ReciveBox.ScrollToCaret();
     SendBox.Focus();
 }
コード例 #3
0
 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();
 }
コード例 #4
0
ファイル: FrmChat.cs プロジェクト: Flowdalic/realjabber
        /// <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;
            }
        }
コード例 #5
0
ファイル: FrmChat.cs プロジェクト: Flowdalic/realjabber
 private void textboxRealTime_KeyPress(object sender, KeyPressEventArgs e)
 {
     SendBox.Focus();
 }
コード例 #6
0
ファイル: FrmChat.cs プロジェクト: Flowdalic/realjabber
 private void textboxConversation2_KeyPress(object sender, KeyPressEventArgs e)
 {
     SendBox.Focus();
 }
コード例 #7
0
ファイル: FrmChat.cs プロジェクト: Flowdalic/realjabber
 private void textboxParticipant1_KeyPress(object sender, KeyPressEventArgs e)
 {
     SendBox.Focus();
 }
コード例 #8
0
ファイル: FrmChat.cs プロジェクト: Flowdalic/realjabber
 // 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();
 }
コード例 #9
0
ファイル: FrmChat.cs プロジェクト: Flowdalic/realjabber
 /// <summary>Window activation event</summary>
 private void FrmChat_Activated(object sender, EventArgs e)
 {
     this.BringToFront();
     SendBox.Focus();
     UpdateMenuCheckmarks();
 }
コード例 #10
0
 private void PrivateMessage_Enter(object sender, EventArgs e)
 {
     SendBox.Focus();
 }