From 65bcedda4d8e3ff6500dbf59a4e607d96e469375 Mon Sep 17 00:00:00 2001
From: tzy <hxb@hdlchina.com.cn>
Date: 星期二, 25 五月 2021 15:47:15 +0800
Subject: [PATCH] 初步完成过户的功能

---
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs |  138 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 97 insertions(+), 41 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs
index e29f3fd..4a5c393 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs
@@ -1,68 +1,124 @@
 锘縰sing System;
 using Shared;
 using HDL_ON.UI.CSS;
+using HDL_ON.Stan;
 
 namespace HDL_ON.UI
 {
     /// <summary>
-    /// 杩囨埛璐﹀彿纭鐣岄潰
-    /// 涓汉璧勬枡
+    /// 杩囨埛璐﹀彿涓汉璧勬枡纭鐣岄潰
     /// </summary>
-    public class TransferUserConfirmPage : FrameLayout
+    public class TransferUserConfirmPage : EditorCommonForm
     {
-        /// <summary>
-        /// 
-        /// </summary>
-        FrameLayout bodyView;
+        #region 鈻� 鍙橀噺澹版槑___________________________
 
-        public TransferUserConfirmPage()
+        /// <summary>
+        /// 璐﹀彿淇℃伅
+        /// </summary>
+        private AccountInfoResult accountInfo = null;
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        /// <param name="i_accountInfo"></param>
+        public void ShowForm(AccountInfoResult i_accountInfo)
         {
-            bodyView = this;
+            this.accountInfo = i_accountInfo;
+
+            //涓汉璧勬枡
+            base.SetTitleText(Language.StringByID(StringId.Profile));
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame();
         }
 
         /// <summary>
-        /// 
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
         /// </summary>
-        public void LoadPage()
+        private void InitMiddleFrame()
         {
-            BackgroundColor = CSS_Color.BackgroundColor;
+            //娓呯┖bodyFrame
+            this.ClearBodyFrame();
 
-            new TopViewDiv(bodyView, "涓汉璧勬枡").LoadTopView();
+            //涓婇儴鐨勭櫧鑹茶儗鏅�
+            var frameBack1 = new FrameLayout();
+            frameBack1.BackgroundColor = CSS_Color.MainBackgroundColor;
+            frameBack1.Height = Application.GetRealHeight(204);
+            bodyFrameLayout.AddChidren(frameBack1);
 
-            var headView = new FrameLayout()
+            //澶村儚
+            var btnHeadImage = new ImageView();
+            btnHeadImage.Y = Application.GetRealHeight(32);
+            btnHeadImage.Gravity = Gravity.CenterHorizontal;
+            btnHeadImage.Width = Application.GetRealWidth(84);
+            btnHeadImage.Height = Application.GetRealWidth(84);
+            btnHeadImage.Radius = (uint)Application.GetRealWidth(42);
+            btnHeadImage.ImagePath = "LoginIcon/2.png";
+            frameBack1.AddChidren(btnHeadImage);
+
+            //鏄电О
+            var btnName = new NormalViewControl(frameBack1.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(24), false);
+            btnName.Y = btnHeadImage.Bottom + Application.GetRealHeight(11);
+            btnName.Gravity = Gravity.CenterHorizontal;
+            btnName.IsBold = true;
+            btnName.TextSize = CSS_FontSize.SubheadingFontSize;
+            btnName.TextColor = CSS_Color.FirstLevelTitleColor;
+            btnName.Text = accountInfo.MemberName;
+            btnName.TextAlignment = TextAlignment.Center;
+            frameBack1.AddChidren(btnName);
+
+            //璐﹀彿
+            var btnAccount = new NormalViewControl(frameBack1.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(16), false);
+            btnAccount.Y = btnName.Bottom + Application.GetRealHeight(7);
+            btnAccount.Gravity = Gravity.CenterHorizontal;
+            btnAccount.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+            btnAccount.TextAlignment = TextAlignment.Center;
+            btnAccount.Text = accountInfo.Account;
+            frameBack1.AddChidren(btnAccount);
+
+            //纭鐨勭櫧鑹茶儗鏅�
+            var frameBack2 = new FrameLayout();
+            frameBack2.Y = frameBack1.Bottom + Application.GetRealHeight(8);
+            frameBack2.Height = Application.GetRealHeight(50);
+            frameBack2.BackgroundColor = CSS_Color.MainBackgroundColor;
+            bodyFrameLayout.AddChidren(frameBack2);
+            //纭杩囨埛
+            var btnConform = new NormalViewControl(200, 24, true);
+            btnConform.Gravity = Gravity.Center;
+            btnConform.TextSize = CSS_FontSize.SubheadingFontSize;
+            btnConform.TextAlignment = TextAlignment.Center;
+            btnConform.TextColor = CSS_Color.MainColor;
+            btnConform.TextID = StringId.ConfirmTransferre;
+            frameBack2.AddChidren(btnConform);
+            btnConform.ButtonClickEvent += (sender, e) =>
             {
-                Y = Application.GetRealHeight(64),
-                Height = Application.GetRealHeight(204),
-                BackgroundColor = CSS_Color.MainBackgroundColor,
+                //濡傛灉璁剧疆鏈夊畨鍏ㄩ獙璇�,鍒欓渶瑕侀獙璇�
+                HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
+                {
+                    var form = new TransferingResidenceForm();
+                    form.AddForm(this.accountInfo);
+                });
             };
-            bodyView.AddChidren(headView);
 
-            ImageView myHeadImage = new ImageView()
+            HdlThreadLogic.Current.RunThread(() =>
             {
-                Y = Application.GetRealHeight(32),
-                Width = Application.GetRealWidth(84),
-                Height = Application.GetRealWidth(84),
-                Radius = (uint)Application.GetRealWidth(42),
-                ImagePath = UserInfo.Current.headImagePagePath,
-                Gravity = Gravity.CenterHorizontal,
-            };
-            headView.AddChidren(myHeadImage);
-
-            var btnConfirm = new Button()
-            {
-                Y = headView.Bottom + Application.GetRealHeight(8),
-                Height = Application.GetRealHeight(50),
-                TextAlignment = TextAlignment.Center,
-                TextColor = CSS_Color.MainColor,
-                TextSize = CSS_FontSize.SubheadingFontSize,
-                BackgroundColor = CSS_Color.MainBackgroundColor,
-                Text = "纭杩囨埛"
-
-            };
-            bodyView.AddChidren(btnConfirm);
-
+                //鐢ㄧ嚎绋嬪幓涓嬭浇澶村儚
+                var headImageBytes = ImageUtlis.Current.DownHeadImageByImageKey(this.accountInfo.MemberHeadIcon, true);
+                if (headImageBytes != null && headImageBytes.Length > 0)
+                {
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        btnHeadImage.ImageBytes = headImageBytes;
+                    }, ShowErrorMode.NO);
+                }
+            }); 
         }
 
+        #endregion
     }
 
 }

--
Gitblit v1.8.0