예제 #1
0
        private void btnSendCommand_Click(object sender, EventArgs e)
        {
            RosterNode roster = Util.XmppServices.RosterControl.SelectedItem();

            if (roster == null)
            {
                return;
            }
            if (roster.RosterItem != null)
            {
                //IQ iq = new IQ(IqType.get, XmppCon.MyJID, roster.RosterItem.Jid);

                agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message();
                msg.To = roster.RosterItem.Jid;

                agsXMPP.Client.Comand cmd = new agsXMPP.Client.Comand();

                cmd.Type  = "tipo 01";
                cmd.Value = Convert.ToInt32(txtCmdValue.Text);

                msg.AddChild(cmd);
                Util.XmppServices.XmppCon.Send(msg);
            }
        }
예제 #2
0
        private void btnSendCommand_Click(object sender, EventArgs e)
        {
            RosterNode roster = Util.XmppServices.RosterControl.SelectedItem();
            if (roster == null) return;
            if (roster.RosterItem != null)
            {
                //IQ iq = new IQ(IqType.get, XmppCon.MyJID, roster.RosterItem.Jid);

                agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message();
                msg.To = roster.RosterItem.Jid;

                agsXMPP.Client.Comand cmd = new agsXMPP.Client.Comand();

                cmd.Type = "tipo 01";
                cmd.Value = Convert.ToInt32(txtCmdValue.Text);

                msg.AddChild(cmd);
                Util.XmppServices.XmppCon.Send(msg);
            }

        }