示例#1
0
    private void ConnectedServer(RetLoginMsg msg)
    {
        RetTeamAddr addr = new RetTeamAddr();

        addr.Key     = msg.Key;
        addr.Address = msg.Address;
        NetworkUpdater.Instance.OnConnectedServer(addr);
    }
示例#2
0
    /// <summary>
    /// 登录成功后返回消息
    /// </summary>
    /// <param name="data"></param>
    /// <param name="error"></param>
    private void OnLoginRet(RetLoginMsg data, RetErrorMsg error)
    {
        if (error != null || data == null)
        {
            string dec = string.Format("{0}\n(错误码:{1})", error.ErrorReason, error.RetCode);
            UIManager.Instance.ShowTips(dec);
            return;
        }

        bool res = HttpClient.SetSession(data.SessionKey, data.Id);

        if (res)
        {
            UIManager.Instance.ShowTips("登录成功");
            UIManager.Instance.CloseWindow("UILoginWindow");

            OnLoginSuccess(data);
        }
        else
        {
            UIManager.Instance.ShowTips("session结构不对");
        }
    }
示例#3
0
 /// <summary>
 /// 账号密码信息存在本地
 /// </summary>
 private void RecordAccountMsg(RetLoginMsg msg)
 {
     //todo
 }
示例#4
0
 /// <summary>
 /// 登录成功后一系列处理
 /// </summary>
 /// <param name="msg"></param>
 private void OnLoginSuccess(RetLoginMsg msg)
 {
     RecordAccountMsg(msg);
     ConnectedServer(msg);
 }