From e44926acb6ab99ea0d5baf758773a0f383e441a9 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期五, 25 十一月 2022 14:23:54 +0800 Subject: [PATCH] 2022年11月25日14:23:44 --- HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 43 insertions(+), 6 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..796dd22 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -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 { -- Gitblit v1.8.0