public void auth_Over(object sender, CJReceiveOverEvent e) { if (e.sendState == SendState.OK) { if (e.Msg.getMsgType() == MsgType.S_AUTH_RIGHT) { log.loging(e.Msg.ToString(), CJLog.LogLevel.DEBUG); user_local.Id = e.Msg.getMsgPeerTo().id; user_local.Name = e.Msg.getMsgPeerTo().name; foreach (CJMsg.Peer p in e.Msg.getMsgTextKVs("id_name")) { user_local += p; } foreach (CJMsg msg_tmp in e.Msg.getMsgTextVs("no_receive")) { user_local.records.Add(msg_tmp); } CB_V_V cb = new CB_V_V(TimerClosingStart); this.Invoke(cb); log.loging("Login_Form Closing", CJLog.LogLevel.DEBUG); return; } // else if(e.Msg.getMsgType() == MsgType.S_TCP_OVER) // { // log.loging("tcp连接断开", CJLog.LogLevel.DEBUG); // conn.Close(); // } } else { log.loging(e.Remark, e.Level); } }
private void initThread() // 线程,委托等的初始化 { cb_moniter = new CB_V_V(do_udp_monitor); t_moniter = new Thread(new ThreadStart(cb_moniter)); t_moniter.Name = "ThreadMoniter"; cb_sender = new CB_V_V(do_udp_sendMsg); t_sender = new Thread(new ThreadStart(cb_sender)); t_sender.Name = "ThreadSender"; }
private void timer_closing_Tick(object sender, EventArgs e) { if (this.Opacity <= 0.0) { timer_closing.Stop(); Program.t_mainForm.Start(user_local); CB_V_V cb = new CB_V_V(FormClose); this.Invoke(cb); } else { CB_V_V cb = new CB_V_V(OpacityDown); this.Invoke(cb); } }