| | |
| | | foreach (var device in listDevice)
|
| | | {
|
| | | var typeInfo = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<ZigBee.Device.CommonDevice>() { device });
|
| | | if (device.Type == DeviceType.IASZone)
|
| | | if (dic.ContainsKey(typeInfo.BeloneTextId) == false)
|
| | | {
|
| | | //这个强制为传感器
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId1200;
|
| | | typeInfo.ConcreteType = Common.DeviceConcreteType.Sensor;
|
| | | }
|
| | | if (device.Type == DeviceType.OnOffOutput)
|
| | | {
|
| | | //继电器的时候,需要特殊处理
|
| | | if (device.DfunctionType == DeviceFunctionType.A开关)
|
| | | {
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uSwitch;
|
| | | }
|
| | | else if (device.DfunctionType == DeviceFunctionType.A插座)
|
| | | {
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uSocket1;
|
| | | }
|
| | | else if (device.DfunctionType == DeviceFunctionType.A灯光)
|
| | | {
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uLight;
|
| | | }
|
| | | else
|
| | | {
|
| | | //继电器
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId2300;
|
| | | }
|
| | | if (dic.ContainsKey(typeInfo.BeloneTextId) == false)
|
| | | {
|
| | | dic[typeInfo.BeloneTextId] = new List<CommonDevice>();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (dic.ContainsKey(typeInfo.BeloneTextId) == false)
|
| | | {
|
| | | dic[typeInfo.BeloneTextId] = new List<CommonDevice>();
|
| | | }
|
| | | dic[typeInfo.BeloneTextId] = new List<CommonDevice>();
|
| | | }
|
| | | dic[typeInfo.BeloneTextId].Add(device);
|
| | | }
|