From 4cc04639fbadde3a7f3b9875353df0d90fc09043 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期六, 18 一月 2020 14:33:40 +0800 Subject: [PATCH] 节前备份 --- HDL_ON/UI/UI2/4-PersonalCenter/BLL/PersonalCenterPageBLL.cs | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 100 insertions(+), 1 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/BLL/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/BLL/PersonalCenterPageBLL.cs index 9924a8e..56aed70 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/BLL/PersonalCenterPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/BLL/PersonalCenterPageBLL.cs @@ -1,7 +1,106 @@ 锘縰sing System; -namespace HDL_ON.UI2 +using Shared; + +namespace HDL_ON.UI { public partial class PersonalCenterPage { + /// <summary> + /// 鍔犺浇浜嬩欢鍒楄〃 + /// </summary> + void LoadEventList() + { + LoadEvent_SwitchHome(); + LoadEvent_GoPersonalDataPage(); + } + + + #region 鍒囨崲浣忓畢 + /// <summary> + /// 浣忓畢鍒楄〃鐐瑰嚮浜嬩欢 + /// </summary> + void LoadEvent_SwitchHome() + { + btnCurResidenceName.MouseUpEventHandler += (sender, e) => { + var dialog = new Dialog(); + var dialogBody = new FrameLayout(); + dialog.AddChidren(dialogBody); + dialogBody.MouseUpEventHandler += (sender1, e1) => { + dialog.Close(); + }; + + var dispalyView = new FrameLayout() + { + X = Application.GetRealWidth(22), + Y = Application.GetRealHeight(268), + Width = Application.GetRealWidth(160), + Height = Application.GetRealHeight(190), + BackgroundImagePath = "PersonalCenter/HomeListbg.png", + }; + dialogBody.AddChidren(dispalyView); + + var contentView = new VerticalScrolViewLayout() { + X = Application.GetRealWidth(8), + Y = Application.GetRealHeight(16), + Width = Application.GetRealWidth(144), + Height = Application.GetRealHeight(45*4), + }; + dispalyView.AddChidren(contentView); + + foreach(var home in MainPage.LoginUser.HomeLists) + { + var btnHomeName = new Button() + { + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(112), + Height = Application.GetRealHeight(44), + TextAlignment = TextAlignment.CenterLeft, + TextColor = UI.CSS.CSS_Color.MainBackgroundColor, + SelectedTextColor = UI.CSS.CSS_Color.MainColor, + Text = home.Name, + TextSize = UI.CSS.CSS_FontSize.SubheadingFontSize, + IsSelected = UserConfig.Instance.CurrentRegion.RegionID == home.RegionID, + IsMoreLines = true, + Tag = home + }; + contentView.AddChidren(btnHomeName); + var btnContentLine = new Button() + { + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(112), + Height = Application.GetRealHeight(1), + BackgroundColor = UI.CSS.CSS_Color.SecondLevelTitleColor + }; + contentView.AddChidren(btnContentLine); + + btnHomeName.MouseUpEventHandler += (senderH, en) => + { + var regionInfo = btnHomeName.Tag as RegionInfoRes; + dialog.Close(); + + UserConfig.Instance.CurrentRegion = regionInfo; + btnCurResidenceName.Text = regionInfo.Name; + UserConfig.Instance.SaveUserConfig(); + }; + } + + dialog.Show(); + }; + } + + #endregion + + + #region 涓汉涓績 + void LoadEvent_GoPersonalDataPage() + { + btnUserHeadPortrait.MouseUpEventHandler += (sender, e) => { + var personalDataView = new PersonalDataPage(); + MainPage.BasePageView.AddChidren(personalDataView); + personalDataView.LoadView(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + } + #endregion } } -- Gitblit v1.8.0