From ed3bfb7462d44747230437717e8673a5192f833f Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 30 十一月 2020 20:34:51 +0800
Subject: [PATCH] 2020-11-30-2

---
 HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs |   97 ++++++------------------------------------------
 1 files changed, 13 insertions(+), 84 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
index 1b00994..57dd341 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -13,11 +13,6 @@
         /// </summary>
         FrameLayout bodyView;
         /// <summary>
-        /// 褰撳墠
-        /// </summary>
-        VerticalScrolViewLayout bodyScrolView;
-
-        /// <summary>
         /// 澶村儚鍖哄煙
         /// </summary>
         FrameLayout headPortraitView;
@@ -176,7 +171,7 @@
         /// </summary>
         Action updataUserName;
 
-        public PersonalDataPage(Action upHeadImage, Action upUserName)
+        public PersonalDataPage(Action upHeadImage,Action upUserName)
         {
             updataHeadImage = upHeadImage;
             updataUserName = upUserName;
@@ -188,27 +183,13 @@
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
             new TopViewDiv(bodyView, Language.StringByID(StringId.PersonalCenter)).LoadTopView();
 
-            bodyScrolView = new VerticalScrolViewLayout()
-            {
-                Y = Application.GetRealHeight(64),
-                VerticalScrollBarEnabled = false,
-                Height = Application.GetRealHeight(551),
-            };
-            bodyView.AddChidren(bodyScrolView);
-
-            if (MainPage.Increase)
-            {
-                bodyScrolView.Height = Application.GetRealHeight(541);
-            }
-
             headPortraitView = new FrameLayout()
             {
-                //Y = Application.GetRealHeight(64),
+                Y = Application.GetRealHeight(64),
                 Height = Application.GetRealHeight(124),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
             };
-
-            bodyScrolView.AddChidren(headPortraitView);
+            bodyView.AddChidren(headPortraitView);
 
             userHeadImageView = new ImageView()
             {
@@ -216,28 +197,22 @@
                 Width = Application.GetMinRealAverage(84),
                 Height = Application.GetMinRealAverage(84),
                 Radius = (uint)Application.GetMinRealAverage(42),
-                ImagePath = UserInfo.Current.headImagePagePath,
+                ImagePath = MainPage.LoginUser.headImagePagePath,
             };
             headPortraitView.AddChidren(userHeadImageView);
 
             #region 涓汉淇℃伅閫夐」鍖哄煙
-            var topPaddingView = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(8)
-            };
-            bodyScrolView.AddChidren(topPaddingView);
-
             /// <summary>
             /// 涓汉淇℃伅閫夐」鍖哄煙
             /// </summary>
             optionListView = new VerticalScrolViewLayout()
             {
-                //Y = headPortraitView.Bottom + Application.GetRealHeight(8),
+                Y = headPortraitView.Bottom + Application.GetRealHeight(8),
                 Height = Application.GetRealHeight(51 * 6),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
                 ScrollEnabled = false,
             };
-            bodyScrolView.AddChidren(optionListView);
+            bodyView.AddChidren(optionListView);
             #region 涓汉閫夐」-鍚嶅瓧鍖哄煙
             /// <summary>
             /// 涓汉閫夐」-鍚嶅瓧鍖哄煙
@@ -270,7 +245,7 @@
                 TextAlignment = TextAlignment.CenterRight,
                 TextColor = CSS_Color.PromptingColor1,
                 TextSize = CSS_FontSize.TextFontSize,
-                Text = string.IsNullOrEmpty(UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName
+                Text = string.IsNullOrEmpty(MainPage.LoginUser.userName) ? "涓嶆効鎰忛�忛湶濮撳悕鐨勭敤鎴�" : MainPage.LoginUser.userName
             };
             userNameView.AddChidren(btnUserName);
             /// <summary>
@@ -367,7 +342,7 @@
                 TextAlignment = TextAlignment.CenterRight,
                 TextColor = CSS_Color.PromptingColor1,
                 TextSize = CSS_FontSize.TextFontSize,
-                Text = GetBindAccountText(UserInfo.Current.userEmailInfo)
+                Text = string.IsNullOrEmpty(MainPage.LoginUser.userEmailInfo) ? Language.StringByID(StringId.Unbound) : MainPage.LoginUser.userEmailInfo
             };
             userEmailInfoView.AddChidren(btnUserEmailInfo);
             /// <summary>
