From f6fd8acd7c53c44187e70b4709443318a628f4b5 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 16 六月 2020 13:12:33 +0800
Subject: [PATCH] 2020-06-016
---
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 192 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 157 insertions(+), 35 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
index daabf42..0df87a0 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -1,10 +1,13 @@
锘縰sing System;
+using HDL_ON.Entity;
using Shared;
namespace HDL_ON.UI
{
public partial class PersonalCenterPage
{
+
+
/// <summary>
/// 鍔犺浇浜嬩欢鍒楄〃
/// </summary>
@@ -12,11 +15,15 @@
{
LoadEvent_SwitchHome();
LoadEvent_GoPersonalDataPage();
- LoadEvent_SkipResdentialManagePage();
-
-
+ if (!DB_ResidenceData.residenceData.residecenInfo.IsOthreShare)
+ {
+ LoadEvent_SkipResdentialManagePage();
+ }
+ if (!DB_ResidenceData.residenceData.residecenInfo.IsOthreShare)
+ {
+ LoadEvent_GoMemberManagement();
+ }
}
-
#region 鍒囨崲浣忓畢
/// <summary>
@@ -24,6 +31,79 @@
/// </summary>
void LoadEvent_SwitchHome()
{
+#if DEBUG
+ btnUserTypeName.MouseUpEventHandler = (sender, e) =>
+ {
+ var pm = new HDL_ON.DAL.Server.HttpServerRequest();
+ var iddd = pm.GetRegionLastBackupId();
+ Dialog dialog = new Dialog();
+
+ FrameLayout bodyView = new FrameLayout();
+ dialog.AddChidren(bodyView);
+ bodyView.MouseUpEventHandler = (sender3, e3) => {
+ dialog.Close();
+ };
+
+ FrameLayout frame = new FrameLayout()
+ {
+ Gravity = Gravity.Center,
+ Width = Application.GetRealWidth(280),
+ Height =Application.GetRealHeight(300),
+ BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
+ Radius = (uint)Application.GetRealWidth(16),
+ };
+ dialog.AddChidren(frame);
+
+ Button btnTitleDialog = new Button()
+ {
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ Text = "鏁版嵁鎭㈠",
+ TextSize = CSS.CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS.CSS_Color.SecondLevelTitleColor,
+ BackgroundColor = CSS.CSS_Color.PromptingColor2,
+ };
+ frame.AddChidren(btnTitleDialog);
+
+ VerticalScrolViewLayout view = new VerticalScrolViewLayout()
+ {
+ Y = Application.GetRealHeight(60),
+ Height = Application.GetRealHeight(240),
+ };
+ frame.AddChidren(view);
+
+ foreach(var dd in iddd)
+ {
+ Button btn = new Button()
+ {
+ Height = Application.GetRealHeight(50),
+ TextAlignment = TextAlignment.Center,
+ TextSize = CSS.CSS_FontSize.TextFontSize,
+ TextColor = CSS.CSS_Color.TextualColor,
+ Text = dd.Value,
+ };
+ view.AddChidren(btn);
+
+ btn.MouseUpEventHandler = (sender1, e1) =>
+ {
+ dialog.Close();
+ pm.GetBackupFileList(dd.Key);
+ };
+
+ view.AddChidren(new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Height = Application.GetRealHeight(1),
+ BackgroundColor = CSS.CSS_Color.BackgroundColor
+ });
+ }
+
+ dialog.Show();
+
+ };
+#endif
+
+
btnCurResidenceName.MouseUpEventHandler += (sender, e) => {
var dialog = new Dialog();
var dialogBody = new FrameLayout();
@@ -37,20 +117,20 @@
X = Application.GetRealWidth(22),
Y = Application.GetRealHeight(268),
Width = Application.GetRealWidth(160),
- Height = Application.GetRealHeight(190),
+ Height = Application.GetRealHeight(198),
BackgroundImagePath = "PersonalCenter/HomeListbg.png",
};
dialogBody.AddChidren(dispalyView);
var contentView = new VerticalScrolViewLayout() {
X = Application.GetRealWidth(8),
- Y = Application.GetRealHeight(16),
- Width = Application.GetRealWidth(144),
+ Y = Application.GetRealHeight(15),
+ Width = Application.GetRealWidth(150),
Height = Application.GetRealHeight(45*4),
};
dispalyView.AddChidren(contentView);
- foreach(var home in MainPage.LoginUser.HomeLists)
+ foreach(var home in MainPage.LoginUser.regionList)
{
var btnHomeName = new Button()
{
@@ -58,32 +138,36 @@
Width = Application.GetRealWidth(112),
Height = Application.GetRealHeight(44),
TextAlignment = TextAlignment.CenterLeft,
- TextColor = UI.CSS.CSS_Color.MainBackgroundColor,
- SelectedTextColor = UI.CSS.CSS_Color.MainColor,
+ TextColor = CSS.CSS_Color.FirstLevelTitleColor,
+ SelectedTextColor = CSS.CSS_Color.MainColor,
Text = home.Name,
- TextSize = UI.CSS.CSS_FontSize.SubheadingFontSize,
- IsSelected = UserConfig.Instance.CurrentRegion.RegionID == home.RegionID,
+ TextSize = home.Name.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize,
+ IsSelected = DB_ResidenceData.residenceData.residecenInfo.RegionID == home.RegionID,
IsMoreLines = true,
- Tag = home
+ Tag = home.RegionID
};
contentView.AddChidren(btnHomeName);
- var btnContentLine = new Button()
+ //if(btnHomeName)
+
+ if (MainPage.LoginUser.regionList.IndexOf(home) < MainPage.LoginUser.regionList.Count - 1)
{
- Gravity = Gravity.CenterHorizontal,
- Width = Application.GetRealWidth(112),
- Height = Application.GetRealHeight(1),
- BackgroundColor = UI.CSS.CSS_Color.SecondLevelTitleColor
- };
- contentView.AddChidren(btnContentLine);
+ contentView.AddChidren(new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(112),
+ Height = Application.GetRealHeight(1),
+ BackgroundColor = CSS.CSS_Color.BackgroundColor
+ });
+ }
btnHomeName.MouseUpEventHandler += (senderH, en) =>
{
- var regionInfo = btnHomeName.Tag as RegionInfoRes;
+ var regionId = (string)btnHomeName.Tag;
dialog.Close();
- UserConfig.Instance.CurrentRegion = regionInfo;
- btnCurResidenceName.Text = regionInfo.Name;
- UserConfig.Instance.SaveUserConfig();
+ DB_ResidenceData.residenceData.CurReginID = regionId;
+ btnCurResidenceName.Text = DB_ResidenceData.residenceData.residecenInfo.Name;
+ OnAppConfig.Instance.SaveUserConfig();
};
}
@@ -96,28 +180,66 @@
#region 浣忓畢绠$悊
void LoadEvent_SkipResdentialManagePage()
{
- EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
- var residentialManagePage = new ResidentialManagePage();
- MainPage.BasePageView.AddChidren(residentialManagePage);
- residentialManagePage.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- };
- btnResidenceManageIcon.MouseUpEventHandler = eventHandler;
- btnResidenceManageText.MouseUpEventHandler = eventHandler;
+ if (!DB_ResidenceData.residenceData.residecenInfo.IsOthreShare)
+ {
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ {
+ Action updateResidenceName = () => {
+ btnCurResidenceName.Text = DB_ResidenceData.residenceData.residecenInfo.Name;
+ };
+ var residentialManagePage = new ResidentialManagePage(updateResidenceName);
+ MainPage.BasePageView.AddChidren(residentialManagePage);
+ residentialManagePage.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ btnResidenceManageIcon.MouseUpEventHandler = eventHandler;
+ btnResidenceManageText.MouseUpEventHandler = eventHandler;
+ }
}
-
#endregion
#region 涓汉涓績
void LoadEvent_GoPersonalDataPage()
{
- btnUserHeadPortrait.MouseUpEventHandler += (sender, e) => {
- var personalDataView = new PersonalDataPage();
+ userHeadImageView.MouseUpEventHandler += (sender, e) => {
+ Action updataHeadImage = () => {
+ userHeadImageView.ImagePath = MainPage.LoginUser.headImagePagePath;
+ };
+ Action updataUserName = () => {
+ btnUserName.Text = MainPage.LoginUser.userName;
+ };
+
+ var personalDataView = new PersonalDataPage(updataHeadImage,updataUserName);
MainPage.BasePageView.AddChidren(personalDataView);
personalDataView.LoadView();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
}
#endregion
+
+ #region 鎴愬憳绠$悊
+ void LoadEvent_GoMemberManagement()
+ {
+
+ EventHandler<MouseEventArgs> eHandler = (sender, e) => {
+ //};
+ //residenceMemberView.MouseUpEventHandler = (sender, e) => {
+ //Action updataHeadImage = () => {
+ // userHeadImageView.ImagePath = MainPage.LoginUser.headImagePagePath;
+ //};
+ //Action updataUserName = () => {
+ // btnUserName.Text = MainPage.LoginUser.userName;
+ //};
+
+ var mmp = new MemberManagementPage();
+ MainPage.BasePageView.AddChidren(mmp);
+ mmp.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ btnResidenceMemberIcon.MouseUpEventHandler = eHandler;
+ btnResidenceMemberText.MouseUpEventHandler = eHandler;
+ }
+
+ #endregion
}
}
--
Gitblit v1.8.0