From 6e8dba90956d7068df68144aa4c6d1189e596255 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 09 七月 2021 17:17:03 +0800
Subject: [PATCH] 调光设备本地控制问题

---
 HDL-ON_Android/Properties/AndroidManifest.xml                              |    2 
 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs             |   15 ++-
 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs                       |   24 ++---
 HDL_ON/DAL/DriverLayer/Control_Udp.cs                                      |   46 ++++++-----
 HDL_ON/Entity/FunctionList.cs                                              |    1 
 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs |   12 +++
 HDL-ON_iOS/Info.plist                                                      |    4 
 HDL_ON/DAL/DriverLayer/Packet.cs                                           |    2 
 HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs        |    4 
 .vs/HDL_APP_Project/xs/UserPrefs.xml                                       |   38 +++------
 HDL_ON/DAL/DriverLayer/Control.cs                                          |   28 ++++--
 HDL_ON/UI/MainPage.cs                                                      |    2 
 HDL_ON/UI/UI1-Login/LoginPage.cs                                           |   35 +++-----
 13 files changed, 108 insertions(+), 105 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index deaba39..11cc970 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,35 +1,23 @@
 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI1-Login/LoginPage.cs">
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL-ON_iOS/Info.plist">
     <Files>
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" Line="760" Column="169" />
-      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs" />
-      <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="154" Column="69" />
-      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1848" Column="82" />
-      <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="346" Column="86" />
-      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="527" Column="46" />
+      <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="704" Column="80" />
+      <File FileName="HDL_ON/UI/UI2/2-Classification/RoomPage.cs" />
+      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" />
+      <File FileName="HDL_ON/Common/ApiUtlis.cs" />
+      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" />
+      <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" />
+      <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" />
+      <File FileName="HDL-ON_iOS/Info.plist" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="HDL_APP_Project" expanded="True">
-            <Node name="HDL_ON" expanded="True">
-              <Node name="Common" expanded="True" />
-              <Node name="DAL" expanded="True">
-                <Node name="DriverLayer" expanded="True" />
-                <Node name="Server" expanded="True" />
-              </Node>
-              <Node name="Entity" expanded="True">
-                <Node name="Function" expanded="True" />
-              </Node>
-              <Node name="UI" expanded="True">
-                <Node name="UI1-Login" expanded="True">
-                  <Node name="LoginPage.cs" selected="True" />
-                </Node>
-              </Node>
+            <Node name="HDL-ON_iOS" expanded="True">
+              <Node name="Info.plist" selected="True" />
             </Node>
-            <Node name="HDL-ON_iOS" expanded="True" />
           </Node>
         </State>
       </Pad>
@@ -41,11 +29,13 @@
     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
     <String>Shared.IOS/Shared.IOS.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
   <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
     <BreakpointStore>
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Common/ApiUtlis.cs" relfile="HDL_ON/Common/ApiUtlis.cs" line="390" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="422" column="1" />
     </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 98c7a12..f928257 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202107081" android:versionName="1.2.202107081" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202107094" android:versionName="1.2.202107094" package="com.hdl.onpro">
 	<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" />
 	<!--  鍙瀵硅鏉冮檺-->
 	<uses-permission android:name="android.permission.CAMERA" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index c4c4c22..89d4e0a 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
 	<key>UIStatusBarStyle</key>
 	<string>UIStatusBarStyleLightContent</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.2.202107081</string>
+	<string>1.2.202107095</string>
 	<key>CFBundleVersion</key>
-	<string>1.2.07081</string>
+	<string>1.2.07095</string>
 	<key>NSLocationWhenInUseUsageDescription</key>
 	<string>Use geographic location to provide services such as weather</string>
 	<key>NSAppleMusicUsageDescription</key>
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 0724f2b..7cbe4d6 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -359,15 +359,6 @@
                     }
                 }
             }
