| | |
| | | var list2 = this.GetVideoDeviceList(); |
| | | list.AddRange(list1); |
| | | list.AddRange(list2); |
| | | GetTestDevice(ref list, true); |
| | | GetTestDevice(ref list, false); |
| | | return list; |
| | | } |
| | | /// <summary> |
| | |
| | | public List<HDL_ON.Entity.Function> GetVideoDeviceList() |
| | | { |
| | | var functionList = new List<Function>(); |
| | | foreach (var videoDevice in FunctionList.List.videoIntercom) { |
| | | foreach (var videoDevice in FunctionList.List.videoIntercom) |
| | | { |
| | | Function function = new Function(); |
| | | function.spk = videoDevice.spk; |
| | | function.name = videoDevice.deviceName; |
| | |
| | | function.online = videoDevice.status== "online"; |
| | | function.sid = videoDevice.sid; |
| | | var video = functionList.Find((o) => o.deviceId == function.deviceId); |
| | | if (video == null) { |
| | | if (video == null) |
| | | { |
| | | functionList.Add(function); |
| | | } |
| | | |
| | |
| | | string strPath = ""; |
| | | switch (functionType) |
| | | { |
| | | case SPK.MechanicalArm: |
| | | { |
| | | strPath = "LogicIcon/lightloguc.png"; |
| | | } |
| | | break; |
| | | case SPK.doorgate: |
| | | { |
| | | strPath = "VideoIcon/keshiduijiang.png"; |
| | |
| | | case SPK.SensorPir: |
| | | case SPK.SensorDoorWindow: |
| | | case SPK.SensorUtrasonic: |
| | | case SPK.SensorMmvPose: |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SenesorMegahealth2: |
| | | case SPK.SensorEnvironment: |
| | |
| | | { |
| | | List<string> deviceStrTypeList = new List<string>(); |
| | | deviceStrTypeList.Clear(); |
| | | |
| | | ///灯光类 |
| | | var lightjosn = deviceList.Find((device) => |
| | | device.spk == SPK.LightSwitch |
| | |
| | | || device.spk == SPK.SensorPir |
| | | || device.spk == SPK.SensorDoorWindow |
| | | || device.spk == SPK.SensorUtrasonic |
| | | || device.spk == SPK.SensorMmvPose |
| | | || device.spk == SPK.SenesorMegahealth |
| | | || device.spk == SPK.SenesorMegahealth2 |
| | | || device.spk == SPK.SensorEnvironment |
| | |
| | | { |
| | | deviceStrTypeList.Add(Language.StringByID(StringId.VideoIntercom)); |
| | | } |
| | | ///机械手类 |
| | | var MechanicalArm = deviceList.Find((device) => |
| | | device.spk == SPK.MechanicalArm); |
| | | if (MechanicalArm != null) |
| | | { |
| | | deviceStrTypeList.Add(Language.StringByID(StringId.jixieshou)); |
| | | } |
| | | return deviceStrTypeList; |
| | | |
| | | } |
| | |
| | | public List<string> GetDeviceTypeFunctionList(string deviceType) |
| | | { |
| | | List<string> functionTypeList = new List<string>(); |
| | | |
| | | ///灯光类 |
| | | if (deviceType == Language.StringByID(StringId.Lights)) |
| | | { |
| | |
| | | functionTypeList.Add(SPK.SensorPir); |
| | | functionTypeList.Add(SPK.SensorDoorWindow); |
| | | functionTypeList.Add(SPK.SensorUtrasonic); |
| | | functionTypeList.Add(SPK.SensorMmvPose); |
| | | functionTypeList.Add(SPK.SenesorMegahealth); |
| | | functionTypeList.Add(SPK.SenesorMegahealth2); |
| | | functionTypeList.Add(SPK.SensorEnvironment); |
| | |
| | | else if (deviceType == Language.StringByID(StringId.VideoIntercom)) |
| | | { |
| | | functionTypeList.Add(SPK.doorgate); |
| | | } ///机械手类 |
| | | else if (deviceType == Language.StringByID(StringId.jixieshou)) |
| | | { |
| | | functionTypeList.Add(SPK.MechanicalArm); |
| | | } |
| | | else |
| | | { |
| | |
| | | functionTypeList.Add(SPK.SensorPir); |
| | | functionTypeList.Add(SPK.SensorDoorWindow); |
| | | functionTypeList.Add(SPK.SensorUtrasonic); |
| | | functionTypeList.Add(SPK.SensorMmvPose); |
| | | functionTypeList.Add(SPK.SenesorMegahealth); |
| | | functionTypeList.Add(SPK.SenesorMegahealth2); |
| | | functionTypeList.Add(SPK.SensorEnvironment); |
| | |
| | | functionTypeList.Add(SPK.MusicStandard); |
| | | functionTypeList.Add(SPK.AvMusic); |
| | | functionTypeList.Add(SPK.doorgate); |
| | | functionTypeList.Add(SPK.MechanicalArm); |
| | | |
| | | } |
| | | |
| | |
| | | deviceTypeList.Add(SPK.SensorPir); |
| | | deviceTypeList.Add(SPK.SensorDoorWindow); |
| | | deviceTypeList.Add(SPK.SensorUtrasonic); |
| | | deviceTypeList.Add(SPK.SensorMmvPose); |
| | | deviceTypeList.Add(SPK.SenesorMegahealth); |
| | | deviceTypeList.Add(SPK.SenesorMegahealth2); |
| | | deviceTypeList.Add(SPK.SensorEnvironment); |
| | |
| | | deviceTypeList.Add(SPK.CurtainDream); |
| | | deviceTypeList.Add(SPK.MusicStandard); |
| | | deviceTypeList.Add(SPK.AvMusic); |
| | | deviceTypeList.Add(SPK.MechanicalArm); |
| | | } |
| | | break; |
| | | } |
| | |
| | | /// <returns></returns> |
| | | public List<Entity.Function> GetFunctionDeviceList(Entity.Room room, string str) |
| | | { |
| | | List<string> functionTypeList = GetSupportEquipment(str); |
| | | List<string> functionTypeList = this.GetSupportEquipment(str); |
| | | //返回房间设备列表 |
| | | var roomDeviceList = GetRoomDevice(room); |
| | | var roomDeviceList = this.GetRoomDevice(room); |
| | | //返回最终支持显示出来的设备列表 |
| | | var list = GetShowDeviceList(functionTypeList, roomDeviceList); |
| | | var list =this.GetShowDeviceList(functionTypeList, roomDeviceList); |
| | | return list; |
| | | } |
| | | /// <summary> |
| | |
| | | //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 = "1234567893", name = "红外对射传感器", spk = Entity.SPK.SensorDuiShe }, |
| | | // new Entity.Function { sid = "1234567895", name = "超声波传感器", spk = Entity.SPK.SensorUtrasonic }, |
| | | new Entity.Function { sid = "1234567896", name = "毫米波传感器", spk = Entity.SPK.SenesorMegahealth }, |
| | | new Entity.Function { sid = "1234567897", name = "毫米波传感器1", spk = Entity.SPK.SenesorMegahealth2 }, |
| | | new Entity.Function { sid = "1234567899", name = "门磁传感器", spk = Entity.SPK.SensorDoorWindow }, |
| | | new Entity.Function { sid = "12345678933456", name = "调光灯", spk = Entity.SPK.LightDimming }, |
| | | new Entity.Function { sid = "1234567895444", name = "cct", spk = Entity.SPK.LightCCT }, |
| | | //new Entity.Function { sid = "1234567896", name = "毫米波传感器", spk = Entity.SPK.SenesorMegahealth }, |
| | | // new Entity.Function { sid = "1234567897", name = "毫米波传感器1", spk = Entity.SPK.SenesorMegahealth2 }, |
| | | // new Entity.Function { sid = "1234567899", name = "门磁传感器", spk = Entity.SPK.SensorDoorWindow }, |
| | | // new Entity.Function { sid = "12345678991234", name = "HDL机械手", spk = Entity.SPK.MechanicalArm }, |
| | | // new Entity.Function { sid = "123456789912345", name = "海曼机械手", spk = Entity.SPK.MechanicalArm }, |
| | | // new Entity.Function { sid = "12345678991234566", name = "海曼机械手", spk = Entity.SPK.MechanicalArm }, |
| | | }; |
| | | foreach (var function in functions) |
| | | { |