黄学彪
2020-04-13 3793a9a38ac6c4c4111c2bba3a35a71c30601e82
ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
@@ -51,9 +51,9 @@
        public SceneCardControl()
        {
            //图片真实宽度+图片自身左右空白
            this.Width = Application.GetMinRealAverage(458 + 14 * 2);
            this.Width = HdlControlLogic.Current.GetPictrueRealSize(458 + 14 * 2);
            //图片高度+阴影
            this.Height = Application.GetMinRealAverage(305 + 43);
            this.Height = HdlControlLogic.Current.GetPictrueRealSize(305 + 43);
            //取消点击特效
            this.UseClickStatu = false;
@@ -77,10 +77,10 @@
            //场景图片控件
            this.btnScenePic = new ImageView();
            btnScenePic.X = Application.GetMinRealAverage(14);
            btnScenePic.Width = Application.GetMinRealAverage(458);
            btnScenePic.Height = Application.GetMinRealAverage(305);
            btnScenePic.Radius = (uint)Application.GetMinRealAverage(17);
            btnScenePic.X = HdlControlLogic.Current.GetPictrueRealSize(14);
            btnScenePic.Width = HdlControlLogic.Current.GetPictrueRealSize(458);
            btnScenePic.Height = HdlControlLogic.Current.GetPictrueRealSize(305);
            btnScenePic.Radius = (uint)Application.GetRealHeight(17);
            this.AddChidren(btnScenePic, ChidrenBindMode.NotBind);
            //场景背景图控件
@@ -89,9 +89,9 @@
            this.AddChidren(btnSceneBackGroud, ChidrenBindMode.BindEventOnly);
            //延时时间显示控件
            this.btnTimeView = new NormalViewControl(Application.GetMinRealAverage(280), Application.GetMinRealAverage(63), false);
            btnTimeView.X = Application.GetMinRealAverage(37);
            btnTimeView.Y = Application.GetMinRealAverage(10);
            this.btnTimeView = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(280), HdlControlLogic.Current.GetPictrueRealSize(63), false);
            btnTimeView.X = HdlControlLogic.Current.GetPictrueRealSize(37);
            btnTimeView.Y = HdlControlLogic.Current.GetPictrueRealSize(10);
            btnTimeView.TextColor = 0xffffb400;
            btnTimeView.IsBold = true;
            if (i_scene.SceneDelayTime > 0)
@@ -102,8 +102,8 @@
            //时间图标控件
            this.btnTimeIcon = new IconViewControl(63);
            btnTimeIcon.X = Application.GetMinRealAverage(37);
            btnTimeIcon.Y = Application.GetMinRealAverage(20);
            btnTimeIcon.X = HdlControlLogic.Current.GetPictrueRealSize(37);
            btnTimeIcon.Y = HdlControlLogic.Current.GetPictrueRealSize(20);
            btnTimeIcon.UnSelectedImagePath = "Item/Time.png";
            this.AddChidren(btnTimeIcon, ChidrenBindMode.NotBind);
            if (i_scene.SceneDelayTime > 0)
@@ -136,8 +136,8 @@
            //收藏控件
            var btnCollect = new IconViewControl(107);
            btnCollect.X = Application.GetMinRealAverage(350);
            btnCollect.Y = Application.GetMinRealAverage(12);
            btnCollect.X = HdlControlLogic.Current.GetPictrueRealSize(350);
            btnCollect.Y = HdlControlLogic.Current.GetPictrueRealSize(12);
            btnCollect.UnSelectedImagePath = "Item/Collection1.png";
            btnCollect.SelectedImagePath = "Item/CollectionSelected1.png";
            this.AddChidren(btnCollect, ChidrenBindMode.NotBind);
@@ -164,9 +164,9 @@
            };
            //场景名称控件
            this.btnSceneName = new NormalViewControl(Application.GetMinRealAverage(280), Application.GetMinRealAverage(63), false);
            btnSceneName.X = Application.GetMinRealAverage(37);
            btnSceneName.Y = Application.GetMinRealAverage(236);
            this.btnSceneName = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(280), HdlControlLogic.Current.GetPictrueRealSize(63), false);
            btnSceneName.X = HdlControlLogic.Current.GetPictrueRealSize(37);
            btnSceneName.Y = HdlControlLogic.Current.GetPictrueRealSize(236);
            btnSceneName.IsBold = true;
            btnSceneName.TextColor = UserCenterColor.Current.White;
            this.AddChidren(btnSceneName, ChidrenBindMode.BindEventOnly);
@@ -219,9 +219,11 @@
            //刷新图片
            if (i_scene.IconPathType == 0)
            {
                if (this.btnScenePic.ImagePath != i_scene.IconPath)
                //主页的场景卡片用的是另外的图
                string newPath = i_scene.IconPath.Replace("SceneIcon", "SceneCardIcon");
                if (this.btnScenePic.ImagePath != newPath)
                {
                    this.btnScenePic.ImagePath = i_scene.IconPath;
                    this.btnScenePic.ImagePath = newPath;
                }
            }
            else