From 5b77d9d57a6cddb474a66ca54401ad5ab0892db3 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 23 十一月 2022 14:23:42 +0800 Subject: [PATCH] Merge branch 'dev--wxr' into LcSdkV1 --- HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 69 +++++++++++++++++++--------------- 1 files changed, 38 insertions(+), 31 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs index 910b0dd..cfdd23b 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs @@ -192,42 +192,49 @@ dispalyView.AddChidren(contentView); } - - - foreach (var home in UserInfo.Current.regionList) + int iii = 0; + //while(iii<20) { - var btnHomeName = new Button() + foreach (var home in UserInfo.Current.regionList) { - Width = Application.GetRealWidth(112), - Height = Application.GetRealHeight(40), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS.CSS_Color.FirstLevelTitleColor, - SelectedTextColor = CSS.CSS_Color.MainColor, - Text = home.homeName, - TextSize = home.homeName.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize, - IsSelected = DB_ResidenceData.Instance.CurrentRegion.id == home.id, - IsMoreLines = true, - Tag = home.id - }; - contentView.AddChidren(btnHomeName); - - if (UserInfo.Current.regionList.IndexOf(home) < UserInfo.Current.regionList.Count - 1) - { - contentView.AddChidren(new Button() + if (iii > 100) + { + break; + } + iii++; + var btnHomeName = new Button() { Width = Application.GetRealWidth(112), - Height = Application.GetRealHeight(1), - BackgroundColor = CSS.CSS_Color.BackgroundColor - }); - } + Height = Application.GetRealHeight(40), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS.CSS_Color.FirstLevelTitleColor, + SelectedTextColor = CSS.CSS_Color.MainColor, + Text = home.homeName, + TextSize = home.homeName.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize, + IsSelected = DB_ResidenceData.Instance.CurrentRegion.id == home.id, + IsMoreLines = true, + Tag = home.id + }; + contentView.AddChidren(btnHomeName); - btnHomeName.MouseUpEventHandler += (senderH, en) => - { - var regionId = (string)btnHomeName.Tag; - dialog.Close(); - LoadEvent_ChangeCurHome(home); - LoadContentView(); - }; + if (UserInfo.Current.regionList.IndexOf(home) < UserInfo.Current.regionList.Count - 1) + { + contentView.AddChidren(new Button() + { + Width = Application.GetRealWidth(112), + Height = Application.GetRealHeight(1), + BackgroundColor = CSS.CSS_Color.BackgroundColor + }); + } + + btnHomeName.MouseUpEventHandler += (senderH, en) => + { + var regionId = (string)btnHomeName.Tag; + dialog.Close(); + LoadEvent_ChangeCurHome(home); + LoadContentView(); + }; + } } dialog.Show(); }; -- Gitblit v1.8.0