From f16fd06aa226e9f97a27858624d4ea7cf8975d25 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 07 五月 2024 17:24:38 +0800
Subject: [PATCH] 增加了萤石摄像头

---
 HDL_ON/Entity/FunctionList.cs |   87 ++++++++++++++++++++++++++-----------------
 1 files changed, 53 insertions(+), 34 deletions(-)

diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index 040fd16..ff957e4 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -14,21 +14,6 @@
     {
         static FunctionList _FunctionList;
 
-        public static void ClearData()
-        {
-            try
-            {
-                _FunctionList._IpCamImou = null;
-                _FunctionList.ClearDatas();
-                _FunctionList = null;
-            }
-            catch (Exception ex)
-            {
-                MainPage.Log($"娓呯悊FunctionList寮傚父:{ex.Message}");
-                _FunctionList = null;
-            }
-        }
-
         public static FunctionList List
         {
             get
@@ -56,6 +41,12 @@
         /// </summary>
         public List<Function> Functions = new List<Function>();
         /// <summary>
+        /// 缇ゆ帶鍒楄〃
+        /// </summary>
+        public List<GroupControl> groupControls = new List<GroupControl>();
+
+
+        /// <summary>
         /// 鏈烘鑷傚垪琛�
         /// </summary>
         /// <returns></returns>
@@ -64,20 +55,26 @@
             return Functions.FindAll((obj) => obj.spk == SPK.MechanicalArm);
         }
 
-        List<Function> _IpCamImou;
+
         /// <summary>
-        /// 鑾峰彇鎽勫儚澶村垪琛�
+        /// 缁垮缓绉戞妧绯荤粺
+        /// 鎬绘帶鍒楄〃
         /// </summary>
         /// <returns></returns>
-        public List<Function> GetIpCamImouList()
+        public List<Function> GetAcstParentList()
         {
-            if (_IpCamImou == null)
-            {
-                _IpCamImou = Functions.FindAll((obj) => obj.spk == SPK.IpCam_Imou);
-            }
-            return _IpCamImou;
+            return Functions.FindAll((obj) => obj.spk == SPK.AcstParent);//.OrderByDescending(o=>o.controlCounter).ToList()
         }
 
+        /// <summary>
+        /// 缁垮缓绉戞妧绯荤粺
+        /// 瀛愭帶鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        public List<Function> GetAcstSubList()
+        {
+            return Functions.FindAll((obj) => obj.spk == SPK.AcstSub);
+        }
 
         /// <summary>
         /// 绌鸿皟鍒楄〃
@@ -97,6 +94,15 @@
             var spkList = SPK.LightSpkList();
             return Functions.FindAll((obj) => spkList.Contains(obj.spk));
         }
+        /// <summary>
+        /// 搴忓垪鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        public List<Function> GetSeries()
+        {
+            return Functions.FindAll((obj) => obj.spk == SPK.CommonSeries);
+        }
+
         /// <summary>
         /// 绐楀笜鍒楄〃
         /// </summary>
@@ -122,6 +128,16 @@
         }
 
         /// <summary>
+        /// 鑾峰彇褰遍煶涓帶鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        public List<Function> GetVideoControlsList()
+        {
+            var spkList = SPK.GetVideoControlsSPKList();
+            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
+        }
+
+        /// <summary>
         /// 鏂伴鍒楄〃
         /// </summary>
         /// <returns></returns>
@@ -140,15 +156,13 @@
             var spkList = SPK.EnergySpkList();
             return Functions.FindAll((obj) => spkList.Contains(obj.spk));
         }
-
-
         #region 瀹剁數鍒楄〃 electricals
         /// <summary>
         /// 瀹剁數鍒楄〃
         /// </summary>
         public List<Function> GetElectricals()
         {
-            var spkList = SPK.ElectricalSpkList();
+        var spkList = SPK.ElectricalSpkList();
             return Functions.FindAll((obj) => spkList.Contains(obj.spk));
         }
     
@@ -197,14 +211,24 @@
             var spkList = new List<string>()
             {
                 SPK.SensorPir,
+                SPK.SensorPirHold,
                 SPK.SensorDoorWindow,
                 SPK.SensorSmoke,
                 SPK.SensorWater,
                 SPK.SensorGas,
+                SPK.SensorDryContact,
+                SPK.SensorDryContact2,
             };
 
             return Functions.FindAll((obj) => spkList.Contains(obj.spk));
         }
+
+
+        /// <summary>
+        /// 鍙瀵硅鍒楄〃,褰撲负null鎴杝ize涓�0鍒欎笉鏄剧ず鍙瀵硅icon
+        /// </summary>
+        // public UI.UI2.FuntionControlView.Video.VideoClouds videoIntercom;
+        public List<UI.UI2.FuntionControlView.Video.Video> videoIntercom = new List<UI.UI2.FuntionControlView.Video.Video>();
 
         List<Function> _OtherBrandFunction;
         /// <summary>
@@ -316,7 +340,7 @@
                     var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityAlarm>(dataString);
                     if (temp == null)
                     {
-                        MainPage.Log("null");
+                        MainPage.Log("SecurityData_null");
                         FileUtlis.Files.DeleteFile(filePath);
                         return;
                     }
@@ -406,11 +430,6 @@
         {
             try
             {
-                if (_IpCamImou != null)
-                {
-                    _IpCamImou.Clear();
-                    _IpCamImou = null;
-                }
                 _FunctionList = new FunctionList();
             }
             catch (Exception ex)
@@ -508,14 +527,14 @@
         {
             if (lockReadFunctionStatus)
             {
-                MainPage.Log($"澶氭杩涘叆--杩斿洖");
+                MainPage.Log($"澶氭杩涘叆--杩斿洖1");
                 return;
             }
             new Thread(() =>
             {
                 if (lockReadFunctionStatus)
                 {
-                    MainPage.Log($"澶氭杩涘叆--杩斿洖");
+                    MainPage.Log($"澶氭杩涘叆--杩斿洖2");
                     return;
                 }
                 MainPage.Log($"杩涘叆--璇诲彇");

--
Gitblit v1.8.0