From 1c63243a7bcc330b7293cc8d5ec81c4c52018196 Mon Sep 17 00:00:00 2001
From: tzy <hxb@hdlchina.com.cn>
Date: 星期日, 30 五月 2021 17:39:51 +0800
Subject: [PATCH] 完成过户功能

---
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs |   55 ++++++++++++-
 HDL-ON_iOS/Resources/Language.ini                                                     |   39 ++++++++-
 HDL-ON_Android/Assets/Language.ini                                                    |   10 ++
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs    |   80 ++++++++++---------
 HDL_ON/Common/R.cs                                                                    |   18 ++++
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs                |    2 
 HDL-ON_Android/Application.cs                                                         |    2 
 7 files changed, 152 insertions(+), 54 deletions(-)

diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs
index 89a9f61..d9d098f 100644
--- a/HDL-ON_Android/Application.cs
+++ b/HDL-ON_Android/Application.cs
@@ -104,8 +104,6 @@
                 {
                     Language.CurrentLanguage = "English";
                 }
-                Language.CurrentLanguage = "English";
-
                 //鑾峰彇鏋佸厜鎺ㄩ�両D
                 GetJPushRegistrationID(activity);
 
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 5cbe1fe..c3ba37f 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -596,7 +596,11 @@
 1151=The account does not exist.
 1152=Fail to Transfer Ownership to Yourself
 1153=Terminate
-1154=姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�...
+1154=Transferring to User, Please Wait鈥�
+1155={0} has become a residential administrator
+1156=The residence data will be deleted from your account
+1157=Fail to transfer
+1158=Please try again
 
 5000=Music
 5001=Group
@@ -1468,6 +1472,10 @@
 1152=涓嶈兘鑷繁杩囨埛缁欒嚜宸�
 1153=缁堟
 1154=姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�...
+1155=鐢ㄦ埛{0}宸茬粡鎴愪负浣忓畢琛岀鐞嗗憳
+1156=璇ヤ綇瀹呯殑淇℃伅灏嗗湪鎮ㄧ殑璐﹀彿涓垹闄�
+1157=杩囨埛澶辫触
+1158=璇烽噸鏂板皾璇�
 
 4000=鍙瀵硅
 4001=閫氳瘽璁板綍
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 2ec7e95..c3ba37f 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -73,11 +73,11 @@
 72=The address of the residence
 73=Floor Management
 74=Room Management
-75=Administrator migration
-76=Administrator privilege migration
+75=Admin Migration
+76=Privilege Migration
 77=Debugging privilege
 78=The administrator is migrated to other user.
-79=All of the data for the residence is migrated to new user.
+79=All residence data are migrated to new user.
 80=Allow the staff to visit your home remotely
 81=Floor
 82=Add floor
@@ -585,7 +585,22 @@
 1140=Expire time should not be more than 72 hours
 1141=Expire time should not be less than 1 hour
 1142=Fail to set, please try again
-
+1143=Fail to verify administrator ID, please log in again account
+1144=Your residence is being migrated to other HDL 
+1145=Note:
+1146=1. All of your residence data will be migrate to new user.{0}2. After migration, original member will be{0}automatically unbound from this residence.{0}3. The new account is a valid HDL one.{0}4. The account from receiver cannot be the same{0}as that from migration side.
+1147=Confirm
+1148=Input receiver's account
+1149=Profile
+1150=Confirm admin migration from {0} to {1}
+1151=The account does not exist.
+1152=Fail to Transfer Ownership to Yourself
+1153=Terminate
+1154=Transferring to User, Please Wait鈥�
+1155={0} has become a residential administrator
+1156=The residence data will be deleted from your account
+1157=Fail to transfer
+1158=Please try again
 
 5000=Music
 5001=Group
@@ -1445,6 +1460,22 @@
 1140=澶辨晥鏃堕棿涓嶈兘澶т簬72灏忔椂
 1141=澶辨晥鏃堕棿涓嶈兘灏忎簬1灏忔椂
 1142=甯稿紑妯″紡鍏抽棴璁剧疆澶辨晥锛岃閲嶈瘯
