From d1ab259186e2341a0839c87300065e9bb5f14e9c Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 12 十一月 2019 10:42:14 +0800
Subject: [PATCH] 2019.11.12

---
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
index 833ab19..d8d38b6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserInformationForm.cs
@@ -46,11 +46,21 @@
             bodyFrameLayout.AddChidren(specialTopFrame);
 
             //鐢ㄦ埛鍥炬爣
-            var btnUserIcon = new IconViewControl(251);
+            var btnUserIcon = new CutPictureControl(UserCenterResourse.UserInfo.UserIconFile, 251, 251, true);
+            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(251) / 2;
             btnUserIcon.Y = Application.GetRealHeight(46);
             btnUserIcon.Gravity = Gravity.CenterHorizontal;
-            btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
+            btnUserIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
             specialTopFrame.AddChidren(btnUserIcon);
+            btnUserIcon.SelectPictrueEvent += async (selectPic) =>
+            {
+                var pra = new { HeadImage = Shared.IO.FileUtils.ReadFile(selectPic) };
+                var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UpdateHeadImage", false, pra);
+                if (result == true)
+                {
+                    UserCenterResourse.UserInfo.UserIconFileChanged = true;
+                }
+            };
         }
 
         #endregion
@@ -301,10 +311,12 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
             //閲嶆柊鍒锋柊鐣岄潰
             this.ShowForm();
+
+            return 1;
         }
 
         #endregion

--
Gitblit v1.8.0