| | |
| | | public AppUnlockPasswordPage(string pw, Action action) |
| | | { |
| | | bodyView = this; |
| | | bodyView.Tag = "unlockpage"; |
| | | oldPasswrod = pw; |
| | | backAction = action; |
| | | } |
| | |
| | | etPassword = new EditText() |
| | | { |
| | | Y = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(0), |
| | | Height = 1, |
| | | Foucs = true, |
| | | //Visible = false, |
| | | IsNumberKeyboardType = true, |
| | |
| | | |
| | | etPassword.Foucs = true; |
| | | |
| | | //加载底部验证按钮 |
| | | if (optionType == "3" || optionType == "5" || optionType == "6") |
| | | { |
| | | //输入登录密码验证 提示按钮 |
| | | AddInputPasswordTipButton(optionType); |
| | | } |
| | | else if (optionType == "7") |
| | | if (optionType == "7") |
| | | { |
| | | //使用账户密码登录按钮 提示按钮 |
| | | AddLoginTipButton(); |
| | | } |
| | | |
| | | else if (optionType != "1") |
| | | { |
| | | //输入登录密码验证 提示按钮 |
| | | AddInputPasswordTipButton(optionType); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | //输入登录密码验证 |
| | | Action<string> action = (pw) => |
| | | { |
| | | var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); |
| | | if (resultObj.Code.ToUpper() == StateCode.SUCCESS) |
| | | { |
| | | //UserInfo.Current.appUnlockPasswrod = ""; |
| | | //UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>(); |
| | | //UserInfo.Current.SaveUserInfo(); |
| | | //this.RemoveFromParent(); |
| | | //backAction(); |
| | | AuthenticationByLoginPassword(pw, optionType); |
| | | //var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); |
| | | //if (resultObj.Code == StateCode.SUCCESS) |
| | | //{ |
| | | // PasswordInputPassed(optionType); |
| | | //} |
| | | //else |
| | | //{ |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); |
| | | // }); |
| | | |
| | | PasswordInputPassed(optionType); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); |
| | | }); |
| | | |
| | | } |
| | | //} |
| | | |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action, StringId.PlsEntryPassword, 0, new System.Collections.Generic.List<string>(), true); |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 登录密码验证 |
| | | /// </summary> |
| | | /// <param name="pw"></param> |
| | | /// <param name="optionType"></param> |
| | | void AuthenticationByLoginPassword(string pw, string optionType) |
| | | { |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | { |
| | | PasswordInputPassed(optionType); |
| | | } |
| | | else |
| | | { |
| | | Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); |
| | | } |
| | | }); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | } |
| | | } |