| | |
| | | Y = Application.GetRealWidth(100), |
| | | Height = Application.GetRealWidth(10), |
| | | Foucs = true, |
| | | Visible = false, |
| | | //Visible = false, |
| | | IsNumberKeyboardType = true, |
| | | }; |
| | | bodyView.AddChidren(etPassword); |
| | | |
| | | //etPassword.MouseUpEventHandler = (sender, e) => { }; |
| | | |
| | | etPassword.TextChangeEventHandler = (sender, e) => { |
| | | passwrod = etPassword.Text.Trim(); |
| | |
| | | btnTipIcon2.IsSelected = true; |
| | | btnTipIcon3.IsSelected = true; |
| | | btnTipIcon4.IsSelected = true; |
| | | Application.HideSoftInput(); |
| | | if (string.IsNullOrEmpty(oldPasswrod)) |
| | | { |
| | | //移除当前界面,每次返回都返回到最上级 |
| | | this.RemoveFromParent(); |
| | | var page = new AppUnlockPasswordPage(passwrod,backAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(optionType); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | //移除当前界面,每次返回都返回到最上级 |
| | | MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 2); |
| | | } |
| | | else |
| | | { |
| | | if(optionType == "2") |
| | | if (optionType == "2") |
| | | { |
| | | //移除当前界面,每次返回都返回到最上级 |
| | | this.RemoveFromParent(); |
| | | var page = new AppUnlockPasswordPage("", backAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage("1"); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | //移除当前界面,每次返回都返回到最上级 |
| | | MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 2); |
| | | return; |
| | | } |
| | | |
| | |
| | | this.RemoveFromParent(); |
| | | var page = new OperationResultDisPalyPage(); |
| | | page.Show(); |
| | | |
| | | page.LoadPage(true, Language.StringByID(StringId.SetSuccessfully), Language.StringByID(StringId.SetSuccessfully), ""); |
| | | string tipMsg = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? Language.StringByID(StringId.TurnOnFingerprintUnlocking) : |
| | | Language.StringByID(StringId.TurnOnFaceIdUnlocking); |
| | | Action<bool> action = (result) => |
| | | |
| | | if (TouchIDUtils.getTouchIDSupperType() != TouchIDUtils.TouchIDSupperType.None) |
| | | { |
| | | var unlockType = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? "3" : "4"; |
| | | if (result) |
| | | Action<bool> action = (result) => |
| | | { |
| | | if (!MainPage.LoginUser.appUnlockType.Contains(unlockType)) |
| | | if (result) |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Add(unlockType); |
| | | if (!MainPage.LoginUser.appUnlockType.Contains(unlockType)) |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Add(unlockType); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (MainPage.LoginUser.appUnlockType.Contains(unlockType)) |
| | | else |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Remove(unlockType); |
| | | if (MainPage.LoginUser.appUnlockType.Contains(unlockType)) |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Remove(unlockType); |
| | | } |
| | | } |
| | | } |
| | | backAction(); |
| | | MainPage.LoginUser.SaveUserInfo(); |
| | | }; |
| | | page.AdditionalOperations(tipMsg, action); |
| | | backAction(); |
| | | MainPage.LoginUser.SaveUserInfo(); |
| | | }; |
| | | page.AdditionalOperations(tipMsg, action); |
| | | } |
| | | if (!MainPage.LoginUser.appUnlockType.Contains("1")) |
| | | { |
| | | MainPage.LoginUser.appUnlockType.Add("1"); |
| | |
| | | btnTipIcon2.MouseUpEventHandler = eventHandler; |
| | | btnTipIcon3.MouseUpEventHandler = eventHandler; |
| | | btnTipIcon4.MouseUpEventHandler = eventHandler; |
| | | |
| | | etPassword.Foucs = true; |
| | | } |
| | | } |
| | | } |