| | |
| | | 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 |
| | |
| | | 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); |
| | |
| | | { |
| | | //移除所有界面 |
| | | 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; |
| | | } |
| | | } |
| | | } |