private void publishToolStripMenuItem_Click(object sender, EventArgs e) { var payload = InputBox("Enter the payload to publish!", "Payload", ""); if (payload == string.Empty) { return; } var item = new Matrix.Xmpp.PubSub.Item { Value = payload }; //var item = new Matrix.Xmpp.PubSub.Item(); //item.Add(new XmppXElement("mypaload", "mynamespace")); var pNode = treeNodes.SelectedNode as DiscoNode; if (pNode != null) { _pm.PublishItem(cboService.Text, pNode.Node, item, PublishResult); } }
public void Publish(JsonReading jr) { if (m_bReady == true) { var item = new Matrix.Xmpp.PubSub.Item(); item.Add(new SensorPayload { Value = jr.JsonObjCollection.ToString() }); m_psMgr.PublishItem(m_psJid, m_node, item); //Debug.WriteLine("item published" + jr.JsonObjCollection.ToString()); } }