| | |
| | | DeviceType.IASZone, |
| | | DeviceType.OnOffSwitch, |
| | | DeviceType.OnOffOutput,//楼梯灯 |
| | | DeviceType.DoorLock |
| | | DeviceType.DoorLock, |
| | | DeviceType.TemperatureSensor, |
| | | }; |
| | | |
| | | ///楼层点击事件 |
| | |
| | | ///第一次进来 |
| | | var roomlists = new List<Common.Room>(); |
| | | roomlists.Clear(); |
| | | if (Config.Instance.Home.FloorDics.Count < 1) |
| | | if (Config.Instance.Home.FloorDics.Count < 2) |
| | | { |
| | | foolrname.Visible = false; |
| | | dropdown.Visible = false; |
| | |
| | | devicetypelist.Add(Language.StringByID(MyInternationalizationString.Curtains)); |
| | | } |
| | | |
| | | var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone); |
| | | var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone|| device.CommonDevice.Type == DeviceType.TemperatureSensor); |
| | | if (iASZonejosn != null) |
| | | { |
| | | devicetypelist.Add(Language.StringByID(MyInternationalizationString.sensor)); |
| | |
| | | else if (devicetype == Language.StringByID(MyInternationalizationString.sensor)) |
| | | { |
| | | list.Add(DeviceType.IASZone); |
| | | list.Add(DeviceType.TemperatureSensor); |
| | | } |
| | | else if (devicetype == Language.StringByID(MyInternationalizationString.doorLock)) |
| | | { |
| | |
| | | deviceIconBtn.SelectedImagePath = $"ZigeeLogic/selectedsensor{iASZonedevice.IasDeviceType}.png"; |
| | | |
| | | |
| | | } |
| | | break; |
| | | case DeviceType.TemperatureSensor: |
| | | { |
| | | var temperatureSensor = common.CommonDevice as TemperatureSensor; |
| | | if (temperatureSensor.SensorDiv == 1) |
| | | { |
| | | deviceIconBtn.UnSelectedImagePath = $"ZigeeLogic/temperature.png"; |
| | | deviceIconBtn.SelectedImagePath = $"ZigeeLogic/selectedtemperature.png"; |
| | | } |
| | | else |
| | | { |
| | | deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/humidity.png"; |
| | | deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedhumidity.png"; |
| | | } |
| | | } |
| | | break; |
| | | case DeviceType.OnOffSwitch: |
| | |
| | | } |
| | | break; |
| | | |
| | | case DeviceType.TemperatureSensor: |
| | | { |
| | | |
| | | var temperatureSensor = common as TemperatureSensor; |
| | | if (temperatureSensor.SensorDiv == 1) |
| | | { |
| | | dictionary(deviceConditionsInfo, "Cluster_ID", "1026"); |
| | | dictionary(deviceConditionsInfo, "AttriButeId", "0"); |
| | | dictionary(deviceConditionsInfo, "Range", "0"); |
| | | dictionary(deviceConditionsInfo, "AttriButeData1", "0"); |
| | | dictionary(deviceConditionsInfo, "AttriButeData2", "0"); |
| | | |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | dictionary(deviceConditionsInfo, "Cluster_ID", "1029"); |
| | | dictionary(deviceConditionsInfo, "AttriButeId", "0"); |
| | | dictionary(deviceConditionsInfo, "Range", "0");//表示大于值 |
| | | dictionary(deviceConditionsInfo, "AttriButeData1", "0");//温度值 |
| | | dictionary(deviceConditionsInfo, "AttriButeData2", "0"); |
| | | } |
| | | |
| | | } |
| | | break; |
| | | } |
| | | |
| | | Btncomplete.MouseUpEventHandler += (sender2, e2) => |