From eb51679c618d5027070fbd6f3c0519f0f17e7d7d Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 23 十一月 2020 10:07:53 +0800 Subject: [PATCH] Merge branch 'CJL' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into CJL --- HDL_ON/UI/UI1-Login/LoginPage.cs | 157 +-------------------------------------------------- 1 files changed, 5 insertions(+), 152 deletions(-) diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index 9dbe678..b8f1b69 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -240,10 +240,8 @@ }; //璺宠浆鍥藉鍖哄彿閫夋嫨鐣岄潰 - EventHandler<MouseEventArgs> eHandler = (sender, e) => - { - JLCountrycode.CountryCodeView.Current.Show((countryName, code) => - { + EventHandler<MouseEventArgs> eHandler = (sender, e) => { + JLCountrycode.CountryCodeView.Current.Show((countryName, code) => { if (!string.IsNullOrEmpty(code)) { phoneZoneCode = code; @@ -462,7 +460,7 @@ LoadEventList(); account = etAccount.Text.Trim(); -#if DEBUG1211 + #if DEBUG1211 //鏈湴妯″紡 Button btnLocalMode = new Button() { @@ -478,159 +476,14 @@ btnLocalMode.MouseUpEventHandler = (sender, e) => { MainPage.LocalMode = true; - UserInfo.Current = new UserInfo(); + MainPage.LoginUser = new UserInfo(); MainPage.GoUserPage(); }; MainPage.Log("etAccount.TextAlignment : " + etAccount.TextAlignment.ToString()); -#endif - - #region 闅愮鏀跨瓥 - AddServiceAgreementControl(bodyView); - #endregion + #endif } - - #region 鈻� 鏈嶅姟鍗忚___________________________ - bool isAgreePrivacyPolicy = false; - /// <summary> - /// 娣诲姞鏈嶅姟鍗忚鎺т欢 - /// </summary> - /// <param name="frameBack"></param> - private void AddServiceAgreementControl(FrameLayout frameLayout) - { - isAgreePrivacyPolicy = UserInfo.Current.isAgreePrivacyPolicy; - var frameRow = new FrameLayout() - { - Height = Application.GetRealHeight(28), - Y = Application.GetRealHeight(628), - }; - frameLayout.AddChidren(frameRow); - - //鍚屾剰鎸夐挳鑳屾櫙 - var agreeView = new FrameLayout() - { - Height = Application.GetRealHeight(28), - Width = Application.GetRealWidth(28), - X = Application.GetRealWidth(82), - }; - frameRow.AddChidren(agreeView); - //鍚屾剰鍥炬爣鎸夐挳 - var agreeBtn = new Button() - { - Width = Application.GetMinRealAverage(28), - Height = Application.GetMinRealAverage(28), - UnSelectedImagePath = "Public/ChooseIcon.png", - SelectedImagePath = "Public/ChooseOnIcon.png", - IsSelected = isAgreePrivacyPolicy, - Gravity = Gravity.Center - }; - agreeView.AddChidren(agreeBtn); - - EventHandler<MouseEventArgs> eventHandler = (sender, e) => - { - isAgreePrivacyPolicy = !isAgreePrivacyPolicy; - agreeBtn.IsSelected = isAgreePrivacyPolicy; - UserInfo.Current.isAgreePrivacyPolicy = isAgreePrivacyPolicy; - UserInfo.Current.SaveUserInfo(); - }; - - agreeBtn.MouseUpEventHandler = eventHandler; - agreeView.MouseUpEventHandler = eventHandler; - - //int btnWidth = 0; - //鍚屾剰鏂囨湰 - var agreeTextBtn = new TextButton() - { - X = agreeView.Right, - Width = Application.GetRealWidth(28), - Height = Application.GetRealHeight(28), - TextColor = CSS_Color.TextualColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - TextID = StringId.Agree - }; - frameRow.AddChidren(agreeTextBtn); - agreeTextBtn.Width = Utlis.GetRealWidthByTextButton(agreeTextBtn); - - //鐢ㄦ埛鍗忚鎸夐挳 - var userAgreementBtn = new TextButton() - { - X = agreeTextBtn.Right, - Width = Application.GetRealWidth(28), - Height = Application.GetRealHeight(28), - TextColor = CSS_Color.MainColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = "銆�" + Language.StringByID(StringId.UserAgreement) + "銆�" - }; - frameRow.AddChidren(userAgreementBtn); - userAgreementBtn.Width = Utlis.GetRealWidthByTextButton(userAgreementBtn); - - //鍜屾枃鏈� - var andTextBtn = new TextButton() - { - X = userAgreementBtn.Right, - Width = Application.GetRealWidth(28), - Height = Application.GetRealHeight(28), - TextColor = CSS_Color.TextualColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - TextID = StringId.And - }; - frameRow.AddChidren(andTextBtn); - andTextBtn.Width = Utlis.GetRealWidthByTextButton(andTextBtn); - - //闅愮鏀跨瓥鎸夐挳 - var privacyPolicyBtn = new TextButton() - { - X = andTextBtn.Right, - Width = Application.GetRealWidth(28), - Height = Application.GetRealHeight(28), - TextColor = CSS_Color.MainColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = "銆�" + Language.StringByID(StringId.PrivacyPolicy) + "銆�" - }; - frameRow.AddChidren(privacyPolicyBtn); - privacyPolicyBtn.Width = Utlis.GetRealWidthByTextButton(privacyPolicyBtn); - - //鎵撳紑鐢ㄦ埛鍗忚 - userAgreementBtn.MouseUpEventHandler = (sender, e) => - { - OpenWebViewPage(false); - }; - - //鎵撳紑闅愮鏀跨瓥 - privacyPolicyBtn.MouseUpEventHandler = (sender, e) => - { - OpenWebViewPage(true); - }; - } - - /// <summary> - /// OpenWebViewPage - /// </summary> - /// <param name="isOpenPrivacyPolicy">鏄惁闅愮鏀跨瓥</param> - private void OpenWebViewPage(bool isOpenPrivacyPolicy) - { - string url = isAgreePrivacyPolicy ? Constant.URL_PrivacyPolicy : Constant.URL_UserAgreement; - string titleStr = isAgreePrivacyPolicy ? Language.StringByID(StringId.PrivacyPolicy) : Language.StringByID(StringId.UserAgreement); - new WebViewDialog().LoadPage(titleStr, url); - } - - /// <summary> - /// 妫�娴嬮殣绉佸崗璁� - /// </summary> - /// <returns></returns> - private bool CheckPrivacyPolicy() - { - if (isAgreePrivacyPolicy == false) - { - //璇峰悓鎰忋�婄敤鎴峰崗璁�嬪拰銆婇殣绉佹斂绛栥�� - Utlis.ShowTip(Language.StringByID(StringId.PleaseReadAndAgreePrivacyPolicyMsg)); - return false; - } - return true; - } - - #endregion } } \ No newline at end of file -- Gitblit v1.8.0