// TODO: MessageEventArgs_3003001 could contain isActionChat from the beginning! private void HandleMessage(MessageEventArgs_300301 message, bool isActionChat) { if (message.ChatId == chatId) { var u = users.GetUser(message.UserId); var cmi = new ChatMessageItem(message, u, isActionChat); chatMessages.Add(cmi); if (ChatMessageReceivedEvent != null) { ChatMessageReceivedEvent(cmi); } } }
/// <summary>Formats and writes the text on a Chat Event to the GUI</summary> /// <param name="chatMessageItem">The chat message item that was received</param> public void OnChatMessageArrived(ChatMessageItem chatMessageItem) { var chatMessage = new ChatMessage(chatMessageItem); AppendHTMLToWebBrowser(chatWebBrowser, chatMessage); }
// TODO: MessageEventArgs_3003001 could contain isActionChat from the beginning! private void HandleMessage(MessageEventArgs_300301 message, bool isActionChat) { if (message.ChatId == chatId) { var u = users.GetUser(message.UserId); var cmi = new ChatMessageItem(message, u, isActionChat); chatMessages.Add(cmi); if (ChatMessageReceivedEvent != null) { ChatMessageReceivedEvent(cmi); } } }
public ChatMessage(ChatMessageItem message) { this.message = message; }
/// <summary>Creates a HTML writable object from a ChatMessageItem</summary> /// <param name="item"></param> public GuiMessageItem(ChatMessageItem item) { timeStamp = item.Time; nickName = item.FromUser.Nick; message = item.ChatMessage; }