wxr
2021-07-01 43b0d5870d528f23ecd6aeceb6cfd4325188b46f
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
@@ -40,6 +40,12 @@
        /// 
        /// </summary>
        FrameLayout bodyView;
        /// <summary>
        /// 是否点击了返回,用于屏蔽EditText失去焦点检测事件
        /// </summary>
        bool isHitBack;
        #endregion
        public ResetPasswordPage()
@@ -50,7 +56,13 @@
        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()
@@ -83,9 +95,8 @@
                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 再次输入新密码
@@ -184,6 +195,7 @@
                {
                    CloseTime = 1,
                    Direction = AMPopTipDirection.None,
                    MaxWidth = Application.GetRealWidth(300),
                    Text = Language.StringByID(StringId.IncorrectRepeatPassword)
                }.Show(bodyView);
@@ -191,8 +203,9 @@
            }
            var waitPage = new Loading();
            waitPage.Start("Please wait...");
            bodyView.AddChidren(waitPage);
            waitPage.Start(Language.StringByID(StringId.PleaseWait));
            new Thread(() =>
            {
                try
@@ -218,7 +231,11 @@
                {
                    Application.RunOnMainThread(() =>
                    {
                        waitPage.Hide();
                        if (waitPage != null)
                        {
                            waitPage.RemoveFromParent();
                            waitPage = null;
                        }
                    });
                }
            })
@@ -253,6 +270,10 @@
                }
                else
                {
                    if (isHitBack) return;//点击返回关闭页面不检测提示
                    if (etPassword.Text.Length == 0) return;//没输入不检测提示
                    //校验密码是否符合要求
                    if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
                    {
@@ -279,6 +300,10 @@
                }
                else
                {
                    if (isHitBack) return;//点击返回关闭页面不检测提示
                    if (etRepeatPassword.Text.Length == 0) return;//没输入不检测提示
                    //校验两次输入的密码是否一致
                    if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
                    {
@@ -286,6 +311,7 @@
                        {
                            CloseTime = 1,
                            Direction = AMPopTipDirection.None,
                            MaxWidth = Application.GetRealWidth(300),
                            Text = Language.StringByID(StringId.IncorrectRepeatPassword)
                        }.Show(bodyView);
                    }
@@ -296,6 +322,13 @@
                }
            };
            Action<View, string> textChangeEventHandler = (view, textStr) =>
            {
                LoadMothed_EnableResetButton();
            };
            etPassword.TextChangeEventHandler += textChangeEventHandler;
            etRepeatPassword.TextChangeEventHandler += textChangeEventHandler;
        }
        /// <summary>