| | |
| | | /// |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | |
| | | /// <summary> |
| | | /// 是否点击了返回,用于屏蔽EditText失去焦点检测事件 |
| | | /// </summary> |
| | | bool isHitBack; |
| | | |
| | | #endregion |
| | | |
| | | public ResetPasswordPage() |
| | |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView(); |
| | | |
| | | Action backAction = () => |
| | | { |
| | | isHitBack = true; |
| | | }; |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView(backAction); |
| | | |
| | | #region 新密码 |
| | | FrameLayout rowView = new FrameLayout() |
| | |
| | | Foucs = true |
| | | }; |
| | | rowView.AddChidren(etPassword); |
| | | var lineView = new LineView(); |
| | | var lineView = new LineView(rowView.Height); |
| | | rowView.AddChidren(lineView); |
| | | lineView.Y = rowView.Height - lineView.Height; |
| | | #endregion |
| | | |
| | | #region 再次输入新密码 |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(224), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | TextID = StringId.Confirm, |
| | |
| | | { |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword) |
| | | }.Show(bodyView); |
| | | |
| | |
| | | } |
| | | |
| | | var waitPage = new Loading(); |
| | | waitPage.Start("Please wait..."); |
| | | |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | |
| | | new Thread(() => |
| | | { |
| | | try |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | |
| | | } |
| | | else |
| | | { |
| | | if (isHitBack) return;//点击返回关闭页面不检测提示 |
| | | |
| | | if (etPassword.Text.Length == 0) return;//没输入不检测提示 |
| | | |
| | | //校验密码是否符合要求 |
| | | if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | if (isHitBack) return;//点击返回关闭页面不检测提示 |
| | | |
| | | if (etRepeatPassword.Text.Length == 0) return;//没输入不检测提示 |
| | | |
| | | //校验两次输入的密码是否一致 |
| | | if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim()) |
| | | { |
| | |
| | | { |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = Language.StringByID(StringId.IncorrectRepeatPassword) |
| | | }.Show(bodyView); |
| | | } |
| | |
| | | } |
| | | }; |
| | | |
| | | Action<View, string> textChangeEventHandler = (view, textStr) => |
| | | { |
| | | LoadMothed_EnableResetButton(); |
| | | }; |
| | | etPassword.TextChangeEventHandler += textChangeEventHandler; |
| | | etRepeatPassword.TextChangeEventHandler += textChangeEventHandler; |
| | | |
| | | } |
| | | |
| | | /// <summary> |