| | |
| | | btnEmailLogin.TextSize = CSS_FontSize.TextFontSize; |
| | | btnPhoneLogin.TextColor = CSS_Color.MainColor; |
| | | btnPhoneLogin.TextSize = CSS_FontSize.EmphasisFontSize_Secondary; |
| | | etAccount.PlaceholderText = Language.StringByID(InternationalizationString.PlsEntryCorrectMobilNeumber); |
| | | etAccount.PlaceholderText = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber); |
| | | #endregion |
| | | |
| | | #region 切换方式方式及图标 |
| | |
| | | btnPhoneLogin.TextSize = CSS_FontSize.TextFontSize; |
| | | btnEmailLogin.TextColor = CSS_Color.MainColor; |
| | | btnEmailLogin.TextSize = CSS_FontSize.EmphasisFontSize_Secondary; |
| | | etAccount.PlaceholderText = Language.StringByID(InternationalizationString.PlsEntryEmailAddress); |
| | | etAccount.PlaceholderText = Language.StringByID(StringId.PlsEntryEmailAddress); |
| | | #endregion |
| | | |
| | | #region 切换修改方式及图标 |
| | |
| | | new Tip() |
| | | { |
| | | CloseTime = 3, |
| | | Text = Language.StringByID(InternationalizationString.PlsEntryCorrectMobilNeumber), |
| | | Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | } |
| | |
| | | new Tip() |
| | | { |
| | | CloseTime = 3, |
| | | Text = Language.StringByID(InternationalizationString.PlsEntryCorrectEmailAddress), |
| | | Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | } |
| | |
| | | }; |
| | | |
| | | //密码文本框焦点变化事件 |
| | | etPassword.FoucsChanged += (sender, e) => { |
| | | etPassword.FoucsChanged += (sender, e) => |
| | | { |
| | | if (etPassword.Foucs) |
| | | { |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; |
| | |
| | | { |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None, |
| | | Text = Language.StringByID(InternationalizationString.IncorrectRepeatPassword) |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword) |
| | | }.Show(bodyView); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | //确认密码文本框焦点变化事件 |
| | | etRepeatPassword.FoucsChanged += (sender, e) => { |
| | | etRepeatPassword.FoucsChanged += (sender, e) => |
| | | { |
| | | if (etRepeatPassword.Foucs) |
| | | { |
| | | btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; |
| | |
| | | { |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None, |
| | | Text = Language.StringByID(InternationalizationString.IncorrectRepeatPassword) |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword) |
| | | }.Show(bodyView); |
| | | } |
| | | else |
| | |
| | | }; |
| | | |
| | | //验证码文本框焦点变化事件 |
| | | etVerificationCode.FoucsChanged += (sender, e) => { |
| | | etVerificationCode.FoucsChanged += (sender, e) => |
| | | { |
| | | if (etVerificationCode.Foucs) |
| | | { |
| | | btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.MainColor; |
| | |
| | | void LoadEvent_ChangeTextVisble() |
| | | { |
| | | //密码文本可见性变化 |
| | | btnVisiblePassword.MouseUpEventHandler += (sender, e) => { |
| | | btnVisiblePassword.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | btnVisiblePassword.IsSelected = !btnVisiblePassword.IsSelected; |
| | | etPassword.SecureTextEntry = !btnVisiblePassword.IsSelected; |
| | | }; |
| | | //重复密码文本可见性变化 |
| | | btnRepeatVisiblePassword.MouseUpEventHandler += (sender, e) => { |
| | | btnRepeatVisiblePassword.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | btnRepeatVisiblePassword.IsSelected = !btnRepeatVisiblePassword.IsSelected; |
| | | etRepeatPassword.SecureTextEntry = !btnRepeatVisiblePassword.IsSelected; |
| | | }; |
| | |
| | | /// </summary> |
| | | void LoadEvent_GetVerificationCode() |
| | | { |
| | | btnGetVerificationCode.MouseUpEventHandler += (sender, e) => { |
| | | btnGetVerificationCode.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (btnGetVerificationCode.IsSelected) |
| | | { |
| | | //获取验证码 |
| | |
| | | { |
| | | //回复获取短信按钮事件 |
| | | btnGetVerificationCode.IsSelected = true; |
| | | btnGetVerificationCode.TextID = InternationalizationString.GetVerificationCode; |
| | | btnGetVerificationCode.TextID = StringId.GetVerificationCode; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | switch (result.StateCode) |
| | | { |
| | | case "Exist": |
| | | tipString = Language.StringByID(InternationalizationString.AccountAlreadyExists); |
| | | tipString = Language.StringByID(StringId.AccountAlreadyExists); |
| | | break; |
| | | case "SendFail": |
| | | tipString = Language.StringByID(InternationalizationString.FailedToSendVerificationCode); |
| | | tipString = Language.StringByID(StringId.FailedToSendVerificationCode); |
| | | break; |
| | | case "Self:Net_Error": |
| | | tipString = Language.StringByID(InternationalizationString.NetworkAnomaly); |
| | | tipString = Language.StringByID(StringId.NetworkAnomaly); |
| | | break; |
| | | } |
| | | |
| | |
| | | if (verResult.StateCode == "Success") |
| | | { |
| | | var resetResult = pm.ResetPassword(account, password, repeatPassword, countryIndex); |
| | | if(resetResult.StateCode == "Success") |
| | | if (resetResult.StateCode == "Success") |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | switch (resetResult.StateCode) |
| | | { |
| | | case "PwdNoConfirm"://两次输入的密码不一致 |
| | | erorrInfo = Language.StringByID(InternationalizationString.IncorrectRepeatPassword); |
| | | erorrInfo = Language.StringByID(StringId.IncorrectRepeatPassword); |
| | | break; |
| | | case "AccountNoExists"://两次输入的密码不一致 |
| | | erorrInfo = Language.StringByID(InternationalizationString.AccountNotExist); |
| | | erorrInfo = Language.StringByID(StringId.AccountNotExist); |
| | | break; |
| | | default: |
| | | erorrInfo = "Server error"; |
| | |
| | | switch (verResult.StateCode) |
| | | { |
| | | case "ValidCodeAndPhoneNoEqual"://验证码错误 |
| | | erorrInfo = Language.StringByID(InternationalizationString.VerificationCodeWrong); |
| | | erorrInfo = Language.StringByID(StringId.VerificationCodeWrong); |
| | | break; |
| | | default: |
| | | erorrInfo = "Server error"; |
| | |
| | | /// </summary> |
| | | void LoadMothed_EnableResetButton() |
| | | { |
| | | if(!string.IsNullOrEmpty( etAccount.Text)&&!string.IsNullOrEmpty(etPassword.Text)&& !string.IsNullOrEmpty( etVerificationCode.Text) && (etPassword.Text.Trim()== etRepeatPassword.Text.Trim())) |
| | | if (!string.IsNullOrEmpty(etAccount.Text) && !string.IsNullOrEmpty(etPassword.Text) && !string.IsNullOrEmpty(etVerificationCode.Text) && (etPassword.Text.Trim() == etRepeatPassword.Text.Trim())) |
| | | { |
| | | btnReset.IsSelected = true; |
| | | } |