| | |
| | | btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | return; |
| | | } |
| | | #if __IOS__ |
| | | etPassword.Foucs = true; |
| | | #endif |
| | | //加载Loading效果 |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | |
| | | } |
| | | //验证码不需要隐藏 |
| | | etPassword.SecureTextEntry = false; |
| | | #if __IOS__ |
| | | etPassword.SetTextContentTypeToOneTimeCode(); |
| | | #endif |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | //} |
| | | //隐藏密码 |
| | | etPassword.SecureTextEntry = true; |
| | | //etPassword.IsNumberKeyboardType = false; |
| | | } |
| | | //验证码登录 |
| | | else if (logintMode == 1) |
| | |
| | | } |
| | | //验证码不需要隐藏 |
| | | etPassword.SecureTextEntry = false; |
| | | etPassword.Text = smsCode; |
| | | //etPassword.IsNumberKeyboardType = true; |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | |
| | | #if __IOS__ |
| | | new Thread(() => { |
| | | for(var i = 0; i < 10; i++) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | this.Y = 0-Application.GetRealHeight(10 * i); |
| | | }); |
| | | Thread.Sleep(10); |
| | | } |
| | | }) { IsBackground = true }.Start(); |
| | | |
| | | var sst = etPassword.MyTextContentType; |
| | | Console.WriteLine(sst); |
| | | etPassword.SetTextContentTypeToOneTimeCode(); |
| | | #endif |
| | | } |
| | | else |
| | | { |
| | | this.Y = 0; |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(1); |
| | | } |
| | |
| | | //当焦点在密码文本框时,点击键盘回撤按键,触发的事件 |
| | | etPassword.EditorEnterAction += (obj) => |
| | | { |
| | | LoginEvent(); |
| | | Application.HideSoftInput(); |
| | | }; |
| | | etPassword.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | etPassword.Foucs = true; |
| | | }; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | btnLogin.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (btnLogin.IsSelected) |
| | | { |
| | | //判断是否同意了隐私政策 |
| | | if (CheckPrivacyPolicy() == false) return; |
| | | |
| | | account = etAccount.Text.Trim(); |
| | | password = etPassword.Text.Trim(); |
| | | |
| | | if (loginType == 0) |
| | | { |
| | | if (!Utlis.CheckPhoneNumber(account, phoneZoneCode)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber), |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (!Utlis.CheckEmail(account)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress), |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | //创建登录线程 |
| | | var loginThread = LoadThread_Login(); |
| | | waitPage = new Loading(); |
| | | new PublicAssmebly().LoadPage_WaitPage(loginThread, bodyView, waitPage); |
| | | } |
| | | LoginEvent(); |
| | | }; |
| | | #region 当账号密码都输入时,才能点击登录按钮 |
| | | etAccount.TextChangeEventHandler = (sender, e) => |
| | |
| | | }; |
| | | #endregion |
| | | } |
| | | /// <summary> |
| | | /// 登录事件 |
| | | /// </summary> |
| | | void LoginEvent() |
| | | { |
| | | if (btnLogin.IsSelected) |
| | | { |
| | | //判断是否同意了隐私政策 |
| | | if (CheckPrivacyPolicy() == false) |
| | | { |
| | | Application.HideSoftInput(); |
| | | return; |
| | | } |
| | | account = etAccount.Text.Trim(); |
| | | password = etPassword.Text.Trim(); |
| | | |
| | | if (loginType == 0) |
| | | { |
| | | if (!Utlis.CheckPhoneNumber(account, phoneZoneCode)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber), |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (!Utlis.CheckEmail(account)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress), |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | //创建登录线程 |
| | | var loginThread = LoadThread_Login(); |
| | | waitPage = new Loading(); |
| | | new PublicAssmebly().LoadPage_WaitPage(loginThread, bodyView, waitPage); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 加载登录线程 |
| | | /// </summary> |