From f46be160caed45c67e8980173d29ed48d525a4d3 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期二, 28 三月 2023 14:49:52 +0800 Subject: [PATCH] 2023年03月28日14:49:50 --- HDL_ON/Entity/FunctionList.cs | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index 2999288..12c46f4 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -19,7 +19,7 @@ try { _FunctionList._IpCamImou = null; - _FunctionList.Clear(); + _FunctionList.ClearDatas(); _FunctionList = null; } catch (Exception ex) @@ -148,6 +148,15 @@ var spkList = SPK.GetDoorLockSPKList(); return Functions.FindAll((obj) => spkList.Contains(obj.spk)); } + /// <summary> + /// 鑾峰彇钀ょ煶瑙嗛闂ㄩ攣 + /// </summary> + /// <returns></returns> + public List<Function> GetVideoDoorLockList() + { + var spkList = SPK.GetVideoDoorLockSPKList(); + return Functions.FindAll((obj) => spkList.Contains(obj.spk)); + } /// <summary> /// 鏂伴鍒楄〃 @@ -175,17 +184,9 @@ /// </summary> public List<Function> InverterList() { - //get - //{ - // return _inverterList; - //} - //set - //{ - // _inverterList = value; - //} - return Functions.FindAll((obj) => obj.spk == SPK.Inverter); + return Functions.FindAll((obj) => obj.spk == SPK.Inverter || obj.spk == SPK.InverterRst); } -#region 瀹剁數鍒楄〃 electricals + #region 瀹剁數鍒楄〃 electricals /// <summary> /// 瀹剁數鍒楄〃 /// </summary> @@ -452,14 +453,16 @@ /// <summary> /// 娓呯┖璁惧鍔熻兘鍒楄〃 /// </summary> - public void Clear() + public void ClearDatas() { try { - _IpCamImou.Clear(); - _IpCamImou = null; - _FunctionList.Clear(); - _FunctionList = null; + if (_IpCamImou != null) + { + _IpCamImou.Clear(); + _IpCamImou = null; + } + _FunctionList = new FunctionList(); } catch (Exception ex) { -- Gitblit v1.8.0