From fe2b566c8d9c097d2568ad211088fa5bc6f8c229 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 23 三月 2021 13:48:25 +0800 Subject: [PATCH] 2.增加住宅绑定网关判断,没有绑定网关的住宅,ON+不再显示 --- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs index 801b039..2b35cc8 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs @@ -90,13 +90,13 @@ this.AddChidren(namePatchView.FLayoutView()); namePatchView.btnText1.TextID = StringId.yaokongqimingcheng; namePatchView.btnText2.Text = control.name; - + //鎵�灞炲尯鍩� View.PatchView quyuPatchView = new View.PatchView(); quyuPatchView.frameLayout.Y = namePatchView.frameLayout.Bottom; this.AddChidren(quyuPatchView.FLayoutView()); quyuPatchView.btnText1.TextID = StringId.suoshuquyu; - quyuPatchView.btnText2.Text=Intelligence.Automation.LogicMethod.GetGetRoomName(function); + quyuPatchView.btnText2.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(function); //缁х画娣诲姞 Button addBtn = new Button @@ -154,11 +154,13 @@ if (bool_library) { this.RemoveFromParent(); + RefreshView(); } else { Method method = new Method(); - method.AddControl(this, (controlDevice) => { + method.AddControl(this, (controlDevice) => + { AddButton addButton = new AddButton(); MainPage.BasePageView.AddChidren(addButton); addButton.Show(controlDevice); @@ -171,16 +173,24 @@ { //绉婚櫎鎵�鏈夌晫闈� MainPage.BasePageView.RemoveViewByTag("PirView"); - //绉婚櫎绾㈠瀹濇牴鐣岄潰 - MainPage.BasePageView.RemoveViewByTag("PirMain"); - //閲嶆柊鍔犺浇鐣岄潰 - var page = new PirMain(); - MainPage.BasePageView.AddChidren(page); - page.Show(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + RefreshView(); }; #endregion } + /// <summary> + /// 鍒锋柊绾㈠瀹濅富鐣岄潰 + /// </summary> + void RefreshView() + { + + //绉婚櫎绾㈠瀹濇牴鐣岄潰 + MainPage.BasePageView.RemoveViewByTag("PirMain"); + //閲嶆柊鍔犺浇鐣岄潰 + var page = new PirMain(); + MainPage.BasePageView.AddChidren(page); + page.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + } } } -- Gitblit v1.8.0