HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-10-10 2ed75b8b337048e5d75e6d9ec8307633134f02fd
ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
@@ -7,6 +7,7 @@
using Shared.IO;
using Shared.Phone.UserView;
using System.Net.Http;
using Shared.Phone.Device.CommonForm;
namespace Shared.Phone.Device.Account
{
@@ -21,25 +22,26 @@
        /// </summary>
        private FrameLayout midFrameLayout;
        /// <summary>
        /// 注册按钮
        /// 手机邮箱
        /// </summary>
        private Button registerBtn;
        private PhoneEmailForm phoneEmailForm;
        /// <summary>
        /// 账号输入控件
        /// phoneRowForm
        /// </summary>
        private EditText accountET;
        private PhoneLoginRowForm phoneRow;
        /// <summary>
        /// 密码输入控件
        /// emailRow
        /// </summary>
        private EditText passwrodET;
        private EmailLoginRowForm emailRow;
        /// <summary>
        /// 登录按钮
        /// pwdRow
        /// </summary>
        private Button loginBtn;
        private PwdLoginRowForm pwdRow;
        /// <summary>
        /// 隐藏密码
        /// 账号密码fl
        /// </summary>
        private Button hidenPWDbtn;
        private FrameLayout accountPwdFL;
        /// <summary>
        /// 登录错误提示按钮
        /// </summary>
@@ -49,9 +51,26 @@
        /// </summary>
        private Button forgotPasswordBtn;
        /// <summary>
        /// 登录按钮
        /// </summary>
        private Button loginBtn;
        /// <summary>
        /// 验证码登录按钮
        /// </summary>
        private Button loginByCodeBtn;
        /// <summary>
        /// 注册按钮
        /// </summary>
        private Button registerBtn;
        /// <summary>
        /// 账号
        /// </summary>
        private string account;
        /// <summary>
        /// 密码
        /// </summary>
        private string password;
        #endregion
@@ -62,7 +81,13 @@
        /// </summary>
        public AccountLogin()
        {
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
            Tag = "Login";
        }
        public override void RemoveFromParent()
        {
            base.RemoveFromParent();
        }
        #endregion
@@ -93,165 +118,144 @@
        /// <param name="password">Password.</param>
        public void LoginViewShow(string account = "", string password = "")
        {
            this.account = account;
            this.password = password;
            #region midFrameLayout
            midFrameLayout = new FrameLayout()
            {
                Width = LayoutParams.MatchParent,
                Height = Application.GetRealHeight(CommonPage.AppRealHeight),
                //Y = Application.GetRealHeight(36),
                BackgroundColor =ZigbeeColor.Current.GXCBackgroundColor
            };
            AddChidren(midFrameLayout);
            #endregion
            #region 布局账户,密码,忘记密码,注册  手机验证码登录
            registerBtn = new Button()
            {
                Width = Application.GetRealWidth(250),
                Height = Application.GetRealHeight(80),
                X = Application.GetRealWidth(CommonPage.AppRealWidth-250-50),
                Y = Application.GetRealHeight(100),
                TextID = R.MyInternationalizationString.Register,
                TextSize = 15,
                TextColor = ZigbeeColor.Current.GXCTextBlueColor,
                TextAlignment = TextAlignment.CenterRight
            };
            midFrameLayout.AddChidren(registerBtn);
             var logoBtn = new Button()
            var logoBG = new Button()
            {
                Width = Application.GetMinRealAverage(270),
                Height = Application.GetMinRealAverage(270),
                Y = Application.GetRealHeight(150)+registerBtn.Bottom,
                UnSelectedImagePath = "Logo/Logo.png",
                Gravity=Gravity.CenterHorizontal
                Height = Application.GetRealHeight(619),
                UnSelectedImagePath = "Account/Logo_loginBG.png"
            };
            midFrameLayout.AddChidren(logoBtn);
            midFrameLayout.AddChidren(logoBG);
            var accountFL = new FrameLayout()
            var phoneEmailBGFL = new FrameLayout()
            {
                Width = Application.GetRealWidth(700),
                Height = Application.GetRealHeight(110),
                Y = Application.GetRealHeight(200) + logoBtn.Bottom,
                Radius = (uint)Application.GetRealHeight(55),
                BorderColor = ZigbeeColor.Current.GXCBorderColor,
                BorderWidth = 1,
                Y = logoBG.Bottom,
                Height = Application.GetRealHeight(1921),
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
            };
            midFrameLayout.AddChidren(phoneEmailBGFL);
            var logo = new Button()
            {
                Width = Application.GetMinRealAverage(184),
                Height = Application.GetMinRealAverage(184),
                Y = Application.GetRealHeight(230),
                UnSelectedImagePath = "Account/Logo_White.png",
                Gravity = Gravity.CenterHorizontal
            };
            midFrameLayout.AddChidren(accountFL);
            midFrameLayout.AddChidren(logo);
            accountET = new EditText()
            var logoName = new Button()
            {
                X=Application.GetRealWidth(20),
                Width = Application.GetRealWidth(660),
                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPhoneNumberOrEmail),
                TextAlignment = TextAlignment.Center,
                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text=account
                Y = logo.Bottom,
                Height = Application.GetRealHeight(69),
                Width = Application.GetRealWidth(300),
                Gravity = Gravity.CenterHorizontal,
                TextID = R.MyInternationalizationString.AppName,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor
            };
            accountFL.AddChidren(accountET);
            midFrameLayout.AddChidren(logoName);
            var passwordFL = new FrameLayout()
            phoneEmailForm = new PhoneEmailForm();
            phoneEmailForm.Init(midFrameLayout);
            //错误提示Btn
            loginErrorBtn = new Button()
            {
                X = Application.GetRealWidth(242),
                Y = Application.GetRealHeight(740),
                Width = Application.GetRealWidth(700),
                Height = Application.GetRealHeight(110),
                Y = accountFL.Bottom + Application.GetRealHeight(100),
                Radius = (uint)Application.GetRealHeight(55),
                BorderColor = ZigbeeColor.Current.GXCBorderColor,
                BorderWidth = 1,
                Gravity = Gravity.CenterHorizontal
                Height = Application.GetRealHeight(58),
                TextColor = ZigbeeColor.Current.GXCTextRed,
                TextAlignment = TextAlignment.CenterLeft,
            };
            midFrameLayout.AddChidren(passwordFL);
            midFrameLayout.AddChidren(loginErrorBtn);
            passwrodET = new EditText()
            accountPwdFL = new FrameLayout()
            {
                Width = Application.GetRealWidth(450),
                PlaceholderText = Language.StringByID(R.MyInternationalizationString.PleaseInputPWD),
                TextAlignment = TextAlignment.Center,
                SecureTextEntry = true,
                PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text=password,
                Gravity=Gravity.CenterHorizontal
                Y = Application.GetRealHeight(801),
                Height = Application.GetRealHeight(553),
                Width = Application.GetRealWidth(942),
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                Radius = (uint)Application.GetRealHeight(30)
            };
            passwordFL.AddChidren(passwrodET);
            midFrameLayout.AddChidren(accountPwdFL);
            hidenPWDbtn = new Button()
            {
                X = passwrodET.Right + Application.GetRealWidth(20),
                Width = Application.GetMinReal(72),
                Height = Application.GetMinReal(72),
                UnSelectedImagePath = "Account/HidenPWD.png",
                SelectedImagePath = "Account/UnHidenPWD.png",
                Gravity=Gravity.CenterVertical
            };
            passwordFL.AddChidren(hidenPWDbtn);
            AddPhoneOrEmailFL(accountPwdFL, "Phone");
            forgotPasswordBtn = new Button()
            {
                Width = Application.GetRealWidth(400),
                Height = Application.GetRealHeight(110),
                Y = passwordFL.Bottom + Application.GetRealHeight(100),
                TextID = R.MyInternationalizationString.ForgotPassword,
                TextSize = 15,
                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor,
                TextAlignment = TextAlignment.Center,
                Gravity=Gravity.CenterHorizontal
                X = Application.GetRealWidth(CommonPage.AppRealWidth - 115 - 250),
                Y = Application.GetRealHeight(1198),
                Width = Application.GetRealWidth(250),
                Height = Application.GetRealHeight(58),
                TextID = R.MyInternationalizationString.ForgotPWD,
                TextSize = CommonFormResouce.loginTextSize,
                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextGrayColor,
                TextAlignment = TextAlignment.CenterRight
            };
            midFrameLayout.AddChidren(forgotPasswordBtn);
            loginBtn = new Button()
            {
                Width = Application.GetRealWidth(700),
                Height = Application.GetRealHeight(110),
                Y = Application.GetRealHeight(100) + forgotPasswordBtn.Bottom,
                Y = Application.GetRealHeight(1293),
                Width = Application.GetRealWidth(688),
                Height = Application.GetRealHeight(127),
                Gravity = Gravity.CenterHorizontal,
                TextID = R.MyInternationalizationString.Login,
                TextSize = 15,
                TextColor = Shared.Common.ZigbeeColor.Current.GXCTextWhiteColor,
                Radius = (uint)Application.GetRealHeight(55),
                BorderWidth = 0,
                BackgroundColor = ZigbeeColor.Current.GXCButtonUnselectedColor,
                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
                Gravity = Gravity.CenterHorizontal,
                Enable = !string.IsNullOrEmpty(passwrodET.Text),
                IsSelected = !string.IsNullOrEmpty(passwrodET.Text)
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor,
                BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor,
                Radius = (uint)Application.GetRealHeight(127 / 2),
                Enable = !string.IsNullOrEmpty(pwdRow.PasswrodET?.Text),
                IsSelected = !string.IsNullOrEmpty(pwdRow.PasswrodET?.Text)
            };
            midFrameLayout.AddChidren(loginBtn);
            //错误提示Btn
            loginErrorBtn = new Button()
            {
                Y=loginBtn.Bottom+Application.GetRealHeight(50),
                Width=Application.GetRealWidth(1080-100),
                Height=Application.GetRealHeight(110),
                TextColor=ZigbeeColor.Current.GXCRedColor,
                Gravity=Gravity.CenterHorizontal
            };
            midFrameLayout.AddChidren(loginErrorBtn);
            loginByCodeBtn = new Button()
            {
                X=Application.GetRealWidth(98),
                Y = Application.GetRealHeight(1431),
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(110),
                Y = midFrameLayout.Bottom - Application.GetRealHeight(100+110),
                Height = Application.GetRealHeight(49),
                TextID = R.MyInternationalizationString.LoginByCode,
                TextColor = ZigbeeColor.Current.GXCTextBlueColor,
                TextAlignment = TextAlignment.Center,
                TextSize = 15,
                Gravity = Gravity.CenterHorizontal
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize
            };
            midFrameLayout.AddChidren(loginByCodeBtn);
            #endregion
            #region event
            passwrodET.EditorEnterAction = (ae) =>
            registerBtn = new Button()
            {
                Application.HideSoftInput();
                X = Application.GetRealWidth(738),
                Y = Application.GetRealHeight(1431),
                Width = Application.GetRealWidth(244),
                Height = Application.GetRealHeight(49),
                TextID = R.MyInternationalizationString.Register,
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                TextAlignment = TextAlignment.CenterRight,
                TextSize = CommonFormResouce.loginTextSize
            };
            midFrameLayout.AddChidren(registerBtn);
            #endregion
            BindEvent();
            #endregion
        }
        #endregion
