From f2dc339a90467553ef7fe86a8312bdc9d590e420 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 23 九月 2020 09:27:11 +0800
Subject: [PATCH] 更新 DeviceName.ini
---
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
index c4a6ace..7feed80 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
@@ -67,10 +67,10 @@
//娓呯┖bodyFrame
this.ClearBodyFrame();
- HdlThreadLogic.Current.RunThread(async () =>
+ HdlThreadLogic.Current.RunThread(() =>
{
//鑾峰彇鎴愬憳鐨勫叡浜垪琛�
- var result = await HdlShardLogic.Current.GetMemberShardContentListAndSetToLocation(memberShardInfo);
+ var result = HdlShardLogic.Current.GetMemberShardContentListAndSetToLocation(memberShardInfo);
if (result == false)
{
//鏄剧ず閲嶆柊鍔犺浇鐨勭晫闈�
@@ -79,7 +79,6 @@
}
//鍒濆鍖栧尯鍩熷垪琛�
this.InitAreaListRow();
-
});
}
@@ -125,7 +124,7 @@
bodyFrameLayout.AddChidren(listView);
//鎺掑簭妤煎眰
- var dicSort = Common.Room.CurrentRoom.GetFloorSortList();
+ var dicSort = HdlRoomLogic.Current.GetFloorSortList();
foreach (var floorId in dicSort.Keys)
{
if (dicGroup.ContainsKey(floorId) == true)
@@ -155,7 +154,7 @@
var frameBack = new FrameListControl(29);
frameBack.BackgroundColor = UserCenterColor.Current.White;
frameBack.Height = 10;
- this.listView.AddChidrenFrame(frameBack);
+ this.listView.AddChidren(frameBack);
//妤煎眰
if (string.IsNullOrEmpty(floorId) == false)
@@ -181,7 +180,7 @@
}
}
//鎴块棿鎺掑簭
- var listSortRoom = Common.Room.CurrentRoom.GetFloorSortRoom(floorId, false);
+ var listSortRoom = HdlRoomLogic.Current.GetFloorSortRoom(floorId, false);
var listSort = new HashSet<string>();
foreach (var room in listSortRoom)
{
@@ -264,27 +263,39 @@
{
//鑾峰彇鍏ㄩ儴璁惧
var listDevice = new List<CommonDevice>();
- foreach (var deviceFile in room.DeviceUIFilePathList)
+ foreach (var deviceKeys in room.ListDevice)
{
+ string deviceFile = HdlShardLogic.Current.GetShardDeviceFileName(deviceKeys);
+ if (deviceFile == string.Empty)
+ {
+ continue;
+ }
var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
if (byteData == null)
{
continue;
}
var device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
+ device.Type = (DeviceType)device.DeviceID;
listDevice.Add(device);
}
//鑾峰彇鍏ㄩ儴鍦烘櫙
var listScene = new List<Common.SceneUI>();
- foreach (var sceneUi in room.SceneUIList)
+ foreach (var sceneId in room.ListSceneId)
{
+ var byteData = HdlShardLogic.Current.GetShardFileContent($"Scene_{sceneId}.json");
+ if (byteData == null)
+ {
+ continue;
+ }
+ var sceneUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(System.Text.Encoding.UTF8.GetString(byteData));
listScene.Add(sceneUi);
}
- HdlThreadLogic.Current.RunThread(async () =>
+ HdlThreadLogic.Current.RunThread(() =>
{
//鎵ц鍒犻櫎
- var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
+ var result = HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
if (result == true)
{
HdlThreadLogic.Current.RunMain(() =>
--
Gitblit v1.8.0