From 3e8ab638052329c43b399213ceca04df2b27685b Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 14 八月 2023 17:38:52 +0800
Subject: [PATCH] 2023-08-14 17:38:47
---
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