黄学彪
2019-12-31 737c036a39176fd2085ce82b7c60391da8cb508c
ZigbeeApp/Shared/Common/Room.cs
@@ -943,6 +943,31 @@
            this.DeleteDevice(device);
        }
        /// <summary>
        /// 删除我的喜爱的设备
        /// </summary>
        /// <param name="device">要删除的设备对象</param>
        public void DeleteLoveDevice(CommonDevice device)
        {
            if (device == null)
            {
                return;
            }
            //我的喜爱
            var loveRoom = this.GetLoveRoom();
            if (loveRoom != null)
            {
                string deviceFile = device.FilePath;
                //移除缓存
                if (loveRoom.DeviceUIFilePathList.Contains(deviceFile) == false)
                {
                    return;
                }
                loveRoom.DeviceUIFilePathList.Remove(deviceFile);
                loveRoom.DeviceUIList.RemoveAll((obj) => obj.FileName == deviceFile);
            }
        }
        #endregion
        #region ◆ 获取设备_________________________