| | |
| | | { |
| | | public SetPir() |
| | | { |
| | | Tag = "PirMain"; |
| | | Tag = "PirView"; |
| | | } |
| | | Action backAction; |
| | | public void Show(Action action) |
| | | public void Show() |
| | | { |
| | | backAction = action; |
| | | #region 界面布局 |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | Intelligence.Automation.LogicView.TopView topView = new Intelligence.Automation.LogicView.TopView(); |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.clickBackBtn.MouseUpEventHandler += (e, sen) => |
| | | { |
| | | //action(); |
| | | RemoveFromParent(); |
| | | }; |
| | | topView.topNameBtn.TextID = StringId.setlogic; |
| | |
| | | Pir.pirDeviceList.Remove(Pir.currPir); |
| | | } |
| | | dialog.Close(); |
| | | action(); |
| | | this.RemoveFromParent(); |
| | | for (int i = MainPage.BasePageView.ChildrenCount - 1; 0 <= i; i--) |
| | | { |
| | | var view = MainPage.BasePageView.GetChildren(i); |
| | | if (view.GetType() == typeof(PirMain)) |
| | | { |
| | | view.RemoveFromParent(); |
| | | } |
| | | } |
| | | Method.RemoveView("PirMain"); |
| | | }, "删除", "dialog", null, dialog); |
| | | |
| | | }, () => |
| | |
| | | /// </summary> |
| | | public override void RemoveFromParent() |
| | | { |
| | | backAction(); |
| | | //刷新PirMain界面 |
| | | Method.RefreshView("PirMain"); |
| | | base.RemoveFromParent(); |
| | | |
| | | } |
| | | } |
| | | } |