Example #1
0
        public void AddMessageToChat(ChatModel chat, MessageModel msg)
        {
            Trace.Call(chat, msg);

            try {
                ChatView chatView = _ChatViewManager.GetChat(chat);
#if LOG4NET
                if (chatView == null)
                {
                    _Logger.Fatal(String.Format("AddMessageToChat(): _ChatViewManager.GetChat(chat) chat.Name: {0} returned null!", chat.Name));
                    return;
                }
#endif
                chatView.AddMessage(msg);
            } catch (Exception ex) {
#if LOG4NET
                _Logger.Fatal(ex);
#endif
            }
        }
Example #2
0
        public void AddMessageToChat(ChatModel chat, MessageModel msg)
        {
            Trace.Call(chat, msg);

            try {
                ChatView chatView = _ChatViewManager.GetChat(chat);
                if (chatView == null)
                {
#if LOG4NET
                    _Logger.Fatal(String.Format("AddMessageToChat(): _ChatViewManager.GetChat(chat) chat.Name: {0} returned null!", chat.Name));
#endif
                    return;
                }

                // FIXME: this must be marshalled into the UI thread!
                chatView.AddMessage(msg);
                _ChatViewManager.UpdateNavigation();
            } catch (Exception ex) {
#if LOG4NET
                _Logger.Fatal(ex);
#endif
            }
        }