| | |
| | | IsBold = true, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | TextID = StringId.SetGesturePassword, |
| | | TextID = optionType == "7" ? StringId.SetGesturePassword : StringId.VerifyGesturePassword, |
| | | }; |
| | | bodyView.AddChidren(btnTipTitle); |
| | | |
| | |
| | | TextColor = CSS_Color.TextualColor, |
| | | SelectedTextColor = CSS_Color.WarningColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextID = string.IsNullOrEmpty(oldPasswrod) ? StringId.DrawUnlockPattern : StringId.DrawUnlockPatternAgain, |
| | | TextID = optionType == "2" ? StringId.DrawUnlockPatternAgain : StringId.DrawUnlockPattern, |
| | | }; |
| | | bodyView.AddChidren(btnTipMsg); |
| | | |
| | | |
| | | if (optionType == "7") |
| | | { |
| | |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(mGestureLockView); |
| | | |
| | | mGestureLockView.SetSolidType(true); |
| | | //滑动结束 回调密码结果和密码长度 |
| | | mGestureLockView.OnLockVerifyEvent += (selectNumStr, selectCount) => |
| | | { |
| | |
| | | } |
| | | if (MainPage.LoginUser.appUnlockType.Contains("2")) |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Remove("2"); |
| | | MainPage.LoginUser.appUnlockType = new System.Collections.Generic.List<string>(); |
| | | MainPage.LoginUser.appUnlockPasswrod = ""; |
| | | MainPage.LoginUser.SaveUserInfo(); |
| | | this.RemoveFromParent(); |
| | |
| | | { |
| | | if (passwrod == oldPasswrod) |
| | | { |
| | | if (optionType == "5" && MainPage.LoginUser.appUnlockType.Contains("3")) |
| | | if (optionType == "5" )//&& MainPage.LoginUser.appUnlockType.Contains("3")) |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Remove("3"); |
| | | if (MainPage.LoginUser.appUnlockType.Contains("3")) |
| | | MainPage.LoginUser.appUnlockType.Remove("3"); |
| | | else |
| | | MainPage.LoginUser.appUnlockType.Add("3"); |
| | | |
| | | MainPage.LoginUser.SaveUserInfo(); |
| | | this.RemoveFromParent(); |
| | | } |
| | | if (MainPage.LoginUser.appUnlockType.Contains("4") && optionType == "6") |
| | | if ( optionType == "6") |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Remove("4"); |
| | | if (MainPage.LoginUser.appUnlockType.Contains("4")) |
| | | MainPage.LoginUser.appUnlockType.Remove("4"); |
| | | else |
| | | MainPage.LoginUser.appUnlockType.Add("4"); |
| | | |
| | | MainPage.LoginUser.SaveUserInfo(); |
| | | this.RemoveFromParent(); |
| | | } |
| | |
| | | |
| | | }; |
| | | |
| | | if (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); |
| | | } |
| | | 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); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | } |