| | |
| | | middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | this.AddChidren(middle); |
| | | |
| | | ///过滤掉的设备 |
| | | ///目前支持的设备 |
| | | List<DeviceType> deviceTypeList = new List<DeviceType> { |
| | | DeviceType.IASZone, |
| | | DeviceType.OnOffSwitch, |
| | | DeviceType.AirSwitch, |
| | | DeviceType.OnOffOutput, |
| | | DeviceType.DimmableLight, |
| | | DeviceType.WindowCoveringDevice, |
| | | }; |
| | | |
| | | ///房间点击事件 |
| | |
| | | foreach (var device in room.DeviceUIList) { |
| | | if (!deviceTypeList.Contains(device.CommonDevice.Type)) |
| | | { |
| | | list.Add(device); |
| | | continue; |
| | | } |
| | | list.Add(device); |
| | | } |
| | | AllDeviceTypeView(list); |
| | | |
| | |
| | | foreach (var device in Common.Logic.LogicDviceList) |
| | | { |
| | | //过滤掉没有用到设备; |
| | | if (deviceTypeList.Contains(device.Type)) |
| | | if (!deviceTypeList.Contains(device.Type)) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | devicetypelist.Clear(); |
| | | |
| | | #region ------排列设备类型------ |
| | | var lightjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.ColorDimmableLight || device.CommonDevice.Type == DeviceType.OnOffOutput); |
| | | var lightjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.DimmableLight || device.CommonDevice.Type == DeviceType.OnOffOutput); |
| | | if (lightjosn != null) |
| | | { |
| | | devicetypelist.Add(Language.StringByID(MyInternationalizationString.Lights)); |
| | |
| | | if (devicetype == Language.StringByID(MyInternationalizationString.Lights)) |
| | | { |
| | | list.Add(DeviceType.OnOffOutput);//0x0101十进制257 |
| | | list.Add(DeviceType.DimmableLight); |
| | | } |
| | | else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains)) |
| | | { |
| | |
| | | } |
| | | break; |
| | | ///调光灯光 |
| | | case DeviceType.ColorDimmableLight: |
| | | case DeviceType.DimmableLight: |
| | | { |
| | | |
| | | #region ----初始化设备功能数据---- |