黄学彪
2020-09-18 c7df85937f73fb347ee0b19e9c052d2d00a6df6c
ZigbeeApp/Shared/Phone/UserCenter/Transfer/TransferResidenceMainForm.cs
File was renamed from ZigbeeApp/Shared/Phone/UserCenter/Residence/TransferResidenceMainForm.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone.UserCenter.Residence
namespace Shared.Phone.UserCenter.Transfer
{
    /// <summary>
    /// 住宅过户的主界面
@@ -11,6 +11,11 @@
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 1:移交给用户  2:授权给调试人员
        /// </summary>
        private int TransferDiv = 0;
        #endregion
        #region ■ 初始化_____________________________
@@ -18,10 +23,14 @@
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
        /// <param name="i_TransferDiv">1:移交给用户  2:授权给调试人员</param>
        public void ShowForm(int i_TransferDiv)
        {
            this.TransferDiv = i_TransferDiv;
            //设置头部信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uTransferOfResidence));
            base.SetTitleText(i_TransferDiv == 1
                ? Language.StringByID(R.MyInternationalizationString.HandoverToUser).Replace("{0}", string.Empty)
                : Language.StringByID(R.MyInternationalizationString.AuthorizedToCommissioningPersonnel).Replace("{0}", string.Empty));
            //初始化中部信息
            this.InitMiddleFrame();
@@ -45,45 +54,38 @@
            btnMsg1.TextSize = 20;
            btnMsg1.IsBold = true;
            btnMsg1.TextAlignment = TextAlignment.Center;
            btnMsg1.TextID = R.MyInternationalizationString.uTransferOfResidenceToOtherEvoyoAccount1;
            btnMsg1.Text = this.TransferDiv == 1 ? "转移住宅到其他用户账号" : "转移住宅到其他调试人员账号";
            bodyFrameLayout.AddChidren(btnMsg1);
            var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(90), false);
            btnMsg2.Y = btnMsg1.Bottom;
            btnMsg2.TextSize = 20;
            btnMsg2.IsBold = true;
            btnMsg2.TextAlignment = TextAlignment.Center;
            btnMsg2.TextID = R.MyInternationalizationString.uTransferOfResidenceToOtherEvoyoAccount2;
            bodyFrameLayout.AddChidren(btnMsg2);
            //该操作不可逆,请注意:
            var btnTip = new NormalViewControl(900, 60, true);
            btnTip.X = Application.GetRealWidth(135);
            btnTip.Y = btnMsg2.Bottom + Application.GetRealHeight(167);
            btnTip.Y = btnMsg1.Bottom + Application.GetRealHeight(257);
            btnTip.TextID = R.MyInternationalizationString.uThisOperationIsIrreversiblePleaseNote;
            bodyFrameLayout.AddChidren(btnTip);
            //1.接收方为Evoyo Home有效注册账号
            //1.接收方为有效注册账号
            var btnTipMsg1 = new NormalViewControl(900, 55, true);
            btnTipMsg1.X = btnTip.X;
            btnTipMsg1.Y = btnTip.Bottom + Application.GetRealHeight(30);
            btnTipMsg1.TextSize = 12;
            btnTipMsg1.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnTipMsg1.TextID = R.MyInternationalizationString.uTheReceiverIsValidAccountForEvoyoHome;
            btnTipMsg1.Text = "1.接收方为有效注册账号";
            bodyFrameLayout.AddChidren(btnTipMsg1);
            //2.接收方与过户方不可以为同一个账号
            //2.接收方与转移方不可以为同一个账号
            var btnTipMsg2 = new NormalViewControl(900, 55, true);
            btnTipMsg2.X = btnTip.X;
            btnTipMsg2.Y = btnTipMsg1.Bottom + Application.GetRealHeight(30);
            btnTipMsg2.TextSize = 12;
            btnTipMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnTipMsg2.TextID = R.MyInternationalizationString.uTheReceiverAndTheTransferPartyCannotBeTheSameAccount;
            btnTipMsg2.Text = "2.接收方与转移方不可以为同一个账号";
            bodyFrameLayout.AddChidren(btnTipMsg2);
            //3.过户成功后,将取消过户方成员对该住宅的使用权
            //3.转移成功后,将取消转移方成员对该住宅的使用权
            var btnTipMsg3 = new NormalViewControl(900, 55, true);
            btnTipMsg3.X = btnTip.X;
            btnTipMsg3.Y = btnTipMsg2.Bottom + Application.GetRealHeight(30);
            btnTipMsg3.TextSize = 12;
            btnTipMsg3.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnTipMsg3.TextID = R.MyInternationalizationString.uIfTheTransferIsSuccessfulTheRightToUseTheHouseWillBeCancelled;
            btnTipMsg3.Text = "3.转移成功后,将取消转移方成员对该住宅的使用权";
            bodyFrameLayout.AddChidren(btnTipMsg3);
            //输入账号
@@ -95,7 +97,7 @@
            btnInputAccount.ButtonClickEvent += (sender, e) =>
            {
                var form = new TransferResidenceByIdForm();
                form.AddForm();
                form.AddForm(this.TransferDiv);
            };
            //扫描二维码的背景
@@ -145,7 +147,7 @@
        {
            var pra = new AccountInfoPra();
            pra.Account = accountId;
            var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string>() { "AccountNoExists" });
            var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string> { "NotCheck" });
            if (byteData == null)
            {
                //异常
@@ -165,6 +167,12 @@
            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(revertObj.ResponseData.ToString());
            infoResult.Account = accountId;
            HdlThreadLogic.Current.RunMain(() =>
            {
                var form2 = new AddMemberInfoForm();
                form2.AddForm(infoResult, this.TransferDiv);
            });
        }
        #endregion