From 05ce435c3b58e53eeab04c672affdeeab75f3036 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 15 十一月 2019 14:41:39 +0800
Subject: [PATCH] 2019.11.15-1

---
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs |   65 ++++++++++++++++++++++++++------
 1 files changed, 53 insertions(+), 12 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
index 3ce4dde..5ef06a0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -18,6 +18,18 @@
         /// 鐢ㄦ埛鍚嶅瓧
         /// </summary>
         private NormalViewControl btnUserName = null;
+        /// <summary>
+        /// 鐢ㄦ埛韬唤
+        /// </summary>
+        private NormalViewControl btnAuthority = null;
+        /// <summary>
+        /// 鐢ㄦ埛澶村儚
+        /// </summary>
+        private ImageView btnUserIcon = null;
+        /// <summary>
+        /// 鐨囧啝
+        /// </summary>
+        private IconViewControl btnImperialCrown = null;
 
         #endregion
 
@@ -69,7 +81,7 @@
             frameBack.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
             frameBack.Y = Application.GetRealHeight(380);
             frameBack.Gravity = Gravity.CenterHorizontal;
-            frameBack.Radius = (uint)Application.GetMinRealAverage(12);
+            frameBack.Radius = 12;
             frameBack.Width = bodyFrameLayout.Width - Application.GetRealWidth(29 * 2);
             frameBack.Height = bodyFrameLayout.Height - Application.GetRealHeight(380) + Application.GetRealHeight(100);
             bodyFrameLayout.AddChidren(frameBack);
@@ -95,9 +107,12 @@
         private void InitUserInfoControl(FrameLayout frameWhite)
         {
             //鐢ㄦ埛澶村儚
-            var btnUserIcon = new IconViewControl(280);
+            this.btnUserIcon = new ImageView();
+            btnUserIcon.Height = Application.GetMinRealAverage(280);
+            btnUserIcon.Width = Application.GetMinRealAverage(280);
+            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(280) / 2;
             btnUserIcon.X = Application.GetRealWidth(121);
-            btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
+            btnUserIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
             bodyFrameLayout.AddChidren(btnUserIcon);
             btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
             btnUserIcon.MouseUpEventHandler += (sender, e) =>
@@ -109,7 +124,7 @@
             if (UserCenterResourse.UserInfo.AuthorityNo == 1)
             {
                 //鐨囧啝
-                var btnImperialCrown = new IconViewControl(60);
+                this.btnImperialCrown = new IconViewControl(60);
                 btnImperialCrown.X = Application.GetRealWidth(346);
                 btnImperialCrown.Y = Application.GetRealHeight(475);
                 btnImperialCrown.UnSelectedImagePath = "Center/ImperialCrown.png";
@@ -117,7 +132,7 @@
             }
 
             //鐢ㄦ埛鏄电О
-            btnUserName = new NormalViewControl(605, 60, true);
+            this.btnUserName = new NormalViewControl(605, 60, true);
             btnUserName.X = btnUserIcon.Right + Application.GetRealWidth(5);
             btnUserName.Y = Application.GetRealHeight(43);
             if (UserCenterResourse.UserInfo != null)
@@ -127,7 +142,7 @@
             frameWhite.AddChidren(btnUserName);
 
             //鐢ㄦ埛韬唤
-            var btnAuthority = new NormalViewControl(605, 60, true);
+            this.btnAuthority = new NormalViewControl(605, 60, true);
             btnAuthority.X = btnUserName.X;
             btnAuthority.Y = btnUserName.Bottom;
             btnAuthority.TextColor = UserCenterColor.Current.Gray;
@@ -161,7 +176,7 @@
                 frameWhiteBack.Gravity = Gravity.CenterHorizontal;
                 frameWhiteBack.Height = Application.GetRealHeight(371);
                 frameWhiteBack.Width = frameWhite.Width - Application.GetRealWidth(29 * 2);
-                frameWhiteBack.Radius = (uint)Application.GetMinRealAverage(10);
+                frameWhiteBack.Radius = 10;
                 frameWhiteBack.BackgroundColor = UserCenterColor.Current.White;
                 frameWhite.AddChidren(frameWhiteBack);
             }
@@ -244,7 +259,7 @@
                 frame.ButtonClickEvent += (sender, e) =>
                 {
                     //浣忓畢鎺ュ彛涓嶉渶瑕佺壒娈婄殑鐧婚檰Token
-                    var form = new Residence.ResidenceManagementForm();
+                    var form = new Residence.ResidenceListForm();
                     form.AddForm();
                 };
             }
@@ -340,7 +355,7 @@
                 btnBackView.X -= ControlCommonResourse.XXLeft / 2;
                 rowback.ButtonClickEvent += (sender, e) =>
                 {
-                    var form = new HdlBackup.HdlBackupMenuForm();
+                    var form = new HdlBackup.HdlBackupListForm();
                     form.AddForm();
                 };
             }
@@ -363,8 +378,8 @@
             btnSuView.X -= ControlCommonResourse.XXLeft / 2;
             rowSuggestion.ButtonClickEvent += (sender, e) =>
             {
-                var form = new DeviceDoorLock.DoorLockHistoryLogForm();
-                form.AddForm("澶╀笅绗竴");
+                var form = new Suggestion.FeedbackForm();
+                form.AddForm();
             };
 
             //鍏充簬鎴戜滑
@@ -397,12 +412,38 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
+            //鐢ㄦ埛澶村儚
+            if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
+            {
+                UserCenterResourse.UserInfo.UserIconFileChanged = false;
+                btnUserIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
+            }
             //鐢ㄦ埛鍚嶅瓧
             btnUserName.Text = UserCenterResourse.UserInfo.UserName;
+            if (UserCenterResourse.UserInfo != null)
+            {
+                //鐢ㄦ埛韬唤
+                btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
+            }
+            if (this.btnImperialCrown != null)
+            {
+                //鐨囧啝
+                if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+                {
+                    this.btnImperialCrown.Visible = false;
+                }
+                else
+                {
+                    this.btnImperialCrown.Visible = true;
+                }
+            }
+
             //鍒濆鍖栦富鑿滃崟鐨勬帶浠�
             this.InitMainMenuInfoControl(frameWhiteBack);
+
+            return 1;
         }
 
         #endregion

--
Gitblit v1.8.0