public void OnReSendBtnClick() { if (mRof == eRegisterOrForgetAccount.Register) { UIAccountController.RegByPhone(PhoneNumber, delegate(string err) { if (string.IsNullOrEmpty(err)) { RegisterVerificationInfoDic[PhoneNumber].ExpireTime = EB.Time.Now + 60; mExpireTime = GetExpireTime(); StartCoroutine(SendVerificationCodeCountdown()); } }); } else if (mRof == eRegisterOrForgetAccount.Forget) { UIAccountController.Forgetpassword(PhoneNumber, delegate(string msg) { if (msg == "OK") { ForgetVerificationInfoDic[PhoneNumber].ExpireTime = EB.Time.Now + 60; mExpireTime = GetExpireTime(); StartCoroutine(SendVerificationCodeCountdown()); } }); } }
public override void Show(bool isShowing) { base.Show(isShowing); if (isShowing && string.IsNullOrEmpty(license)) { UIAccountController.License(delegate(string licenseStr) { LTUIUtil.SetText(TextLabel, license = licenseStr); }); } }
public void OnBtnClick() { if (string.IsNullOrEmpty(UserPhoneInput.value)) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_ManHuangAskController_1039")); return; } string inputStr = UserPhoneInput.value; long phoneNum = 0; if (!long.TryParse(inputStr, out phoneNum) || phoneNum.ToString().Length != 11 || phoneNum.ToString().Substring(0, 1) != "1") { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_ManHuangAskController_1329")); UserPhoneInput.value = ""; return; } if (!mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().InputVerificationController.GetIsExpire(mRof, UserPhoneInput.value)) { Show(false); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().InputVerificationController.Show(true); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().InputVerificationController.SetData(mRof, UserPhoneInput.value, 0); return; } if (mRof == eRegisterOrForgetAccount.Register) { UIAccountController.RegByPhone(UserPhoneInput.value, delegate(string err) { if (string.IsNullOrEmpty(err)) { Show(false); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().InputVerificationController.Show(true); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().InputVerificationController.SetData(mRof, UserPhoneInput.value, EB.Time.Now + 60); } }); } else if (mRof == eRegisterOrForgetAccount.Forget) { UIAccountController.Forgetpassword(UserPhoneInput.value, delegate(string msg) { if (msg == "OK") { Show(false); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().InputVerificationController.Show(true); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().InputVerificationController.SetData(mRof, UserPhoneInput.value, EB.Time.Now + 60); } }); } }
public void OnEnterGameBtnClick() { if (string.IsNullOrEmpty(UserNameInput.value)) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_ManHuangAskController_1039")); return; } string inputStr = UserNameInput.value; long phoneNum = 0; if (!long.TryParse(inputStr, out phoneNum) || phoneNum.ToString().Length != 11 || phoneNum.ToString().Substring(0, 1) != "1") { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_ManHuangAskController_1329")); return; } // password if (string.IsNullOrEmpty(PasswordInput.value)) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_ManHuangFindPasswordController_5475")); return; } if (GameUtils.GetStringWidth(PasswordInput.value) < 6) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_ManHuangFindPasswordController_6782")); return; } UIAccountController.LoginByPhone(UserNameInput.value, PasswordInput.value, delegate(string phone, string openId, string accessToken, string password) { if (LoginCallback != null) { LoginCallback(phone, openId, accessToken, password); } ManHuangAccountUIController ctrl = mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>(); if (ctrl != null) { ctrl.controller.Close(); } }); }
public void OnSureBtnClick() { if (string.IsNullOrEmpty(PasswordInput.value)) { ErrTipsLabel.text = EB.Localizer.GetString("ID_codefont_in_ManHuangFindPasswordController_5475"); return; } if (string.IsNullOrEmpty(RePasswordInput.value)) { ErrTipsLabel.text = EB.Localizer.GetString("ID_codefont_in_ManHuangFindPasswordController_5578"); return; } if (PasswordInput.value != RePasswordInput.value) { ErrTipsLabel.text = EB.Localizer.GetString("ID_codefont_in_ManHuangFindPasswordController_5682"); return; } if (!InputCheck(PasswordInput.value)) { return; } if (!InputCheck(RePasswordInput.value)) { return; } UIAccountController.Modifypassword(PhoneNumberInput.value, "", PasswordInput.value, delegate() { Show(false); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().LoginUIController.Show(true); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().LoginUIController.FillData(PhoneNumberInput.value, PasswordInput.value); }); }
public void OnNumberInputChange() { InitNumLabel(); int numberLength = Input.value.Length; if (numberLength >= 6) { if (mRof == eRegisterOrForgetAccount.Register) { if (!string.IsNullOrEmpty(RegisterVerificationInfoDic[PhoneNumber].Code) && !GetIsExpire(mRof, PhoneNumber)) { if (RegisterVerificationInfoDic[PhoneNumber].Code != Input.value) { Input.value = ""; MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_ManHuangInputVerificationCodeController_3585")); } else { Show(false); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().RegisterPasswordController.Show(true); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().RegisterPasswordController.SetData(PhoneNumber); } } else { if (IsRequesting) { return; } IsRequesting = true; UIAccountController.SMSVerify(PhoneNumber, Input.value, delegate(bool successful) { IsRequesting = false; if (successful) { RegisterVerificationInfoDic[PhoneNumber].Code = Input.value; Input.enabled = false; Show(false); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().RegisterPasswordController.Show(true); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().RegisterPasswordController.SetData(PhoneNumber); } else { Input.value = ""; } }); } } else if (mRof == eRegisterOrForgetAccount.Forget) { if (!string.IsNullOrEmpty(ForgetVerificationInfoDic[PhoneNumber].Code) && !GetIsExpire(mRof, PhoneNumber)) { if (ForgetVerificationInfoDic[PhoneNumber].Code != Input.value) { Input.value = ""; MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_ManHuangInputVerificationCodeController_3585")); } else { Show(false); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().ForgetPasswordController.Show(true); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().ForgetPasswordController.SetData(PhoneNumber); } } else { if (IsRequesting) { return; } IsRequesting = true; UIAccountController.ForgetpasswordVerify(PhoneNumber, Input.value, delegate(bool successful) { IsRequesting = false; if (successful) { ForgetVerificationInfoDic[PhoneNumber].Code = Input.value; Input.enabled = false; Show(false); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().ForgetPasswordController.Show(true); mDMono.transform.parent.parent.GetUIControllerILRComponent <ManHuangAccountUIController>().ForgetPasswordController.SetData(PhoneNumber); } else { Input.value = ""; } }); } } } else { } }