From bb6ad792b598927a5459a5fb6f6c27fb1aa9e94e Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 17 十二月 2020 14:06:36 +0800
Subject: [PATCH] 20201217-1

---
 HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneLocationPage.cs |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneLocationPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneLocationPage.cs
index 5346fda..de061ea 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneLocationPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneLocationPage.cs
@@ -9,14 +9,14 @@
     {
         FrameLayout bodyView;
         VerticalScrolViewLayout contentView;
-        Function scene;
+        Scene scene;
         Button lastButton;
         Action backAction;
-        public SetSceneLocationPage(Function function, Action action)
+        public SetSceneLocationPage(Scene s, Action action)
         {
             backAction = action;
             bodyView = this;
-            scene = function;
+            scene = s;
         }
 
         public void LoadPage()
@@ -33,8 +33,8 @@
             bodyView.AddChidren(contentView);
 
             System.Collections.Generic.List<Room> rooms = new System.Collections.Generic.List<Room>();
-            rooms.Add(new Room() { sid = "", name = Language.StringByID(StringId.WholeHouseScene),floorId = ""  });
-            rooms.AddRange(DB_ResidenceData.rooms);
+            rooms.Add(new Room() { roomName = Language.StringByID(StringId.WholeHouseScene),parentId = ""  });
+            rooms.AddRange(SpatialInfo.CurrentSpatial.RoomList);
             foreach (var room in rooms)
             {
                 var roomView = new FrameLayout()
@@ -52,7 +52,7 @@
                     TextSize = CSS_FontSize.SubheadingFontSize,
                     TextColor = CSS_Color.FirstLevelTitleColor,
                     TextAlignment = TextAlignment.CenterLeft,
-                    Text = room.floorName + room.name,
+                    Text = room.floorName + room.roomName,
                 };
                 roomView.AddChidren(btnRoomText);
 
@@ -67,7 +67,7 @@
                     Tag = "ChooseIcon"
                 };
                 roomView.AddChidren(btnChoose);
-                if(scene.roomIdList.Contains(room.sid))
+                if(scene.roomIds.Contains(room.roomId))
                 {
                     btnChoose.IsSelected = true;
                     lastButton = btnChoose;
@@ -104,8 +104,8 @@
                 }
                 lastButton = btn;
                 btn.IsSelected = true;
-                scene.roomIdList = new System.Collections.Generic.List<string>();
-                scene.roomIdList.Add(room.sid);
+                scene.roomIds = new System.Collections.Generic.List<string>();
+                scene.roomIds.Add(room.roomId);
                 this.RemoveFromParent();
                 backAction();
             };

--
Gitblit v1.8.0