| | |
| | | /// PM绑定目标回调 |
| | | /// </summary> |
| | | public Action<string> actionPMTarget = null; |
| | | /// <summary> |
| | | /// 是否能点击保存按钮 |
| | | /// </summary> |
| | | private bool canSave = true; |
| | | #endregion |
| | | |
| | | #region UI设计 |
| | |
| | | curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png"; |
| | | } |
| | | curRoom = room; |
| | | curControlDev.RoomId = room.Id; |
| | | |
| | | //新风面板保存使能 |
| | | btnFinifh.Enable = true; |
| | |
| | | break; |
| | | case 4: |
| | | //PM2.5 |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | targetList.Add(device); |
| | | oldTargetList.Add(device); |
| | | } |
| | | break; |
| | | } |
| | | |
| | |
| | | /// <param name="curControlDev"></param> |
| | | void SaveTarget() |
| | | { |
| | | btnFinifh.Enable = false; |
| | | if (targetList.Count == 0) |
| | | { |
| | | //空目标 |
| | |
| | | break; |
| | | case 4: |
| | | //PM2.5 |
| | | removeDevice.BindCluster = 1066; |
| | | break; |
| | | } |
| | | removeDevice.BindMacAddr = bd.DeviceAddr; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | var mess = ex.Message; |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | btnFinifh.Enable = true; |
| | | } |
| | | }); |
| | | } |
| | |
| | | break; |
| | | case 4: |
| | | //PM2.5 |
| | | addBindInfo.BindCluster = 1066; |
| | | break; |
| | | } |
| | | addBindInfo.BindType = 0; |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | btnFinifh.Enable = true; |
| | | var mess = ex.Message; |
| | | } |
| | | }); |
| | |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | |
| | | if (device != null) |
| | | { |
| | | //获取设备类型的 |
| | |
| | | } |
| | | break; |
| | | case 4: |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | roomIncludeMatchDevice.Add(device); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | //电池设备不支持绑定 |
| | | if (device.ZigbeeType != 1) |
| | | { |
| | | continue; |
| | | } |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | //电池设备不支持绑定 |
| | | if (device.ZigbeeType != 1) |
| | | { |
| | | continue; |
| | | } |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | |
| | | } |
| | | break; |
| | | case 4: |
| | | foreach (var r in supportRoomList) |
| | | { |
| | | if (r.ListDevice.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | | foreach (var deviceKeys in r.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | currentPanelBindSupportDeviceListTemp.Add(device); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | return currentPanelBindSupportDeviceListTemp; |
| | |
| | | } |
| | | break; |
| | | case 4: |
| | | foreach (var deviceKeys in curRoom.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | curRoomDeviceListTemp.Add(device); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | return curRoomDeviceListTemp; |