From 505effa88b17ce8c3c7ac5403b76d9e5d0cfc2a5 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期一, 28 十月 2024 11:58:31 +0800
Subject: [PATCH] 谷歌版本问题修复

---
 HDL_ON/Entity/FunctionList.cs |   30 ++++++++++--------------------
 1 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index d190820..9b3858a 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -138,7 +138,12 @@
         /// <returns></returns>
         public List<Function> GetInverterJinmaoList()
         {
-            return Functions.FindAll((obj) => obj.spk == SPK.InverterJinmao);
+            var tempList = Functions.FindAll((obj) => obj.spk == SPK.InverterJinmao);
+            foreach(var device in tempList)
+            {
+                device.collect = true;
+            }
+            return tempList;
         }
 
         /// <summary>
@@ -189,25 +194,6 @@
         public List<Function> GetDoorLockList()
         {
             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>
-        /// 鑾峰彇褰遍煶涓帶鍒楄〃
-        /// </summary>
-        /// <returns></returns>
-        public List<Function> GetVideoControlsList()
-        {
-            var spkList = SPK.GetVideoControlsSPKList();
             return Functions.FindAll((obj) => spkList.Contains(obj.spk));
         }
 
@@ -576,6 +562,10 @@
         /// </summary>
         public void DeleteFunction(Function delTemp)
         {
+            if(delTemp == null)
+            {
+                return;
+            }
             Functions.Remove(Functions.Find((obj) => obj.deviceId == delTemp.deviceId));
             FileUtlis.Files.DeleteFile(delTemp.savePath);
         }

--
Gitblit v1.8.0