+1143=绠$悊鍛樿韩浠介獙璇佸け璐�,璇烽噸鏂扮櫥褰�
+1144=鎮ㄧ殑浣忓畢灏嗚繃鎴风粰鍏朵粬HDL璐﹀彿
+1145=璇锋敞鎰忥細
+1146=1.璇ヤ綇瀹呮偍鐨勬暟鎹紙浜戠鏁版嵁锛夊皢鍏ㄩ儴杞Щ缁欐柊鐨勬埛涓粄0}2.杩囨埛鍚庯紝鍘熸湁鐨勬垚鍛樺皢鑷姩瑙g粦璇ヤ綇瀹厈0}3.鏂版埛涓昏处鍙蜂负鏈夋晥鐨凥DL璐﹀彿{0}4.鎺ユ敹鏂硅处鍙蜂笌杞Щ鏂硅处鍙蜂笉鍙负鍚屼竴涓处鍙�
+1147=纭杩囨埛
+1148=璇疯緭鍏ユ帴鏀舵柟璐﹀彿
+1149=涓汉璧勬枡
+1150=纭杩囨埛{0}鐨勭鐞嗗憳璐﹀彿缁欒处鍙穥1}
+1151=鐩爣璐﹀彿骞朵笉瀛樺湪
+1152=涓嶈兘鑷繁杩囨埛缁欒嚜宸�
+1153=缁堟
+1154=姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�...
+1155=鐢ㄦ埛{0}宸茬粡鎴愪负浣忓畢琛岀鐞嗗憳
+1156=璇ヤ綇瀹呯殑淇℃伅灏嗗湪鎮ㄧ殑璐﹀彿涓垹闄�
+1157=杩囨埛澶辫触
+1158=璇烽噸鏂板皾璇�
 
 4000=鍙瀵硅
 4001=閫氳瘽璁板綍
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 5d24e53..4004cad 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -1086,7 +1086,23 @@
         /// <summary>
         /// 姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�...
         /// </summary>
-        public const int IsTransferingPleaseWaitting = 1154;
+        public const int IsTransferingPleaseWaitting = 1154;
+        /// <summary>
+        /// 鐢ㄦ埛{0}宸茬粡鎴愪负浣忓畢琛岀鐞嗗憳
+        /// </summary>
+        public const int CongratulationsXXBecomingNNAdministrator = 1155;
+        /// <summary>
+        /// 璇ヤ綇瀹呯殑淇℃伅灏嗗湪鎮ㄧ殑璐﹀彿涓垹闄�
+        /// </summary>
+        public const int ResidenceDataWillBeDeletedFromYourAccount = 1156;
+        /// <summary>
+        /// 杩囨埛澶辫触
+        /// </summary>
+        public const int TransferFail = 1157;
+        /// <summary>
+        /// 璇烽噸鏂板皾璇�
+        /// </summary>
+        public const int PleaseTryAgain = 1158;
 
 
         public const int keshiduijiang = 4000;
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
index f877f78..ee17871 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
@@ -282,7 +282,7 @@
                 Height = Application.GetRealHeight(65),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
             };
