tzy
2021-07-01 536bc8fecd45139bba59d1bafcbe7d4f4e1f4d34
完成管理员权限迁移的功能
3个文件已添加
1个文件已删除
12个文件已修改
1003 ■■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Stan/Logic/HdlCheckLogic.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddThirdPartyDeviceMenuListPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationConfirmPage.cs 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationInputPage.cs 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationMemberConfirmPage.cs 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationMemberListPage.cs 180 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationResultPage.cs 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -616,13 +616,17 @@
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
1157=Fail to migrate
1158=Please try again
1159=Admin authority migration
1160=Your admin authority is being migrated to other members
1161=1.Your data (cloud data) of the residence will be{0}migratedto the new administrator{0}2.Your data will be exchanged with the target member{0}and your permission will be changed to the target{0}member
1162=Confirm
1163=No members to choose
1164=Confirm admin authority migration from {0} to {1}
1165=Migrate successfully
1166=Fail to migrate
1167=Migrate successfully, And your permissions will become normal members
 
4000=Video intercom
4001=Call record
@@ -1676,8 +1680,15 @@
1156=该住宅的信息将在您的账号中删除
1157=过户失败
1158=请重新尝试
1159=管理员权限转移
1160=您将转移您的管理员权限给其他成员
1161=1.该住宅您的管理员数据(云端数据)将全部转移给新的{0}管理员{0}2.您的数据将会与目标成员互换,您的权限将变更为目标{0}成员的权限
1162=确认转移
1163=检测不到可供选择的成员
1164=确认转移{0}的管理员权限给账号{1}
1165=迁移成功
1166=迁移失败
1167=迁移成功,您的权限将变为普通成员
 
4000=可视对讲
4001=通话记录
HDL-ON_iOS/Resources/Language.ini
@@ -439,7 +439,6 @@
453=Alarm mute
454=Deployment information
455=The name can not be blank.
456=Canvas
457=Energy consumption
458=Date
@@ -617,13 +616,17 @@
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
1157=Fail to migrate
1158=Please try again
1159=Admin authority migration
1160=Your admin authority is being migrated to other members
1161=1.Your data (cloud data) of the residence will be{0}migratedto the new administrator{0}2.Your data will be exchanged with the target member{0}and your permission will be changed to the target{0}member
1162=Confirm
1163=No members to choose
1164=Confirm admin authority migration from {0} to {1}
1165=Migrate successfully
1166=Fail to migrate
1167=Migrate successfully, And your permissions will become normal members
 
4000=Video intercom
4001=Call record
@@ -1677,8 +1680,15 @@
1156=该住宅的信息将在您的账号中删除
1157=过户失败
1158=请重新尝试
1159=管理员权限转移
1160=您将转移您的管理员权限给其他成员
1161=1.该住宅您的管理员数据(云端数据)将全部转移给新的{0}管理员{0}2.您的数据将会与目标成员互换,您的权限将变更为目标{0}成员的权限
1162=确认转移
1163=检测不到可供选择的成员
1164=确认转移{0}的管理员权限给账号{1}
1165=迁移成功
1166=迁移失败
1167=迁移成功,您的权限将变为普通成员
 
