예제 #1
0
        private void ReceiveMessageHistory(JToken jsonMessage)
        {
            MessageReception message    = jsonMessage.ToObject <MessageReception>();
            bool             isSentByMe = message.username == ServerService.instance.username;

            App.Current.Dispatcher.Invoke(delegate
            {
                Messages.Add(new MessageChat(message.username, message.content, isSentByMe, message.time));
            });
        }
예제 #2
0
        private void ReceiveMessage(JToken jsonMessage)
        {
            MessageReception message = jsonMessage.ToObject <MessageReception>();

            if (message.channel_id == this.ID || IsLobbyChat)
            {
                bool isSentByMe = message.username == ServerService.instance.username;
                App.Current.Dispatcher.Invoke(delegate
                {
                    Messages.Add(new MessageChat(message.username, message.content, isSentByMe, message.time));
                });
            }
        }