-            //Bug淇锛氫竴绔彛杩滅▼鎺у埗璋冨厜璁惧鐨勮皟鍏夊睘鎬ф椂锛屾棤娉曟帶鍒跺埌0锛屽弽澶嶆í璺炽��
-            //鍥犱负On + 杩滅▼鎺у埗鍙戦�佺粰浜戠浣跨敤鐨勬槸link鍗忚鏁版嵁锛屾潹娑涗腑杞粰楂樿儨澶勭悊鏃跺�欓�昏緫涓婃湁鍐茬獊锛屽鑷存棤娉曞崟鐙帶鍒朵寒搴﹀�硷紝闇�瑕佸悓鏃跺彂閫佸紑鍏冲�间笌浜害鍊笺��
-            if (DB_ResidenceData.Instance.GatewayType == 0)
-            {
-                if(commandDictionary.Count == 1 && commandDictionary.ContainsKey(FunctionAttributeKey.Brightness))
-                {
-                    commandDictionary.Add(FunctionAttributeKey.OnOff, commandDictionary[FunctionAttributeKey.Brightness] == "0" ? "off" : "on");
-                }
-            }
 
             ///dome鎺у埗
             if (MainPage.NoLoginMode)
@@ -443,6 +434,25 @@
                 //杩滅▼閫氳
                 else
                 {
+                    //Bug淇锛氫竴绔彛杩滅▼鎺у埗璋冨厜璁惧鐨勮皟鍏夊睘鎬ф椂锛屾棤娉曟帶鍒跺埌0锛屽弽澶嶆í璺炽��
+                    //鍥犱负On + 杩滅▼鎺у埗鍙戦�佺粰浜戠浣跨敤鐨勬槸link鍗忚鏁版嵁锛屾潹娑涗腑杞粰楂樿儨澶勭悊鏃跺�欓�昏緫涓婃湁鍐茬獊锛屽鑷存棤娉曞崟鐙帶鍒朵寒搴﹀�硷紝闇�瑕佸悓鏃跺彂閫佸紑鍏冲�间笌浜害鍊笺��
+                    if (DB_ResidenceData.Instance.GatewayType == 0)
+                    {
+                        if (commandDictionary.Count == 1)
+                        {
+                            if (commandDictionary.ContainsKey(FunctionAttributeKey.Brightness))
+                            {
+                                commandDictionary.Add(FunctionAttributeKey.OnOff, commandDictionary[FunctionAttributeKey.Brightness] == "0" ? "off" : "on");
+                            }
+                        }
+                        if(function.spk == SPK.LightCCT)
+                        {
+                            if (!commandDictionary.ContainsKey(FunctionAttributeKey.CCT))
+                            {
+                                commandDictionary.Add(FunctionAttributeKey.CCT, function.GetAttrState(FunctionAttributeKey.CCT));
+                            }
+                        }
+                    }
                     DAL.Server.HttpServerRequest httpServer = new DAL.Server.HttpServerRequest();
                     //ALink鎺у埗銆丅us鎺у埗浣跨敤鍚屼竴涓帴鍙f帶鍒讹紝鐢变簯绔礋璐hВ鏋�
                     var apiControlData = function.GetApiControlData(commandDictionary);
diff --git a/HDL_ON/DAL/DriverLayer/Control_Udp.cs b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
index 789428d..160eee7 100644
--- a/HDL_ON/DAL/DriverLayer/Control_Udp.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -437,17 +437,21 @@
                         switch (function.spk)
                         {
                             case SPK.LightCCT:
-                                byte b0 = 100;//寮�鍏虫搷浣滀緷鎹畂n_off瀛楁锛屽疄闄呭紑鍏冲�间緷鎹産rightness锛屽綋on_off涓烘墦寮�锛宐rightness涓嶈兘涓�0
-                                if(commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
+                                byte b0 = 100;
+                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                                 {
                                     if (function.trait_on_off.curValue.ToString() == "off")
                                     {
                                         b0 = 0;
                                     }
+                                    else
+                                    {
+                                        b0 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
+                                    }
                                 }
                                 else
                                 {
-                                    b0 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));// == 0 ? (byte)100 : Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
+                                    b0 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
                                 }
                                 var bytes0 = new byte[] { function.bus.LoopId,
                                             b0,
@@ -459,22 +463,21 @@
                                 ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes0, 1);
                                 break;
                             case SPK.LightRGB:
-                                byte b = 100;//寮�鍏虫搷浣滀緷鎹畂n_off瀛楁锛屽疄闄呭紑鍏冲�间緷鎹産rightness锛屽綋on_off涓烘墦寮�锛宐rightness涓嶈兘涓�0
-                                if (function.trait_on_off.curValue.ToString() == "off")
+                                byte b = 100;
+                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                                 {
-                                    b = 0;
-                                }
-                                else
-                                {
-                                    byte lightBri1 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
-                                    if (lightBri1 == 0)
+                                    if (function.trait_on_off.curValue.ToString() == "off")
                                     {
-                                        b = 100;
+                                        b = 0;
                                     }
                                     else
                                     {
-                                        b = lightBri1;
+                                        b = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
                                     }
+                                }
+                                else
+                                {
+                                    b = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
                                 }
                                 var tempLight = new Light();
                                 var bytes = new byte[] { function.bus.LoopId,
@@ -488,22 +491,21 @@
                                 break;
                             case SPK.LightDimming:
                                 byte b1 = 100;
-                                if (function.trait_on_off.curValue.ToString() == "off")
+                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                                 {
-                                    b1 = 0;
-                                }
-                                else
-                                {
-                                    byte lightBri = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
-                                    if (lightBri == 0)
+                                    if (function.trait_on_off.curValue.ToString() == "off")
                                     {
-                                        b1 = 100;
+                                        b1 = 0;
                                     }
                                     else
                                     {
-                                        b1 = lightBri;
+                                        b1 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
                                     }
                                 }
+                                else
+                                {
+                                    b1 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
+                                }
                                 ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] {
                                             function.bus.LoopId,
                                             b1,
diff --git a/HDL_ON/DAL/DriverLayer/Packet.cs b/HDL_ON/DAL/DriverLayer/Packet.cs
index 2d28447..5994565 100644
--- a/HDL_ON/DAL/DriverLayer/Packet.cs
+++ b/HDL_ON/DAL/DriverLayer/Packet.cs
@@ -180,7 +180,7 @@
                                     light.trait_on_off.curValue = receiveBytes[light.bus.LoopId] == 0 ? "off" : "on";
                                     if (light.trait_on_off.curValue.ToString() == "on")
                                     {
-                                        light.SetAttrState(FunctionAttributeKey.Brightness, receiveBytes[2].ToString());
+                                        light.SetAttrState(FunctionAttributeKey.Brightness, receiveBytes[i+1].ToString());
                                         light.lastState = Language.StringByID(StringId.Brightness) + " : " + receiveBytes[2] + "%";
                                     }
                                     HomePage.UpdataFunctionStates(light);
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index 0d84b83..707c057 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -184,6 +184,7 @@
         /// <para>false:鐩存帴鏃犳潯浠舵坊鍔�</para></param>
         public void IniFunctionList(string filePath, bool checkRepeat = false)
         {
+            MainPage.Log("鍒濆鍖栧姛鑳芥暟鎹�");
             // todo 澧炲姞璁惧锛屽鍔犲姛鑳借繘鍔熻兘鍒楄〃
             if (filePath.StartsWith("FunctionData_"))
             {
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 0a502ab..22b9615 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string VersionString = "1.2.0708";
+        public static string VersionString = "1.2.0709";
         ///// <summary>
         ///// 瀹㈡埛绔被鍨�
         ///// </summary>
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 58ce5a1..2103fe5 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -205,7 +205,7 @@
                 {
                     //etAccount.Text = "tf@smarttech.com.ua";//鍥藉璐﹀彿锛屾湁浣忓畢锛岀櫥褰曟棤娉曟樉绀�
                     //etAccount.Text = "13375012446";//娴嬭瘯鏈嶅姟鍣�
-                    etAccount.Text = "13450425803";
+                    //etAccount.Text = "13450425803";
                     //etAccount.Text = "1033326940@qq.com";
                     //etAccount.Text = "18022428438";//wjc
                     //etAccount.Text = "13602944661";//kx
@@ -223,15 +223,13 @@
                     //etAccount.Text = "15217626103";//
                     //etAccount.Text = "13682244600";//娉㈠摜
                     //etAccount.Text = "13168123446";//鏄嗘槑閲戣寕椤圭洰锛屾柊椋庨棶棰�
-                    etAccount.Text = "551775569@qq.com";
-                    etAccount.Text = "2949126848@qq.com";//闄堢惓cct娴嬭瘯
+                    //etAccount.Text = "2949126848@qq.com";//闄堢惓
                     //etAccount.Text = "13168123446";
                     //etAccount.Text = "13676202754";//宸存灄鏈嶅姟鍣�
                     //etAccount.Text = "13602944661";//kx
-                    //etAccount.Text = "551775569@qq.com";//wcf
+                    etAccount.Text = "551775569@qq.com";//wcf
                     //etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374
-                    //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 鍥藉鏈嶅姟鍣ㄦ祴璇�
-                    etAccount.Text = "15971583093";//楂樿儨 璋冨厜0 100 鍙嶅妯烦
+                    //etAccount.Text = "15971583093";//楂樿儨
                 }
                 b = !b;
                 etPassword.Text = "123456";
@@ -671,12 +669,12 @@
                     sid = "light4",
                     deviceId = "light4",
                     name = Language.CurrentLanguage == "Chinese" ? "澶х伅" : "light 1",
-                    spk = SPK.LightSwitch,
+                    spk = SPK.LightDimming,
                     roomIds = new List<string>() { "1405771024583090178" },
                     attributes = new List<FunctionAttributes>()
                     {
                         new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on"   },
-                        new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
+                        new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="100",state = "100"   },
                         new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
                     },
                 };
@@ -691,7 +689,6 @@
                     attributes = new List<FunctionAttributes>()
                     {
                         new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on"   },
-                        new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
                         new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
                     },
                 };
@@ -735,7 +732,7 @@
                     {
                         new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on"   },
                         new FunctionAttributes() { key = "mode",value =new List<string>(){ "day", "night", "away", "normal", "timer" }, curValue="day",state = "day"   },
-                        new FunctionAttributes() { key = "set_temp",value =new List<string>(){ "" }, curValue="26",state = "26"   },
+                        new FunctionAttributes() { key = "set_temp",value =new List<string>(){ "" }, curValue="26",state = "26" ,max = 35,min = 5  },
                         new FunctionAttributes() { key = "room_temp",value =new List<string>(){ "" }, curValue="26",state = "26"   },
                     },
                 };
