From 4f8fc4fe0a7d6f73c3a06e6f924a4a2615b090d7 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 05 七月 2021 10:14:01 +0800
Subject: [PATCH] Merge branch 'wxr6' into newBranch1
---
HDL_ON/Entity/FunctionList.cs | 84 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 81 insertions(+), 3 deletions(-)
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index d0cb2e8..b5622b0 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -101,7 +101,6 @@
return Functions.FindAll((obj) => spkList.Contains(obj.spk));
}
-
/// <summary>
/// 绾㈠瀹濆垪琛�
/// </summary>
@@ -109,8 +108,19 @@
{
return Functions.FindAll((obj) => obj.spk == SPK.IrModule);
}
-
#endregion
+
+ /// <summary>
+ /// 闊充箰鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ public List<Function> GetMusicList()
+ {
+ var spkList = SPK.MusicSpkList();
+ return Functions.FindAll((obj) => spkList.Contains(obj.spk));
+ }
+
+
/// <summary>
/// 鐜浼犳劅鍣ㄥ垪琛�
/// </summary>
@@ -128,7 +138,39 @@
return Functions.FindAll((obj) => spkList.Contains(obj.spk));
}
+ /// <summary>
+ /// 鍙瀵硅鍒楄〃
+ /// </summary>
+ public UI.UI2.FuntionControlView.Video.VideoClouds videoIntercom;
+
+ List<Function> _OtherBrandFunction;
+ /// <summary>
+ /// 绗笁鏂瑰搧鐗屽姛鑳�
+ /// </summary>
+ public List<Function> OtherBrandFunction
+ {
+ get
+ {
+ if(_OtherBrandFunction == null)
+ {
+ _OtherBrandFunction = new List<Function>();
+ var spkList = SPK.GetAll3tySPK();
+ _OtherBrandFunction = Functions.FindAll((obj) => spkList.Contains(obj.spk));
+ }
+ return _OtherBrandFunction;
+ }
+ }
+
+
+ /// <summary>
+ /// 鍦烘櫙鍒楄〃
+ /// </summary>
public List<Scene> scenes = new List<Scene>();
+
+ /// <summary>
+ /// 瀹夐槻鍒楄〃
+ /// </summary>
+ public List<SecurityAlarm> securities = new List<SecurityAlarm>();
/// <summary>
/// 鍔犺浇鍔熻兘鍒楄〃
@@ -140,6 +182,7 @@
/// <para>false:鐩存帴鏃犳潯浠舵坊鍔�</para></param>
public void IniFunctionList(string filePath, bool checkRepeat = false)
{
+ //MainPage.Log("12346890sdkxghjkl");
// todo 澧炲姞璁惧锛屽鍔犲姛鑳借繘鍔熻兘鍒楄〃
if (filePath.StartsWith("FunctionData_"))
{
@@ -152,6 +195,11 @@
FileUtlis.Files.DeleteFile(filePath);
return;
}
+ //闊充箰閮ㄥ垎瑕佷慨鏀�
+ //if(tempFunction.spk.ToString() == SPK.MusicStandard)
+ //{
+ // UI.Music.A31MusicModel.A31MusicModelList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<UI.Music.A31MusicModel>(functionDataString));
+ //}
if (checkRepeat == true)
{
//妫�娴嬮噸澶�
@@ -168,12 +216,39 @@
}
Functions.Add(tempFunction);
}
- if (filePath.StartsWith("SceneData_"))
+ else if (filePath.StartsWith("SceneData_"))
{
var sceneDataBytes = FileUtlis.Files.ReadFile(filePath);
var sceneDataString = System.Text.Encoding.UTF8.GetString(sceneDataBytes);
var tempScene = Newtonsoft.Json.JsonConvert.DeserializeObject<Scene>(sceneDataString);
List.scenes.Add(tempScene);
+ }
+ else if (filePath.StartsWith("SecurityData_"))
+ {
+ var dataBytes = FileUtlis.Files.ReadFile(filePath);
+ var dataString = System.Text.Encoding.UTF8.GetString(dataBytes);
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityAlarm>(dataString);
+ if (temp == null)
+ {
+ MainPage.Log("null");
+ FileUtlis.Files.DeleteFile(filePath);
+ return;
+ }
+ if (checkRepeat == true)
+ {
+ //妫�娴嬮噸澶�
+ for (int i = 0; i < securities.Count; i++)
+ {
+ if (securities[i].sid == temp.sid)
+ {
+ //鍏堢Щ闄ゆ帀鍐嶅姞
+ securities.RemoveAt(i);
+ securities.Add(temp);
+ return;
+ }
+ }
+ }
+ securities.Add(temp);
}
}
@@ -216,6 +291,9 @@
return Functions;
}
+
+
+
/// <summary>
/// 娓呯┖璁惧鍔熻兘鍒楄〃
/// </summary>
--
Gitblit v1.8.0