From a1b0ab7044100daaa7e0f1da2d2ca45e38098963 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 29 三月 2021 09:13:25 +0800
Subject: [PATCH] 2021-3-29-2
---
HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs | 56 ++++++++++++++++++++++++++++++--------------------------
1 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
index ab86b2c..f588139 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
@@ -5,6 +5,9 @@
namespace HDL_ON.UI
{
+ /// <summary>
+ /// 鍔熻兘鍒嗛厤鎴块棿鐣岄潰
+ /// </summary>
public partial class ChooseRoomPage : FrameLayout
{
#region 鎺т欢鍒楄〃
@@ -14,6 +17,7 @@
/// </summary>
VerticalScrolViewLayout contentView;
+ Button btnAllRoomText;
Button btnChooseAll;
#endregion
@@ -56,17 +60,6 @@
};
contentView.AddChidren(allRoomView);
- Button btnAllRoomText = new Button()
- {
- X = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(280),
- TextID = StringId.All,
- TextSize= CSS_FontSize.SubheadingFontSize,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextAlignment = TextAlignment.CenterLeft,
- };
- allRoomView.AddChidren(btnAllRoomText);
-
btnChooseAll = new Button()
{
X = Application.GetRealWidth(331),
@@ -79,7 +72,18 @@
};
allRoomView.AddChidren(btnChooseAll);
- foreach(var room in DB_ResidenceData.residenceData.rooms)
+ btnAllRoomText = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ TextID = StringId.All,
+ TextSize= CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ allRoomView.AddChidren(btnAllRoomText);
+
+
+ foreach(var room in SpatialInfo.CurrentSpatial.RoomList)
{
var roomView = new FrameLayout()
{
@@ -98,17 +102,6 @@
};
roomView.AddChidren(btnLine);
- 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.floor + " " + room.name,
- };
- roomView.AddChidren(btnRoomText);
-
Button btnChoose = new Button()
{
X = Application.GetRealWidth(331),
@@ -117,16 +110,27 @@
Height = Application.GetMinRealAverage(28),
UnSelectedImagePath = "Public/ChooseIcon.png",
SelectedImagePath = "Public/ChooseOnIcon.png",
- IsSelected = function.roomIdList.Contains(room.sid),
+ IsSelected = function.roomIds.Contains(room.roomId),
Tag = "ChooseIcon"
};
roomView.AddChidren(btnChoose);
- btnChoose.MouseUpEventHandler = (sender, e) => {
+
+ 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);
+ btnRoomText.MouseUpEventHandler = (sender, e) => {
btnChoose.IsSelected = !btnChoose.IsSelected;
LoadEvent_RoomSelected(room, btnChoose.IsSelected);
};
- if (!function.roomIdList.Contains(room.sid) && btnChooseAll.IsSelected)
+ if (!function.roomIds.Contains(room.roomId) && btnChooseAll.IsSelected)
{
btnChooseAll.IsSelected = false;
}
--
Gitblit v1.8.0