void OnMessageReceived(TextMessageReceivedEventArgs e) { if (IsRemoteUser(e.Sender)) { MessageReceived(this, e); } }
void chatHost_MessageReceived(object sender, TextMessageReceivedEventArgs e) { if (e.SessionID != Id) { return; } eventQueue.Enqueue(() => OnMessageReceived(e)); }
void session_MessageReceived(object sender, Squiggle.Core.Chat.TextMessageReceivedEventArgs e) { IBuddy buddy; if (buddies.TryGet(e.Sender.ClientID, out buddy)) { MessageReceived(this, new ChatMessageReceivedEventArgs() { Id = e.Id, Sender = buddy, FontName = e.FontName, FontSize = e.FontSize, Color = e.Color, FontStyle = e.FontStyle, Message = e.Message }); LogHistory(EventType.Message, buddy, e.Message); } }