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/AddDevice/AddMiniRemoteControlDirection4Page.cs |   33 ++++++++++++---------------------
 1 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs
index ef5b20c..70f04f8 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs
@@ -203,12 +203,12 @@
 
             //鍙互寮�濮嬩娇鐢ㄧ孩澶栭仴鎺у姛鑳斤紒
             var strMsg = Language.StringByID(StringId.AddInfraredRemoteControlMsg7);
-            int yy = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.TextualColor,
+            var listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.TextualColor,
                 Application.GetRealHeight(20), btnFail.Bottom + Application.GetRealHeight(8));
 
             //寮�濮嬩娇鐢�
             var btnUse = new BottomClickButton(220);
-            btnUse.Y = yy + Application.GetRealHeight(60);
+            btnUse.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(60);
             btnUse.TextID = StringId.StartUse;
             bodyFrameLayout.AddChidren(btnUse);
             btnUse.ButtonClickEvent += (sender, e) =>
@@ -220,31 +220,22 @@
                     return;
                 }
                 var form = HdlFormLogic.Current.GetFormByName("AddMiniRemoteControlDirection1Page") as AddMiniRemoteControlDirection1Page;
-                if (form.AddDeviceEvent != null)
+                //if (form.AddDeviceEvent != null)
                 {
                     //浠h〃杩欎釜鏄敱娓╂�婚偅杈硅皟鐢ㄧ殑,鐩存帴鍥炶皟鍑芥暟
-                    form.AddDeviceEvent.Invoke(newDevice);
+                    form.AddDeviceEvent?.Invoke(newDevice);
                     //鍏抽棴鎺夎繖涓晫闈�
                     this.CloseForm();
                     //鍐嶆妸AddMiniRemoteControlDirection1Page鐣岄潰鍏充簡
                     HdlFormLogic.Current.CloseFormByFormName("AddMiniRemoteControlDirection1Page");
                 }
-                else
-                {
-                    //浠h〃杩欏苟涓嶆槸鐢辨俯鎬荤殑鐣岄潰璋冪敤鐨�,鍒欏叧闂帀鍏ㄩ儴鐨勭晫闈�
-                    HdlFormLogic.Current.CloseAllOpenForm();
-                    //鐒跺悗鍐嶆妸娓╂�荤殑鐣岄潰new璧锋潵
-                    HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.GetPirDeviceList(this, () =>
-                    {
-                        Application.RunOnMainThread(() =>
-                        {
-                            var page = new UI2.PersonalCenter.PirDevice.PirMain();
-                            MainPage.BasePageView.AddChidren(page);
-                            page.Show();
-                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-                        });
-                    });
-                }
+                //else
+                //{
+                //    //浠h〃杩欏苟涓嶆槸鐢辨俯鎬荤殑鐣岄潰璋冪敤鐨�,鍒欏叧闂帀鍏ㄩ儴鐨勭晫闈�
+                //    HdlFormLogic.Current.CloseAllOpenForm();
+                //    //鐒跺悗鍐嶆妸娓╂�荤殑鐣岄潰new璧锋潵
+                //    new UI2.PersonalCenter.PirDevice.Method().MainView(this, newDevice,()=> { });
+                //}
             };
         }
 
@@ -359,7 +350,7 @@
         private void RefreshMiniRemoteControlInfo(Action<Entity.Function> successEvent)
         {
             var pra = new Dictionary<string, object>();
-            pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID);
+            pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.id);
             pra.Add("spk", Entity.SPK.IrModule);
 
             var requestJson = DAL.Server.HttpUtil.GetSignRequestJson(pra);

--
Gitblit v1.8.0