From c0c734d7a84cf7105401878ffc4b64cbb67621d1 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 01 十一月 2024 15:02:24 +0800
Subject: [PATCH] 更新极光Sdk531
---
HDL_ON/Entity/FunctionList.cs | 77 ++++++++++++++++++++++++++++----------
1 files changed, 56 insertions(+), 21 deletions(-)
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index ff957e4..67fcdb7 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -14,6 +14,21 @@
{
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
@@ -55,6 +70,7 @@
return Functions.FindAll((obj) => obj.spk == SPK.MechanicalArm);
}
+
/// <summary>
/// 缁垮缓绉戞妧绯荤粺
@@ -126,6 +142,24 @@
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> GetEzMonitorList()
+ {
+ var spkList = SPK.GetEvIpcamSPKList();
+ return Functions.FindAll((obj) => spkList.Contains(obj.spk));
+ }
/// <summary>
/// 鑾峰彇褰遍煶涓帶鍒楄〃
@@ -162,11 +196,11 @@
/// </summary>
public List<Function> GetElectricals()
{
- var spkList = SPK.ElectricalSpkList();
+ var spkList = SPK.ElectricalSpkList();
return Functions.FindAll((obj) => spkList.Contains(obj.spk));
}
-
-
+
+
/// <summary>
/// 绾㈠瀹濆垪琛�
/// </summary>
@@ -174,7 +208,7 @@
{
return Functions.FindAll((obj) => obj.spk == SPK.IrModule);
}
-#endregion
+ #endregion
/// <summary>
/// 闊充箰鍒楄〃
@@ -238,7 +272,7 @@
{
get
{
- if(_OtherBrandFunction == null)
+ if (_OtherBrandFunction == null)
{
_OtherBrandFunction = new List<Function>();
var spkList = SPK.GetAll3tySPK();
@@ -306,9 +340,9 @@
{
//妫�娴嬮噸澶�
var same = Functions.FindAll((obj) => obj.deviceId == tempFunction.deviceId);
- if(same!= null)
+ if (same != null)
{
- foreach(var sameTemp in same)
+ foreach (var sameTemp in same)
{
Functions.Remove(sameTemp);
}
@@ -380,7 +414,7 @@
{
}
else
- {
+ {
switch (brandType)
{
case SPK.BrandType.Hdl:
@@ -430,6 +464,7 @@
{
try
{
+
_FunctionList = new FunctionList();
}
catch (Exception ex)
@@ -442,11 +477,11 @@
/// <summary>
/// 鍔熻兘缁戝畾鎴块棿
/// </summary>
- public string FunctionsBindRooms(List<string> roomIds,List<string> deviceIds)
+ public string FunctionsBindRooms(List<string> roomIds, List<string> deviceIds)
{
var pm = new HttpServerRequest();
var pack = pm.BindDeviceToRoom(deviceIds, roomIds);
- if(pack.Code == StateCode.SUCCESS)
+ if (pack.Code == StateCode.SUCCESS)
{
}
@@ -460,7 +495,7 @@
/// <summary>
/// 鍒犻櫎鍦烘櫙
/// </summary>
- public void DeleteScene(Scene scene,bool upSevser)
+ public void DeleteScene(Scene scene, bool upSevser)
{
if (upSevser)
{
@@ -543,7 +578,7 @@
{
Read3tyFunctionStatus();
- if(DriverLayer.Control.Ins.GatewayOnline_Local)
+ if (DriverLayer.Control.Ins.GatewayOnline_Local)
{
//List<Function> functions = GetDeviceFunctionList(SPK.BrandType.Hdl);
@@ -607,12 +642,12 @@
MainPage.Log($"缁撴潫--璇诲彇");
}
-
+
})
{ IsBackground = true }.Start();
}
-#region 鍦烘櫙鐩稿叧
+ #region 鍦烘櫙鐩稿叧
/// <summary>
/// 娣诲姞鍦烘櫙
/// </summary>
@@ -644,10 +679,10 @@
}
return revPack.Code;
}
-#endregion
+ #endregion
-#region 鏀惰棌鍔熻兘
-
+ #region 鏀惰棌鍔熻兘
+
/// <summary>
/// 鏀惰棌鍦烘櫙
/// </summary>
@@ -672,14 +707,14 @@
return result;
}
-#endregion
+ #endregion
-#region
-
+ #region
-#endregion
+
+ #endregion
}
}
--
Gitblit v1.8.0