gxc
2019-11-29 b94f318b1cb5c3618dd53b5240c1d999c8427b71
ZigbeeApp/Shared/Phone/Device/Category/CategorySceneSelectImgByLocal.cs
@@ -75,18 +75,19 @@
            {
                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}.jpg",
                        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);
@@ -94,17 +95,13 @@
                    EventHandler<MouseEventArgs> selectIcon = (sender, e) =>
                    {
                        //CategoryAddScene.ImagePath = icon.UnSelectedImagePath;
                        //Room.AddRoomScene.ImagePath = icon.UnSelectedImagePath;
                        action?.Invoke(icon.UnSelectedImagePath);
                        action?.Invoke(icon.ImagePath);
                        action = null;
                        this.RemoveFromParent();
                    };
                    icon.MouseUpEventHandler += selectIcon;
                }
            }
        }
        #endregion
    }