From dc6b96a219645c1125de6d6bb5e94d61cf167be1 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期六, 21 八月 2021 17:37:53 +0800 Subject: [PATCH] 2021-8-21-1 --- HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index f55167c..8acfce2 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -179,12 +179,21 @@ return Entity.FunctionList.List.GetDeviceFunctionList(); } /// <summary> - /// 鑾峰彇缃戝叧鍦烘櫙鍒楄〃 + /// 鑾峰彇鍦烘櫙鍒楄〃 /// </summary> /// <returns></returns> public List<HDL_ON.Entity.Scene> GetSceneList() { return HDL_ON.Entity.FunctionList.List.scenes; + } + + /// <summary> + /// 鑾峰彇瀹夐槻鍒楄〃 + /// </summary> + /// <returns></returns> + public List<HDL_ON.Entity.SecurityAlarm> GetSecurityList() + { + return FunctionList.List.securities; } /// <summary> /// 鑾峰彇鎴块棿鐨勮澶囧垪琛� @@ -217,7 +226,7 @@ return deviceLists; } /// <summary> - /// 鑾峰彇褰撲釜璁惧 + /// 鑾峰彇璁惧锛堝姛鑳斤級瀵硅薄 /// </summary> /// <param name="sid">璁惧鍞竴鏍囪瘑</param> /// <returns></returns> @@ -238,7 +247,7 @@ } /// <summary> - /// 鑾峰彇褰撲釜鍦烘櫙 + /// 鑾峰彇鍦烘櫙瀵硅薄 /// </summary> /// <param name="sid">鍦烘櫙鍞竴鏍囪瘑</param> /// <returns></returns> @@ -258,6 +267,26 @@ return scene; } /// <summary> + /// 鑾峰彇瀹夐槻瀵硅薄 + /// </summary> + /// <param name="sid">瀹夐槻鍞竴鏍囪瘑</param> + /// <returns></returns> + public HDL_ON.Entity.SecurityAlarm GetSecurity(string sid) + { + HDL_ON.Entity.SecurityAlarm security = new Entity.SecurityAlarm() { name = "Unknown" }; + List<HDL_ON.Entity.SecurityAlarm> SecurityLists = GetSecurityList(); + for (int i = 0; i < SecurityLists.Count; i++) + { + var sce = SecurityLists[i]; + if (sce.sid == sid) + { + security = sce; + break; + } + } + return security; + } + /// <summary> /// 鑾峰彇鎴块棿鍚�(鍗虫槸=鍖哄煙鍚嶇О) /// </summary> /// <param name="device">璁惧</param> -- Gitblit v1.8.0