From 40f46f32cb00f4304a691d4f027a76a13a9ebb6d Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期一, 16 十二月 2019 15:11:36 +0800
Subject: [PATCH] 2019.12.16
---
ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs | 56 ++++++++++++++++++++++++++++----------------------------
1 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs
old mode 100755
new mode 100644
index 39cc2e4..6a7e5bc
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddRoomSelectPicByLocal.cs
@@ -50,40 +50,40 @@
};
this.AddChidren(midFl);
- for (int i = 0; i < 25; i++)
+
+ int k = 0;
+ for (int j = 0; j < 3; j++)
{
- var RoomRowView = new FrameLayout()
+ var itemView = new FrameLayout()
{
- Height = Application.GetRealHeight(600),
- Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonPage.XLeft * 2),
- Gravity=Gravity.CenterHorizontal,
- BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
- Radius = CommonPage.BigFormRadius,
+ Height = Application.GetRealHeight(311 + 58)
};
- midFl.AddChidren(RoomRowView);
-
- var backGroundBtn = new Button()
+ midFl.AddChidren(itemView);
+ for (int i = 0; i < 2; i++)
{
- Y = Application.GetRealHeight(50),
- Width = Application.GetMinRealAverage(CommonPage.AppRealWidth - CommonPage.XLeft * 2),
- Height = Application.GetMinRealAverage(550),
- UnSelectedImagePath = "Room/r" + (i).ToString() + ".png",
- Radius = CommonPage.BigFormRadius,
- Gravity=Gravity.CenterHorizontal
- };
- RoomRowView.AddChidren(backGroundBtn);
-
- backGroundBtn.MouseUpEventHandler += (sender, e) =>
- {
- if (AddRoom.room.BackgroundImageType == 1 || AddRoom.room.BackgroundImageType == 2)
+ var icon = new ImageView()
{
- AddRoom.OldBackgroundImagePath = AddRoom.room.BackgroundImage;
- }
- //AddRoom.room.BackgroundImage = backGroundBtn.UnSelectedImagePath;
- action?.Invoke(backGroundBtn.UnSelectedImagePath);
- this.RemoveFromParent();
- };
+ X = Application.GetRealWidth(58 + i * (467 + 32)),
+ Y = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(467),
+ Height = Application.GetRealHeight(311),
+ ImagePath = $"RoomIcon/{k}.JPG",
+ Radius = (uint)Application.GetRealHeight(17)
+ };
+ itemView.AddChidren(icon);
+ icon.SetViewShadow(true);
+ k++;
+
+ EventHandler<MouseEventArgs> selectIcon = (sender, e) =>
+ {
+ action?.Invoke(icon.ImagePath);
+ action = null;
+ this.RemoveFromParent();
+ };
+ icon.MouseUpEventHandler += selectIcon;
+ }
}
+
#endregion
}
}
--
Gitblit v1.8.0