@@ -901,12 +898,12 @@
                     sid = "light6",
                     deviceId = "light6",
                     name = Language.CurrentLanguage == "Chinese" ? "椁愬巺鐏�1" : "Dining room light 1",
-                    spk = SPK.LightSwitch,
+                    spk = SPK.LightDimming,
                     roomIds = new List<string>() { room3.roomId },
                     attributes = new List<FunctionAttributes>()
                     {
                         new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on"   },
-                        new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
+                        new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="100",state = "100"   },
                         new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
                     },
                 };
@@ -921,7 +918,6 @@
                     attributes = new List<FunctionAttributes>()
                     {
                         new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on"   },
-                        new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
                         new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
                     },
                 };
@@ -1053,7 +1049,6 @@
                     attributes = new List<FunctionAttributes>()
                     {
                         new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on"   },
-                        new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
                         new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0"   },
                     },
                 };
@@ -1062,15 +1057,11 @@
                 #endregion
 
                 var fileList = Common.FileUtlis.Files.ReadFiles();
-
+                foreach(var file in fileList)
+                {
+                    FunctionList.List.IniFunctionList(file,true);
+                }
                 Room.CurrentSpatial.InitRoomListFunctions();
-
-
-
-
-
-
-
 
 
 
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 606a378..ba8453a 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -269,7 +269,7 @@
                                 }
                             });
                             runCount++;
