From 41f9c8837b0551c68f8fd798c06951fa716b7ab8 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期一, 11 一月 2021 14:05:29 +0800
Subject: [PATCH] Merge branch 'NewFilePath' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into NewFilePath
---
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs | 54 +++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 39 insertions(+), 15 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
index e57df22..802a739 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
@@ -445,29 +445,52 @@
return;
}
}
- var addResult = SpatialInfo.CurrentSpatial.AddRoom(room,out room);//妫�鏌oom鏄惁涓轰簯绔繑鍥炵殑鏈�鏂版暟鎹�
- if (addResult == StateCode.SUCCESS)
+ var waitPage = new Loading();
+ waitPage.Start();
+ new Thread(() =>
{
- var deviceIds = new List<string>();
- foreach (var f in roomFunctions)
+ try
{
- deviceIds.Add(f.deviceId);
- }
- if (deviceIds.Count > 0)
- {
- var bindResult = FunctionList.List.FunctionsBindRooms(new List<string>() { room.roomId }, deviceIds);
- if (bindResult == StateCode.SUCCESS)
+ var addResult = SpatialInfo.CurrentSpatial.AddRoom(room, out room);//妫�鏌oom鏄惁涓轰簯绔繑鍥炵殑鏈�鏂版暟鎹�
+ if (addResult == StateCode.SUCCESS)
{
+ var deviceIds = new List<string>();
foreach (var f in roomFunctions)
{
- f.roomIds.Add(room.roomId);
+ deviceIds.Add(f.deviceId);
}
- room.GetRoomFunctions(true);
+ if (deviceIds.Count > 0)
+ {
+ var bindResult = FunctionList.List.FunctionsBindRooms(new List<string>() { room.roomId }, deviceIds);
+ if (bindResult == StateCode.SUCCESS)
+ {
+ foreach (var f in roomFunctions)
+ {
+ f.roomIds.Add(room.roomId);
+ }
+ room.GetRoomFunctions(true);
+ }
+ }
+ Application.RunOnMainThread(() =>
+ {
+ backAction(room);
+ RemoveFromParent();
+ });
}
}
- backAction(room);
- RemoveFromParent();
- }
+ catch (Exception ex)
+ {
+ MainPage.Log($"娣诲姞鎴块棿澶辫触msg:{ex.Message}");
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ waitPage.Hide();
+ });
+ }
+ })
+ { IsBackground = true }.Start();
};
}
@@ -621,6 +644,7 @@
pictureOptionView.Parent.RemoveFromParent();
Action<string> action = (obj) => {
room.backgroundImage = obj;
+ btnRoomBg.ImageBytes = null;//瑙e喅鏈塈mageBytes涓嶅姞杞絀magePath
btnRoomBg.ImagePath = room.backgroundImage;
};
--
Gitblit v1.8.0