| | |
| | | /// <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功能的,才支持测试
|
| | |
| | | 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)
|
| | | {
|
| | |
| | | if (mainDevice.DfunctionType == DeviceFunctionType.A未定义)
|
| | | {
|
| | | mainDevice.DfunctionType = DeviceFunctionType.A开关;
|
| | | }
|
| | | if (mainDevice.IsCustomizeImage == false)
|
| | | {
|
| | | mainDevice.IconPath = "Device/Switch.png";
|
| | | }
|
| | | }
|
| | | //如果是彩灯的话
|
| | |
| | | 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路继电器的图标
|
| | |
|
| | | }
|
| | |
|