예제 #1
0
        // 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);
                }
            }
        }
예제 #2
0
 /// <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);
 }
예제 #3
0
        // 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);
                }
            }
        }
예제 #4
0
 public ChatMessage(ChatMessageItem message)
 {
     this.message = message;
 }
예제 #5
0
 /// <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;
 }