xm
2020-05-13 99da2604f81af29afc6b3c6f4f128b4e5a8a5649
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
old mode 100755 new mode 100644
@@ -296,26 +296,11 @@
            {
                device = Newtonsoft.Json.JsonConvert.DeserializeObject<FreshAir>(strDeviceByte);
            }
            else { return null; }
            //能少存一个变量就少存一个
            device.Type = (DeviceType)device.DeviceID;
            return device;
        }
        /// <summary>
        /// 由设备路径恢复设备对象
        /// </summary>
        /// <returns>The device by file path.</returns>
        /// <param name="deviceFilePath">Device file path.</param>
        public static CommonDevice CommonDeviceByFilePath(string deviceFilePath)
        {
            var v = deviceFilePath.Split('_');
            if (v.Length < 3)
            else if (strDeviceType == ZigBee.Device.DeviceType.PMSensor.ToString())
            {
                return null;
                return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte);
            }
            return CommonDeviceByByteString(v[1], System.Text.Encoding.UTF8.GetString(Shared.Common.Global.ReadFileByHomeId(deviceFilePath)));
            return null;
        }
        /// <summary>
@@ -373,17 +358,17 @@
                }
                else if (this.Type == DeviceType.Thermostat)
                {
                    //空调
                    //空调
                    IconPath = "Device/AirConditionerEpoint.png";
                }
                else if (this.Type == DeviceType.FreshAir)
                {
                    //新风
                    //新风
                    IconPath = "Device/FreshAirEpoint.png";
                }
                else if (this.Type == DeviceType.PMSensor)
                {
                    //PM2.5空气质量传感器
                    //PM2.5空气质量传感器
                    IconPath = "Device/AirQualitySensorEpoint.png";
                }
                else if (this.Type == DeviceType.FreshAirHumiditySensor)