Пример #1
0
        /// <summary>Initializes a new chat window, and adds it to the hashtable of chat windows</summary>
        /// <param name="jid">JID of recipient</param>
        /// <param name="nickName">nickname of recipient</param>
        /// <returns>FrmChat object of new chat window</returns>
        private FrmChat InitializeChatWindow(jabber.JID jid, string nickName)
        {
            // Attempt to use existing chat window
            FrmChat chatWindow = ActiveChatWindow(jid);

            if (chatWindow == null)
            {
                // Create new chat window
                chatWindow = new FrmChat();
                chatWindow.JabberObject = jabberClient;
                chatWindow.JID          = jid;
                chatWindow.Nickname     = (nickName != null) ? nickName : jid.User;
                chatWindow.Text         = chatWindow.Nickname;
                chatForms[jid.Bare]     = chatWindow;
            }
            return(chatWindow);
        }
Пример #2
0
 /// <summary>Initializes a new chat window, and adds it to the hashtable of chat windows</summary>
 /// <param name="jid">JID of recipient</param>
 /// <param name="nickName">nickname of recipient</param>
 /// <returns>FrmChat object of new chat window</returns>
 private FrmChat InitializeChatWindow(jabber.JID jid, string nickName)
 {
     // Attempt to use existing chat window
     FrmChat chatWindow = ActiveChatWindow(jid);
     if (chatWindow == null)
     {
         // Create new chat window
         chatWindow = new FrmChat();
         chatWindow.JabberObject = jabberClient;
         chatWindow.JID = jid;
         chatWindow.Nickname = (nickName != null) ? nickName : jid.User;
         chatWindow.Text = chatWindow.Nickname;
         chatForms[jid.Bare] = chatWindow;
     }
     return chatWindow;
 }