From 06696e6f225733a60b03eea4a7c6374053d92c1d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 14 四月 2020 14:15:35 +0800
Subject: [PATCH] 20200414

---
 HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs
index 5d7d450..2753df0 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs
@@ -45,7 +45,7 @@
         #region 鍖哄煙鍙橀噺
         int showdFunctionCount = 0;
         string roomId;
-        string showedFunctionRoomId="0";
+        string showedFunctionRoomId = "0";
         #endregion
 
         public RoomEditFunctionPage(string rId)
@@ -101,7 +101,7 @@
 
             btnChoosedRoom = new Button()
             {
-                X = Application.GetRealWidth(313-100+24),
+                X = Application.GetRealWidth(313 - 100 + 24),
                 Width = Application.GetRealWidth(100),
                 //Height = Application.GetRealHeight(55),
                 TextAlignment = TextAlignment.CenterRight,
@@ -168,7 +168,7 @@
 
             foreach (var function in DB_ResidenceData.residenceData.functionList.functions)
             {
-                if (function.roomIdList.Count > 0 && !function.roomIdList.Contains(roomId)&& showUnallocated)
+                if (function.roomIdList.Count > 0 && !function.roomIdList.Contains(roomId) && showUnallocated)
                 {
                     continue;
                 }
@@ -204,17 +204,22 @@
                 functionRow.AddChidren(btnFunctionIcon);
                 switch (function.functionCategory)
                 {
-                    case FunctionType.AC:
-                        btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon.png";
+                    case FunctionCategory.Thermostat:
+                        switch (function.functionType)
+                        {
+                            case FunctionType.AC:
+                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon.png";
+                                break;
+                            case FunctionType.FloorHeating:
+                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png";
+                                break;
+                        }
                         break;
-                    case FunctionType.Curtain:
+                    case FunctionCategory.Curtain:
                         btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png";
                         break;
-                    case FunctionType.Light:
+                    case FunctionCategory.Light:
                         btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png";
-                        break;
-                    case FunctionType.FloorHeating:
-                        btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png";
                         break;
                 }
 
@@ -271,7 +276,7 @@
                     IsSelected = function.roomIdList.Contains(roomId)
                 };
                 functionRow.AddChidren(btnChooseIcon);
-                LoadEvent_ChangeRoomFunctionList(functionRow,btnChooseIcon, function);
+                LoadEvent_ChangeRoomFunctionList(functionRow, btnChooseIcon, function);
 
                 showdFunctionCount++;
             }
@@ -331,7 +336,7 @@
                 Tag = "0"
             };
             roomListView.AddChidren(btnAllRoom);
-            LoadEvent_ChangeShowedFunctionList(btnAllRoom,dialog,Language.StringByID(StringId.All));
+            LoadEvent_ChangeShowedFunctionList(btnAllRoom, dialog, Language.StringByID(StringId.All));
 
             roomListView.AddChidren(new Button()
             {
@@ -357,7 +362,7 @@
                     Tag = tempRoom.sid,
                 };
                 roomListView.AddChidren(btnRoom);
-                LoadEvent_ChangeShowedFunctionList(btnRoom,dialog,tempRoom.name);
+                LoadEvent_ChangeShowedFunctionList(btnRoom, dialog, tempRoom.name);
 
                 roomListView.AddChidren(new Button()
                 {
@@ -367,7 +372,8 @@
                     BackgroundColor = CSS_Color.DividingLineColor,
                 });
             }
-            dialogBodyView.MouseUpEventHandler = (sender, e) => {
+            dialogBodyView.MouseUpEventHandler = (sender, e) =>
+            {
                 dialog.Close();
             };
 

--
Gitblit v1.8.0