From 23fb45dd846ed8b62304c408c6bbe64265d4ac8b Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 20 十二月 2019 18:57:16 +0800 Subject: [PATCH] 代码合并 --- ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs | 54 ++++++++---------------------------------------------- 1 files changed, 8 insertions(+), 46 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs index 20a5eea..7cf9971 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs @@ -248,53 +248,15 @@ foreach (var device in listDevice) { var typeInfo = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<ZigBee.Device.CommonDevice>() { device }); - if (device.Type == DeviceType.IASZone) + //鎸夋墍灞濱D鍒嗙粍 + if (dic.ContainsKey(typeInfo.BeloneTextId) == false) { - //杩欎釜寮哄埗涓轰紶鎰熷櫒 - typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId1200; - typeInfo.ConcreteType = Common.DeviceConcreteType.Sensor; - } - if (device.Type == DeviceType.OnOffOutput) - { - string iconPath = string.Empty; - //缁х數鍣ㄧ殑鏃跺��,闇�瑕佺壒娈婂鐞� - if (device.DfunctionType == DeviceFunctionType.A寮�鍏�) - { - typeInfo.BeloneTextId = R.MyInternationalizationString.uSwitch; - iconPath = "Device/Switch.png"; - } - else if (device.DfunctionType == DeviceFunctionType.A鎻掑骇) - { - typeInfo.BeloneTextId = R.MyInternationalizationString.uSocket1; - iconPath = "Device/Socket1.png"; - } - else if (device.DfunctionType == DeviceFunctionType.A鐏厜) - { - typeInfo.BeloneTextId = R.MyInternationalizationString.uLight; - iconPath = "Device/Light.png"; - } - else - { - //缁х數鍣� - typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId2300; - iconPath = "Device/Relay.png"; - } - if (dic.ContainsKey(typeInfo.BeloneTextId) == false) - { - dic[typeInfo.BeloneTextId] = new DeviceRowInfo(); - dic[typeInfo.BeloneTextId].IconPath = iconPath; - } - } - else - { - if (dic.ContainsKey(typeInfo.BeloneTextId) == false) - { - dic[typeInfo.BeloneTextId] = new DeviceRowInfo(); - string path1 = string.Empty; - string path2 = string.Empty; - Common.LocalDevice.Current.GetDeviceBeloneIcon(typeInfo.ConcreteType, ref path1, ref path2); - dic[typeInfo.BeloneTextId].IconPath = path1; - } + dic[typeInfo.BeloneTextId] = new DeviceRowInfo(); + string path1 = string.Empty; + string path2 = string.Empty; + //鑾峰彇鍥剧墖 + Common.LocalDevice.Current.GetDeviceBeloneIcon(typeInfo.ConcreteType, ref path1, ref path2); + dic[typeInfo.BeloneTextId].IconPath = path1; } dic[typeInfo.BeloneTextId].listDeviceKeys.Add(Common.LocalDevice.Current.GetDeviceMainKeys(device)); } -- Gitblit v1.8.0