| | |
| | | { |
| | | action(); |
| | | this.RemoveFromParent(); |
| | | |
| | | }; |
| | | |
| | | VerticalRefreshLayout vv = new VerticalRefreshLayout(); |
| | | vv.Height = Application.GetRealHeight(667 - 64); |
| | | vv.Y = Application.GetRealHeight(64); |
| | |
| | | }; |
| | | #endregion |
| | | UIView(vv); |
| | | topView.topIconBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var form = new AddMiniRemoteControlDirection1Page(); |
| | | form.AddForm(); |
| | | form.AddDeviceEvent += (device) => |
| | | { |
| | | Pir pir = new Pir(); |
| | | pir.name = device.name; |
| | | pir.deviceId = device.deviceId; |
| | | pir.sid = device.sid; |
| | | Pir.pirDeviceList.Add(pir); |
| | | UIView(vv); |
| | | }; |
| | | |
| | | }; |
| | | |
| | | } |
| | | /// <summary> |
| | |
| | | if (StringId.xiugaimingzi == intValue) |
| | | { |
| | | List<string> list = new List<string>(); |
| | | for (int b = 0; b < Pir.pirDeviceList.Count; b++) |
| | | for (int b = 0; b < PirDevice.Pir.pirDeviceList.Count; b++) |
| | | { |
| | | list.Add(Pir.pirDeviceList[b].name); |
| | | list.Add(PirDevice.Pir.pirDeviceList[b].name); |
| | | } |
| | | Method methodView = new Method(); |
| | | methodView.EditControlName(StringId.xiugaimingzi, list, pirclick.name, (name, view) => |
| | |
| | | TipPopView tipPopView = new TipPopView(); |
| | | tipPopView.TipBox(StringId.tip, text, (dialog) => |
| | | { |
| | | |
| | | Thread(dialog, (responsePackNew) => |
| | | { |
| | | dialog.Close(); |
| | | UIView(vv); |
| | | }, "删除", pirclick.deviceId, ""); |
| | | { |
| | | var pir = Pir.pirDeviceList.Find((c) => c.deviceId == pirclick.deviceId); |
| | | if (pir != null) |
| | | { |
| | | Pir.pirDeviceList.Remove(pirclick); |
| | | } |
| | | dialog.Close(); |
| | | UIView(vv); |
| | | }, "删除", pirclick.deviceId, ""); |
| | | }, () => |
| | | { |
| | | NewSwitchView(pirclick, vv); |
| | |
| | | else |
| | | { |
| | | Method method = new Method(); |
| | | method.ErrorShow(responsePackNew); |
| | | method.ErrorShow(responsePackNew,""); |
| | | } |
| | | |
| | | }); |