From 9d65c293924e4edbbc8c6c6091f55d7fc49c23eb Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 06 七月 2021 13:15:46 +0800
Subject: [PATCH] 乐橙子账号token
---
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs | 54 +++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 41 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
index 424a911..25a6f44 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditPageBLL.cs
@@ -31,24 +31,49 @@
{
Action action = () =>
{
- var delResult = SpatialInfo.CurrentSpatial.DelRoom(room);
- if (delResult == StateCode.SUCCESS)
+ var waitPage = new Loading();
+ waitPage.Start();
+ new Thread(() =>
{
- foreach (var f in FunctionList.List.GetDeviceFunctionList())
+ try
{
- if (f.roomIds.Contains(room.roomId))
+ var delResult = SpatialInfo.CurrentSpatial.DelRoom(room);
+ if (delResult == StateCode.SUCCESS)
{
- f.roomIds.Remove(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();
+ });
}
}
- //鍒犻櫎浜嬩欢鍥炶皟
- this.deleteAction?.Invoke();
- this.RemoveFromParent();
- }
+ catch (Exception ex)
+ {
+ MainPage.Log($"娣诲姞鎴块棿澶辫触msg:{ex.Message}");
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ waitPage.Hide();
+ waitPage.RemoveFromParent();
+ });
+ }
+ })
+ { IsBackground = true }.Start();
};
new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteRoomTip, action);
};
}
+
/// <summary>
/// 鏄剧ず鑳屾櫙鍥鹃�夋嫨閫夐」
@@ -81,7 +106,7 @@
}
btnRoomName.Text = str;
room.roomName = str;
- room.SaveRoomData();
+ room.UpdataRoomInfo();
};
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
{
@@ -107,7 +132,7 @@
Action floorsCallBackAction = () =>
{
btnFloorInfo.Text = room.floorName;
- room.SaveRoomData();
+ room.UpdataRoomInfo();
};
var residentialManagePage = new RoomBinglingFloorPage(floorsCallBackAction, room);
MainPage.BasePageView.AddChidren(residentialManagePage);
@@ -229,8 +254,10 @@
Action<string> action = (obj) =>
{
room.backgroundImage = obj;
+ btnRoomBg.ImageBytes = null;//瑙e喅鏈塈mageBytes涓嶅姞杞絀magePath
btnRoomBg.ImagePath = room.backgroundImage;
- room.SaveRoomData();
+ room.UpdataRoomInfo();
+ modifyImageAction?.Invoke();
};
var galleryPage = new RoomGalleryPage(room.backgroundImage, action);
@@ -257,7 +284,8 @@
{
//2020-12-03 闇�瑕佽鏈�鏂扮殑鍥剧墖璺緞鍚屾鍒颁簯绔�
room.backgroundImage = imageUrl;
- room.SaveRoomData();
+ room.UpdataRoomInfo();
+ modifyImageAction?.Invoke();
};
//涓婁紶鍥剧墖鍒颁簯绔�
UploadImage(selectImagePath, btnRoomBg, room, uploadSuccessAction);
--
Gitblit v1.8.0