-            contentView.AddChidren(administratorPermissionMigrationRow);
+            //contentView.AddChidren(administratorPermissionMigrationRow);
 
             btnAdministratorPermissionMigrationTitle = new Button()
             {
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs
index 7a7f4c0..f9b1297 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs
@@ -2,6 +2,7 @@
 using Shared;
 using HDL_ON.UI.CSS;
 using HDL_ON.Stan;
+using System.Collections.Generic;
 
 namespace HDL_ON.UI
 {
@@ -24,16 +25,16 @@
         /// <summary>
         /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
         /// </summary>
-        /// <param name="i_accountResult">瀵规柟璐﹀彿淇℃伅</param>
+        /// <param name="i_accountInfo">鐢ㄦ埛瀵硅薄淇℃伅</param>
         /// <param name="i_success">鏄惁鎴愬姛</param>
-        public void ShowForm(AccountInfoResult i_accountResult, bool i_success)
+        public void ShowForm(AccountInfoResult i_accountInfo, bool i_success)
         {
             this.ScrollLeftEnabled = false;
             //杩囨埛
             base.SetTitleText(Language.StringByID(StringId.Transfer));
 
             //鍒濆鍖栦腑閮ㄤ俊鎭�
-            this.InitMiddleFrame();
+            this.InitMiddleFrame(i_accountInfo, i_success);
 
             //绉婚櫎杩斿洖閿�
             base.RemoveBackButton();
@@ -42,14 +43,56 @@
         /// <summary>
         /// 鍒濆鍖栦腑閮ㄤ俊鎭�
         /// </summary>
-        private void InitMiddleFrame()
+        /// <param name="i_accountInfo">鐢ㄦ埛瀵硅薄淇℃伅</param>
+        /// <param name="i_success">鏄惁鎴愬姛</param>
+        private void InitMiddleFrame(AccountInfoResult i_accountInfo, bool i_success)
         {
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            //纭
+            //鍥剧墖
+            var btnPictrue = new PicViewControl(180, 180);
+            btnPictrue.Y = Application.GetRealHeight(32);
+            btnPictrue.Gravity = Gravity.CenterHorizontal;
+            btnPictrue.UnSelectedImagePath = i_success == true ? "Public/TipIcon_Successfully.png" : "Public/TipIcon_Failed.png";
+            bodyFrameLayout.AddChidren(btnPictrue);
+
+            List<NormalViewControl> listContr = null;
+            if (i_success == true)
+            {
+                //鐢ㄦ埛{0}宸茬粡鎴愪负浣忓畢琛岀鐞嗗憳
+                string strMsg = Language.StringByID(StringId.CongratulationsXXBecomingNNAdministrator).Replace("{0}", i_accountInfo.MemberName);
+                listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS_FontSize.SubheadingFontSize, CSS_Color.MainColor, Application.GetRealHeight(24),
+                    btnPictrue.Bottom + Application.GetRealHeight(16));
+                //璇ヤ綇瀹呯殑淇℃伅灏嗗湪鎮ㄧ殑璐﹀彿涓垹闄�
+                var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(18), false);
+                btnMsg2.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(8);
+                btnMsg2.TextAlignment = TextAlignment.Center;
+                btnMsg2.Gravity = Gravity.CenterHorizontal;
+                btnMsg2.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+                btnMsg2.TextID = StringId.ResidenceDataWillBeDeletedFromYourAccount;
+                bodyFrameLayout.AddChidren(btnMsg2);
+            }
+            else
+            {
+                //杩囨埛澶辫触
+                string strMsg = Language.StringByID(StringId.TransferFail);
+                listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS_FontSize.SubheadingFontSize, CSS_Color.AuxiliaryColor2, Application.GetRealHeight(24),
+                    btnPictrue.Bottom + Application.GetRealHeight(16));
+                //璇烽噸鏂板皾璇�
+                var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(18), false);
+                btnMsg2.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(8);
+                btnMsg2.TextAlignment = TextAlignment.Center;
+                btnMsg2.Gravity = Gravity.CenterHorizontal;
+                btnMsg2.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+                btnMsg2.TextID = StringId.PleaseTryAgain;
+                bodyFrameLayout.AddChidren(btnMsg2);
+            }
+
+            //瀹屾垚
             var btnConfirm = new BottomClickButton(220);
