wxr
2020-12-17 6ec12a036c96a200fc0a941967d6b4d07592f863
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
@@ -31,48 +31,24 @@
            {
                Action action = () =>
                {
                    var waitPage = new Loading();
                    waitPage.Start();
                    new Thread(() =>
                    var delResult = SpatialInfo.CurrentSpatial.DelRoom(room);
                    if (delResult == StateCode.SUCCESS)
                    {
                        try
                        foreach (var f in FunctionList.List.GetDeviceFunctionList())
                        {
                            var delResult = SpatialInfo.CurrentSpatial.DelRoom(room);
                            if (delResult == StateCode.SUCCESS)
                            if (f.roomIds.Contains(room.roomId))
                            {
                                foreach (var f in FunctionList.List.GetDeviceFunctionList())
                                {
                                    if (f.roomIds.Contains(room.roomId))
                                    {
                                        f.roomIds.Remove(room.roomId);
                                    }
                                }
                                Application.RunOnMainThread(() =>
                                {
                                    //删除事件回调
                                    this.deleteAction?.Invoke();
                                    this.RemoveFromParent();
                                });
                                f.roomIds.Remove(room.roomId);
                            }
                        }
                        catch (Exception ex)
                        {
                            MainPage.Log($"添加房间失败msg:{ex.Message}");
                        }
                        finally
                        {
                            Application.RunOnMainThread(() =>
                            {
                                waitPage.Hide();
                            });
                        }
                    })
                    { IsBackground = true }.Start();
                        //删除事件回调
                        this.deleteAction?.Invoke();
                        this.RemoveFromParent();
                    }
                };
                new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteRoomTip, action);
            };
        }
        /// <summary>
        /// 显示背景图选择选项