private void timer1_Tick(object sender, EventArgs e) { this.skinProgressBar1.PerformStep(); //按照设置的Step进行一步一步增加 if (this.skinProgressBar1.Value >= 100) //进度条跑满 { Gonggao gg = new Gonggao(); gg.Title = txtTitle.Text; gg.Detail = txtContent.Text; gg.Uid = Local.getCurrentUid(); gg.Datetime = DateTime.Now.ToLocalTime().ToString(); BLL.gonggaoBLL.add(gg); this.timer1.Stop(); //关闭定时器 Local.getClientInstance().sendData(gg.Detail); //发送到服务器 MessageBox.Show("公告发布,并推送到所有客户端!"); this.Close(); } }
public void initNetWork() { _client = Local.getClientInstance(); // _client.sendData("xxx");//hello _client.eventRecvd += onRecv; }