private void xmppClient_OnMessage(object sender, MessageEventArgs e) { DisplayEvent("OnMessage"); if (e.Message.Type == MessageType.error) { return; } if (e.Message.Body != null) { if (!Util.ChatForms.ContainsKey(e.Message.From.Bare)) { //get nickname from the roster listview string nick = e.Message.From.Bare; var item = listContacts.Items[e.Message.From.Bare]; if (item != null) { nick = item.Text; } //-------------------------------------------------------------------------- var f = new HangoutChat(e.Message.From, xmppClient, nick); f.Show(); //fom chat show f.IncomingMessage(e.Message); // message in //-------------------------------------------------------------------------- } } }
private void xmppClient_OnMessage(object sender, MessageEventArgs e) //จัดการข้อความเข้า { DisplayEvent("ข้อความเข้า"); // แสดงผลการทำงาน ข้อความเข้า if (e.Message.Body != null) { if (!Util.ChatForms.ContainsKey(e.Message.From.Bare)) { //get nickname from the roster listview string nick = e.Message.From.Bare; var item = listContacts.Items[e.Message.From.Bare]; if (item != null) { nick = item.Text; } var f = new HangoutChat(e.Message.From, xmppClient, nick); f.Show(); f.IncomingMessage(e.Message); } } }