| | |
| | | { |
| | | return "FunctionIcon/DoorLock/DoorLock.png"; |
| | | } |
| | | else if (SPK.SensorDryContact == device.spk |
| | | || SPK.SensorDryContact2 == device.spk) |
| | | { |
| | | return "LogicIcon/ganjiedian.png"; |
| | | } |
| | | else if (SPK.SensorLight == device.spk) |
| | | { |
| | | return "LogicIcon/lightloguc.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) |
| | | { |
| | |
| | | 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.SensorPirHold); |
| | | functionTypeList.Add(SPK.ElectricalTvHisense); |
| | | functionTypeList.Add(SPK.SensorLight); |
| | | functionTypeList.Add(SPK.OtherCommon); |
| | | |
| | | } |
| | | |
| | |
| | | deviceTypeList.Add(SPK.MechanicalArm); |
| | | deviceTypeList.Add(SPK.AcIr); |
| | | deviceTypeList.Add(SPK.ElectricalTvHisense); |
| | | deviceTypeList.Add(SPK.OtherCommon); |
| | | } |
| | | break; |
| | | } |
| | |
| | | get |
| | | { |
| | | return Entity.DB_ResidenceData.Instance.CurrentRegion.isOtherShare; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 拼接时间格式//"{h}h{m}min{s}s"; |
| | | /// </summary> |
| | | /// <param name="totalSeconds">秒(没有默认传入0)</param> |
| | | /// <returns></returns> |
| | | public string getTimeStr(string totalSeconds) |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrEmpty(totalSeconds)) |
| | | { |
| | | return ""; |
| | | } |
| | | int time = int.Parse(totalSeconds); |
| | | int h = time / (60 * 60); |
| | | int m = time % (60 * 60) / 60; |
| | | int s = (time % (60 * 60) % 60); |
| | | |
| | | if (h == 0 && m != 0 && s != 0) |
| | | { |
| | | return $"{m}min{s}s"; |
| | | } |
| | | else if (h == 0 && m == 0 && s != 0) |
| | | { |
| | | return $"{s}s"; |
| | | } |
| | | else if (h == 0 && m != 0 && s == 0) |
| | | { |
| | | return $"{m}min"; |
| | | } |
| | | else if (h != 0 && m == 0 && s != 0) |
| | | { |
| | | return $"{h}h{s}s"; |
| | | } |
| | | else if (h != 0 && m == 0 && s == 0) |
| | | { |
| | | return $"{h}h"; |
| | | } |
| | | else if (h != 0 && m != 0 && s == 0) |
| | | { |
| | | return $"{h}h{m}min"; |
| | | } |
| | | else if (h != 0 && m != 0 && s != 0) |
| | | { |
| | | return $"{h}h{m}min{s}s"; |
| | | } |
| | | else if (h == 0 && m == 0 && s == 0) |
| | | { |
| | | return $"0s"; |
| | | } |
| | | return ""; |
| | | } |
| | | catch |
| | | { |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | |
| | | 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 }, |
| | | new Entity.Function { sid = "123456789688889", name = "人体存在传感器", spk = Entity.SPK.SensorPirHold }, |
| | | new Entity.Function { sid = "12345678968888", name = "测试猫眼", spk = Entity.SPK.Peephole }, |
| | | new Entity.Function { sid = "12345678968889", name = "测试萤石摄像头", spk = Entity.SPK.Ev_Ipcam }, |
| | | // new Entity.Function { sid = "1234567897", name = "毫米波传感器1", spk = Entity.SPK.SenesorMegahealth2 }, |