| | |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | | public List<Function> GetDoorLockList() |
| | | { |
| | | var spkList = SPK.GetDoorLockSPKList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新风列表 |
| | | /// </summary> |
| | |
| | | public List<Function> GetAirFreshList() |
| | | { |
| | | var spkList = SPK.AirFreshSpkList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | /// <summary> |
| | | /// 面板列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetPanelList() |
| | | { |
| | | var spkList = SPK.PanelSpkList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | |
| | | var spkList = SPK.ArmSensorSpkList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | /// <summary> |
| | | /// 安防中心支持的传感器列表 |
| | | /// </summary> |
| | | public List<Function> GetArmCenterList() |
| | | { |
| | | var spkList = new List<string>() |
| | | { |
| | | SPK.SensorPir, |
| | | SPK.SensorDoorWindow, |
| | | SPK.SensorSmoke, |
| | | SPK.SensorWater, |
| | | SPK.SensorGas, |
| | | }; |
| | | |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 可视对讲列表,当为null或size为0则不显示可视对讲icon |
| | |
| | | /// </summary> |
| | | public List<SecurityAlarm> securities = new List<SecurityAlarm>(); |
| | | |
| | | public List<SecurityAlarm> GetOrdinarySecurities() |
| | | { |
| | | var ordinarySecurities = new List<SecurityAlarm>(); |
| | | foreach (var mode in securities) |
| | | { |
| | | if (mode.type == "all_day" || mode.type == "mute") |
| | | { |
| | | continue; |
| | | } |
| | | ordinarySecurities.Add(mode); |
| | | } |
| | | return ordinarySecurities; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 加载功能列表 |
| | |
| | | |
| | | if(DriverLayer.Control.Ins.GatewayOnline_Local) |
| | | { |
| | | |
| | | //List<Function> functions = GetDeviceFunctionList(SPK.BrandType.Hdl); |
| | | //var sss = functions.OrderBy((obj) => obj.collect); |
| | | |
| | | List<Function> readList = new List<Function>(); |
| | | foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) |
| | | { |
| | | readList.Add(function); |
| | | MainPage.Log($"读取功能状态:{function.name} : {function.sid} "); |
| | | Control.Ins.SendReadCommand(function); |
| | | if (readList.Count > 9) |
| | | { |
| | | Control.Ins.SendReadCommand(readList); |
| | | } |
| | | } |
| | | if(DB_ResidenceData.Instance.GatewayType == 1) |
| | | if (readList.Count > 0) |
| | | { |
| | | Control.Ins.SendReadCommand(readList); |
| | | } |
| | | if (DB_ResidenceData.Instance.GatewayType == 1) |
| | | { |
| | | Dictionary<string, string> pairs = new Dictionary<string, string>(); |
| | | string sendId = Control.Ins.msg_id.ToString(); |
| | |
| | | var page = new List<string>(); |
| | | int count = 0; |
| | | |
| | | //List<Function> functions = GetDeviceFunctionList(SPK.BrandType.Hdl); |
| | | //var sss = functions.OrderBy((obj) => obj.collect); |
| | | foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) |
| | | { |
| | | page.Add(function.deviceId); |