gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs
@@ -156,7 +156,7 @@
            btnIconContr.ButtonClickEvent += (sender, e) =>
            {
                //楼层菜单
                var contr = new TopRightMenuControl(dicFloor.Count, 449, Language.StringByID(R.MyInternationalizationString.SelectFloor));
                var contr = new TopRightMenuControl(dicFloor.Count, 2, Language.StringByID(R.MyInternationalizationString.SelectFloor));
                foreach (var floorId in dicFloor.Keys)
                {
                    contr.AddRowMenu(dicFloor[floorId], "Floor/Floor.png", "Floor/FloorSelected.png", () =>
@@ -288,46 +288,13 @@
                    string unSelectPath = string.Empty;
                    string selectPath = string.Empty;
                    var typeInfo = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice>() { device });
                    if (device.Type == DeviceType.OnOffOutput)
                    var typeInfo = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device);
                    //获取图片
                    Common.LocalDevice.Current.GetDeviceObjectIcon(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);
                }