wxr
2023-05-09 76fca0e9a011eb36081e34b875a5d7399d4de3e9
HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -435,6 +435,16 @@
                {
                    btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
                    btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
                    new Thread(() => {
                        for(var i = 0; i < 10; i++)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                this.Y = 0-Application.GetRealHeight(10 * i);
                            });
                            Thread.Sleep(10);
                        }
                    }) { IsBackground = true }.Start();
                }
                else
                {
@@ -451,9 +461,14 @@
            //当焦点在密码文本框时,点击键盘回撤按键,触发的事件
            etPassword.EditorEnterAction += (obj) =>
            {
                LoginEvent();
                Application.HideSoftInput();
            };
            etPassword.MouseUpEventHandler = (sender, e) =>
            {
                etPassword.Foucs = true;
            };
            etPassword.MouseDownEventHandler = (sender, e) =>
            {
                etPassword.Foucs = true;
            };
@@ -486,11 +501,57 @@
        {
            btnLogin.MouseUpEventHandler += (sender, e) =>
            {
                LoginEvent();
            };
            #region 当账号密码都输入时,才能点击登录按钮
            etAccount.TextChangeEventHandler = (sender, e) =>
            {
                account = etAccount.Text.Trim();
                if (account.Length > 0 && etPassword.Text.Trim().Length > 0)
                {
                    btnLogin.IsSelected = true;
                }
                else
                {
                    btnLogin.IsSelected = false;
                }
                if (Regex.IsMatch(account, @"^[1]+\d{10}"))//&& account.Length == 11)
                {
                    btnGetVerificationCode.IsSelected = true;
                    btnGetVerificationCode.TextColor = CSS_Color.MainBackgroundColor;
                }
                else
                {
                    btnGetVerificationCode.IsSelected = false;
                    btnGetVerificationCode.TextColor = CSS_Color.PromptingColor1;
                }
            };
            etPassword.TextChangeEventHandler += (sender, e) =>
            {
                if (etAccount.Text.Trim().Length > 0 && etPassword.Text.Trim().Length > 0)
                {
                    btnLogin.IsSelected = true;
                }
                else
                {
                    btnLogin.IsSelected = false;
                }
            };
            #endregion
        }
        /// <summary>
        /// 登录事件
        /// </summary>
        void LoginEvent()
        {
                if (btnLogin.IsSelected)
                {
                    //判断是否同意了隐私政策
                    if (CheckPrivacyPolicy() == false) return;
                if (CheckPrivacyPolicy() == false)
                {
                    Application.HideSoftInput();
                    return;
                }
                    account = etAccount.Text.Trim();
                    password = etPassword.Text.Trim();
@@ -529,44 +590,7 @@
                    waitPage = new Loading();
                    new PublicAssmebly().LoadPage_WaitPage(loginThread, bodyView, waitPage);
                }
            };
            #region 当账号密码都输入时,才能点击登录按钮
            etAccount.TextChangeEventHandler = (sender, e) =>
            {
                account = etAccount.Text.Trim();
                if (account.Length > 0 && etPassword.Text.Trim().Length > 0)
                {
                    btnLogin.IsSelected = true;
                }
                else
                {
                    btnLogin.IsSelected = false;
                }
                if (Regex.IsMatch(account, @"^[1]+\d{10}"))//&& account.Length == 11)
                {
                    btnGetVerificationCode.IsSelected = true;
                    btnGetVerificationCode.TextColor = CSS_Color.MainBackgroundColor;
                }
                else
                {
                    btnGetVerificationCode.IsSelected = false;
                    btnGetVerificationCode.TextColor = CSS_Color.PromptingColor1;
                }
            };
            etPassword.TextChangeEventHandler += (sender, e) =>
            {
                if (etAccount.Text.Trim().Length > 0 && etPassword.Text.Trim().Length > 0)
                {
                    btnLogin.IsSelected = true;
                }
                else
                {
                    btnLogin.IsSelected = false;
                }
            };
            #endregion
        }
        /// <summary>
        /// 加载登录线程
        /// </summary>
@@ -893,6 +917,8 @@
            {
                //2020-12-22 增加点击隐藏键盘事件
                Application.HideSoftInput();
                this.Y = 0;
                //判断是否同意了隐私政策
                if (CheckPrivacyPolicy() == false) return;