From 8301df084faa8f43f4b9cb7f92088e5fd9e64524 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 01 十二月 2022 15:41:53 +0800
Subject: [PATCH] 大华摄像头更新

---
 HDL_ON/Entity/FunctionList.cs |   51 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index cdd06aa..3f2a267 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -13,6 +13,21 @@
     public class FunctionList
     {
         static FunctionList _FunctionList;
+
+        public static void ClearData()
+        {
+            try
+            {
+                _FunctionList.Clear();
+                _FunctionList = null;
+            }
+            catch (Exception ex)
+            {
+                MainPage.Log($"娓呯悊FunctionList寮傚父:{ex.Message}");
+                _FunctionList = null;
+            }
+        }
+
         public static FunctionList List
         {
             get
@@ -46,6 +61,24 @@
         public List<Function> GetMechanicalArmList()
         {
             return Functions.FindAll((obj) => obj.spk == SPK.MechanicalArm);
+        }
+
+        List<Function> _IpCamImou;
+        /// <summary>
+        /// 鑾峰彇鎽勫儚澶村垪琛�
+        /// </summary>
+        /// <returns></returns>
+        public List<Function> GetIpCamImouList()
+        {
+            if (_IpCamImou == null)
+            {
+                _IpCamImou = Functions.FindAll((obj) => obj.spk == SPK.IpCam_Imou);
+                if (_IpCamImou.Count > 0)
+                {
+                    Com.Utils.HdlToLcUtils.Instance.InitData(Shared.Application.Activity, "HDL-HOME-APP-TEST", "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss", OnAppConfig.Instance.RequestHttpsHost);
+                }
+            }
+            return _IpCamImou;
         }
 
         /// <summary>
@@ -344,6 +377,9 @@
             {
                 MainPage.Log($"IniFunctionList error : {ex.Message}");
             }
+            finally
+            {
+            }
         }
 
         /// <summary>
@@ -404,8 +440,18 @@
         /// </summary>
         public void Clear()
         {
-            Functions = new List<Function>();
-            _FunctionList = null;
+            try
+            {
+                _IpCamImou.Clear();
+                _IpCamImou = null;
+                _FunctionList.Clear();
+                _FunctionList = null;
+            }
+            catch (Exception ex)
+            {
+                MainPage.Log($"娓呯悊FunctionList寮傚父:{ex.Message}");
+                _FunctionList = null;
+            }
         }
 
         /// <summary>
@@ -428,7 +474,6 @@
 
         /// <summary>
         /// 鍒犻櫎鍦烘櫙
-        /// todo
         /// </summary>
         public void DeleteScene(Scene scene,bool upSevser)
         {

--
Gitblit v1.8.0