From e7a71b8318fa26b8a85eac86e4c0a129f453d44f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 08 一月 2020 17:54:16 +0800
Subject: [PATCH] 2019.1.8
---
ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs
old mode 100755
new mode 100644
index 5388d58..188c42f
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs
@@ -12,8 +12,7 @@
/// </summary>
private FrameLayout bodyFrameLayout;
-
- public Action action;
+ public Action<string> action;
public CategorySceneSelectImgByLocal()
{
@@ -71,40 +70,38 @@
};
bodyFrameLayout.AddChidren(scrollView);
- int k = 1;
- for (int j = 0; j < 2; j++)
+ int k = 0;
+ for (int j = 0; j < 5; j++)
{
var itemView = new FrameLayout()
{
- Height = Application.GetRealHeight(311 + CommonPage.XLeft)
+ Height = Application.GetRealHeight(311 + 58)
};
scrollView.AddChidren(itemView);
for (int i = 0; i < 2; i++)
{
- var icon = new Button()
+ var icon = new ImageView()
{
- X=Application.GetRealWidth(CommonPage.XLeft+i*(467+32)),
- Width=Application.GetMinRealAverage(467),
- Height=Application.GetMinRealAverage(311),
- Gravity=Gravity.CenterVertical,
- UnSelectedImagePath = $"SceneIcon/{k}.png",
+ X=Application.GetRealWidth(58+i*(467+32)),
+ Y=Application.GetRealHeight(58),
+ Width=Application.GetRealWidth(467),
+ Height=Application.GetRealHeight(311),
+ ImagePath = $"SceneIcon/{k}.jpg",
+ Radius =(uint)Application.GetRealHeight(17)
};
itemView.AddChidren(icon);
+ icon.SetViewShadow(true);
k++;
EventHandler<MouseEventArgs> selectIcon = (sender, e) =>
{
- CategoryAddScene.ImagePath = icon.UnSelectedImagePath;
- Room.AddRoomScene.ImagePath = icon.UnSelectedImagePath;
- action?.Invoke();
+ action?.Invoke(icon.ImagePath);
action = null;
this.RemoveFromParent();
-
};
icon.MouseUpEventHandler += selectIcon;
}
}
-
}
#endregion
}
--
Gitblit v1.8.0