-                            System.Threading.Thread.Sleep(8);
+                            System.Threading.Thread.Sleep(12);
                         }
                         Application.RunOnMainThread(() =>
                         {
@@ -307,6 +307,7 @@
                             Height = Application.GetRealWidth(192 + 20),//2020-12-01 鎴块棿鍥剧墖姣斾緥鏀瑰洖16:9
                             Radius = (uint)Application.GetRealWidth(12),
                             Tag = room.roomId,
+                            BackgroundColor = CSS_Color.MainBackgroundColor,
                         };
                         roomListView.AddChidren(roomView);
 
@@ -323,7 +324,7 @@
                             Height = Application.GetRealWidth(70 + 20),
                             Radius = (uint)Application.GetRealWidth(12),
                             Tag = room.roomId,
-                            BackgroundColor = CSS_Color.BackgroundColor,
+                            BackgroundColor = CSS_Color.MainBackgroundColor,
                         };
                         roomListView.AddChidren(roomView);
                         LoadSmallPirtureRoomRow(roomView, room);
@@ -509,9 +510,10 @@
             roomView.RemoveAll();
             roomFloorChangeView.BackgroundColor = roomListView.BackgroundColor = CSS_Color.BackgroundColor;
             roomView.BackgroundColor = CSS_Color.BackgroundColor;