4000=可视对讲
4001=通话记录
HDL_ON/Common/R.cs
@@ -1170,7 +1170,42 @@
        /// 请重新尝试
        /// </summary>
        public const int PleaseTryAgain = 1158;
        /// <summary>
        /// 管理员权限转移
        /// </summary>
        public const int AdminAuthorityTransfer = 1159;
        /// <summary>
        /// 您将转移您的管理员权限给其他成员
        /// </summary>
        public const int AdminAuthorityTransferMag1 = 1160;
        /// <summary>
        /// 1.该住宅您的管理员数据(云端数据)将全部转移给新的管理员{0}2.您的数据将会与目标成员互换,您的权限将变更为目标成员的权限
        /// </summary>
        public const int AdminAuthorityTransferMag2 = 1161;
        /// <summary>
        /// 确认转移
        /// </summary>
        public const int ConfirmTransfer2 = 1162;
        /// <summary>
        /// 检测不到可供选择的成员
        /// </summary>
        public const int NotHadMemberToSelect = 1163;
        /// <summary>
        /// 确认转移{0}的管理员权限给账号{1}
        /// </summary>
        public const int TransferreConfirmMsg3 = 1164;
        /// <summary>
        /// 迁移成功
        /// </summary>
        public const int TransferreSuccess1 = 1165;
        /// <summary>
        /// 迁移失败
        /// </summary>
        public const int TransferreFail1 = 1166;
        /// <summary>
        /// 迁移成功,您的权限将变为普通成员
        /// </summary>
        public const int TransferreSuccessMsg1 = 1167;
        public const int keshiduijiang = 4000;
        public const int tonghuajilu = 4001;
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -738,6 +738,24 @@
            return result != null && result.Code == StateCode.SUCCESS;
        }
        /// <summary>
        /// 管理员权限迁移
        /// </summary>
        /// <param name="i_childAccountId">成员账号id</param>
        /// <returns></returns>
        public bool AdminAuthorityMigration(string i_childAccountId)
        {
            var pra2 = new
            {
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
                childAccountId = i_childAccountId
            };
            var requestJson = HttpUtil.GetSignRequestJson(pra2);
            var result = HttpUtil.RequestHttpsPost(NewAPI.API_Post_AdminAuthorityMigration, requestJson);
            return result != null && result.Code == StateCode.SUCCESS;
        }
        #region 新数据分享
        /// <summary>
        /// 添加分享
HDL_ON/DAL/Server/NewAPI.cs
@@ -115,6 +115,10 @@
        /// 过户
        /// </summary>
        public const string API_Post_TransferResidence = "/home-wisdom/app/home/transfer";
        /// <summary>
        /// 管理员权限迁移
        /// </summary>
        public const string API_Post_AdminAuthorityMigration = "/home-wisdom/app/home/ownerConvert";
        #endregion
