void UpdateLoginRes() { Action Over = () => { CancelInvoke("UpdateLoginRes"); GameApp.SendMsg.EndWaitUI(); }; string LoginRes = TestPlugins.Call <string>("GetLoginRes"); Debug.Log(StringBuilderTool.ToInfoString("登陆结果:", LoginRes)); string[] s = LoginRes.Split('_'); if (s.Length > 0) { switch (s[0]) { case "Wait": break; case "Success": Debug.Log("登录成功!"); Over(); SDKInfo.AccessToken = s[1]; SDKInfo.UserId = int.Parse(s[2]); SDKInfo.UserName = s[3]; Debug.Log(StringBuilderTool.ToInfoString("AccessToken:", SDKInfo.AccessToken)); Debug.Log(StringBuilderTool.ToString("UserId:", SDKInfo.UserId)); Debug.Log(StringBuilderTool.ToInfoString("UserName:", SDKInfo.UserName)); GameApp.Instance.UILogin.RecordNickName = SDKInfo.UserName; GameApp.Instance.UILogin.Account = SDKInfo.UserName; GameApp.Instance.Platform.LeSDKLogin(s[1]); break; case "NullUserInfo": GameApp.Instance.CommonMsgDlg.OpenSimpleMsgBox("登录异常!用户信息为空!"); Over(); break; case "Failure": GameApp.Instance.CommonMsgDlg.OpenSimpleMsgBox(StringBuilderTool.ToInfoString("登录失败!\n错误码:", s[1], "\n错误描述:", s[2])); Over(); break; case "Cancel": Debug.Log("取消登录!"); Over(); //清空数据,等待重新登陆... SDKInfo = new LeSDKInfo(); GameApp.Instance.Platform.PlatformInfo = new KOIPlatformInfo(); GameApp.Instance.UILogin.ShowLeSDKLogin(); break; } } }
public string ToString(LeSDKInfo lesdkinfo) { return(StringBuilderTool.ToString( /*0*/ lesdkinfo.AccessToken, "_", /*1*/ lesdkinfo.UserId, "_", /*2*/ Price, "_", /*3*/ ProductID, "_", /*4*/ ProductName, "_", /*5*/ ProductDes, "_", /*6*/ NotifyURL, "_", /*7*/ ExtraInfo)); }