From 4fef29b9ab9f2632f15a0d45005f92d91de5d4e5 Mon Sep 17 00:00:00 2001 From: Davin <591807572@qq.com> Date: 星期四, 27 七月 2023 14:26:59 +0800 Subject: [PATCH] feature 萤石sdk更新 --- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs | 38 ++++++++++++++++++++++++-------------- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs index 8f089d6..dc80600 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs @@ -128,7 +128,11 @@ }; bodyView.AddChidren(functionListView); - foreach (var function in FunctionList.List.Functions) + List<Function> showList = new List<Function>(); + showList.AddRange(FunctionList.List.Functions); + showList.AddRange(FunctionList.List.groupControls); + + foreach (var function in showList) { if (!MainPage.SceneSupportFunctionList.Contains(function.spk)) { @@ -165,22 +169,28 @@ else { var selectedRoom = Room.CurrentSpatial.RoomList.Find((obj) => obj.uid == DB_ResidenceData.Instance.sceneChooseRoomId); - - var listAllFun = new List<Function>(); - var listFun = new List<Function>(); - listAllFun.AddRange(unallocatedList); - listAllFun.AddRange(allocatedList); - - btnFloor.Text = selectedRoom.floorRoomName; - foreach(var funtion in listAllFun) + if (selectedRoom == null) { - if (funtion.roomIds.Contains(selectedRoom.roomId)) - { - listFun.Add(funtion); - } + LoadFunctionListRow(null); } - LoadFunctionListRow(listFun); + else + { + var listAllFun = new List<Function>(); + var listFun = new List<Function>(); + listAllFun.AddRange(unallocatedList); + listAllFun.AddRange(allocatedList); + + btnFloor.Text = selectedRoom.floorRoomName; + foreach (var funtion in listAllFun) + { + if (funtion.roomIds.Contains(selectedRoom.roomId)) + { + listFun.Add(funtion); + } + } + LoadFunctionListRow(listFun); + } } -- Gitblit v1.8.0