| | |
| | | public partial class AppUnlockPasswordPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | EditText etPassword; |
| | | |
| | | string passwrod = ""; |
| | | string oldPasswrod = ""; |
| | |
| | | oldPasswrod = pw; |
| | | backAction = action; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | |
| | | bodyView.AddChidren(btnTipError); |
| | | |
| | | |
| | | var etPassword = new EditText() |
| | | etPassword = new EditText() |
| | | { |
| | | Y = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(0), |
| | |
| | | { |
| | | if (passwrod == oldPasswrod) |
| | | { |
| | | //MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); |
| | | this.RemoveFromParent(); |
| | | backAction(); |
| | | return; |
| | |
| | | } |
| | | if (MainPage.LoginUser.appUnlockType.Contains("1")) |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Remove("1"); |
| | | MainPage.LoginUser.appUnlockType =new System.Collections.Generic.List<string>();//.Remove("1"); |
| | | MainPage.LoginUser.appUnlockPasswrod = ""; |
| | | MainPage.LoginUser.SaveUserInfo(); |
| | | this.RemoveFromParent(); |
| | |
| | | btnTipIcon4.MouseUpEventHandler = eventHandler; |
| | | |
| | | etPassword.Foucs = true; |
| | | |
| | | |
| | | if (optionType == "3" || optionType == "5" || optionType == "6" || optionType == "7") |
| | | { |
| | | Button btnLoginAccountVerify = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(517), |
| | | Height = Application.GetRealHeight(60), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextID = StringId.EnterLoginPasswordVerification, |
| | | }; |
| | | bodyView.AddChidren(btnLoginAccountVerify); |
| | | |
| | | btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (optionType == "7") |
| | | { |
| | | MainPage.GoLoginPage(MainPage.LoginUser.accountString); |
| | | } |
| | | else |
| | | { |
| | | Action<string> action = (pw) => { |
| | | var loginResult = new DAL.Server.HttpServerRequest().LoginByPassword(MainPage.LoginUser.accountString, pw); |
| | | if (loginResult.StateCode.ToUpper() == "SUCCESS") |
| | | { |
| | | MainPage.LoginUser.appUnlockPasswrod = ""; |
| | | MainPage.LoginUser.appUnlockType = new System.Collections.Generic.List<string>(); |
| | | MainPage.LoginUser.SaveUserInfo(); |
| | | this.RemoveFromParent(); |
| | | backAction(); |
| | | } |
| | | //登录失败 |
| | | else |
| | | { |
| | | string tipStr = "Sever erorr"; |
| | | switch (loginResult.StateCode) |
| | | { |
| | | case "ValidCodeAndPhoneNoEqual": |
| | | tipStr = Language.StringByID(StringId.VerificationCodeError); |
| | | break; |
| | | case "USERNAMEORPWDERROR": |
| | | tipStr = Language.StringByID(StringId.LoginFailed_AccountOrPasswordError); |
| | | break; |
| | | case "ACCOUNTNOEXISTS": |
| | | tipStr = Language.StringByID(StringId.ACCOUNTNOEXISTS); |
| | | break; |
| | | case "NoRecord": |
| | | tipStr = Language.StringByID(StringId.PlsGetTheVerificationCode); |
| | | break; |
| | | case "Self:Net_Error": |
| | | tipStr = Language.StringByID(StringId.NetworkAnomaly); |
| | | break; |
| | | } |
| | | //账号或者密码错误 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //提示原因 |
| | | var tip = new Tip() |
| | | { |
| | | Text = tipStr, |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | | }); |
| | | } |
| | | |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action, StringId.PlsEntryPassword, 0, new System.Collections.Generic.List<string>(), true); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |