From b8bdf52ccc38e3c6b0a95c2b60f59fc99dc546fd Mon Sep 17 00:00:00 2001 From: lss <lsc@hdlchina.com.cn> Date: 星期四, 22 四月 2021 09:25:06 +0800 Subject: [PATCH] 2021-4-22 对接乐橙可视对讲 --- HDL_ON/Entity/FunctionList.cs | 37 +++++++++++++++++++++++++++++++++---- 1 files changed, 33 insertions(+), 4 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index 7239051..898d24e 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -195,13 +195,29 @@ ); } +<<<<<<< Updated upstream +======= + /// <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>(); + + /// <summary> + /// 鍦烘櫙鍒楄〃 + /// </summary> +>>>>>>> Stashed changes public List<Scene> scenes = new List<Scene>(); /// <summary> /// 鍔犺浇鍔熻兘鍒楄〃 /// </summary> /// <param name="filePath"></param> - public void IniFunctionList(string filePath) + /// <param name="checkRepeat"> + /// <para>鑰冭檻鍒版�ц兘闂杩藉姞姝ゅ彉閲�,鏄惁妫�娴嬮噸澶�,鍙function鏈夋晥</para> + /// <para>true:褰撻噸澶嶅瓨鍦ㄦ椂,鏇挎崲鎺�</para> + /// <para>false:鐩存帴鏃犳潯浠舵坊鍔�</para></param> + public void IniFunctionList(string filePath, bool checkRepeat = false) { // todo 澧炲姞璁惧锛屽鍔犲姛鑳借繘鍔熻兘鍒楄〃 if (filePath.StartsWith("FunctionData_")) @@ -214,10 +230,21 @@ 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; + } + } + } Functions.Add(tempFunction); - } if (filePath.StartsWith("SceneData_")) { @@ -320,6 +347,7 @@ List.scenes.Remove(scene); } } + /// <summary> /// 鍒犻櫎鏈湴鍔熻兘鍙婃枃浠� /// </summary> @@ -437,6 +465,7 @@ }) { IsBackground = true }.Start(); } + #region 鍦烘櫙鐩稿叧 /// <summary> /// 娣诲姞鍦烘櫙 -- Gitblit v1.8.0