private void 按条件发送消息ToolStripMenuItem_Click(object sender, EventArgs e) { en = enum_.atjfsxx; }
private void 按时间ToolStripMenuItem_Click(object sender, EventArgs e) { en = enum_.asjfsxx; }
private void 个人消息ToolStripMenuItem_Click(object sender, EventArgs e) { en = enum_.grxx; }
private void 全体消息ToolStripMenuItem_Click(object sender, EventArgs e) { if (textBox1.Text == "") return; en = enum_.xtxx; XmppServerConnection xs = new XmppServerConnection(this); xs.Send(en); }
public void Send(enum_ en) { agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message(); switch (en) { case enum_.xtxx: foreach (XmppServerConnection con in Online.onlineuser) { msg.Body = frm.textBox1.Text; //msg.From = con.Send(msg); } frm.listBox1.Items.Add("系统推送群体消息."); break; case enum_.atjfsxx: break; case enum_.asjfsxx: break; case enum_.grxx: break; default: break; } }