Пример #1
0
 public frmChat(SkyMap.Net.XMPP.Jid jid, XmppClientConnection con, string nickname, bool privateChat)
 {
     this.components = null;
     this.m_Jid = jid;
     this._connection = con;
     this._nickname = nickname;
     this.InitializeComponent();
     this.Text = "与:" + nickname + "聊天中...";
     Util.ChatForms.Add(this.m_Jid.get_Bare().ToLower(), this);
     if (privateChat)
     {
         con.get_MesagageGrabber().Add(jid, new BareJidComparer(), new MessageCB(this, (IntPtr) this.MessageCallback), null);
     }
     else
     {
         con.get_MesagageGrabber().Add(jid, new FullJidComparer(), new MessageCB(this, (IntPtr) this.MessageCallback), null);
     }
 }