wxr
2020-06-16 f6fd8acd7c53c44187e70b4709443318a628f4b5
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -1,7 +1,6 @@
using System;
using Shared;
using Shared;
using HDL_ON.UI.CSS;
using HDL_ON.UI;
using HDL_ON.Entity;
namespace HDL_ON.UI
{
@@ -32,7 +31,7 @@
        /// <summary>
        /// 用户头像
        /// </summary>
        Button btnUserHeadPortrait;
        ImageView userHeadImageView;
        /// <summary>
        /// 住宅信息区域
        /// </summary>
@@ -54,7 +53,7 @@
        /// </summary>
        Button btnUserTypeIcon;
        /// <summary>
        /// 用户类型图标
        /// 用户类型名称
        /// </summary>
        Button btnUserTypeName;
        /// <summary>
@@ -93,18 +92,18 @@
        /// 区域安放小区域文本
        /// </summary>
        Button btnResidenceArmText;
        /// <summary>
        /// 区域数据备份小区域
        /// </summary>
        FrameLayout residenceDataBackupView;
        /// <summary>
        /// 区域数据备份小区域图标
        /// </summary>
        Button btnResidenceDataBackupIcon;
        /// <summary>
        /// 区域数据备份小区域文本
        /// </summary>
        Button btnResidenceDataBackupText;
        ///// <summary>
        ///// 区域数据备份小区域
        ///// </summary>
        //FrameLayout residenceDataBackupView;
        ///// <summary>
        ///// 区域数据备份小区域图标
        ///// </summary>
        //Button btnResidenceDataBackupIcon;
        ///// <summary>
        ///// 区域数据备份小区域文本
        ///// </summary>
        //Button btnResidenceDataBackupText;
        /// <summary>
        /// 区域辅助功能小区域
        /// </summary>
@@ -206,12 +205,13 @@
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                Text = string.IsNullOrEmpty(MainPage.LoginUser.UserName) ? "不愿意透露姓名的用户" : MainPage.LoginUser.UserName
                Text = string.IsNullOrEmpty(MainPage.LoginUser.userName) ? "不愿意透露姓名的用户" : MainPage.LoginUser.userName
            };
            personalInfoView.AddChidren(btnUserName);
            if (!string.IsNullOrEmpty(MainPage.LoginUser.UserName))
            if (!string.IsNullOrEmpty(MainPage.LoginUser.userName))
            {
                btnUserName.Text = MainPage.LoginUser.UserName;
                btnUserName.Text = MainPage.LoginUser.userName;;
            }
            btnEmail = new Button()
            {
@@ -220,25 +220,32 @@
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = MainPage.LoginUser.AccountString
                Text = MainPage.LoginUser.accountString
            };
            personalInfoView.AddChidren(btnEmail);
            btnUserHeadPortrait = new Button()
            userHeadImageView = new ImageView()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(51),
                Width = Application.GetMinRealAverage(84),
                Height = Application.GetMinRealAverage(84),
                Radius = (uint)Application.GetMinRealAverage(42),
                UnSelectedImagePath = "LoginIcon/2.png"
                ImagePath = MainPage.LoginUser.headImagePagePath
            };
            bodyView.AddChidren(btnUserHeadPortrait);
            bodyView.AddChidren(userHeadImageView);
            //if ( MainPage.LoginUser.headImagePageBytes==null)
            //{
            //    userHeadImageView.ImagePath = MainPage.LoginUser.headImagePagePath;
            //}else
            //{
            //    userHeadImageView.ImageBytes = MainPage.LoginUser.headImagePageBytes;
            //}
            #endregion
            #region 住宅信息区域
            if (MainPage.LoginUser.AccountType == 0)
            if (!DB_ResidenceData.residenceData.residecenInfo.IsOthreShare)
            {
                residenceInfoView = new FrameLayout()
                {
@@ -289,10 +296,9 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
                Text = UserConfig.Instance.CurrentRegion.Name,
                Text = DB_ResidenceData.residenceData.residecenInfo.Name,
            };
            residenceInfoView.AddChidren(btnCurResidenceName);
            userTypeView = new FrameLayout()
            {
@@ -310,7 +316,8 @@
                Y = Application.GetRealHeight(15),
                Width = Application.GetMinRealAverage(20),
                Height = Application.GetMinRealAverage(20),
                UnSelectedImagePath = MainPage.LoginUser.AccountType == 0 ? "PersonalCenter/AdminTypeIcon.png" : "PersonalCenter/MemberTypeIcon.png",
                UnSelectedImagePath = DB_ResidenceData.residenceData.residecenInfo.IsOthreShare
                                    == false ? "PersonalCenter/AdminTypeIcon.png" : "PersonalCenter/MemberTypeIcon.png",
            };
            userTypeView.AddChidren(btnUserTypeIcon);
@@ -322,12 +329,13 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = MainPage.LoginUser.AccountType == 0 ? "管理员" : "成员"
                Text = DB_ResidenceData.residenceData.residecenInfo.IsOthreShare
                        == false ? "管理员" : "成员"
            };
            userTypeView.AddChidren(btnUserTypeName);
            #endregion
            #region 住宅管理
            if (MainPage.LoginUser.AccountType == 0)
            if (!DB_ResidenceData.residenceData.residecenInfo.IsOthreShare)
            {
                #region ---住宅管理区域
                residenceManageView = new FrameLayout()
@@ -420,39 +428,40 @@
                residenceArmView.AddChidren(btnResidenceArmText);
                #endregion
                #region ---数据备份区域
                residenceDataBackupView = new FrameLayout()
                {
                    X = Application.GetRealWidth(28 - 24),
                    Y = residenceManageView.Bottom,
                    Width = Application.GetRealWidth(64 + 48),
                    Height = Application.GetRealWidth(64),
                };
                residenceInfoView.AddChidren(residenceDataBackupView);
                btnResidenceDataBackupIcon = new Button
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = Application.GetRealHeight(5),
                    Width = Application.GetMinRealAverage(30),
                    Height = Application.GetMinRealAverage(30),
                    UnSelectedImagePath = "PersonalCenter/ResidenceDataBackupIcon.png",
                };
                residenceDataBackupView.AddChidren(btnResidenceDataBackupIcon);
                btnResidenceDataBackupText = new Button()
                {
                    Y = btnResidenceManageIcon.Bottom,
                    Height = Application.GetRealHeight(29),
                    TextID = StringId.DataBackup,
                    TextAlignment = TextAlignment.Center,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                };
                residenceDataBackupView.AddChidren(btnResidenceDataBackupText);
                //residenceDataBackupView = new FrameLayout()
                //{
                //    X = Application.GetRealWidth(28 - 24),
                //    Y = residenceManageView.Bottom,
                //    Width = Application.GetRealWidth(64 + 48),
                //    Height = Application.GetRealWidth(64),
                //};
                //residenceInfoView.AddChidren(residenceDataBackupView);
                //btnResidenceDataBackupIcon = new Button
                //{
                //    Gravity = Gravity.CenterHorizontal,
                //    Y = Application.GetRealHeight(5),
                //    Width = Application.GetMinRealAverage(30),
                //    Height = Application.GetMinRealAverage(30),
                //    UnSelectedImagePath = "PersonalCenter/ResidenceDataBackupIcon.png",
                //};
                //residenceDataBackupView.AddChidren(btnResidenceDataBackupIcon);
                //btnResidenceDataBackupText = new Button()
                //{
                //    Y = btnResidenceManageIcon.Bottom,
                //    Height = Application.GetRealHeight(29),
                //    TextID = StringId.DataBackup,
                //    TextAlignment = TextAlignment.Center,
                //    TextColor = CSS_Color.FirstLevelTitleColor,
                //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                //};
                //residenceDataBackupView.AddChidren(btnResidenceDataBackupText);
                #endregion
                #region ---辅助功能区域
                residenceAuxiliaryFunctionView = new FrameLayout()
                {
                    X = residenceDataBackupView.Right,
                    X = Application.GetRealWidth(28 - 24),
                    //X = residenceDataBackupView.Right,
                    Y = residenceManageView.Bottom,
                    Width = Application.GetRealWidth(64 + 48),
                    Height = Application.GetRealWidth(64),
@@ -541,39 +550,39 @@
                residenceArmView.AddChidren(btnResidenceArmText);
                #endregion
                #region ---数据备份区域
                residenceDataBackupView = new FrameLayout()
                {
                    X = residenceArmView.Right,
                    Y = Application.GetRealHeight(68),
                    Width = Application.GetRealWidth(64 + 48),
                    Height = Application.GetRealWidth(64),
                };
                residenceInfoView.AddChidren(residenceDataBackupView);
                btnResidenceDataBackupIcon = new Button
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = Application.GetRealHeight(5),
                    Width = Application.GetMinRealAverage(30),
                    Height = Application.GetMinRealAverage(30),
                    UnSelectedImagePath = "PersonalCenter/ResidenceDataBackupIcon.png",
                };
                residenceDataBackupView.AddChidren(btnResidenceDataBackupIcon);
                btnResidenceDataBackupText = new Button()
                {
                    Y = btnResidenceDataBackupIcon.Bottom,
                    Height = Application.GetRealHeight(29),
                    TextID = StringId.DataBackup,
                    TextAlignment = TextAlignment.Center,
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                };
                residenceDataBackupView.AddChidren(btnResidenceDataBackupText);
                //residenceDataBackupView = new FrameLayout()
                //{
                //    X = residenceArmView.Right,
                //    Y = Application.GetRealHeight(68),
                //    Width = Application.GetRealWidth(64 + 48),
                //    Height = Application.GetRealWidth(64),
                //};
                //residenceInfoView.AddChidren(residenceDataBackupView);
                //btnResidenceDataBackupIcon = new Button
                //{
                //    Gravity = Gravity.CenterHorizontal,
                //    Y = Application.GetRealHeight(5),
                //    Width = Application.GetMinRealAverage(30),
                //    Height = Application.GetMinRealAverage(30),
                //    UnSelectedImagePath = "PersonalCenter/ResidenceDataBackupIcon.png",
                //};
                //residenceDataBackupView.AddChidren(btnResidenceDataBackupIcon);
                //btnResidenceDataBackupText = new Button()
                //{
                //    Y = btnResidenceDataBackupIcon.Bottom,
                //    Height = Application.GetRealHeight(29),
                //    TextID = StringId.DataBackup,
                //    TextAlignment = TextAlignment.Center,
                //    TextColor = CSS_Color.FirstLevelTitleColor,
                //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel
                //};
                //residenceDataBackupView.AddChidren(btnResidenceDataBackupText);
                #endregion
                #region ---辅助功能区域
                residenceAuxiliaryFunctionView = new FrameLayout()
                {
                    X = residenceDataBackupView.Right,
                    X = residenceArmView.Right,
                    Y = Application.GetRealHeight(68),
                    Width = Application.GetRealWidth(64 + 48),
                    Height = Application.GetRealWidth(64),