HDL_ON/HDL_ON.projitems
@@ -37,6 +37,9 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlBluetoothIOSLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlCheckLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlCommonLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\AdminMigrationMemberConfirmPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\AdminMigrationMemberListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\AdminMigrationResultPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\TransferingResidencePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\TransferResidenceResultPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockAlwaysOnManagerPage.cs" />
@@ -233,7 +236,6 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\ConfirmButton.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\AdminMigrationConfirmPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\TransferInputPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\AdminMigrationInputPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\TransferUserConfirmPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\1-HomePage\MessageCenterPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\MenuButton.cs" />
HDL_ON/UI/UI0-Stan/Logic/HdlCheckLogic.cs
@@ -46,7 +46,7 @@
        /// <param name="addTopFrame">验证界面是否添加头部Frame(只对手势密码和数字密码有效)</param>
        /// <param name="successEvent">验证成功之后的回调函数,失败不会回调(0:没有设置有验证 1:验证成功)</param>
        /// <param name="loadPageBeforEvent">加载指定解锁认证界面之前的事件,0:取消当前验证并切换到其他方式,1:数字密码,2:手势密码,3:指纹密码,4:面容ID</param>
        public void CheckUnlockSecurity(bool addTopFrame, Action<int> successEvent, Action<string> loadPageBeforEvent = null)
        public void CheckUnlockSecurity(bool addTopFrame, Action<int> successEvent, Action<int> loadPageBeforEvent = null)
        {
            //验证指纹和面容id都使用指纹验证
            if (UserInfo.Current.appUnlockType.Contains("3") || UserInfo.Current.appUnlockType.Contains("4"))
@@ -58,7 +58,7 @@
                if (type == TouchIDUtils.TouchIDSupperType.TouchID)
                {
                    //通知使用指纹验证
                    loadPageBeforEvent?.Invoke("3");
                    loadPageBeforEvent?.Invoke(3);
                    //Touch ID验证
                    TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent += (sender2, e2) =>
@@ -77,7 +77,7 @@
                        else if (e2 == TouchIDUtils.TouchIDState.InputPassword)
                        {
                            //通知取消了验证,切换为其他验证
                            loadPageBeforEvent?.Invoke("0");
                            loadPageBeforEvent?.Invoke(0);
                            //使用密码或者手势密码解锁认证
                            this.CheckUnlockSecurityByPassword(addTopFrame, successEvent, loadPageBeforEvent);
@@ -108,12 +108,12 @@
        /// <param name="addTopFrame">验证界面是否添加头部Frame(只对手势密码和数字密码有效)</param>
        /// <param name="successEvent">验证成功之后的回调函数,失败不会回调(0:没有设置有验证 1:验证成功)</param>
        /// <param name="loadPageBeforEvent">加载指定解锁认证界面之前的事件,1:数字密码,2:手势密码,3:指纹密码,4:面容ID</param>
        private void CheckUnlockSecurityByPassword(bool addTopFrame, Action<int> successEvent, Action<string> loadPageBeforEvent = null)
        private void CheckUnlockSecurityByPassword(bool addTopFrame, Action<int> successEvent, Action<int> loadPageBeforEvent = null)
        {
            if (UserInfo.Current.appUnlockType.Contains("1"))
            {
                //通知使用数字密码验证
                loadPageBeforEvent?.Invoke("1");
                loadPageBeforEvent?.Invoke(1);
                //显示数字密码解锁认证界面
                this.ShowAppNumPasswordSecurityForm(addTopFrame, successEvent);
@@ -121,7 +121,7 @@
            else if (UserInfo.Current.appUnlockType.Contains("2"))
            {
                //通知使用手势密码验证
                loadPageBeforEvent?.Invoke("2");
                loadPageBeforEvent?.Invoke(2);
                //显示手势密码解锁认证界面
                this.ShowAppGestureSecurityForm(addTopFrame, successEvent);
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddThirdPartyDeviceMenuListPage.cs
@@ -7,7 +7,7 @@
namespace HDL_ON.UI
{
    /// <summary>
    /// 添加第三方设备的菜单列表界面
    /// 添加第三方设备的菜单列表界面(已废弃)
    /// </summary>
    public class AddThirdPartyDeviceMenuListPage : EditorCommonForm
    {
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
@@ -282,7 +282,11 @@
                Height = Application.GetRealHeight(65),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            //contentView.AddChidren(administratorPermissionMigrationRow);
            if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false)
            {
                //是主账号本人才能显示这个菜单
                contentView.AddChidren(administratorPermissionMigrationRow);
            }
            btnAdministratorPermissionMigrationTitle = new Button()
            {
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs
@@ -157,10 +157,8 @@
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var skipPage = new AdminMigrationConfirmPage();
                MainPage.BasePageView.AddChidren(skipPage);
                skipPage.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                var form = new AdminMigrationConfirmPage();
                form.AddForm();
            };
            administratorPermissionMigrationRow.MouseUpEventHandler = eventHandler;
@@ -176,8 +174,8 @@
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var from = new TransferConfirmPage();
                from.AddForm();
                var form = new TransferConfirmPage();
                form.AddForm();
            };
            transferRow.MouseUpEventHandler = eventHandler;
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationConfirmPage.cs
@@ -1,140 +1,95 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using HDL_ON.Stan;
namespace HDL_ON.UI
{
    /// <summary>
    /// 管理员权限迁移确认提醒界面
    /// </summary>
    public class AdminMigrationConfirmPage : FrameLayout
    public class AdminMigrationConfirmPage : EditorCommonForm
    {
        /// <summary>
        ///
        /// </summary>
        FrameLayout bodyView;
        public AdminMigrationConfirmPage()
        {
            bodyView = this;
        }
        /// <summary>
        ///
        /// </summary>
        public void LoadPage()
        {
            BackgroundColor = CSS_Color.MainBackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(StringId.AdministratorPermissionMigration)).LoadTopView();
            #region 头像
            FrameLayout headView = new FrameLayout()
            {
                Y = Application.GetRealHeight(72),
                Height = Application.GetRealHeight(132),
            };
            bodyView.AddChidren(headView);
            ImageView myHeadImage = new ImageView()
            {
                X = Application.GetRealWidth(48),
                Y = Application.GetRealHeight(96),
                Width = Application.GetRealWidth(84),
                Height = Application.GetRealWidth(84),
                Radius = (uint)Application.GetRealWidth(42),
                ImagePath = UserInfo.Current.headImagePagePath,
                Gravity = Gravity.CenterVertical,
            };
            headView.AddChidren(myHeadImage);
            ImageView transferImage = new ImageView()
            {
                X = Application.GetRealWidth(144),
                Y = Application.GetRealHeight(96),
                Width = Application.GetRealWidth(84),
                Height = Application.GetRealWidth(32),
                ImagePath = "PersonalCenter/Transfer.png",
                Gravity = Gravity.Center,
            };
            headView.AddChidren(transferImage);
            ImageView otherHeadImage = new ImageView()
            {
                X = Application.GetRealWidth(231),
                Y = Application.GetRealHeight(96),
                Width = Application.GetRealWidth(101),
                Height = Application.GetRealWidth(101),
                ImagePath = "PersonalCenter/Head.png",
                Gravity = Gravity.CenterVertical,
            };
            headView.AddChidren(otherHeadImage);
        #region ■ 变量声明___________________________
            #endregion
            var btnTip = new Button()
        #region ■ 初始化_____________________________
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
            {
                Y = headView.Bottom,
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(22),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                Text = "您将转移您的管理员权限给其他HDL账号",
            };
            bodyView.AddChidren(btnTip);
            //管理员权限转移
            base.SetTitleText(Language.StringByID(StringId.AdminAuthorityTransfer));
            //请注意
            var btnPleaseNote = new Button()
            {
                Y = btnTip.Bottom + Application.GetRealHeight(38),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(17),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = "请注意:",
            };
            bodyView.AddChidren(btnPleaseNote);
            //请注意的内容
            var btnPleaseNoteStr = new Button()
            {
                Y = btnPleaseNote.Bottom + Application.GetRealHeight(8),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(170),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                IsMoreLines = true,
                Text = "1.该住宅您的管理员数据(云端数据)将全部转移给新的管理员 \n\n2.新的管理员可以选择不保留原有住宅成员的数据,其他成员将会不能使用 \n\n3.在转移后,您若需要成为家庭成员,由新的管理员设置 \n\n4.接收方账号为有效的HDL账号 \n\n5.接收方账号与转移方账号不可为同一个账号 (绑定的其他登录)",
            };
            bodyView.AddChidren(btnPleaseNoteStr);
            //
            var btnConfirm = new ConfirmButton()
            {
                Y = Application.GetRealHeight(583),
                Text = "确认转移",
            };
            bodyView.AddChidren(btnConfirm);
            btnConfirm.MouseUpEventHandler = (sender, e) => {
                //Utlis.ShowTip("暂不支持");
                var skipPage = new AdminMigrationInputPage();
                MainPage.BasePageView.AddChidren(skipPage);
                skipPage.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            //初始化中部信息
            this.InitMiddleFrame();
        }
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
            //账号自己的头像
            var btnHeadImage = new ImageView();
            btnHeadImage.X = Application.GetRealWidth(48);
            btnHeadImage.Y = Application.GetRealHeight(32);
            btnHeadImage.Width = Application.GetRealWidth(84);
            btnHeadImage.Height = Application.GetRealWidth(84);
            btnHeadImage.Radius = (uint)Application.GetRealWidth(42);
            btnHeadImage.ImagePath = UserInfo.Current.headImagePagePath;
            bodyFrameLayout.AddChidren(btnHeadImage);
            //箭头
            var btnArrow = new PicViewControl(84, 32);
            btnArrow.X = btnHeadImage.Right + Application.GetRealWidth(12);
            btnArrow.Y = Application.GetRealHeight(58);
            btnArrow.UnSelectedImagePath = "PersonalCenter/Transfer.png";
            bodyFrameLayout.AddChidren(btnArrow);
            //一个默认头像
            var btnHead2 = new IconViewControl(102);
            btnHead2.X = btnArrow.Right + Application.GetRealWidth(3);
            btnHead2.Y = Application.GetRealHeight(26);
            btnHead2.UnSelectedImagePath = "PersonalCenter/Head.png";
            bodyFrameLayout.AddChidren(btnHead2);
            //您将转移您的管理员权限给其他成员
            this.AddListMsgControls(bodyFrameLayout, Language.StringByID(StringId.AdminAuthorityTransferMag1), CSS_FontSize.SubheadingFontSize,
                CSS_Color.FirstLevelTitleColor, Application.GetRealHeight(23), btnHead2.Bottom + Application.GetRealHeight(12));
            //请注意:
            var btnAttention = new NormalViewControl(200, 18, true);
            btnAttention.X = HdlControlResourse.XXLeft;
            btnAttention.Y = btnHeadImage.Bottom + Application.GetRealHeight(84);
            btnAttention.TextID = StringId.Attention;
            btnAttention.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
            btnAttention.TextColor = CSS_Color.FirstLevelTitleColor;
            bodyFrameLayout.AddChidren(btnAttention);
            //1.该住宅您的管理员数据(云端数据)将全部转移给新的管理员
            //2.您的数据将会与目标成员互换,您的权限将变更为目标成员的权限
            var listContr = this.AddListMsgControls(bodyFrameLayout, Language.StringByID(StringId.AdminAuthorityTransferMag2), CSS_FontSize.PromptFontSize_FirstLevel,
                CSS_Color.TextualColor, Application.GetRealHeight(18), btnAttention.Bottom + Application.GetRealHeight(8), TextAlignment.CenterLeft);
            //确认转移
            var btnConfirm = new BottomClickButton(220);
            btnConfirm.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(75);
            btnConfirm.TextID = StringId.ConfirmTransfer2;
            bodyFrameLayout.AddChidren(btnConfirm);
            btnConfirm.ButtonClickEvent += (sender, e) =>
            {
                var form = new AdminMigrationMemberListPage();
                form.AddForm();
            };
    }
        #endregion
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationInputPage.cs
File was deleted
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationMemberConfirmPage.cs
New file
@@ -0,0 +1,210 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using HDL_ON.Stan;
using HDL_ON.Entity;
namespace HDL_ON.UI
{
    /// <summary>
    /// 管理员权限迁移成员资料确认界面
    /// </summary>
    public class AdminMigrationMemberConfirmPage : EditorCommonForm
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 成员信息
        /// </summary>
        private ResidenceMemberInfo memberInfo = null;
        #endregion
        #region ■ 初始化_____________________________
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        /// <param name="i_memberInfo">成员信息</param>
        public void ShowForm(ResidenceMemberInfo i_memberInfo)
        {
            this.memberInfo = i_memberInfo;
            //个人资料
            base.SetTitleText(Language.StringByID(StringId.Profile));
            //初始化中部信息
            this.InitMiddleFrame();
        }
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
            //上部的白色背景
            var frameBack1 = new FrameLayout();
            frameBack1.BackgroundColor = CSS_Color.MainBackgroundColor;
            frameBack1.Height = Application.GetRealHeight(204);
            bodyFrameLayout.AddChidren(frameBack1);
            //头像
            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 = string.IsNullOrEmpty(memberInfo.nickName) == true ? memberInfo.memberName : memberInfo.nickName;
            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 = memberInfo.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.ConfirmTransfer2;
            frameBack2.AddChidren(btnConform);
            btnConform.ButtonClickEvent += (sender, e) =>
            {
                //如果设置有安全验证,则需要验证
                HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
                {
                    //如果没有设置有安全验证
                    if (div == 0)
                    {
                        //确认转移{0}的管理员权限给账号{1}
                        string msg = Language.StringByID(StringId.TransferreConfirmMsg3).Replace("{0}", DB_ResidenceData.Instance.CurrentRegion.homeName);
                        msg = msg.Replace("{1}", btnName.Text);
                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, msg, () =>
                        {
                            //执行迁移管理员权限
                            this.DoAdminAuthorityMigration();
                        });
                    }
                    else
                    {
                        //执行迁移管理员权限
                        this.DoAdminAuthorityMigration();
                    }
                });
            };
            HdlThreadLogic.Current.RunThread(() =>
            {
                //用线程去下载头像
                var headImageBytes = ImageUtlis.Current.DownHeadImageByImageKey(this.memberInfo.memberHeadIcon, true);
                if (headImageBytes != null && headImageBytes.Length > 0)
                {
                    HdlThreadLogic.Current.RunMain(() =>
                    {
                        btnHeadImage.ImageBytes = headImageBytes;
                    }, ShowErrorMode.NO);
                }
            });
        }
        #endregion
        #region ■ 执行迁移管理员权限_________________
        /// <summary>
        /// 执行迁移管理员权限
        /// </summary>
        private void DoAdminAuthorityMigration()
        {
            this.ShowProgressBar();
            HdlThreadLogic.Current.RunThread(() =>
            {
                //瞎玩的一个特效而已
                System.Threading.Thread.Sleep(1000);
                //执行权限迁移
                var result = new DAL.Server.HttpServerRequest().AdminAuthorityMigration(this.memberInfo.childAccountId);
                this.CloseProgressBar();
                HdlThreadLogic.Current.RunMain(() =>
                {
                    var form = new AdminMigrationResultPage();
                    form.AddForm(result);
                    form.FinishEvent += () =>
                    {
                        if (result == false)
                        {
                            //重试
                            this.DoAdminAuthorityMigration();
                        }
                        else
                        {
                            //成功 -> 刷新App缓存及界面
                            this.RefreshAppMemoryAndForm();
                        }
                    };
                });
            });
        }
        /// <summary>
        /// 刷新App缓存及界面
        /// </summary>
        private void RefreshAppMemoryAndForm()
        {
            //刷新缓存(注意,里面既有ui,也有http,也有转圈的那个东西)
            Common.ApiUtlis.Ins.DownloadData();
            HdlThreadLogic.Current.RunThread(() =>
            {
                while (Common.ApiUtlis.Ins.DownloadDataComplete == false)
                {
                    //等待DownloadData函数结束
                    System.Threading.Thread.Sleep(300);
                }
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //关闭所有界面
                    HdlFormLogic.Current.CloseAllOpenForm();
                    //获取主页的那个容器
                    var userPage = MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1) as UserPage;
                    if (userPage != null)
                    {
                        //刷新个人中心界面
                        MainPage.CurPageIndex = 1;
                        userPage.ChoosePersonalCenter();
                    }
                });
            });
        }
        #endregion
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationMemberListPage.cs
New file
@@ -0,0 +1,180 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using HDL_ON.Stan;
using HDL_ON.Entity;
using System.Collections.Generic;
namespace HDL_ON.UI
{
    /// <summary>
    /// 管理员权限迁移的成员列表界面
    /// </summary>
    public class AdminMigrationMemberListPage : EditorCommonForm
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 成员列表
        /// </summary>
        private List<ResidenceMemberInfo> listMember = null;
        #endregion
        #region ■ 初始化_____________________________
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
        {
            //管理员权限转移
            base.SetTitleText(Language.StringByID(StringId.AdminAuthorityTransfer));
            //初始化中部信息
            this.InitMiddleFrame();
        }
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private void InitMiddleFrame()
        {
            HdlThreadLogic.Current.RunThread(() =>
            {
                this.ShowProgressBar();
                //获取成员列表
                var responePack = new DAL.Server.HttpServerRequest().GetResidenceMemberAccount();
                if (responePack.Code != DAL.Server.StateCode.SUCCESS)
                {
                    //提示
                    DAL.Server.IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
                    this.CloseProgressBar(ShowReLoadMode.YES);
                    return;
                }
                this.CloseProgressBar();
                this.listMember = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString());
                if (listMember.Count == 0)
                {
                    //检测不到可供选择的成员
                    HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.NotHadMemberToSelect));
                    return;
                }
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //列表控件
                    var listView = new VerticalListControl();
                    listView.Height = bodyFrameLayout.Height;
                    listView.BackgroundColor = CSS_Color.MainBackgroundColor;
                    bodyFrameLayout.AddChidren(listView);
                    var listIcon = new List<ImageView>();
                    for (int i = 0; i < listMember.Count; i++)
                    {
                        //添加成员行控件
                        var btnIcon = this.AddMemberRowcontrol(listView, listMember[i], i != listMember.Count - 1);
                        listIcon.Add(btnIcon);
                    }
                    //调整桌布高度
                    listView.AdjustRealHeight(0);
                    //获取成员头像
                    this.DownLoadUserIcon(listIcon);
                });
            });
        }
        #endregion
        #region ■ 添加成员行控件_____________________
        /// <summary>
        /// 添加成员行控件
        /// </summary>
        /// <param name="listView">列表控件</param>
        /// <param name="memberInfo">成员信息</param>
        /// <param name="addLine">是否添加底线</param>
        private ImageView AddMemberRowcontrol(VerticalListControl listView, ResidenceMemberInfo memberInfo, bool addLine)
        {
            //行控件
            var rowContr = new FrameRowControl();
            rowContr.Height = Application.GetRealHeight(65);
            listView.AddChidren(rowContr);
            //头像(初始)
            var btnIcon = new ImageView();
            btnIcon.X = HdlControlResourse.XXLeft;
            btnIcon.Width = this.GetPictrueRealSize(36);
            btnIcon.Height = this.GetPictrueRealSize(36);
            btnIcon.Gravity = Gravity.CenterVertical;
            btnIcon.Radius = (uint)this.GetPictrueRealSize(36) / 2;
            btnIcon.ImagePath = "LoginIcon/2.png";
            rowContr.AddChidren(btnIcon);
            //昵称
            var nickName = string.IsNullOrEmpty(memberInfo.nickName) == true ? memberInfo.memberName : memberInfo.nickName;
            var btnName = rowContr.AddTopView(nickName, 200);
            btnName.TextColor = CSS_Color.textColor;
            btnName.X = btnIcon.Right + Application.GetRealWidth(12);
            btnName.Y = Application.GetRealHeight(12);
            //邮箱或者手机号
            var strPhone = string.IsNullOrEmpty(memberInfo.childAccountPhone) == true ? memberInfo.childAccountEmail : memberInfo.childAccountPhone;
            var btnPhone = rowContr.AddBottomView(strPhone, 200);
            btnPhone.X = btnName.X;
            btnPhone.Y = btnName.Bottom + Application.GetRealHeight(4);
            //右箭头
            rowContr.AddRightArrow();
            //底线
            if (addLine == true)
            {
                rowContr.AddBottomLine();
            }
            rowContr.ButtonClickEvent += (sender, e) =>
            {
                var form = new AdminMigrationMemberConfirmPage();
                form.AddForm(memberInfo);
            };
            return btnIcon;
        }
        #endregion
        #region ■ 获取成员头像_______________________
        /// <summary>
        /// 获取成员头像
        /// </summary>
        /// <param name="listIcon">头像控件列表,它的索引和this.listMember一致</param>
        private void DownLoadUserIcon(List<ImageView> listIcon)
        {
            HdlThreadLogic.Current.RunThread(() =>
            {
                for (int i = 0; i < this.listMember.Count; i++)
                {
                    var resultData = ImageUtlis.Current.DownHeadImageByImageKey(this.listMember[i].memberHeadIcon, false, this.listMember[i].childAccountRegionUrl);
                    if (this.Parent == null)
                    {
                        //界面已经关闭
                        return;
                    }
                    if (resultData != null && resultData.Length > 0)
                    {
                        int nowIndex = i;
                        HdlThreadLogic.Current.RunMain(() =>
                        {
                            listIcon[nowIndex].ImageBytes = resultData;
                        }, ShowErrorMode.NO);
                    }
                    System.Threading.Thread.Sleep(200);
                }
            }, ShowErrorMode.NO);
        }
        #endregion
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/AdminMigrationResultPage.cs
New file
@@ -0,0 +1,105 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using HDL_ON.Stan;
using System.Collections.Generic;
using HDL_ON.Entity;
namespace HDL_ON.UI
{
    /// <summary>
    /// 管理员权限迁移结果界面
    /// </summary>
    public class AdminMigrationResultPage : EditorCommonForm
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 结束事件
        /// </summary>
        public Action FinishEvent = null;
        #endregion
        #region ■ 初始化_____________________________
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        /// <param name="i_memberInfo">成员信息</param>
        /// <param name="i_success">是否成功</param>
        public void ShowForm(bool i_success)
        {
            this.ScrollLeftEnabled = false;
            //管理员权限转移
            base.SetTitleText(Language.StringByID(StringId.AdminAuthorityTransfer));
            //初始化中部信息
            this.InitMiddleFrame(i_success);
            //移除返回键
            base.RemoveBackButton();
        }
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        /// <param name="i_success">是否成功</param>
        private void InitMiddleFrame(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)
            {
                //迁移成功
                string strMsg = Language.StringByID(StringId.TransferreSuccess1);
                listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS_FontSize.SubheadingFontSize, CSS_Color.MainColor, Application.GetRealHeight(24),
                    btnPictrue.Bottom + Application.GetRealHeight(16));
                //迁移成功,您的权限将变为普通成员
                strMsg = Language.StringByID(StringId.TransferreSuccessMsg1);
                this.AddListMsgControls(bodyFrameLayout, strMsg, CSS_FontSize.PromptFontSize_FirstLevel, CSS_Color.TextualColor, Application.GetRealHeight(18),
                    listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(8));
            }
            else
            {
                //迁移失败
                string strMsg = Language.StringByID(StringId.TransferreFail1);
                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.Y = Application.GetRealHeight(337);
            btnConfirm.TextID = i_success == true ? StringId.Complete : StringId.Retry;
            bodyFrameLayout.AddChidren(btnConfirm);
            btnConfirm.ButtonClickEvent += (sender, e) =>
            {
                this.CloseForm();
                //回调函数
                this.FinishEvent?.Invoke();
                this.FinishEvent = null;
            };
        }
        #endregion
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs
@@ -99,9 +99,24 @@
                //如果设置有安全验证,则需要验证
                HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
                {
                    //如果没有设置有安全验证
                    if (div == 0)
                    {
                        //确认过户{0}的管理员账号给账号{1}
                        string msg = Language.StringByID(StringId.TransferreConfirmMsg2).Replace("{0}", Entity.DB_ResidenceData.Instance.CurrentRegion.homeName);
                        msg = msg.Replace("{1}", btnName.Text);
                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.TransferreConfirmMsg2), () =>
                        {
                    var form = new TransferingResidenceForm();
                    form.AddForm(this.accountInfo);
                });
                    }
                    else
                    {
                        var form = new TransferingResidenceForm();
                        form.AddForm(this.accountInfo);
                    }
                });
            };
            HdlThreadLogic.Current.RunThread(() =>