From 6ec12a036c96a200fc0a941967d6b4d07592f863 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 17 十二月 2020 14:31:17 +0800 Subject: [PATCH] Merge branch 'tzy' into NewFilePath --- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs | 42 +++++++++--------------------------------- 1 files changed, 9 insertions(+), 33 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs index 4b4d2fe..424a911 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs +++ b/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> /// 鏄剧ず鑳屾櫙鍥鹃�夋嫨閫夐」 -- Gitblit v1.8.0