JLChen
2020-12-14 15978205aa7e4aeca8af3d3d34a80a85f0265f63
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -132,6 +132,7 @@
        /// 区域添加功能小区域文本
        /// </summary>
        Button btnResidenceAddFunctionText;
        /// <summary>
        /// 软件设置区域
        /// </summary>
@@ -187,7 +188,7 @@
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(94),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealHeight(5),
                Radius = (uint)Application.GetRealHeight(12),
                BorderColor = 0x00FFFFFF,
                BorderWidth = 0,
            };
@@ -200,13 +201,12 @@
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                Text = string.IsNullOrEmpty(MainPage.LoginUser.userName) ? "不愿意透露姓名的用户" : MainPage.LoginUser.userName
                Text = string.IsNullOrEmpty(UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName
            };
            personalInfoView.AddChidren(btnUserName);
            if (!string.IsNullOrEmpty(MainPage.LoginUser.userName))
            if (!string.IsNullOrEmpty( UserInfo.Current.userName))
            {
                btnUserName.Text = MainPage.LoginUser.userName;;
                btnUserName.Text =  UserInfo.Current.userName; ;
            }
            btnEmail = new Button()
            {
@@ -215,7 +215,7 @@
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = MainPage.LoginUser.accountString
                Text =  UserInfo.Current.AccountString
            };
            personalInfoView.AddChidren(btnEmail);
@@ -226,15 +226,15 @@
                Width = Application.GetMinRealAverage(84),
                Height = Application.GetMinRealAverage(84),
                Radius = (uint)Application.GetMinRealAverage(42),
                ImagePath = MainPage.LoginUser.headImagePagePath
                ImagePath =  UserInfo.Current.headImagePagePath
            };
            bodyView.AddChidren(userHeadImageView);
            //if ( MainPage.LoginUser.headImagePageBytes==null)
            //if (  UserInfo.Current.headImagePageBytes==null)
            //{
            //    userHeadImageView.ImagePath = MainPage.LoginUser.headImagePagePath;
            //    userHeadImageView.ImagePath =  UserInfo.Current.headImagePagePath;
            //}else
            //{
            //    userHeadImageView.ImageBytes = MainPage.LoginUser.headImagePageBytes;
            //    userHeadImageView.ImageBytes =  UserInfo.Current.headImagePageBytes;
            //}
            #endregion
@@ -245,9 +245,15 @@
                Height = Application.GetRealHeight(400),
            };
            bodyView.AddChidren(contentView);
            LoadContentView();
        }
        public void LoadContentView()
        {
            contentView.RemoveAll();
            #region 住宅信息区域
            if (!DB_ResidenceData.residenceData.residecenInfo.IsOthreShare)
            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
            {
                residenceInfoView = new FrameLayout()
                {
@@ -255,7 +261,7 @@
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(213),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                    Radius = (uint)Application.GetRealHeight(5),
                    Radius = (uint)Application.GetRealHeight(12),
                    BorderColor = 0x00FFFFFF,
                    BorderWidth = 0,
                };
@@ -269,7 +275,7 @@
                    Width = Application.GetRealWidth(343),
                    Height = Application.GetRealHeight(144),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                    Radius = (uint)Application.GetRealHeight(5),
                    Radius = (uint)Application.GetRealHeight(12),
                    BorderColor = 0x00FFFFFF,
                    BorderWidth = 0,
                };
@@ -296,7 +302,7 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
                Text = DB_ResidenceData.residenceData.residecenInfo.Name,
                Text = DB_ResidenceData.Instance.CurrentRegion.Name,
            };
            residenceInfoView.AddChidren(btnCurResidenceName);
@@ -316,7 +322,7 @@
                Y = Application.GetRealHeight(15),
                Width = Application.GetMinRealAverage(20),
                Height = Application.GetMinRealAverage(20),
                UnSelectedImagePath = DB_ResidenceData.residenceData.residecenInfo.IsOthreShare
                UnSelectedImagePath = DB_ResidenceData.Instance.CurrentRegion.IsOthreShare
                                    == false ? "PersonalCenter/AdminTypeIcon.png" : "PersonalCenter/MemberTypeIcon.png",
            };
            userTypeView.AddChidren(btnUserTypeIcon);