@@ -263,20 +267,17 @@
        /// </summary>
        private void BindEvent()
        {
            //选择手机邮箱
            phoneEmailForm.SelectedPhone.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
            phoneEmailForm.SelectedEmail.MouseUpEventHandler += SelectPhoneOrEmail_MouseUpEvent;
            //登录事件
            loginBtn.MouseUpEventHandler += LoginBtnEvent;
            //短信登录
            loginByCodeBtn.MouseUpEventHandler += LoginByCode;
            //忘记密码
            forgotPasswordBtn.MouseUpEventHandler += ForgetPWD;
            //注册事件
            registerBtn.MouseUpEventHandler += Register;
            //账号监听
            accountET.TextChangeEventHandler += Account_TextChange;
            //密码监听事件
            passwrodET.TextChangeEventHandler += Pwd_TextChange;
            //隐藏密码
            hidenPWDbtn.MouseUpEventHandler += HidePWD;
            //忘记密码
            forgotPasswordBtn.MouseUpEventHandler += ForgetPWD_MouseUpEvent;
        }
@@ -291,15 +292,23 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void LoginBtnEvent(object sender,MouseEventArgs mouseEventArgs)
        {
            Login(accountET.Text.Trim(), passwrodET.Text.Trim());
            if (phoneEmailForm.SelectedPhone.IsSelected)
            {
                Login(phoneRow.AccountET.Text.Trim(), pwdRow.PasswrodET.Text.Trim());
            }
            else
            {
                Login(phoneRow.AccountET.Text.Trim(), pwdRow.PasswrodET.Text.Trim());
            }
        }
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="account">Account.</param>
        /// <param name="password">Password.</param>
        private void Login(string account, string password)
        /// <param name="accountStr">Account.</param>
        /// <param name="passwordStr">Password.</param>
        private void Login(string accountStr, string passwordStr)
        {
            //Application.RunOnMainThread( () =>
            //{
@@ -311,8 +320,8 @@
                    var requestObj = new SendDataToServer.LoginObj
                    {
                        Account = account,
                        Password = password,
                        Account = accountStr,
                        Password = passwordStr,
                        Source = CommonPage.Source,
                        Company = CommonPage.Company
                    };
@@ -321,6 +330,7 @@
                    if (revertObj == null)
                    {
                        CommonPage.Instance.FailureToServer();
                        CommonPage.Loading.Hide();
                        return;
                    }
                    var stateCodeStr = revertObj.StateCode.ToUpper();
@@ -343,12 +353,10 @@
                            var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
                            var revertData = responseDataObj;
                            Config.ReFresh();
                            Config.Instance.UserID = revertData.UserID;
                            Config.Instance.MasterID = revertData.MainUserID;
                            Config.Instance.AccountType = revertData.UserType;
                            Config.Instance.Account = revertData.Account;
                            Config.Instance.MqttKey = revertData.MqttKey;
                            Config.Instance.Password = password;
                            Config.Instance.Password = passwordStr;
                            Config.Instance.MD5PWD = revertData.MD5PWD;
                            Config.Instance.Guid = revertData.Guid;
                            Config.Instance.LoginDateTime = DateTime.Now;
                            Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd;
@@ -364,7 +372,7 @@
                            var homes = await House.GetHomeLists();
                            //刷新个人中心的内存及线程
                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
                            Shared.Common.Room.canInitAllRoom = true;
                            Shared.Common.Room.CanInitAllRoom = true;
                            Shared.Common.Room.InitAllRoom();
                            Application.RunOnMainThread(() =>
                            {
@@ -379,28 +387,24 @@
                        CommonPage.Loading.Hide();
                        //未激活
                        loginErrorBtn.TextID = R.MyInternationalizationString.NOTVERIFY;
                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.NOTVERIFY);
                    }
                    else if (stateCodeStr == "NOTENABLE")
                    {
                        CommonPage.Loading.Hide();
                        //该用户属于调试账号,并未启用
                        loginErrorBtn.TextID = R.MyInternationalizationString.NOTENABLE;
                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.NOTENABLE);
                    }
                    else if (stateCodeStr == "USERNAMEORPWDERROR")
                    {
                        CommonPage.Loading.Hide();
                        //账号或密码错误
                        loginErrorBtn.TextID = R.MyInternationalizationString.USERNAMEORPWDERROR;
                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.USERNAMEORPWDERROR);
                    }
                    else if (stateCodeStr == "ACCOUNTNOEXISTS")
                    {
                        CommonPage.Loading.Hide();
                        //账号不存在
                        loginErrorBtn.TextID = R.MyInternationalizationString.ACCOUNTNOEXISTS;
                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.ACCOUNTNOEXISTS);
                    }
                    else if (stateCodeStr == "YOUDATANOISLOCALREGION")
                    {
@@ -413,12 +417,11 @@
                        var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginLocalRegionRes>(revertObj.ResponseData.ToString());
                        CommonPage.RequestHttpsHost = responseDataObj.RegionServer;
                        //再次登录
                        Login(account, password);
                        Login(accountStr, passwordStr);
                    }
                    else
                    {
                        loginErrorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
                        CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.RequestServerFailed);
                    }
                }
                catch (Exception ex)
