| | |
| | | return; |
| | | } |
| | | } |
| | | var waitPage = new Loading(); |
| | | waitPage.Start(); |
| | | new Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var addResult = SpatialInfo.CurrentSpatial.AddRoom(room, out room);//检查room是否为云端返回的最新数据 |
| | | if (addResult == StateCode.SUCCESS) |
| | | { |
| | |
| | | room.GetRoomFunctions(true); |
| | | } |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | backAction(room); |
| | | RemoveFromParent(); |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"添加房间失败msg:{ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | } |
| | | |