From a9a4e7c5928a0b7031e7104eeeb960059f26f5c0 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 08 七月 2021 18:51:24 +0800
Subject: [PATCH] 2021-07-08 1.增加注释
---
HDL_ON/Entity/FunctionList.cs | 111 ++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 96 insertions(+), 15 deletions(-)
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index d0cb2e8..042a71b 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -109,15 +109,26 @@
{
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>
public List<Function> GetEnvirSensorsList()
{
var spkList = SPK.EnvironSpkList();
- return Functions.FindAll((obj) => spkList.Contains(obj.spk));
+ return Functions.FindAll((obj) => spkList.Contains(obj.spk));
}
/// <summary>
/// 瀹夐槻璁惧鍒楄〃
@@ -128,7 +139,40 @@
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>
+ /// 绗笁鏂瑰搧鐗屽姛鑳�
+ /// </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>
/// 鍔犺浇鍔熻兘鍒楄〃
@@ -152,19 +196,24 @@
FileUtlis.Files.DeleteFile(filePath);
return;
}
- if (checkRepeat == true)
- {
- //妫�娴嬮噸澶�
- for (int i = 0; i < Functions.Count; i++)
- {
- if (Functions[i].deviceId == tempFunction.deviceId)
- {
- //鍏堢Щ闄ゆ帀鍐嶅姞
- Functions.RemoveAt(i);
- Functions.Add(tempFunction);
- return;
- }
- }
+ //闊充箰閮ㄥ垎瑕佷慨鏀�
+ //if(tempFunction.spk.ToString() == SPK.MusicStandard)
+ //{
+ // UI.Music.A31MusicModel.A31MusicModelList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<UI.Music.A31MusicModel>(functionDataString));
+ //}
+ if (checkRepeat == true)
+ {
+ //妫�娴嬮噸澶�
+ for (int i = 0; i < Functions.Count; i++)
+ {
+ if (Functions[i].deviceId == tempFunction.deviceId)
+ {
+ //鍏堢Щ闄ゆ帀鍐嶅姞
+ Functions.RemoveAt(i);
+ Functions.Add(tempFunction);
+ return;
+ }
+ }
}
Functions.Add(tempFunction);
}
@@ -174,6 +223,33 @@
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);
}
}
@@ -215,6 +291,9 @@
return Functions;
}
+
+
+
/// <summary>
/// 娓呯┖璁惧鍔熻兘鍒楄〃
@@ -269,6 +348,7 @@
List.scenes.Remove(scene);
}
}
+
/// <summary>
/// 鍒犻櫎鏈湴鍔熻兘鍙婃枃浠�
/// </summary>
@@ -386,6 +466,7 @@
})
{ IsBackground = true }.Start();
}
+
#region 鍦烘櫙鐩稿叧
/// <summary>
/// 娣诲姞鍦烘櫙
--
Gitblit v1.8.0