| | |
| | | using System; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.UI.CSS; |
| | |
| | | /// 0:手机 |
| | | /// 1:邮箱 |
| | | /// </summary> |
| | | int logintType = 0; |
| | | int loginType = 0; |
| | | /// <summary> |
| | | /// 登录方式 |
| | | /// 0:密码 |
| | | /// 1:验证码 |
| | | /// </summary> |
| | | int logintMode = 0; |
| | | string account; |
| | | string password; |
| | | string account = ""; |
| | | string password = ""; |
| | | #endregion |
| | | |
| | | #region 控件列表 |
| | |
| | | HttpServerRequest pm; |
| | | #endregion |
| | | |
| | | string verAccount = ""; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | string registerPhone; |
| | | string registerEmail; |
| | | |
| | | /// <summary> |
| | | /// 加载视图 |
| | | /// </summary> |
| | | public void LoadView(string account = "") |
| | | public void LoadView(UserInfo userInfo = null) |
| | | { |
| | | Language.CurrentLanguage = "Chinese"; |
| | | |
| | | var btnIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | |
| | | btnIcon.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | #if DEBUG |
| | | etAccount.Text = "464027401@qq.com"; |
| | | etAccount.Text = "464027401@qq.com"; //"2791308028@qq.com";// |
| | | etPassword.Text = "qqqqqq"; |
| | | btnLogin.IsSelected = true; |
| | | #endif |
| | |
| | | |
| | | btnEmailLogin = new Button() |
| | | { |
| | | X = btnPhoneLogin.Right, |
| | | X = btnPhoneLogin.Right + Application.GetRealWidth(20), |
| | | Y = Application.GetRealHeight(177), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealHeight(40), |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "+86", |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Enable = false, |
| | | }; |
| | | if (logintType == 0) |
| | | if (loginType == 0) |
| | | accountView.AddChidren(btnGlobalRoaming); |
| | | |
| | | btnDividingLineVertical_AccountView = new Button() |
| | |
| | | }; |
| | | accountView.AddChidren(etAccount); |
| | | |
| | | if (account != "") |
| | | if (userInfo != null) |
| | | { |
| | | etAccount.Text = account; |
| | | registerEmail = userInfo.userEmailInfo; |
| | | etAccount.Text = registerPhone = userInfo.userMobileInfo; |
| | | } |
| | | |
| | | btnAccountViewBottomLine = new Button() |
| | |
| | | }; |
| | | accountView.AddChidren(btnAccountViewBottomLine); |
| | | |
| | | |
| | | btnAccountIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(21), |
| | |
| | | Height = Application.GetMinRealAverage(20), |
| | | UnSelectedImagePath = "LoginIcon/AccountIcon.png", |
| | | }; |
| | | if (logintType == 1) |
| | | if (loginType == 1) |
| | | { |
| | | accountView.AddChidren(btnAccountIcon); |
| | | } |
| | |
| | | X = Application.GetRealWidth(219), |
| | | Width = Application.GetRealWidth(100), |
| | | TextID = StringId.GetVerificationCode, |
| | | TextColor = CSS_Color.MainColor, |
| | | SelectedTextColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | SelectedTextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | Visible = false, |
| | | IsSelected = false, |
| | | }; |
| | | passwordView.AddChidren(btnGetVerificationCode); |
| | | #endregion |
| | | |
| | | btnPasswordViewBottomLine = new Button() |
| | |
| | | passwordView.AddChidren(btnPasswordViewBottomLine); |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 注册与快捷登录 |
| | | btnRegister = new Button() |
| | |
| | | }; |
| | | bodyView.AddChidren(btnLogin); |
| | | |
| | | |
| | | LoadEventList(); |
| | | account = etAccount.Text.Trim(); |
| | | |
| | | #if DEBUG1211 |
| | | //本地模式 |
| | | Button btnLocalMode = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(600), |
| | | Height = Application.GetRealHeight(67), |
| | | Text = "Local Mode", |
| | | TextAlignment = TextAlignment.Center, |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextColor = CSS_Color.TextualColor, |
| | | }; |
| | | bodyView.AddChidren(btnLocalMode); |
| | | |
| | | btnLocalMode.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | MainPage.LocalMode = true; |
| | | MainPage.LoginUser = new UserInfo(); |
| | | MainPage.GoUserPage(); |
| | | }; |
| | | |
| | | MainPage.Log("etAccount.TextAlignment : " + etAccount.TextAlignment.ToString()); |
| | | |
| | | #endif |
| | | |
| | | } |
| | | } |
| | | } |