From 7d005a7618e3d7a80d8ede3baf6ecc4bf8019cd5 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 01 九月 2020 15:22:09 +0800
Subject: [PATCH] 2020-09-01

---
 HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs |   39 +++++++++++++++++++++++++++++++--------
 1 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs
index 2cf2c04..6e11318 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs
@@ -44,6 +44,9 @@
         #endregion
 
         #region 鍖哄煙鍙橀噺
+        /// <summary>
+        /// 闇�瑕佹樉绀虹殑鍔熻兘鎬绘暟锛屽奖鍝嶅埌鐣岄潰鏄剧ず
+        /// </summary>
         int showdFunctionCount = 0;
         Room room;
         string showedFunctionRoomId = "0";
@@ -133,11 +136,11 @@
             {
                 Y = showdFunctionTypeRow.Bottom,
                 Height = Application.GetRealHeight(518 - 40 - 62),
-                BackgroundColor = CSS_Color.MainBackgroundColor,
+                BackgroundColor = CSS_Color.BackgroundColor,
             };
             bodyView.AddChidren(functionListView);
 
-            foreach (var function in DB_ResidenceData.residenceData.functionList.functions)
+            foreach (var function in DB_ResidenceData.functionList.GetAllFunction())
             {
                 function.roomIdList.Remove(null);
                 if (function.roomIdList.Count > 0 )
@@ -251,13 +254,33 @@
                     case FunctionCategory.Music:
                         btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png";
                         break;
+                    case FunctionCategory.Sensor:
+                        switch(function.functionType)
+                        {
+                            case FunctionType.PM25:
+                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconPm25.png";
+                                break;
+                            case FunctionType.CO2:
+                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconCO2.png";
+                                break;
+                            case FunctionType.TVOC:
+                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTVOC.png";
+                                break;
+                            case FunctionType.Humidity:
+                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconHumidity.png";
+                                break;
+                            case FunctionType.Temp:
+                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTemp.png";
+                                break;
+                        }
+                        break;
                 }
 
                 if (!btnAllocated.IsSelected)
                 {
                     var btnFunctionName = new Button()
                     {
-                        X = btnFunctionIcon.Right + Application.GetRealWidth(3),
+                        X = btnFunctionIcon.Right + Application.GetRealWidth(12),
                         Width = Application.GetRealWidth(200),
                         Text = function.name,
                         TextAlignment = TextAlignment.CenterLeft,
@@ -270,9 +293,9 @@
                 {
                     var btnFunctionName = new Button()
                     {
-                        X = btnFunctionIcon.Right + Application.GetRealWidth(3),
+                        X = btnFunctionIcon.Right + Application.GetRealWidth(12),
                         Width = Application.GetRealWidth(200),
-                        Height = Application.GetRealHeight(30),
+                        Height = Application.GetRealHeight(40),
                         Text = function.name,
                         TextAlignment = TextAlignment.CenterLeft,
                         TextColor = CSS_Color.FirstLevelTitleColor,
@@ -282,8 +305,8 @@
 
                     var btnFunctionFloorName = new Button()
                     {
-                        X = btnFunctionIcon.Right + Application.GetRealWidth(3),
-                        Y = btnFunctionName.Bottom,
+                        X = btnFunctionIcon.Right + Application.GetRealWidth(12),
+                        Y = Application.GetRealHeight(50),
                         Width = Application.GetRealWidth(200),
                         Height = Application.GetRealHeight(20),
                         Text = function.GetRoomListName(),
@@ -376,7 +399,7 @@
                 Height = Application.GetRealWidth(1),
                 BackgroundColor = CSS_Color.DividingLineColor,
             });
-            foreach (var tempRoom in DB_ResidenceData.residenceData.rooms)
+            foreach (var tempRoom in DB_ResidenceData.rooms)
             {
 
                 Button btnRoom = new Button()

--
Gitblit v1.8.0