HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-04-13 3793a9a38ac6c4c4111c2bba3a35a71c30601e82
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -370,13 +370,13 @@
            //房间滑动控件左边的虚拟图片
            var mLeftImageView = new ImageView();
            mLeftImageView.ImagePath = "RoomIcon/1.jpg";
            mLeftImageView.ImagePath = "RoomIcon/19.jpg";
            mLeftImageView.Radius = (uint)Application.GetRealHeight(17);
            mLeftImageView.Width = Application.GetRealWidth(717);
            mLeftImageView.Height = Application.GetRealHeight(478);
            //房间滑动控件右边的虚拟图片
            var mRightImageView = new ImageView();
            mRightImageView.ImagePath = "RoomIcon/2.jpg";
            mRightImageView.ImagePath = "RoomIcon/19.jpg";
            mRightImageView.Radius = (uint)Application.GetRealHeight(17);
            mRightImageView.Width = mLeftImageView.Width;
            mRightImageView.Height = mLeftImageView.Height;
@@ -428,7 +428,7 @@
            btnRoomLeftShadow.Gravity = Gravity.CenterVertical;
            btnRoomLeftShadow.BackgroundColor = 0x1c000000;
            btnRoomLeftShadow.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
            frameBack.AddChidren(btnRoomLeftShadow);
            //frameBack.AddChidren(btnRoomLeftShadow);//暂时不加遮罩
            //在房间卡片右边添加遮罩
            var btnRoomRightShadow = new FrameLayout();
@@ -438,7 +438,7 @@
            btnRoomRightShadow.Gravity = Gravity.CenterVertical;
            btnRoomRightShadow.BackgroundColor = btnRoomLeftShadow.BackgroundColor;
            btnRoomRightShadow.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
            frameBack.AddChidren(btnRoomRightShadow);
            //frameBack.AddChidren(btnRoomRightShadow);//暂时不加遮罩
            //控件开始滑动的事件
            roomPageView.StartScrollAction += () =>
@@ -480,13 +480,11 @@
            };
            //设置房间的初始选择
            roomPageView.PageIndex = curIndex;
#if iOS
            //Ios如果索引是第一个时,它触发不了事件,需要手动触发
            //如果索引是第一个时,它触发不了事件,需要手动触发
            if (curIndex == 0)
            {
                roomPageView.EndScrollAction();
            }
#endif
        }
        /// <summary>
@@ -834,7 +832,7 @@
            HdlThreadLogic.Current.RunThread(() =>
            {
                //初始化设备卡片列表控件
                //初始化场景卡片列表控件
                this.InitSceneListCardControl(listSceneBackContr, listScene);
            });
        }
@@ -848,7 +846,7 @@
            //场景计数
            int contrCount = 0;
            //X轴坐标(图片左边有余白)
            int XX = Application.GetMinRealAverage(44);
            int XX = this.GetPictrueRealSize(44);
            //Y轴坐标
            int YY = 0;
            foreach (var sceneUi in listScene)
@@ -875,11 +873,11 @@
                    //设备计数
                    contrCount++;
                    //每两个后,X轴重置
                    XX = contrCount % 2 == 0 ? Application.GetMinRealAverage(44) : cardContr.Right + Application.GetMinRealAverage(20);
                    XX = contrCount % 2 == 0 ? this.GetPictrueRealSize(44) : cardContr.Right + this.GetPictrueRealSize(20);
                    if (contrCount % 2 == 0)
                    {
                        //没两个之后,Y轴递增
                        YY = cardContr.Bottom + Application.GetMinRealAverage(15);
                        YY = cardContr.Bottom + this.GetPictrueRealSize(15);
                    }
                    //控件记录到缓存中
                    this.dicSceneCardControl[sceneUi.Id] = cardContr;
@@ -909,25 +907,19 @@
        /// </summary>
        private void ShowNoSceneTip()
        {
            var noScene = new Button
            {
                Y = Application.GetRealHeight(69),
                Width = Application.GetMinRealAverage(683),
                Height = Application.GetMinRealAverage(392),
                Gravity = Gravity.CenterHorizontal,
                UnSelectedImagePath = "Item/NoFunction.png"
            };
            bodyFrameLayout.AddChidren(noScene);
            var noScenceTip = new Button()
            {
                Y = noScene.Bottom,
                Height = Application.GetRealHeight(200),
                Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n"),
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                TextAlignment = TextAlignment.Center,
                IsMoreLines = true
            };
            bodyFrameLayout.AddChidren(noScenceTip);
            var picNoFunc = new PicViewControl(683, 392);
            picNoFunc.Y = Application.GetRealHeight(69);
            picNoFunc.Gravity = Gravity.CenterHorizontal;
            picNoFunc.UnSelectedImagePath = "Item/NoFunction.png";
            bodyFrameLayout.AddChidren(picNoFunc);
            var btnTip = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(200), false);
            btnTip.Y = picNoFunc.Bottom;
            btnTip.Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n");
            btnTip.TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor;
            btnTip.TextAlignment = TextAlignment.Center;
            btnTip.IsMoreLines = true;
            bodyFrameLayout.AddChidren(btnTip);
        }
        /// <summary>