| | |
| | | list.AddRange(list2); |
| | | list.AddRange(FunctionList.List.groupControls); |
| | | #if DEBUG |
| | | GetTestDevice(ref list, true); |
| | | //GetTestDevice(ref list, true); |
| | | #endif |
| | | return list; |
| | | } |
| | |
| | | function.spk = videoDevice.spk; |
| | | function.name = videoDevice.deviceName; |
| | | function.deviceId = videoDevice.deviceId; |
| | | function.online = videoDevice.status == "online"; |
| | | function.setOnine( videoDevice.status == "online"); |
| | | function.sid = videoDevice.sid; |
| | | var video = functionList.Find((o) => o.deviceId == function.deviceId); |
| | | if (video == null) |
| | |
| | | { |
| | | return "MusicIcon/localMusic.png"; |
| | | } |
| | | else if (SPK.SensorPm10 == device.spk || SPK.SensorPirHold == device.spk) |
| | | else if (SPK.SensorPm10 == device.spk |
| | | || SPK.SensorPirHold == device.spk |
| | | ) |
| | | { |
| | | return "LogicIcon/sensor.png"; |
| | | } |
| | |
| | | { |
| | | return "FunctionIcon/DoorLock/DoorLock.png"; |
| | | } |
| | | //else if (SPK.SensorDryContact == device.spk |
| | | // || SPK.SensorDryContact2 == device.spk |
| | | // || SPK.OtherCommon == device.spk |
| | | // ) |
| | | //{ |
| | | // return "LogicIcon/ganjiedian.png"; |
| | | //} |
| | | else if (SPK.SensorLight == device.spk) |
| | | { |
| | | return "LogicIcon/lightloguc.png"; |
| | | } |
| | | //LogicIcon/heatlogic.png" |
| | | return $"FunctionIcon/Icon/{device.IconName}.png"; |
| | | |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 获取设备类型图标(已弃用 2022年11月25日14:07:30) |
| | | /// </summary> |
| | |
| | | || device.spk == SPK.LightCCT |
| | | || device.spk == SPK.LightRGB |
| | | || device.spk == SPK.LightRGBW |
| | | || device.spk == SPK.OtherCommon |
| | | ); |
| | | if (lightjosn != null) |
| | | { |
| | |
| | | || device.spk == SPK.SensorHelp |
| | | || device.spk == SPK.SensorPm10 |
| | | || device.spk == SPK.SensorPirHold |
| | | || device.spk == SPK.SensorLight |
| | | ); |
| | | if (sensor != null) |
| | | { |
| | |
| | | functionTypeList.Add(SPK.AirSwitch); |
| | | functionTypeList.Add(SPK.PanelSocket); |
| | | functionTypeList.Add(SPK.ElectricSocket); |
| | | functionTypeList.Add(SPK.OtherCommon); |
| | | } |
| | | //群控 |
| | | else if (deviceType == Language.StringByID(StringId.GroupControl)) |
| | |
| | | functionTypeList.Add(SPK.SensorHelp); |
| | | functionTypeList.Add(SPK.SensorPm10); |
| | | functionTypeList.Add(SPK.SensorPirHold); |
| | | functionTypeList.Add(SPK.SensorLight); |
| | | |
| | | |
| | | } |
| | |
| | | functionTypeList.Add(SPK.AcIr); |
| | | functionTypeList.Add(SPK.SensorPirHold); |
| | | functionTypeList.Add(SPK.ElectricalTvHisense); |
| | | functionTypeList.Add(SPK.SensorLight); |
| | | functionTypeList.Add(SPK.OtherCommon); |
| | | |
| | | } |
| | | |
| | |
| | | deviceTypeList.Add(SPK.VideoDoorLock); |
| | | deviceTypeList.Add(SPK.AcIr); |
| | | deviceTypeList.Add(SPK.SensorPirHold); |
| | | deviceTypeList.Add(SPK.SensorLight); |
| | | |
| | | } |
| | | break; |
| | |
| | | deviceTypeList.Add(SPK.MechanicalArm); |
| | | deviceTypeList.Add(SPK.AcIr); |
| | | deviceTypeList.Add(SPK.ElectricalTvHisense); |
| | | deviceTypeList.Add(SPK.OtherCommon); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | //模拟设备 |
| | | var functions = new List<Function> { |
| | | //new Entity.Function { sid = "1234567890", name = "超声波传感器", spk = Entity.SPK.SensorUtrasonic }, |
| | | // new Entity.Function { sid = "1234567891", name = "温度传感器", spk = Entity.SPK.SensorTemperature }, |
| | | // new Entity.Function { sid = "1234567892", name = "湿度传感器", spk = Entity.SPK.SensorHumidity }, |
| | | new Entity.Function { sid = "1234567890", name = "光照传感器", spk = Entity.SPK.SensorLight }, |
| | | new Entity.Function { sid = "1234567891", name = "干节点", spk = Entity.SPK.SensorDryContact }, |
| | | new Entity.Function { sid = "1234567892", name = "紧急求助传感器", spk = Entity.SPK.SensorHelp }, |
| | | new Entity.Function { sid = "12345678921", name = "通用开关", spk = Entity.SPK.OtherCommon }, |
| | | //new Entity.Function { sid = "12345678933456", name = "门锁", spk = Entity.SPK.DoorLock }, |
| | | // new Entity.Function { sid = "1234567895444", name = "视频门锁", spk = Entity.SPK.VideoDoorLock }, |
| | | //new Entity.Function { sid = "12345678968888", name = "人体存在传感器", spk = Entity.SPK.SensorPirHold }, |