| | |
| | | { |
| | | Tag = "PirView"; |
| | | } |
| | | public void Show() |
| | | public void Show(Action action) |
| | | { |
| | | #region 界面布局 |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | |
| | | topView.topNameBtn.TextID = StringId.shebeigaunli; |
| | | topView.topIconBtn.Visible = true; |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); }; |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { |
| | | action(); |
| | | this.RemoveFromParent(); |
| | | }; |
| | | VerticalRefreshLayout vv = new VerticalRefreshLayout(); |
| | | vv.Height = Application.GetRealHeight(667 - 64); |
| | | vv.Y = Application.GetRealHeight(64); |
| | |
| | | Width = Application.GetRealWidth(8), |
| | | Height = Application.GetRealWidth(8), |
| | | UnSelectedImagePath = "PirIcon/online.png", |
| | | SelectedImagePath = "PirIcon/offline.png", |
| | | }; |
| | | devfLayout.AddChidren(stateIconBtn); |
| | | //红外宝状态(在线-离线) |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = TextSize.text12, |
| | | TextColor = 0xFF67D569,// CSS.CSS_Color.textColor, |
| | | SelectedTextColor =CSS.CSS_Color.textRedColor, |
| | | IsBold = true, |
| | | }; |
| | | devfLayout.AddChidren(stateTextBtn); |
| | | if (pirDevice.online) { |
| | | stateIconBtn.IsSelected = true; |
| | | stateTextBtn.IsSelected = true; |
| | | } else { |
| | | stateIconBtn.IsSelected = false; |
| | | stateTextBtn.IsSelected = false; |
| | | } |
| | | //线 |
| | | Button lineBtn = new Button |
| | | { |
| | |
| | | { |
| | | if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "") |
| | | { |
| | | pirDevice.FunctioList.Remove(Function); |
| | | var function = pirDevice.FunctioList.Find((c)=>c.sid== Function.sid); |
| | | if (function != null) |
| | | { |
| | | pirDevice.FunctioList.Remove(Function); |
| | | } |
| | | UIView(vv); |
| | | } |
| | | |