-            btnConfirm.TextID = StringId.Complete;
+            btnConfirm.Y = Application.GetRealHeight(337);
+            btnConfirm.TextID = i_success == true ? StringId.Complete : StringId.Retry;
             bodyFrameLayout.AddChidren(btnConfirm);
             btnConfirm.ButtonClickEvent += (sender, e) =>
             {
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs
index aa6e574..20484cb 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs
@@ -48,31 +48,34 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            //浣忓畢鐨勫浘鏍�
-            var btnHouseIcon = new PicViewControl(93, 93);
-            btnHouseIcon.Y = Application.GetRealHeight(127);
-            btnHouseIcon.X = Application.GetRealWidth(48);
-            btnHouseIcon.BackgroundColor = CSS_Color.MainColor;
-            bodyFrameLayout.AddChidren(btnHouseIcon);
-            //浣忓畢鍚嶅瓧  (浠ヤ腑闂翠负鍩哄噯,宸﹀彸闂磋窛16)
-            var btnHouseName = new NormalViewControl(bodyFrameLayout.Width / 2 - Application.GetRealWidth(16 * 2), Application.GetRealHeight(48), false);
-            btnHouseName.X = Application.GetRealWidth(16);
-            btnHouseName.Y = btnHouseIcon.Bottom + Application.GetRealHeight(10);
-            btnHouseName.IsBold = true;
-            btnHouseName.IsMoreLines = true;
-            btnHouseName.TextAlignment = TextAlignment.TopCenter;
-            btnHouseName.TextSize = CSS_FontSize.SubheadingFontSize;
-            btnHouseName.Text = Entity.DB_ResidenceData.Instance.CurrentRegion.homeName;
-            bodyFrameLayout.AddChidren(btnHouseName);
+            //涓讳汉鐨勫浘鏍�
+            var btnAdminIcon = new ImageView();
+            btnAdminIcon.Y = Application.GetRealHeight(112);
+            btnAdminIcon.X = Application.GetRealWidth(48);
+            btnAdminIcon.Height = this.GetPictrueRealSize(70);
+            btnAdminIcon.Width = this.GetPictrueRealSize(70);
+            btnAdminIcon.Radius = (uint)this.GetPictrueRealSize(70) / 2;
+            btnAdminIcon.ImagePath = UserInfo.Current.headImagePagePath;
+            bodyFrameLayout.AddChidren(btnAdminIcon);
+            //涓讳汉鍚嶅瓧  (浠ヤ腑闂翠负鍩哄噯,宸﹀彸闂磋窛16)
+            var btnAdminName = new NormalViewControl((btnAdminIcon.Right + btnAdminIcon.X) - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(48), false);
+            btnAdminName.X = HdlControlResourse.XXLeft;
+            btnAdminName.Y = btnAdminIcon.Bottom + Application.GetRealHeight(10);
+            btnAdminName.IsBold = true;
+            btnAdminName.IsMoreLines = true;
+            btnAdminName.TextAlignment = TextAlignment.TopCenter;
+            btnAdminName.TextSize = CSS_FontSize.SubheadingFontSize;
+            btnAdminName.Text = string.IsNullOrEmpty(UserInfo.Current.userName) == true ? UserInfo.Current.AccountString : UserInfo.Current.userName;
+            bodyFrameLayout.AddChidren(btnAdminName);
 
             //澶村儚
             var imageByte = ImageUtlis.Current.ReadFile(this.accountResult.MemberHeadIcon);
             var btnUserIcon = new ImageView();
-            btnUserIcon.Y = btnHouseIcon.Y;
-            btnUserIcon.X = bodyFrameLayout.Width - Application.GetRealWidth(48) - this.GetPictrueRealSize(93);
-            btnUserIcon.Height = this.GetPictrueRealSize(93);
-            btnUserIcon.Width = this.GetPictrueRealSize(93);
-            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(93) / 2;
+            btnUserIcon.Y = btnAdminIcon.Y;
+            btnUserIcon.X = bodyFrameLayout.Width - Application.GetRealWidth(48) - this.GetPictrueRealSize(70);
+            btnUserIcon.Height = this.GetPictrueRealSize(70);
+            btnUserIcon.Width = this.GetPictrueRealSize(70);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(70) / 2;
             if (imageByte != null && imageByte.Length > 0)
             {
                 btnUserIcon.ImageBytes = imageByte;
@@ -84,9 +87,9 @@
             bodyFrameLayout.AddChidren(btnUserIcon);
 
             //鏄电О  (浠ヤ腑闂翠负鍩哄噯,宸﹀彸闂磋窛50)
-            var btnName = new NormalViewControl(btnHouseName.Width, btnHouseName.Height, false);
-            btnName.X = bodyFrameLayout.Width - btnHouseName.X - btnHouseName.Width;
-            btnName.Y = btnHouseName.Y;
+            var btnName = new NormalViewControl(btnAdminName.Width, btnAdminName.Height, false);
+            btnName.X = bodyFrameLayout.Width - btnAdminName.X - btnAdminName.Width;
+            btnName.Y = btnAdminName.Y;
             btnName.IsBold = true;
             btnName.IsMoreLines = true;
             btnName.TextAlignment = TextAlignment.TopCenter;
@@ -95,11 +98,11 @@
             bodyFrameLayout.AddChidren(btnName);
 
             //寮�鍚繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉绾跨▼
-            this.StartConcetionAnimeteThread(btnHouseIcon.Right + Application.GetRealWidth(10));
+            this.StartConcetionAnimeteThread(btnAdminIcon.Right + Application.GetRealWidth(16));
 
             //缁堟
             var btnCancel = new BottomClickButton();
-            btnCancel.Y = Application.GetRealHeight(392);
+            btnCancel.Y = Application.GetRealHeight(519);
             btnCancel.TextID = StringId.Terminate;
             bodyFrameLayout.AddChidren(btnCancel);
             btnCancel.ButtonClickEvent += (sender, e) =>
@@ -109,7 +112,6 @@
 
             //鍒濆鍖栨秷鎭帶浠�
             this.InitMsgControl();
-
         }
 
         #endregion
@@ -123,23 +125,23 @@
         {
             //鐢熸垚鐐瑰彿鍥炬牱
             int pointXX = XX;
-            int pointWidth = Application.GetRealWidth(6);
-            int pointSpace = Application.GetRealWidth(5);
-            for (int i = 0; i < 7; i++)
+            int pointWidth = Application.GetRealWidth(4);
+            int pointSpace = Application.GetRealWidth(9);
+            for (int i = 0; i < 9; i++)
             {
-                var btnPoint = new NormalViewControl(pointWidth, Application.GetRealHeight(4), false);
-                btnPoint.Radius = (uint)Application.GetRealHeight(4) / 2;
-                btnPoint.BackgroundColor = 0xffd5d5d5;
-                btnPoint.Y = Application.GetRealHeight(170);
+                var btnPoint = new NormalViewControl(pointWidth, pointWidth, false);
+                btnPoint.Radius = (uint)pointWidth / 2;
+                btnPoint.BackgroundColor = CSS_Color.PromptingColor1;
+                btnPoint.Y = Application.GetRealHeight(144);
                 btnPoint.X = pointXX;
                 bodyFrameLayout.AddChidren(btnPoint);
-                pointXX = btnPoint.Right + Application.GetRealWidth(5);
+                pointXX = btnPoint.Right + pointSpace;
             }
 
             var listPoint = new List<int>();
             //璺冲姩鐨勯棿璺�
             int jumpSpace = pointWidth + pointSpace;
-            for (int i = 0; i < 7; i++)
+            for (int i = 0; i < 9; i++)
             {
                 //X杞�+Index*(鍥炬爣澶у皬+闂磋窛)
                 listPoint.Add(XX + i * jumpSpace);
@@ -147,9 +149,9 @@
 
             var btnRound = new IconViewControl(8);
             btnRound.Radius = (uint)btnRound.IconSize / 2;
-            btnRound.BackgroundColor = CSS_Color.AuxiliaryColor2;
+            btnRound.BackgroundColor = CSS_Color.MainColor;
             btnRound.X = listPoint[0] - (btnRound.IconSize - pointWidth) / 2;
-            btnRound.Y = Application.GetRealHeight(169);
+            btnRound.Y = Application.GetRealHeight(142);
             bodyFrameLayout.AddChidren(btnRound);
 
             HdlThreadLogic.Current.RunThread(() =>
@@ -258,7 +260,7 @@
 
             //姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�...
             var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(20), false);
-            btnMsg.Y = Application.GetRealHeight(300);
+            btnMsg.Y = Application.GetRealHeight(288);
             btnMsg.TextAlignment = TextAlignment.Center;
             btnMsg.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
             btnMsg.Text = msg;

--
Gitblit v1.8.0