BogheApp.SessionWindow.buttonSendText_Click C# (CSharp) Method

buttonSendText_Click() private method

private buttonSendText_Click ( object sender, RoutedEventArgs e ) : void
sender object
e RoutedEventArgs
return void
        private void buttonSendText_Click(object sender, RoutedEventArgs e)
        {
            if (this.ChatSession == null)
            {
                this.ChatSession = this.CreateOutgoingSession(MediaType.Chat);
            }
            HistoryShortMessageEvent @event = new HistoryShortMessageEvent(this.remotePartyUri);
            @event.Status = HistoryEvent.StatusType.Outgoing;
            @event.SipSessionId = this.ChatSession.Id;
            @event.Content = this.textBoxInput.Text;
            this.AddMessagingEvent(@event);

            this.ChatSession.SendMessage(this.textBoxInput.Text);
            this.textBoxInput.Text = String.Empty;

            if (this.IsComposingAlertEnabled)
            {
                this.imActivityIndicator.OnContentSent();
            }
        }