Пример #1
0
        /// <summary>
        /// Sets control parameters from a data form, previously fetched using any of the GetForm methods.
        /// </summary>
        /// <param name="Form">Data form.</param>
        /// <param name="Callback">Callback method.</param>
        /// <param name="State">State object to pass on to callback method.</param>
        /// <param name="Nodes">Any nodes to control.</param>
        public void Set(DataForm Form, SetResultCallback Callback, object State, params ThingReference[] Nodes)
        {
            StringBuilder Xml = new StringBuilder();

            Xml.Append("<set xmlns='");
            Xml.Append(NamespaceControl);
            Xml.Append("'>");

            this.Serialize(Xml, Nodes);
            Form.SerializeSubmit(Xml);

            Xml.Append("</set>");

            Form.Client.SendIqSet(Form.From, Xml.ToString(), SetResultCallback, new object[] { Callback, State });
        }