| | |
| | | string selectPath = string.Empty;
|
| | |
|
| | | var typeInfo = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice>() { device });
|
| | | if (device.Type == DeviceType.OnOffOutput)
|
| | | //获取图片
|
| | | Common.LocalDevice.Current.GetDeviceBeloneIcon(typeInfo.ConcreteType, ref unSelectPath, ref selectPath);
|
| | | if (dicRoomData.ContainsKey(typeInfo.BeloneTextId) == false)
|
| | | {
|
| | | //继电器的时候,需要特殊处理
|
| | | if (device.DfunctionType == DeviceFunctionType.A开关)
|
| | | {
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uSwitch;
|
| | | unSelectPath = "Device/Switch.png";
|
| | | }
|
| | | else if (device.DfunctionType == DeviceFunctionType.A插座)
|
| | | {
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uSocket1;
|
| | | unSelectPath = "Device/Socket1.png";
|
| | | }
|
| | | else if (device.DfunctionType == DeviceFunctionType.A灯光)
|
| | | {
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uLight;
|
| | | unSelectPath = "Device/Light.png";
|
| | | }
|
| | | else
|
| | | {
|
| | | //继电器
|
| | | typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId2300;
|
| | | unSelectPath = "Device/Relay.png";
|
| | | }
|
| | | if (dicRoomData.ContainsKey(typeInfo.BeloneTextId) == false)
|
| | | {
|
| | | dicRoomData[typeInfo.BeloneTextId] = new uRowInformation();
|
| | | dicRoomData[typeInfo.BeloneTextId].IconPath = unSelectPath;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | //获取图片
|
| | | Common.LocalDevice.Current.GetDeviceBeloneIcon(typeInfo.ConcreteType, ref unSelectPath, ref selectPath);
|
| | | if (dicRoomData.ContainsKey(typeInfo.BeloneTextId) == false)
|
| | | {
|
| | | dicRoomData[typeInfo.BeloneTextId] = new uRowInformation();
|
| | | dicRoomData[typeInfo.BeloneTextId].IconPath = unSelectPath;
|
| | | }
|
| | | dicRoomData[typeInfo.BeloneTextId] = new uRowInformation();
|
| | | dicRoomData[typeInfo.BeloneTextId].IconPath = unSelectPath;
|
| | | }
|
| | | dicRoomData[typeInfo.BeloneTextId].listDevice.Add(device);
|
| | | }
|