黄学彪
2020-04-08 4dce704aaf8587cf3f91cf88f2208315a03c4cbb
ZigbeeApp/Shared/Common/Device.cs
@@ -689,6 +689,22 @@
        /// <returns></returns>
        public bool DeviceIsCanFixedPosition(CommonDevice device)
        {
            if (device.Type == DeviceType.DoorLock)
            {
                //门锁没有定位功能
                return false;
            }
            if (device.Type == DeviceType.IASZone)
            {
                var myTypeInfo = this.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                if (myTypeInfo.ConcreteType == DeviceConcreteType.Sensor_Pir)
                {
                    //传感器除了Pir都没有定位功能
                    return true;
                }
                return false;
            }
            foreach (var data in device.InClusterList)
            {
                //拥有on/off功能的,才支持测试
@@ -2372,6 +2388,22 @@
                    mainDevice.IconPath = "Device/Light.png";
                }
            }
            //如果是三路继电器的回路的话,默认为灯光
            else if (mainDevice.Type == DeviceType.OnOffOutput)
            {
                var myType = this.GetHdlMyDeviceEnumInfo(mainDevice);
                if (myType != null && myType.ConcreteType == DeviceConcreteType.Relay_ThreeLoad)
                {
                    if (mainDevice.DfunctionType == DeviceFunctionType.A未定义)
                    {
                        mainDevice.DfunctionType = DeviceFunctionType.A灯光;
                    }
                    if (mainDevice.IsCustomizeImage == false)
                    {
                        mainDevice.IconPath = "Device/Light.png";
                    }
                }
            }
            //如果是空气开关的话
            else if (mainDevice.Type == DeviceType.AirSwitch)
            {
@@ -2379,6 +2411,10 @@
                if (mainDevice.DfunctionType == DeviceFunctionType.A未定义)
                {
                    mainDevice.DfunctionType = DeviceFunctionType.A开关;
                }
                if (mainDevice.IsCustomizeImage == false)
                {
                    mainDevice.IconPath = "Device/Switch.png";
                }
            }
            //如果是彩灯的话
@@ -2555,6 +2591,7 @@
            this.dicPictrueShard["ButtonPanel_SimpleThree"] = "ButtonPanel_Three";//简约3按键面板 沿用 3按键的图标
            this.dicPictrueShard["ButtonPanel_SimpleTwo"] = "ButtonPanel_Two";//简约2按键面板 沿用 2按键的图标
            this.dicPictrueShard["IntelligentLocks_Sone"] = "IntelligentLocks_H06C";//S-one的门锁图片沿用H06C的图标
            this.dicPictrueShard["Relay_FangyueFreshAirModul"] = "Relay_ThreeLoad";//方悦新风小模块图片沿用3路继电器的图标
        }