黄学彪
2019-12-20 23fb45dd846ed8b62304c408c6bbe64265d4ac8b
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
@@ -410,43 +410,9 @@
                    continue;
                }
                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);
            }