From 5204bc34549ba4718158c447cbb3c74b39ffe163 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期一, 02 十二月 2019 16:03:29 +0800
Subject: [PATCH] 2019.12.2

---
 ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs |   89 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 74 insertions(+), 15 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
index 050c746..6747f9f 100644
--- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -637,8 +637,6 @@
                     Y = Application.GetRealHeight(302),
                     Width = Application.GetRealWidth(CommonPage.AppRealWidth),
                     Height = Application.GetRealHeight(478),
-                    //Radius = CommonPage.BigFormRadius,
-                    //Gravity = Gravity.CenterHorizontal,
                 };
                 AddChidren(roomPageView);
                 //涓庡睆骞曡竟妗嗙殑杈硅窛
@@ -654,30 +652,91 @@
                 {
                     var roomBackView = new FrameLayout()
                     {
-                        BackgroundImagePath = room.BackgroundImage,
                         Width = Application.GetRealWidth(717),
-                        Height=Application.GetRealHeight(478),
-                        Radius=(uint)Application.GetRealHeight(10)
+                        Height=Application.GetRealHeight(478)
                     };
                     roomPageView.AddChidren(roomBackView);
 
-                    if (room.BackgroundImageType != 0)
+                    var roomImg = new ImageView()
                     {
-                        roomBackView.BackgroundImagePath = System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage);
-                    }
+                        ImagePath = room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage),
+                        Radius = (uint)Application.GetRealHeight(17)
+                    };
+                    roomBackView.AddChidren(roomImg);
+
+                    var roomNameBackground = new FrameLayout
+                    {
+                        X = Application.GetRealWidth(29),
+                        Y = Application.GetRealHeight(282),
+                        Width = Application.GetRealWidth(200),
+                        Height = Application.GetRealHeight(80),
+                        BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor2
+                    };
+                    roomBackView.AddChidren(roomNameBackground);
+                    roomNameBackground.SetCornerWithSameRadius(Application.GetRealHeight(40), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
 
                     var roomName = new Button()
                     {
-                        X = Application.GetRealWidth(20),
-                        Y = Application.GetRealHeight(20),
-                        Width = Application.GetRealWidth(500),
-                        Height = Application.GetRealHeight(80),
+                        X = Application.GetRealWidth(5),
+                        Width = Application.GetRealWidth(190),
                         Text = room.Name,
-                        TextAlignment = TextAlignment.CenterLeft,
                         TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
-                        TextSize = 18,
                     };
-                    roomBackView.AddChidren(roomName);
+                    roomNameBackground.AddChidren(roomName);
+
+
+                    var roomTemperatureBackground = new FrameLayout
+                    {
+                        X = Application.GetRealWidth(29),
+                        Y = Application.GetRealHeight(374),
+                        Width = Application.GetRealWidth(340),
+                        Height = Application.GetRealHeight(80),
+                        BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor2
+                    };
+                    roomBackView.AddChidren(roomTemperatureBackground);
+                    roomTemperatureBackground.SetCornerWithSameRadius(Application.GetRealHeight(40), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
+
+                    var temperatureIcon = new Button
+                    {
+                        X = Application.GetRealWidth(12),
+                        Width = Application.GetMinRealAverage(58),
+                        Height = Application.GetMinRealAverage(58),
+                        Gravity = Gravity.CenterVertical,
+                        UnSelectedImagePath = "Room/Temperature.png"
+                    };
+                    roomTemperatureBackground.AddChidren(temperatureIcon);
+
+                    var temperatureText = new Button
+                    {
+                        X = Application.GetRealWidth(69),
+                        Width = Application.GetRealWidth(86),
+                        Height = Application.GetRealHeight(58),
+                        Gravity = Gravity.CenterVertical,
+                        Text="26鈩�"
+                    };
+                    roomTemperatureBackground.AddChidren(temperatureText);
+
+                    var humidityIcon = new Button
+                    {
+                        X = Application.GetRealWidth(179),
+                        Width = Application.GetMinRealAverage(58),
+                        Height = Application.GetMinRealAverage(58),
+                        Gravity = Gravity.CenterVertical,
+                        UnSelectedImagePath = "Room/Humidity.png"
+                    };
+                    roomTemperatureBackground.AddChidren(humidityIcon);
+
+                    var humidityText = new Button
+                    {
+                        X = Application.GetRealWidth(236),
+                        Width = Application.GetRealWidth(86),
+                        Height = Application.GetRealHeight(58),
+                        Gravity = Gravity.CenterVertical,
+                        Text = "13%"
+                    };
+                    roomTemperatureBackground.AddChidren(humidityText);
+
+
                     var roomListBtn = new Button()
                     {
                         X = roomBackView.Width - Application.GetRealWidth(100 + 20),

--
Gitblit v1.8.0