@@ -449,91 +452,65 @@
            loginByCodePage.Show();
        }
        /// <summary>
        /// phone/email 选择
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="mouseEventArgs"></param>
        private void SelectPhoneOrEmail_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false;
            loginBtn.Enable = loginBtn.IsSelected = false;
            (sender as Button).IsSelected = true;
            if((sender as Button).Tag.ToString()=="Phone")
            {
                AddPhoneOrEmailFL(accountPwdFL, "Phone");
            }
            else
            {
                AddPhoneOrEmailFL(accountPwdFL, "Email");
            }
        }
        /// <summary>
        /// AddPhoneOrEmailFL
        /// </summary>
        /// <param name="accountPwdFrameLayout"></param>
        /// <param name="phoneOrEmail"></param>
        private void AddPhoneOrEmailFL(FrameLayout accountPwdFrameLayout,string phoneOrEmail)
        {
            accountPwdFrameLayout.RemoveAll();
            if (phoneOrEmail == "Phone")
            {
                phoneRow = new PhoneLoginRowForm();
                phoneRow.Init(accountPwdFrameLayout, this, this.account, 29, 29);
                phoneRow.AccountET.TextChangeEventHandler += Account_TextChange;
            }
            else
            {
                emailRow = new EmailLoginRowForm();
                emailRow.Init(accountPwdFrameLayout, this.account, 29, 29);
                emailRow.AccountET.TextChangeEventHandler += Account_TextChange;
            }
            pwdRow = new PwdLoginRowForm();
            pwdRow.Init(accountPwdFrameLayout, 29, 225);
            pwdRow.PasswrodET.TextChangeEventHandler += Pwd_TextChange;
        }
        #endregion
        #region ◆ 忘记密码________________________
        /// <summary>
        /// 忘记密码
        /// </summary>
        private void ForgetPWD(object sender, MouseEventArgs mouseEventArgs)
        private void ForgetPWD_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            var forgetWPDDialog = new Dialog()
            {
                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
            };
            forgetWPDDialog.Show();
            var forgetSelectedView = new FrameLayout()
            {
                BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor,
                Gravity = Gravity.Center,
                Width = Application.GetRealWidth(700),
                Height = Application.GetRealHeight(700),
                Radius = (uint)Application.GetRealHeight(30),
            };
            forgetWPDDialog.AddChidren(forgetSelectedView);
            var forgetByPhone = new Button()
            {
                Y = Application.GetRealHeight(100),
                Width = Application.GetRealWidth(600),
                Height = Application.GetRealHeight(100),
                TextID = R.MyInternationalizationString.FindPWDByPhone,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                TextAlignment = TextAlignment.Center,
                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
                Radius = (uint)Application.GetRealHeight(50),
                Gravity = Gravity.CenterHorizontal
            };
            forgetSelectedView.AddChidren(forgetByPhone);
            var forgetByEmail = new Button()
            {
                Y = Application.GetRealHeight(100) + forgetByPhone.Bottom,
                Width = Application.GetRealWidth(600),
                Height = Application.GetRealHeight(100),
                TextID = R.MyInternationalizationString.FindPWDByEmail,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                TextAlignment = TextAlignment.Center,
                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
                Radius = (uint)Application.GetRealHeight(50),
                Gravity = Gravity.CenterHorizontal
            };
            forgetSelectedView.AddChidren(forgetByEmail);
            var cancleBtn = new Button()
            {
                Y = Application.GetRealHeight(100) + forgetByEmail.Bottom,
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(100),
                TextID = R.MyInternationalizationString.Cancel,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                TextAlignment = TextAlignment.Center,
                BackgroundColor = ZigbeeColor.Current.GXCButtonBlueColor,
                Radius = (uint)Application.GetRealHeight(50),
                Gravity = Gravity.CenterHorizontal
            };
            forgetSelectedView.AddChidren(cancleBtn);
            forgetByPhone.MouseUpEventHandler += (sender1, e1) =>
            {
                forgetWPDDialog.Close();
                this.RemoveFromParent();
                var forgot = new Account.ForgotPasswordByPhone();
                CommonPage.Instance.AddChidren(forgot);
                forgot.Show();
            };
            forgetByEmail.MouseUpEventHandler += (sender1, e1) =>
            {
                forgetWPDDialog.Close();
                this.RemoveFromParent();
                var forgot = new Account.ForgotPasswordByEmail();
                CommonPage.Instance.AddChidren(forgot);
                forgot.Show();
            };
            cancleBtn.MouseUpEventHandler += (sender1, e1) =>
            {
                forgetWPDDialog.Close();
            };
            var forgot = new AccountForgetPWD();
            CommonPage.Instance.AddChidren(forgot);
            forgot.Show();
        }
        #endregion
