From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 27 八月 2021 13:21:21 +0800 Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1 --- HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneLocationPage.cs | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 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..b2ad4b7 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.WholeZone),parentId = "" }); + rooms.AddRange(SpatialInfo.CurrentSpatial.RoomList); foreach (var room in rooms) { var roomView = new FrameLayout() @@ -45,17 +45,6 @@ }; contentView.AddChidren(roomView); - Button btnRoomText = new Button() - { - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(280), - TextSize = CSS_FontSize.SubheadingFontSize, - TextColor = CSS_Color.FirstLevelTitleColor, - TextAlignment = TextAlignment.CenterLeft, - Text = room.floorName + room.name, - }; - roomView.AddChidren(btnRoomText); - Button btnChoose = new Button() { X = Application.GetRealWidth(331), @@ -67,7 +56,19 @@ Tag = "ChooseIcon" }; roomView.AddChidren(btnChoose); - if(scene.roomIdList.Contains(room.sid)) + + Button btnRoomText = new Button() + { + X = Application.GetRealWidth(16), + //Width = Application.GetRealWidth(280), + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + TextAlignment = TextAlignment.CenterLeft, + Text = room.floorName + room.roomName, + }; + roomView.AddChidren(btnRoomText); + + if (scene.roomIds.Contains(room.roomId)) { btnChoose.IsSelected = true; lastButton = btnChoose; @@ -86,7 +87,7 @@ }; roomView.AddChidren(btnLine); - LoadEvent_ChangeSceneLocation(room, btnChoose); + LoadEvent_ChangeSceneLocation(room, btnRoomText); } } @@ -104,8 +105,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