Пример #1
0
 public MessageForm Add(JabberID RemoteUserJID, MessageForm msgWindow)
 {
     base.Add(RemoteUserJID.ToString().ToLower(), msgWindow);
     return msgWindow;
 }
Пример #2
0
        private MessageForm CreateNewWindow(JabberID JID, MessagePacket initialMessage)
        {
            //Populate the window with the initial message if it
            //was provided.
            MessageForm newWindow;

            if (initialMessage == null)
            {
                MessageForm m = new MessageForm(_sessionManager, JID);
                m.MessageThreadID = System.Guid.NewGuid().ToString();
                m.Show();
                newWindow = m;
            }
            else
            {
                MessageForm m = new MessageForm(_sessionManager, _sessionManager.LocalUser, initialMessage.From);
                m.Show();
                m.MessageThreadID = initialMessage.Thread;
                m.PostMessage(initialMessage);
                newWindow = m;
            }
            this.Add(JID, newWindow);

            newWindow.BringToFront();
            return newWindow;
        }