| | |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | |
| | | |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | |
| | | Width = Application.GetRealWidth(82), |
| | | Height = Application.GetRealWidth(84), |
| | | UnSelectedImagePath = "PirIcon/add.png", |
| | | Visible=false, |
| | | Visible = false, |
| | | |
| | | }; |
| | | middFLayout.AddChidren(addDevice); |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region 界面点击事件 |
| | | ///下拉刷新界面事件 |
| | | vv.BeginHeaderRefreshingAction += () => |
| | | { |
| | | ////关闭刷新View; |
| | | vv.EndHeaderRefreshing(); |
| | | |
| | | PirMethod.GetControlList(this, () => |
| | | { |
| | | ////关闭刷新View; |
| | | vv.EndHeaderRefreshing(); |
| | | |
| | | PirMethod.GetControlList(this, () => |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //刷新界面 |
| | | UIView(vv); |
| | | }); |
| | | }, Pir.currPir); |
| | | //刷新界面 |
| | | UIView(vv); |
| | | }); |
| | | }, Pir.currPir); |
| | | |
| | | }; |
| | | }; |
| | | ///设置图标点击事件 |
| | | topView.clickSetBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | GetDeviceTypeList(true, () => |
| | | { |
| | | DeviceTypeViewClick(if_value); |
| | | //获取成功之后移除 |
| | | view.RemoveFromParent(); |
| | | //获取成功之后移除 |
| | | view.RemoveFromParent(); |
| | | |
| | | }); |
| | | } |
| | |
| | | //遥控器名称 |
| | | controlView.nameBtn.Text = control.name; |
| | | //遥控器存放区域 |
| | | controlView.areaBtn.Text = Intelligence.Automation.LogicMethod.CurrLogicMethod.GetGetRoomName(control); |
| | | controlView.areaBtn.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(control); |
| | | //标记遥控器 |
| | | controlView.delBtn.Tag = control; |
| | | //删除点击事件 |
| | |
| | | TipPopView tipPopView = new TipPopView(); |
| | | tipPopView.TipBox(StringId.tip, text, (dialog) => |
| | | { |
| | | PirMethod.ThreadSend(new Control { deviceId=control.deviceId}, (responsePackNew) => |
| | | PirMethod.ThreadSend(new Control { deviceId = control.deviceId }, (responsePackNew) => |
| | | { |
| | | dialog.Close(); |
| | | var function = Pir.currPir.FunctioList.Find((c) => c.sid == Function.sid); |
| | |
| | | { |
| | | EditControl editControl = new EditControl(); |
| | | MainPage.BasePageView.AddChidren(editControl); |
| | | editControl.Show(control,(device) => |
| | | editControl.Show(control, (device) => |
| | | { |
| | | //回调更新名字/区域 |
| | | controlView.nameBtn.Text = device.name; |
| | | controlView.areaBtn.Text = Intelligence.Automation.LogicMethod.CurrLogicMethod.GetGetRoomName(device); |
| | | controlView.areaBtn.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(device); |
| | | |
| | | }); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |