HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-04-13 3793a9a38ac6c4c4111c2bba3a35a71c30601e82
ZigbeeApp/Shared/Phone/MainPage/Controls/ListRoomCardControl.cs
@@ -38,8 +38,8 @@
        /// </summary>
        public ListRoomCardControl()
        {
            this.Width = Application.GetRealWidth(495);
            this.Height = Application.GetRealHeight(354);
            this.Width = HdlControlLogic.Current.GetPictrueRealSize(495);
            this.Height = HdlControlLogic.Current.GetPictrueRealSize(354);
        }
        /// <summary>
@@ -58,8 +58,8 @@
            //房间图片
            this.picRoom = new ImageView();
            picRoom.Gravity = Gravity.CenterHorizontal;
            picRoom.Width = Application.GetRealWidth(467);
            picRoom.Height = Application.GetRealHeight(311);
            picRoom.Width = HdlControlLogic.Current.GetPictrueRealSize(467);
            picRoom.Height = HdlControlLogic.Current.GetPictrueRealSize(311);
            picRoom.Radius = (uint)Application.GetRealHeight(29);
            this.AddChidren(picRoom, ChidrenBindMode.NotBind);
@@ -70,30 +70,15 @@
            frameBack.BackgroundColor = 0x33000000;
            this.AddChidren(picRoom, ChidrenBindMode.BindEventOnly);
            ////房间名字的背景
            //var btnRoomNameBackGroud = new NormalViewControl(Application.GetRealWidth(141), Application.GetRealHeight(84), false);
            //btnRoomNameBackGroud.X = Application.GetRealWidth(14);
            //btnRoomNameBackGroud.UnSelectedImagePath = "Room/RoomCardView_Name.png";
            //this.AddChidren(btnRoomNameBackGroud, ChidrenBindMode.BindEventOnly);
            ////房间名字
            //this.btnRoomName = new NormalViewControl(btnRoomNameBackGroud.Width, btnRoomNameBackGroud.Height, false);
            //btnRoomName.X = Application.GetRealWidth(14);
            //btnRoomName.TextSize = 12;
            //btnRoomName.IsBold = true;
            //btnRoomName.TextAlignment = TextAlignment.Center;
            //btnRoomName.TextColor = UserCenterColor.Current.White;
            //this.AddChidren(btnRoomName, ChidrenBindMode.BindEventOnly);
            //房间名字的背景
            this.btnRoomNameBackGroud = new NormalViewControl(Application.GetRealWidth(141), Application.GetRealHeight(84), false);
            btnRoomNameBackGroud.X = Application.GetRealWidth(14);
            this.btnRoomNameBackGroud = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(141), Application.GetRealHeight(84), false);
            btnRoomNameBackGroud.X = HdlControlLogic.Current.GetPictrueRealSize(14);
            btnRoomNameBackGroud.BackgroundColor = 0x80000000;
            this.AddChidren(btnRoomNameBackGroud, ChidrenBindMode.BindEventOnly);
            //房间名字
            this.btnRoomName = new NormalViewControl(50, Application.GetRealHeight(84), false);
            btnRoomName.X = Application.GetRealWidth(14);
            btnRoomName.X = HdlControlLogic.Current.GetPictrueRealSize(14);
            btnRoomName.TextSize = 12;
            btnRoomName.IsBold = true;
            btnRoomName.TextAlignment = TextAlignment.Center;
@@ -118,14 +103,14 @@
            {
                //刷新名字
                btnRoomName.Text = room.Name;
                int realWidth = btnRoomName.GetRealWidthByText() + Application.GetRealWidth(70);
                if (realWidth < Application.GetRealWidth(141))
                int realWidth = btnRoomName.GetRealWidthByText() + HdlControlLogic.Current.GetPictrueRealSize(70);
                if (realWidth < HdlControlLogic.Current.GetPictrueRealSize(141))
                {
                    realWidth = Application.GetRealWidth(141);
                    realWidth = HdlControlLogic.Current.GetPictrueRealSize(141);
                }
                else if (realWidth > Application.GetRealWidth(420))
                else if (realWidth > HdlControlLogic.Current.GetPictrueRealSize(420))
                {
                    realWidth = Application.GetRealWidth(420);
                    realWidth = HdlControlLogic.Current.GetPictrueRealSize(420);
                }
                btnRoomName.Width = realWidth;
                btnRoomNameBackGroud.Width = realWidth;