@@ -547,8 +524,7 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void Register(object sender,MouseEventArgs mouseEventArgs)
        {
            this.RemoveFromParent();
            var registerPage = new RegistrationPhoneOREmail();
            var registerPage = new AccountRegister();
            Shared.Common.CommonPage.Instance.AddChidren(registerPage);
            registerPage.Show();
        }
@@ -574,18 +550,18 @@
        private void Pwd_TextChange(object sender,string mouseEventArgs)
        {
            loginErrorBtn.Text = "";
            if (1 <= passwrodET.Text.Trim().Length && passwrodET.Text.Trim().Length <= 16 && accountET.Text.Trim().Length > 0)
            if (1 <= pwdRow.PasswrodET.Text.Trim().Length && pwdRow.PasswrodET.Text.Trim().Length <= 16 && phoneRow.AccountET.Text.Trim().Length > 0)
            {
                loginBtn.Enable = loginBtn.IsSelected = true;
            }
            else if (passwrodET.Text.Trim().Length > 16)
            else if (pwdRow.PasswrodET.Text.Trim().Length > 16)
            {
                passwrodET.Text = mouseEventArgs.Remove(16);
                pwdRow.PasswrodET.Text = mouseEventArgs.Remove(16);
            }
            else if (passwrodET.Text.Trim().Length > 16 && accountET.Text.Trim().Length > 0)
            else if (pwdRow.PasswrodET.Text.Trim().Length > 16 && phoneRow.AccountET.Text.Trim().Length > 0)
            {
                loginBtn.Enable = loginBtn.IsSelected = true;
                passwrodET.Text = mouseEventArgs.Remove(16);
                pwdRow.PasswrodET.Text = mouseEventArgs.Remove(16);
            }
            else
            {
@@ -594,17 +570,7 @@
        }
        #endregion
        #region ◆ 密码隐藏__________________________
        private void HidePWD(object sender, MouseEventArgs mouseEventArgs)
        {
            passwrodET.SecureTextEntry = !passwrodET.SecureTextEntry;
            hidenPWDbtn.IsSelected = !hidenPWDbtn.IsSelected;
        }
        #endregion
    }
}