示例#1
0
        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);
            }
        }
示例#2
0
 public void receiveOver() // 接收到数据后,触发事件
 {
     if (ReceiveOver != null)
     {
         CJReceiveOverEvent e = new CJReceiveOverEvent();
         e.sendState = this.send_state;
         e.Msg       = this.msg_receive;
         ReceiveOver(this, e);
     }
 }
示例#3
0
 public void receive_Over(object sender, CJReceiveOverEvent e)
 {
     log.loging("事件触发啦");
     log.loging(e.sendState.ToString());
     if (e.sendState == SendState.OK)
     {
         log.loging(e.Msg.getMsgDataText());
     }
     //log.loging(e.Msg.data_text);
 }
示例#4
0
 public void receiveOver(CJLog.LogLevel level, string remark) // 接收到数据后,触发事件
 {
     if (ReceiveOver != null)
     {
         CJReceiveOverEvent e = new CJReceiveOverEvent();
         e.sendState = this.send_state;
         e.Msg       = this.msg_receive;
         e.Level     = level;
         e.Remark    = remark;
         ReceiveOver(this, e);
     }
 }
示例#5
0
 public void receiveOver() // 接收到数据后,触发事件
 {
     if (ReceiveOver != null)
     {
         CJReceiveOverEvent e = new CJReceiveOverEvent();
         e.sendState = this.send_state;
         e.Msg       = this.msg_receive;
         e.Level     = CJLog.LogLevel.DEFAULT;
         e.Remark    = "";
         ReceiveOver(this, e);
     }
 }