Esempio n. 1
0
 void client_UserChat(object sender, UserChatEventArgs e)
 {
     if (e.User == this)
     {
         Chatted.SafeInvoke(this, e);
     }
 }
        void client_UserChat(object sender, UserChatEventArgs e)
        {
            var _e = new ChatReceivedEventArgs(new ChatMessage(e.User, e.Font, e.Body, e.Timestamp));

            if (!conversationEventsMap.ContainsKey(e.User.Name))
            {
                CreateConversation(e.User, false);
            }

            conversationEventsMap[e.User.Name].RaiseChatReceived(_e);
        }
Esempio n. 3
0
        void HandleChatUser(JObject message)
        {
            var username = Convert.ToString(message["from"]);
            var user     = GetUser(username);

            var args = new UserChatEventArgs(
                user,
                ParseFont(message["font"]),
                new UTF8Encoding(false, true).GetString(Convert.FromBase64String(Convert.ToString(message["body"]))),
                DateTime.Parse(message["timestamp"].ToString(), null, System.Globalization.DateTimeStyles.RoundtripKind)
                );

            UserChat.SafeInvoke(this, args);
        }
        void client_UserChat(object sender, UserChatEventArgs e)
        {
            var _e = new ChatReceivedEventArgs(new ChatMessage(e.User, e.Font, e.Body, e.Timestamp));

            if (!conversationEventsMap.ContainsKey(e.User.Name))
            {
                CreateConversation(e.User, false);
            }

            conversationEventsMap[e.User.Name].RaiseChatReceived(_e);
        }
Esempio n. 5
0
 void client_UserChat(object sender, UserChatEventArgs e)
 {
     if (e.User == this)
         Chatted.SafeInvoke(this, e);
 }
Esempio n. 6
0
        void HandleChatUser(JObject message)
        {
            var username = Convert.ToString(message["from"]);
            var user = GetUser(username);

            var args = new UserChatEventArgs(
                user,
                ParseFont(message["font"]),
                new UTF8Encoding(false, true).GetString(Convert.FromBase64String(Convert.ToString(message["body"]))),
                DateTime.Parse(message["timestamp"].ToString(), null, System.Globalization.DateTimeStyles.RoundtripKind)
                );
            UserChat.SafeInvoke(this, args);
        }