@@ -329,13 +335,13 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextID = DB_ResidenceData.residenceData.residecenInfo.IsOthreShare
                TextID = DB_ResidenceData.Instance.CurrentRegion.IsOthreShare
                        == false ? StringId.Administrators : StringId.Member
            };
            userTypeView.AddChidren(btnUserTypeName);
            #endregion
            #region 住宅管理
            if (!DB_ResidenceData.residenceData.residecenInfo.IsOthreShare)
            if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
            {
                #region ---住宅管理区域
                residenceManageView = new FrameLayout()
@@ -368,6 +374,7 @@
                };
                residenceManageView.AddChidren(btnResidenceManageText);
                #endregion
                #region ---成员区域
                residenceMemberView = new FrameLayout()
                {
@@ -615,7 +622,6 @@
            #endregion
            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
            #region 软件设置区域
            softSettingView = new FrameLayout()
            {
@@ -623,7 +629,7 @@
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(88),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealHeight(5),
                Radius = (uint)Application.GetRealHeight(12),
                BorderColor = 0x00FFFFFF,
                BorderWidth = 0,
            };
@@ -643,7 +649,7 @@
            {
                X = Application.GetRealWidth(48),
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(44),
                Height = Application.GetRealWidth(44),
                TextID = StringId.NightView,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
@@ -673,7 +679,7 @@
            Button btnGeneralSettingsIcon = new Button()
            {
                X = Application.GetRealWidth(12),
                Y = Application.GetRealHeight(54),
                Y = Application.GetRealWidth(54),
                Width = Application.GetMinRealAverage(24),
                Height = Application.GetMinRealAverage(24),
                UnSelectedImagePath = "PersonalCenter/GeneralSettingsIcon.png",
@@ -685,7 +691,7 @@
                X = Application.GetRealWidth(48),
                Y = btnSoftSettingViewLine.Bottom,
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(44),
                Height = Application.GetRealWidth(44),
                TextID = StringId.GeneralSettings,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
@@ -703,7 +709,6 @@
            };
            softSettingView.AddChidren(btnGeneralSettingsRight);
            #endregion
            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
            #region 获取支持
            supportView = new FrameLayout()
@@ -712,7 +717,7 @@
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealWidth(88),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealHeight(5),
                Radius = (uint)Application.GetRealHeight(12),
                BorderColor = 0x00FFFFFF,
                BorderWidth = 0,
            };
@@ -732,7 +737,7 @@
            {
                X = Application.GetRealWidth(48),
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(44),
                Height = Application.GetRealWidth(44),
                TextID = StringId.GetSupport,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
@@ -754,7 +759,7 @@
            var btnSupportViewLine = new Button()
            {
                X = Application.GetRealWidth(48),
                Y = btnNightViewModeText.Bottom,
                Y = btnSupportText.Bottom,
                Height = Application.GetRealHeight(1),
                BackgroundColor = CSS_Color.DividingLineColor
            };
@@ -763,7 +768,7 @@
            Button btnAboutOnIcon = new Button()
            {
                X = Application.GetRealWidth(12),
                Y = Application.GetRealHeight(54),
                Y = Application.GetRealWidth(54),
                Width = Application.GetMinRealAverage(24),
                Height = Application.GetMinRealAverage(24),
                UnSelectedImagePath = "PersonalCenter/InfoOnIcon.png",
@@ -773,9 +778,9 @@
            btnAboutOnText = new Button()
            {
                X = Application.GetRealWidth(48),
                Y = btnSoftSettingViewLine.Bottom,
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(44),
                Y = btnSupportViewLine.Bottom,
                Width = Application.GetRealWidth(370),
                Height = Application.GetRealWidth(44),
                TextID = StringId.AboutOn,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
@@ -801,4 +806,4 @@
            LoadEventList();
        }
    }
}
}