/// <summary> /// Triggered when the user clicks on the "Send" button (the paper plane arrow icon) /// from the message input section. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Send_Message_Click(object sender, EventArgs e) { Entities.Message msg = new Entities.Message(); msg.Contents = this.richTextBox1.Text; this.session.REST.PostMessageToChannel(msg, this.currentChannel); this.richTextBox1.Text = ""; }
/// <summary> /// Triggers when a message is received, will add the message /// to the message pane if this the currently viewed pane /// </summary> /// <param name="m"></param> private void OnMessage(Entities.Message m) { if (this.currentChannel?.ThreadId == m.ThreadId) { this.panel4.OnNewMessage(m); } }
/// <summary> /// Triggered when the user clicks on the "Send" button (the paper plane arrow icon) /// from the message input section. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Send_Message_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.richTextBox1.Text) || string.IsNullOrWhiteSpace(this.richTextBox1.Text)) { return; } Entities.Message msg = new Entities.Message(); msg.Contents = this.richTextBox1.Text; this.session.REST.PostMessageToChannel(msg, (Channel)this.currentChannel); this.richTextBox1.Text = ""; }