Esempio n. 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);
            }
        }
Esempio n. 2
0
 public MainForm(CJUser luser)
 {
     InitializeComponent();
     user_local = luser;
 }