private void 消息发送ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (FormInputAndAction fiaa = new FormInputAndAction(str => UserClient.Net_simplify_client.ReadFromServer(
                                                                 CommonHeadCode.SimplifyHeadCode.群发消息, UserClient.UserAccount.UserName + ":" + str).IsSuccess, "", "请输入群发的消息:"))
     {
         fiaa.ShowDialog();
     }
 }
示例#2
0
 private void MenuItem意见反馈_Click(object sender, RoutedEventArgs e)
 {
     using (FormInputAndAction fiaa = new FormInputAndAction(str => UserClient.Net_simplify_client.ReadFromServer(
                                                                 CommonHeadCode.SimplifyHeadCode.意见反馈, UserClient.UserAccount.UserName + ":" + str).IsSuccess, "", "请输入意见反馈:"))
     {
         fiaa.ShowDialog();
     }
 }
 private void 更改公告ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (FormInputAndAction fiaa = new FormInputAndAction(str => UserClient.Net_simplify_client.ReadFromServer(
                                                                 CommonHeadCode.SimplifyHeadCode.更新公告, str).IsSuccess, UserClient.Announcement, "请输入公告内容"))
     {
         fiaa.ShowDialog();
     }
 }
示例#4
0
        private void 消息发送ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //测试发送字节数据
            //net_socket_server.SendAllClients(BitConverter.GetBytes(12345678));
            //将消息群发给所有的客户端,并使用消息弹窗的方式显示
            FormInputAndAction fiaa = new FormInputAndAction(m =>
            {
                net_socket_server.SendAllClients(CommonHeadCode.MultiNetHeadCode.弹窗消息 + m); return(true);
            });

            fiaa.ShowDialog();
            fiaa.Dispose();
        }