+            //roomView.BackgroundColor = CSS_Color.MainBackgroundColor;
 
 
-            var viewbg = new ImageView()
+            var viewbg = new Button()
             {
                 Width = Application.GetRealWidth(343),
                 Height = Application.GetRealWidth(70),
@@ -556,10 +558,10 @@
 
             var btnAllClose = new Button()
             {
-                X = Application.GetRealWidth(288),
-                Y = Application.GetRealWidth(10),
-                Width = Application.GetMinRealAverage(58),
-                Height = Application.GetMinRealAverage(58),
+                X = Application.GetRealWidth(278),
+                Y = Application.GetRealWidth(15),
+                Width = Application.GetMinRealAverage(50),
+                Height = Application.GetMinRealAverage(50),
                 UnSelectedImagePath = "Classification/Room/AllCloseIcon2.png",
                 Tag = "AllClose",
                 Visible = false
@@ -699,13 +701,7 @@
                         functionOnCount = FunctionList.List.GetAirFreshList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
                         break;
                     case ShowFunction.Music:
-                        //functionCount = Music.A31MusicModel.A31MusicModelList.Count;
-                        //functionOnCount = Music.A31MusicModel.A31MusicModelList.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
-                        //if(functionCount == 0)
-                        //{
-                        //    functionCount = FunctionList.List.GetMusicList().Count;
-                        //}
-                        functionCount = 1;
+                        functionCount = FunctionList.List.GetMusicList().Count;
                         break;
                     case ShowFunction.Panel:
                         break;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
index a097bcd..5b8f65b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -410,9 +410,9 @@
                 Button btnModeIcon = new Button()
                 {
                     X = btnTitle.X,
-                    Y = Application.GetRealHeight(41 * (modeList.IndexOf(m) + 1) + 10 + 8),
-                    Width = Application.GetRealWidth(30),
-                    Height = Application.GetRealWidth(30),
+                    Y = Application.GetRealHeight(44 * (modeList.IndexOf(m) + 1) + 10 + 8),
+                    Width = Application.GetRealWidth(24),
+                    Height = Application.GetRealWidth(24),
                     IsSelected = device.GetAttrState(FunctionAttributeKey.Swing) == m,
                 };
                 modeChangeView.AddChidren(btnModeIcon);
@@ -431,10 +431,6 @@
                 };
                 modeChangeView.AddChidren(btnModeText);
 
-                btnModeIcon.UnSelectedImagePath = acFunction.GetSwingIconPath(m, false);
-                btnModeIcon.SelectedImagePath = acFunction.GetSwingIconPath(m);
-                btnModeText.Text = acFunction.GetSwingAttrText(m);
-
                 if (modeList.IndexOf(m) < modeList.Count - 1)
                 {
                     modeChangeView.AddChidren(new Button()
@@ -446,6 +442,11 @@
                         BackgroundColor = CSS_Color.BackgroundColor,
                     });
                 }
+
+                btnModeIcon.UnSelectedImagePath = acFunction.GetSwingIconPath(m, false);
+                btnModeIcon.SelectedImagePath = acFunction.GetSwingIconPath(m);
+                btnModeText.Text = acFunction.GetSwingAttrText(m);
+
                 EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                 {
                     dialog.Close();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs
index 341c300..58df0a8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs
@@ -133,6 +133,18 @@
 
                 //娣诲姞鏁版嵁瀵硅薄
                 AttributesStatus buttonObj = new AttributesStatus();
+
+                //闃叉key涓嶅敮涓�
+                var attrCount = control.attributes.Count;
+                var keyString = "key" + attrCount;
+                while (true)
+                {
+                    if (control.attributes.Find((obj) => obj.key == keyString) == null)
+                    {
+                        break;
+                    }
+                    keyString = "key" + (++attrCount);
+                }
                 buttonObj.key = "key" + control.attributes.Count.ToString();
                 buttonObj.value = texts;
 
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
index 950bbd0..4170d64 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -107,7 +107,7 @@
                 }
 
                 var temp = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.SetTemp));
-                if (temp < Convert.ToInt32(function.GetAttribute(FunctionAttributeKey.SetTemp).min))
+                if (temp <= Convert.ToInt32(function.GetAttribute(FunctionAttributeKey.SetTemp).min))
                 {
                     return;
                 }
@@ -126,7 +126,7 @@
                     return;
                 }
                 var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp));
-                if (temp > Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max))
+                if (temp >= Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max))
                 {
                     return;
                 }

--
Gitblit v1.8.0