From 132dc0402e0c5e22a7d54cdddc1700a1842304bd Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 十二月 2022 15:42:23 +0800 Subject: [PATCH] Merge branch 'wjc' into dev--wxr --- HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 45 insertions(+), 8 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index 4c0e435..c4db742 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -187,7 +187,7 @@ var list2 = this.GetVideoDeviceList(); list.AddRange(list1); list.AddRange(list2); - GetTestDevice(ref list, false); + GetTestDevice(ref list, true); return list; } /// <summary> @@ -343,17 +343,39 @@ return roomName.TrimEnd(','); } - #region 鍔ㄤ竴鏀瑰洓 + /// <summary> /// 鑾峰彇璁惧绫诲瀷鍥炬爣 /// </summary> + /// <param name="device">璁惧</param> + /// <returns></returns> + public string GetDeviceIconPath(Function device) + { + + if (SPK.MusicStandard == device.spk + || SPK.AvMusic == device.spk) + { + return "MusicIcon/localMusic.png"; + } + //LogicIcon/heatlogic.png" + return $"FunctionIcon/Icon/{device.IconName}.png"; + + } + /// <summary> + /// 鑾峰彇璁惧绫诲瀷鍥炬爣(宸插純鐢� 2022骞�11鏈�25鏃�14:07:30) + /// </summary> /// <param name="functionType">璁惧绫诲瀷</param> /// <returns></returns> - public string GetIconPath(string functionType) + public string GetIconPath(string spk) { string strPath = ""; - switch (functionType) + switch (spk) { + case SPK.IpCam_Imou: + { + strPath = $"FunctionIcon/Icon/{SPK.IpCam_Imou.Replace(".", "")}.png"; + } + break; case SPK.MechanicalArm: { strPath = "LogicIcon/lightloguc.png"; @@ -451,10 +473,10 @@ strPath = "MusicIcon/localMusic.png"; } break; - } return strPath; } + #region 鍔ㄤ竴鏀逛笁 /// <summary> /// 璁惧绫诲瀷鐨勫垪琛�(鐏厜绫伙紝绐楀笜绫汇�傘�傘��) /// </summary> @@ -570,6 +592,13 @@ { deviceStrTypeList.Add(Language.StringByID(StringId.jixieshou)); } + ///鎽勫儚澶寸被 + var camera = deviceList.Find((device) => + device.spk == SPK.IpCam_Imou); + if (camera != null) + { + deviceStrTypeList.Add(Language.StringByID(StringId.shexiangtou)); + } return deviceStrTypeList; } @@ -669,10 +698,16 @@ else if (deviceType == Language.StringByID(StringId.VideoIntercom)) { functionTypeList.Add(SPK.doorgate); - } ///鏈烘鎵嬬被 + } + ///鏈烘鎵嬬被 else if (deviceType == Language.StringByID(StringId.jixieshou)) { functionTypeList.Add(SPK.MechanicalArm); + } + ///鎽勫儚澶寸被 + else if (deviceType == Language.StringByID(StringId.shexiangtou)) + { + functionTypeList.Add(SPK.IpCam_Imou); } else { @@ -727,6 +762,7 @@ functionTypeList.Add(SPK.AvMusic); functionTypeList.Add(SPK.doorgate); functionTypeList.Add(SPK.MechanicalArm); + functionTypeList.Add(SPK.IpCam_Imou); } @@ -784,6 +820,7 @@ deviceTypeList.Add(SPK.SensorHelp); deviceTypeList.Add(SPK.DoorLock); deviceTypeList.Add(SPK.doorgate); + deviceTypeList.Add(SPK.IpCam_Imou); } break; @@ -851,7 +888,7 @@ return list; } /// <summary> - /// 缃戝叧ID(鑾峰彇鍢変箰缃戝叧ID) + /// 缃戝叧ID(鑾峰彇缃戝叧ID) /// </summary> public string GatewayId { @@ -1126,7 +1163,7 @@ // new Entity.Function { sid = "1234567891", name = "娓╁害浼犳劅鍣�", spk = Entity.SPK.SensorTemperature }, // new Entity.Function { sid = "1234567892", name = "婀垮害浼犳劅鍣�", spk = Entity.SPK.SensorHumidity }, 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 = "1234567895444", name = "闈㈡澘", spk = Entity.SPK.PanelSocket }, //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 }, -- Gitblit v1.8.0