@@ -416,7 +391,7 @@
                 TextAlignment = TextAlignment.CenterRight,
                 TextColor = CSS_Color.PromptingColor1,
                 TextSize = CSS_FontSize.TextFontSize,
-                Text = GetBindAccountText(UserInfo.Current.userMobileInfo)
+                Text = string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) ? Language.StringByID(StringId.Unbound) : MainPage.LoginUser.userMobileInfo
             };
             userPhoneInfoView.AddChidren(btnUserPhoneInfo);
             /// <summary>
@@ -502,21 +477,16 @@
             #endregion
 
             #region 瑙i攣璁剧疆鍖哄煙
-            var topPaddingView2 = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(8)
-            };
-            bodyScrolView.AddChidren(topPaddingView2);
             /// <summary>
             /// 瑙i攣璁剧疆鍖哄煙
             /// </summary>
             interpretationSettingsView = new FrameLayout()
             {
-                //Y = optionListView.Bottom + Application.GetRealHeight(8),
+                Y = optionListView.Bottom + Application.GetRealHeight(8),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
-                Height = Application.GetRealHeight(66),
+                Height = Application.GetRealHeight(65),
             };
-            bodyScrolView.AddChidren(interpretationSettingsView);
+            bodyView.AddChidren(interpretationSettingsView);
             btnInterpretationSettingsTitle = new Button()
             {
                 X = Application.GetRealWidth(16),
@@ -527,7 +497,6 @@
                 TextID = StringId.InterpretationSettings,
             };
             interpretationSettingsView.AddChidren(btnInterpretationSettingsTitle);
-
             btnInterpretationSettingsTip = new Button()
             {
                 X = Application.GetRealWidth(16),
@@ -549,26 +518,6 @@
                 UnSelectedImagePath = "Public/Right.png",
             };
             interpretationSettingsView.AddChidren(btnInterpretationSettingsRight);
-            interpretationSettingsView.AddChidren(new LineView(interpretationSettingsView.Height));
-            #endregion
-
-            #region 鏈嶅姟鍣ㄤ俊鎭�
-            ListCellView myServerInfoCellView = new ListCellView()
-            {
-            };
-            bodyScrolView.AddChidren(myServerInfoCellView);
-            //璺宠浆鏈嶅姟鍣ㄤ俊鎭�
-            Action selectAction = () =>
-            {
-                var myServerInfoPage = new MyServerInfoPage();
-                MainPage.BasePageView.AddChidren(myServerInfoPage);
-                myServerInfoPage.LoadPage();
-                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-            };
-            myServerInfoCellView.goAction = selectAction;
-            myServerInfoCellView.btnTilte.Text = Language.StringByID(StringId.ServerInformation);
-            myServerInfoCellView.lineView.RemoveFromParent();
-
             #endregion
 
             btnLogout = new Button()
@@ -583,7 +532,7 @@
             };
             bodyView.AddChidren(btnLogout);
 
-            if (MainPage.Increase)
+            if(MainPage.Increase)
             {
                 btnLogout.Y = Application.GetRealHeight(613);
                 btnLogout.Height = Application.GetRealHeight(50);
@@ -591,7 +540,6 @@
             }
 
             LoadEventList();
-
         }
 
         /// <summary>
@@ -668,25 +616,6 @@
             pictureOptionView.AddChidren(btnCancel);
 
             LoadEvent_PictureOptionViewEventList(pictureBaseView);
-        }
-
-        /// <summary>
-        /// 鑾峰彇缁戝畾璐﹀彿鏄剧ず鏂囨湰锛岀┖鐨勬椂鍊欐樉绀轰负鏈粦瀹�
-        /// </summary>
-        /// <param name="account"></param>
-        string GetBindAccountText(string account)
-        {
-            return string.IsNullOrEmpty(account) ? Language.StringByID(StringId.Unbound) : account;
-        }
-
-        /// <summary>
-        /// 鍒ゆ柇鏄惁涓烘湭缁戝畾
-        /// </summary>
-        /// <param name="account"></param>
-        /// <returns></returns>
-        bool CheckIfUnbound(string account)
-        {
-            return string.IsNullOrEmpty(account) || account == Language.StringByID(StringId.Unbound);
         }
     }
 }

--
Gitblit v1.8.0