protected virtual void OnChatReceive(ChatReceiveEventArgs e) { var handler = ChatReceiveEvent; if (handler != null) handler (this, e); }
/// <summary> /// Handles the ChatReceiveEvent from the callback. Adds the received /// message to the ChatTextBox display. /// </summary> public void ChatReceive(object sender, ChatReceiveEventArgs e) { App.Current.Dispatcher.Invoke(new Action<Infrastructure.ChatMessage>(m => chatTextBox.AddMessage(m)), e.Message); }