From 489d3bd60ad7dc2fecb398b09cf4c52df16f0fc2 Mon Sep 17 00:00:00 2001 From: Davin <591807572@qq.com> Date: 星期三, 26 七月 2023 15:55:30 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' of http://59.41.255.150:6688/r/~wxr/OnPro into Dev-Branch --- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs index 5f4966d..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)) { @@ -156,9 +160,39 @@ { unallocatedList.Add(function); } + + } + if (string.IsNullOrEmpty(DB_ResidenceData.Instance.sceneChooseRoomId)) + { + LoadFunctionListRow(null); + } + else + { + var selectedRoom = Room.CurrentSpatial.RoomList.Find((obj) => obj.uid == DB_ResidenceData.Instance.sceneChooseRoomId); + if (selectedRoom == null) + { + LoadFunctionListRow(null); + } + 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); + } } - LoadFunctionListRow(null); LoadEventList(); } @@ -278,6 +312,7 @@ form.ShowDeviceFunctionView(btnFloor, listAllFun, (selectId, listFun) => { nowSelectId = selectId; + DB_ResidenceData.Instance.sceneChooseRoomId = selectId; //閲嶆柊鍒锋柊璁惧鍒楄〃 this.LoadFunctionListRow(listFun); }, nowSelectId); -- Gitblit v1.8.0