| | |
| | | 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"); |
| | | RefreshView(); |
| | | |
| | | }; |
| | | #endregion |
| | | } |
| | | /// <summary> |
| | | /// 刷新红外宝主界面 |
| | | /// </summary> |
| | | void RefreshView() |
| | | { |
| | | |
| | | //移除红外宝根界面 |
| | | MainPage.BasePageView.RemoveViewByTag("PirMain"); |
| | | //重新加载界面 |
| | |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | }; |
| | | #endregion |
| | | } |
| | | } |
| | | } |