private void OnLogin(ApolloPlatform platform) { if (!this.m_IsSwitchToLoginPlatform) { Singleton <CUIManager> .GetInstance().OpenSendMsgAlert(5, enUIEventID.None); this.m_IsSwitchToLoginPlatform = true; if (!this.accountService.IsPlatformInstalled(platform)) { if (this.CurPlatform == ApolloPlatform.Wechat) { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloPlatform>(EventID.ApolloHelper_Platform_Not_Installed, ApolloPlatform.Wechat); return; } if ((this.CurPlatform != ApolloPlatform.QQ) && (this.CurPlatform != ApolloPlatform.QRWechat)) { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloPlatform>(EventID.ApolloHelper_Platform_Not_Installed, platform); return; } } if (!this.m_IsLoginEventHandlerRegistered) { this.m_IsLoginEventHandlerRegistered = true; this.accountService.LoginEvent += new AccountLoginHandle(this.OnLoginEvent); } ApolloAccountInfo accountInfo = this.GetAccountInfo(false); if (accountInfo != null) { this.m_LastOpenID = accountInfo.OpenId; } this.accountService.Login(platform); } }
public override ApolloWakeupInfo FromString(string src) { Debug.Log("WakeUpInfo:" + src); ApolloStringParser apolloStringParser = new ApolloStringParser(src); this.state = (ApolloWakeState)apolloStringParser.GetInt("State"); this.Platform = (ApolloPlatform)apolloStringParser.GetInt("Platform"); this.MediaTagName = apolloStringParser.GetString("MediaTagName"); this.OpenId = apolloStringParser.GetString("OpenId"); this.Lang = apolloStringParser.GetString("Lang"); this.Country = apolloStringParser.GetString("Country"); this.MessageExt = apolloStringParser.GetString("MessageExt"); string @string = apolloStringParser.GetString("ExtInfo"); if (@string != null && string.Empty != @string) { string[] array = @string.Split(new char[] { ',' }); this.ExtensionInfo.Clear(); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string src2 = array2[i]; string src3 = ApolloStringParser.ReplaceApolloString(src2); src3 = ApolloStringParser.ReplaceApolloString(src3); ApolloKVPair apolloKVPair = new ApolloKVPair(); apolloKVPair.FromString(src3); this.ExtensionInfo.Add(apolloKVPair); } } return(this); }
public string GetAccessToken(ApolloPlatform platform) { string result = string.Empty; ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false); if (accountInfo != null) { for (int i = 0; i < accountInfo.TokenList.Count; i++) { ApolloToken apolloToken = accountInfo.TokenList[i]; if (platform == ApolloPlatform.Wechat) { if (apolloToken != null && apolloToken.Type == ApolloTokenType.Access) { result = apolloToken.Value; } } else if ((platform == ApolloPlatform.QQ || platform == ApolloPlatform.Guest) && apolloToken != null && apolloToken.Type == ApolloTokenType.Access) { result = apolloToken.Value; } } } return(result); }
public override ApolloShareResult FromString(string src) { char[] separator = new char[] { '&' }; foreach (string str in src.Split(separator)) { char[] chArray2 = new char[] { '=' }; string[] strArray3 = str.Split(chArray2); if (strArray3.Length > 1) { if (strArray3[0].CompareTo("Platform") == 0) { this.platform = (ApolloPlatform)int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("nResult") == 0) { this.result = (ApolloResult)int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("szDescription") == 0) { this.drescription = strArray3[1]; } else if (strArray3[0].CompareTo("szExt") == 0) { this.extInfo = strArray3[1]; } } } return(this); }
public override ApolloWakeupInfo FromString(string src) { ApolloStringParser parser = new ApolloStringParser(src); this.state = (ApolloWakeState)parser.GetInt("State"); this.Platform = (ApolloPlatform)parser.GetInt("Platform"); this.MediaTagName = parser.GetString("MediaTagName"); this.OpenId = parser.GetString("OpenId"); this.Lang = parser.GetString("Lang"); this.Country = parser.GetString("Country"); this.MessageExt = parser.GetString("MessageExt"); string str = parser.GetString("ExtInfo"); if ((str != null) && (string.Empty != str)) { char[] separator = new char[] { ',' }; string[] strArray = str.Split(separator); this.ExtensionInfo.Clear(); foreach (string str2 in strArray) { string str3 = ApolloStringParser.ReplaceApolloString(ApolloStringParser.ReplaceApolloString(str2)); ApolloKVPair item = new ApolloKVPair(); item.FromString(str3); this.ExtensionInfo.Add(item); } } return(this); }
public ApolloAccountInfo GetAccountInfo(bool refreshToken = false) { ApolloAccountInfo accountInfo = new ApolloAccountInfo(); if (ApolloConfig.platform == ApolloPlatform.None) { accountInfo.OpenId = ApolloConfig.CustomOpenId; accountInfo.Platform = ApolloPlatform.None; return(accountInfo); } ApolloResult record = this.accountService.GetRecord(ref accountInfo); if (record == ApolloResult.Success) { if ((this.CurPlatform == ApolloPlatform.None) && (this.CurPlatform != accountInfo.Platform)) { ApolloConfig.platform = this.CurPlatform = accountInfo.Platform; } return(accountInfo); } if (((record == ApolloResult.TokenInvalid) && (accountInfo != null)) && ((accountInfo.Platform == ApolloPlatform.Wechat) && refreshToken)) { this.accountService.RefreshAtkEvent -= new RefreshAccessTokenHandler(this.OnRefreshAccessTokenEvent); this.accountService.RefreshAtkEvent += new RefreshAccessTokenHandler(this.OnRefreshAccessTokenEvent); this.accountService.RefreshAccessToken(); return(null); } return(null); }
public ApolloHelper() { this.info = new ApolloInfo(ApolloConfig.QQAppID, ApolloConfig.WXAppID, ApolloConfig.maxMessageBufferSize, string.Empty); IApollo.Instance.Initialize(this.info); IApollo.Instance.SetApolloLogger(ApolloLogPriority.None, null); this.accountService = IApollo.Instance.GetAccountService(); this.payService = null; this.registerInfo = new RegisterInfo(); this.snsService = (IApollo.Instance.GetService(1) as IApolloSnsService); this.reportService = (IApollo.Instance.GetService(3) as IApolloReportService); this.quickLoginService = (IApollo.Instance.GetService(7) as IApolloQuickLoginService); this.m_IsSwitchToLoginPlatform = false; this.m_IsLoginEventHandlerRegistered = false; this.m_IsLoginReturn = false; this.CurPlatform = ApolloPlatform.None; this.m_LastOpenID = null; this.m_LastTriedPlatform = ApolloPlatform.None; this.m_IsLastTriedPlatformSet = false; this.IsLastLaunchFrom3rdAPP = false; if (File.Exists(Application.persistentDataPath + "/customOpenId.txt")) { this.IsNoneModeSupport = true; } else { this.IsNoneModeSupport = false; } HttpDnsPolicy.Init(); }
public ApolloAccountInfo GetAccountInfo(bool refreshToken = false) { ApolloAccountInfo apolloAccountInfo = new ApolloAccountInfo(); if (ApolloConfig.platform == null) { apolloAccountInfo.set_OpenId(ApolloConfig.CustomOpenId); apolloAccountInfo.set_Platform(0); return(apolloAccountInfo); } ApolloResult record = this.accountService.GetRecord(ref apolloAccountInfo); if (record == null) { if (this.CurPlatform == null && this.CurPlatform != apolloAccountInfo.get_Platform()) { ApolloConfig.platform = (this.CurPlatform = apolloAccountInfo.get_Platform()); } return(apolloAccountInfo); } if (record == 16 && apolloAccountInfo != null && apolloAccountInfo.get_Platform() == 1 && refreshToken) { this.accountService.remove_RefreshAtkEvent(new RefreshAccessTokenHandler(this.OnRefreshAccessTokenEvent)); this.accountService.add_RefreshAtkEvent(new RefreshAccessTokenHandler(this.OnRefreshAccessTokenEvent)); this.accountService.RefreshAccessToken(); return(null); } return(null); }
public ApolloHelper() { IApollo.Instance.Initialize(this.info); IApollo.Instance.SetApolloLogger(ApolloLogPriority.None, null); this.accountService = IApollo.Instance.GetAccountService(); this.payService = null; this.registerInfo = new RegisterInfo(); this.snsService = IApollo.Instance.GetService(1) as IApolloSnsService; this.reportService = IApollo.Instance.GetService(3) as IApolloReportService; this.quickLoginService = IApollo.Instance.GetService(7) as IApolloQuickLoginService; this.m_IsSwitchToLoginPlatform = false; this.m_IsLoginEventHandlerRegistered = false; this.m_IsLoginReturn = false; this.CurPlatform = ApolloPlatform.None; this.m_LastOpenID = null; this.m_LastTriedPlatform = ApolloPlatform.None; this.m_IsLastTriedPlatformSet = false; if (File.Exists(Application.persistentDataPath + "/customOpenId.txt")) { this.IsNoneModeSupport = true; } else { this.IsNoneModeSupport = false; } }
public ApolloRealNameAuthResult() { this.Platform = ApolloPlatform.None; this.Ret = ApolloResult.Unknown; this.ErrorCode = -1; this.Desc = string.Empty; }
public ApolloAccountInfo GetAccountInfo(bool refreshToken = false) { ApolloAccountInfo accountInfo = new ApolloAccountInfo(); if (ApolloConfig.platform == ApolloPlatform.None) { accountInfo.OpenId = ApolloConfig.CustomOpenId; accountInfo.Platform = ApolloPlatform.None; return(accountInfo); } ApolloResult record = this.accountService.GetRecord(ref accountInfo); if (record == ApolloResult.Success) { Debug.Log("GetAccountInfo Success"); if (this.m_CurPlatform != accountInfo.Platform) { ApolloConfig.platform = this.m_CurPlatform = accountInfo.Platform; } return(accountInfo); } if (((record == ApolloResult.TokenInvalid) && (accountInfo != null)) && ((accountInfo.Platform == ApolloPlatform.Wechat) && refreshToken)) { Debug.Log("try to refresh token"); this.accountService.RefreshAtkEvent += new RefreshAccessTokenHandler(this.OnRefreshAccessTokenEvent); this.accountService.RefreshAccessToken(); return(null); } Debug.Log(string.Format("GetRecord Fail result is {0}", record)); Debug.Log(string.Format("current platform is {0}", (accountInfo != null) ? ((object)accountInfo.Platform) : ((object)0))); return(null); }
public ApolloResult Initialize(ApolloPlatform platform, uint permission, string url) { ADebug.Log(string.Concat(new object[] { "Connector Initialize:", platform, " url:", url })); if (platform == ApolloPlatform.WTLogin) { } return((ApolloResult)apollo_connector_Initialize(base.ObjectId, platform, permission, url)); }
public override void ReadFrom(ApolloBufferReader reader) { int platform = 0; int ret = 0; reader.Read(ref platform); reader.Read(ref ret); reader.Read(ref this.ErrorCode); reader.Read(ref this.Desc); this.Platform = (ApolloPlatform)platform; this.Ret = (ApolloResult)ret; }
public void Login(ApolloPlatform platform, ulong uin = 0, string pwd = null) { switch (platform) { case ApolloPlatform.None: { if (ApolloConfig.CustomOpenId == null) { } ApolloResult result = NoneAccountService.Initialize(new NoneAccountInitInfo(ApolloConfig.CustomOpenId)); if (result == ApolloResult.Success) { break; } List <KeyValuePair <string, string> > events = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()), new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()), new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()), new KeyValuePair <string, string>("openid", "NULL") }; float num = Time.time - Singleton <CLoginSystem> .GetInstance().m_fLoginClickTime; events.Add(new KeyValuePair <string, string>("totaltime", num.ToString())); events.Add(new KeyValuePair <string, string>("errorcode", result.ToString())); events.Add(new KeyValuePair <string, string>("error_msg", "null")); Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_MSDKClientAuth", events, true); Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, result); return; } case ApolloPlatform.WTLogin: Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, ApolloResult.Empty); return; } ApolloConfig.Uin = uin; ApolloConfig.Password = pwd; ApolloConfig.platform = this.CurPlatform = platform; if ((ApolloConfig.platform == ApolloPlatform.None) && this.IsNoneModeSupport) { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloAccountInfo>(EventID.ApolloHelper_Login_Success, this.GetAccountInfo(false)); } else { this.OnLogin(platform); } }
public void Login(ApolloPlatform platform, ulong uin = 0uL, string pwd = null) { switch (platform) { case 0: { if (ApolloConfig.CustomOpenId == null) { } ApolloResult apolloResult = NoneAccountService.Initialize(new NoneAccountInitInfo(ApolloConfig.CustomOpenId)); if (apolloResult != null) { List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >(); list.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion())); list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString())); list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString())); list.Add(new KeyValuePair <string, string>("openid", "NULL")); list.Add(new KeyValuePair <string, string>("totaltime", (Time.time - Singleton <CLoginSystem> .GetInstance().m_fLoginClickTime).ToString())); list.Add(new KeyValuePair <string, string>("errorCode", apolloResult.ToString())); list.Add(new KeyValuePair <string, string>("error_msg", "null")); Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_MSDKClientAuth", list, true); Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, apolloResult); return; } break; } case 3: Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, 7); return; } ApolloConfig.Uin = uin; ApolloConfig.Password = pwd; this.CurPlatform = platform; ApolloConfig.platform = platform; if (ApolloConfig.platform == null && this.IsNoneModeSupport) { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloAccountInfo>(EventID.ApolloHelper_Login_Success, this.GetAccountInfo(false)); } else { this.OnLogin(platform); } }
public void Login(ApolloPlatform platform, ulong uin = 0, string pwd = null) { switch (platform) { case ApolloPlatform.None: { if (ApolloConfig.CustomOpenId == null) { Debug.Log(string.Format("Custom OpenId is Empty! current platform{0}", platform)); } ApolloResult result = NoneAccountService.Initialize(new NoneAccountInitInfo(ApolloConfig.CustomOpenId)); if (result != ApolloResult.Success) { Debug.Log(string.Format("login apollo result is {0}! current platform{1}", result, platform)); List <KeyValuePair <string, string> > events = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()), new KeyValuePair <string, string>("status", "1"), new KeyValuePair <string, string>("errorcode", result.ToString()) }; Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_PlatformLogin", events, true); Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Login_Failed); return; } Debug.Log(string.Format("Set login by none platform success", result, platform)); break; } case ApolloPlatform.WTLogin: Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Login_Failed); return; } ApolloConfig.Uin = uin; ApolloConfig.Password = pwd; ApolloConfig.platform = this.m_CurPlatform = platform; if (ApolloConfig.platform == ApolloPlatform.None) { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloAccountInfo>(EventID.ApolloHelper_Login_Success, this.GetAccountInfo(false)); } else { this.OnLogin(platform); } }
public ApolloHelper() { IApollo.Instance.Initialize(this.info); IApollo.Instance.SetApolloLogger(ApolloLogPriority.None, null); this.accountService = IApollo.Instance.GetAccountService(); this.payService = null; this.registerInfo = new RegisterInfo(); this.snsService = IApollo.Instance.GetService(1) as IApolloSnsService; this.reportService = IApollo.Instance.GetService(3) as IApolloReportService; this.quickLoginService = IApollo.Instance.GetService(7) as IApolloQuickLoginService; this.m_IsSwitchToLoginPlatform = false; this.m_IsLoginEventHandlerRegistered = false; this.m_IsLoginReturn = false; this.m_CurPlatform = ApolloPlatform.None; this.m_LastOpenID = null; this.m_LastTriedPlatform = ApolloPlatform.None; this.m_IsLastTriedPlatformSet = false; }
public void Login(ApolloPlatform platform, bool wait = true, ulong uin = 0uL, string pwd = null) { Singleton <CUIManager> .GetInstance().OpenSendMsgAlert(5, enUIEventID.None); if (wait) { if (this.loginTimerSeq > 0) { Singleton <CTimerManager> .GetInstance().RemoveTimerSafely(ref this.loginTimerSeq); } this.loginTimerSeq = Singleton <CTimerManager> .GetInstance().AddTimer(3000, 1, delegate(int sequence) { this.LoginHandler(platform, uin, pwd); }); } else { this.LoginHandler(platform, uin, pwd); } }
public override IApolloConnector CreateApolloConnection(ApolloPlatform platform, uint permission, string url) { ADebug.Log("CreateApolloConnection"); if (string.IsNullOrEmpty(url)) { throw new Exception("Argument Error: url can not be null or empty"); } if (ApolloCommon.ApolloInfo == null) { throw new Exception("IApollo.Instance.Initialize must be called first!"); } if (platform == ApolloPlatform.None) { } ApolloConnector apolloConnector = new ApolloConnector(); ApolloResult apolloResult = apolloConnector.Initialize(platform, permission, url); if (apolloResult != ApolloResult.Success) { throw new Exception("connector Initialize Error:" + apolloResult); } return(apolloConnector); }
public override ApolloShareResult FromString(string src) { string[] array = src.Split(new char[] { '&' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; string[] array3 = text.Split(new char[] { '=' }); if (array3.Length > 1) { if (array3[0].CompareTo("Platform") == 0) { this.platform = (ApolloPlatform)int.Parse(array3[1]); } else if (array3[0].CompareTo("nResult") == 0) { this.result = (ApolloResult)int.Parse(array3[1]); } else if (array3[0].CompareTo("szDescription") == 0) { this.drescription = array3[1]; } else if (array3[0].CompareTo("szExt") == 0) { this.extInfo = array3[1]; } } } return(this); }
public override IApolloConnector CreateApolloConnection(ApolloPlatform platform, ApolloPermission permission, string url) { return(this.CreateApolloConnection(platform, (uint)permission, url)); }
private void OnLoginEvent(ApolloResult loginResult, ApolloAccountInfo accountInfo) { this.m_IsSwitchToLoginPlatform = false; if (loginResult != ApolloResult.Success) { if (loginResult == ApolloResult.UserCancel) { BugLocateLogSys.Log(string.Format("Login Fail. User cancel", new object[0])); Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Login_Canceled); } else { BugLocateLogSys.Log(string.Format("Login Fail. Error code is {0}", loginResult)); List <KeyValuePair <string, string> > events = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()), new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()), new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()), new KeyValuePair <string, string>("openid", "NULL") }; float num = Time.time - Singleton <CLoginSystem> .GetInstance().m_fLoginClickTime; events.Add(new KeyValuePair <string, string>("totaltime", num.ToString())); events.Add(new KeyValuePair <string, string>("errorcode", loginResult.ToString())); events.Add(new KeyValuePair <string, string>("error_msg", "null")); Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_MSDKClientAuth", events, true); Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, loginResult); } } else { if (this.m_LastOpenID == null) { switch (this.CurPlatform) { case ApolloPlatform.Wechat: case ApolloPlatform.QRWechat: if (accountInfo.Platform != ApolloPlatform.Wechat) { this.Logout(); return; } break; case ApolloPlatform.QQ: case ApolloPlatform.WTLogin: case ApolloPlatform.QR: if (accountInfo.Platform == ApolloPlatform.QQ) { break; } this.Logout(); return; } } ApolloConfig.platform = this.CurPlatform = accountInfo.Platform; if ((this.m_LastOpenID != null) && (accountInfo.OpenId != this.m_LastOpenID)) { Singleton <CUIManager> .GetInstance().OpenMessageBox(Singleton <CTextManager> .GetInstance().GetText("Common_Login_Different_Account_Tip_Force"), enUIEventID.Login_Change_Account_Yes, false); return; } if (this.JudgeLoginAccountInfo(ref accountInfo)) { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloAccountInfo>(EventID.ApolloHelper_Login_Success, accountInfo); } else { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloAccountInfo>(EventID.ApolloHelper_Login_Failed, accountInfo); } } if (this.accountService != null) { this.accountService.LoginEvent -= new AccountLoginHandle(this.OnLoginEvent); } else { BugLocateLogSys.Log("accountService == null"); } this.m_IsLoginEventHandlerRegistered = false; this.m_IsLoginReturn = true; BugLocateLogSys.Log("LoginEvent Thread:" + Thread.CurrentThread.ManagedThreadId); }
public bool IsPlatformInstalled(ApolloPlatform platform) { return(apollo_account_IsPlatformInstalled(platform)); }
public bool IsPlatformSupportApi(ApolloPlatform platform) { return(apollo_account_IsPlatformSupportApi(platform)); }
public bool IsPlatformInstalled(ApolloPlatform platform) { return(this.accountService.IsPlatformInstalled(platform)); }
public void Login(ApolloPlatform platform) { ADebug.Log("Login"); apollo_account_login(base.ObjectId, platform); }
private static extern int apollo_connector_Initialize(ulong objId, ApolloPlatform platform, uint permission, [MarshalAs(20)] string pszSvrUrl);
public override IApolloConnector CreateApolloConnection(ApolloPlatform platform, string url) { return(this.CreateApolloConnection(platform, 16777215u, url)); }
private void InitTdir(ApolloPlatform platform) { this.mPlatform = platform; this.InitSvrList(); }
private void OnLoginEvent(ApolloResult loginResult, ApolloAccountInfo accountInfo) { Singleton <CUIManager> .GetInstance().CloseSendMsgAlert(); Singleton <ApolloHelper> .GetInstance().IsLastLaunchFrom3rdAPP = false; Debug.Log(string.Concat(new object[] { "*Login*OnLoginEvent called ", loginResult, " ", Time.realtimeSinceStartup })); this.m_IsSwitchToLoginPlatform = false; if (loginResult == ApolloResult.Success) { ApolloConfig.platform = (this.CurPlatform = accountInfo.Platform); if (!string.IsNullOrEmpty(this.m_LastOpenID) && accountInfo.OpenId != this.m_LastOpenID) { Singleton <CUIManager> .GetInstance().OpenMessageBox(Singleton <CTextManager> .GetInstance().GetText("Common_Login_Different_Account_Tip_Force"), enUIEventID.Login_Change_Account_Yes, false); return; } if (this.JudgeLoginAccountInfo(ref accountInfo)) { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloAccountInfo>(EventID.ApolloHelper_Login_Success, accountInfo); } else { Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, ApolloResult.Empty); } } else if (loginResult == ApolloResult.UserCancel) { BugLocateLogSys.Log(string.Format("Login Fail. User cancel", new object[0])); Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Login_Canceled); } else if (loginResult == ApolloResult.NeedRealNameAuth) { Debug.Log("Login NeedRealNameAuth."); BugLocateLogSys.Log(string.Format("Login NeedRealNameAuth.", new object[0])); Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Login_Need_Real_Name_Auth); } else { BugLocateLogSys.Log(string.Format("Login Fail. Error code is {0}", loginResult)); List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >(); list.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion())); list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString())); list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString())); list.Add(new KeyValuePair <string, string>("openid", "NULL")); list.Add(new KeyValuePair <string, string>("totaltime", (Time.time - Singleton <CLoginSystem> .GetInstance().m_fLoginClickTime).ToString())); list.Add(new KeyValuePair <string, string>("errorCode", loginResult.ToString())); list.Add(new KeyValuePair <string, string>("error_msg", "null")); Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_MSDKClientAuth", list, true); Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, loginResult); } if (this.accountService == null) { BugLocateLogSys.Log("accountService == null"); } this.m_IsLoginReturn = true; BugLocateLogSys.Log("LoginEvent Thread:" + Thread.get_CurrentThread().get_ManagedThreadId()); }