gxc
2019-12-13 eb424d24e39bab4a245725f35deab3f234ea0f13
ZigbeeApp/Shared/Common/Device.cs
old mode 100755 new mode 100644
@@ -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">需要保存的哪个设备的房间ID</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)