From eb424d24e39bab4a245725f35deab3f234ea0f13 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 13 十二月 2019 10:48:50 +0800
Subject: [PATCH] 2019.12.13

---
 ZigbeeApp/Shared/Common/Device.cs |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
old mode 100755
new mode 100644
index b9086a3..0d7cf92
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -1397,7 +1397,7 @@
                             temperatrue = true;
                         }
                         //婀垮害浼犳劅鍣�
-                        else if(((TemperatureSensor)device).SensorDiv == 2)
+                        else if (((TemperatureSensor)device).SensorDiv == 2)
                         {
                             humidity = true;
                         }
@@ -1524,7 +1524,8 @@
         /// </summary>
         /// <param name="listDevice">闇�瑕佷繚瀛樼殑璁惧瀵硅薄</param>
         /// <param name="roomId">闇�瑕佷繚瀛樼殑鍝釜璁惧鐨勬埧闂碔D</param>
-        public void SaveRealDeviceRoomId(List<CommonDevice> listDevice, string roomId)
+        /// <param name="saveRoadDevice">濡傛灉鍙湁涓�涓洖璺�,鏄惁鎶婂洖璺殑鎴块棿涓�璧蜂慨鏀�</param>
+        public void SaveRealDeviceRoomId(List<CommonDevice> listDevice, string roomId, bool saveRoadDevice = true)
         {
             if (listDevice != null)
             {
@@ -1535,10 +1536,13 @@
             string fullName = UserCenterLogic.CombinePath(DirNameResourse.DeviceRoomIdFile);
             UserCenterLogic.SaveFileContent(fullName, this.dicDeviceRoomId);
 
+            //娣诲姞鑷姩澶囦唤
+            HdlAutoBackupLogic.AddOrEditorFile(DirNameResourse.DeviceRoomIdFile);
+
             //濡傛灉璁惧鍙湁涓�涓洖璺紝濡傛灉鏀瑰彉浜嗙湡瀹炶澶囧尯鍩燂紝鍒欏畠鐨勫洖璺殑鍖哄煙涔熶竴璧锋敼浜�
-            if (listDevice != null && listDevice.Count == 1)
+            if (saveRoadDevice == true && listDevice != null && listDevice.Count == 1)
             {
-                Common.Room.CurrentRoom.ChangedRoom(listDevice[0], roomId);
+                Common.Room.CurrentRoom.ChangedRoom(listDevice[0], roomId, false);
             }
         }
 
@@ -1939,7 +1943,7 @@
                 }
             }
             //濡傛灉鏄皟鍏夊櫒
-            else if (mainDevice.Type == DeviceType.DimmableLight )
+            else if (mainDevice.Type == DeviceType.DimmableLight)
             {
                 mainDevice.DfunctionType = DeviceFunctionType.A鐏厜;
                 if (mainDevice.IsCustomizeImage == false)
@@ -1948,7 +1952,7 @@
                 }
             }
             //濡傛灉鏄僵鐏殑璇�
-            else if ( mainDevice.Type == DeviceType.ColorDimmableLight)
+            else if (mainDevice.Type == DeviceType.ColorDimmableLight)
             {
                 mainDevice.DfunctionType = DeviceFunctionType.A鐏厜;
                 if (mainDevice.IsCustomizeImage == false)

--
Gitblit v1.8.0