From 30b5770f56f99c1f92e933ad31cf7d2af58b033c Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 02 十二月 2020 16:31:48 +0800
Subject: [PATCH] 20201202
---
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomsManagementPage.cs | 54 ++++++++++++++++++------------------------------------
1 files changed, 18 insertions(+), 36 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomsManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomsManagementPage.cs
index 2c6b29a..a9ab971 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomsManagementPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomsManagementPage.cs
@@ -38,7 +38,7 @@
};
bodyView.AddChidren(roomsListView);
- foreach(var room in DB_ResidenceData.rooms)
+ foreach(var room in DB_ResidenceData.Rooms)
{
LoadRoomRow(room);
}
@@ -50,61 +50,43 @@
/// </summary>
void LoadRoomRow(Room room)
{
- roomsListView.AddChidren(new Button()
- {
- Height = Application.GetRealHeight(8),
- Tag = room.name+"line",
- });
-
var roomRow = new FrameLayout()
{
- Gravity = Gravity.CenterHorizontal,
- Tag = room.name + "row",
- Width = Application.GetRealWidth(343),
- Height = Application.GetRealHeight(92),
- Radius = (uint)Application.GetRealWidth(12),
+ Tag = room.roomName + "row",
+ Height = Application.GetRealHeight(100),
};
roomsListView.AddChidren(roomRow);
- var btnBg = new Button()
+ var btnBg = new ImageView()
{
- Y = Application.GetRealHeight(0 - (192 - 92) / 2),
- Height = Application.GetRealHeight(192),
- UnSelectedImagePath = room.backgroundImage,
+ Y = Application.GetRealHeight(10),
+ Height = Application.GetRealHeight(90),
+ Width = Application.GetRealWidth(343),
+ ImagePath = room.backgroundImage,
Radius = (uint)Application.GetRealWidth(12),
+ Gravity = Gravity.CenterHorizontal,
};
roomRow.AddChidren(btnBg);
- //ImageView imageView = new ImageView()
- //{
- // Height = Application.GetRealHeight(92),
- // Radius = (uint)Application.GetRealWidth(12),
- //};
- //roomRow.AddChidren(imageView);
-
- var btnShadow = new Button()
- {
- BackgroundColor = 0x19333333,
- };
- roomRow.AddChidren(btnShadow);
-
var btnRoomName = new Button()
{
- X = Application.GetRealWidth(12),
- Y = Application.GetRealHeight(10),
+ X = Application.GetRealWidth(28),
+ Y = Application.GetRealHeight(21),
Width = Application.GetRealWidth(266),
- Height = Application.GetRealHeight(26),
- TextAlignment = TextAlignment.CenterLeft,
+ Height = Application.GetRealHeight(22),
+ TextAlignment = TextAlignment.TopLeft,
TextColor = CSS_Color.MainBackgroundColor,
TextSize = CSS_FontSize.SubheadingFontSize,
- Text = room.floorName + room.name,
+ Text = room.floorName + room.roomName,
};
roomRow.AddChidren(btnRoomName);
- btnShadow.MouseUpEventHandler += (sender, e) =>
- {
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
LoadEvent_SkipEditRoomPage(room, btnRoomName, btnBg);
};
+ btnBg.MouseUpEventHandler = eventHandler;
+ roomRow.MouseUpEventHandler = eventHandler;
+ btnRoomName.MouseUpEventHandler = eventHandler;
}
}
--
Gitblit v1.8.0