From 48ba446936b51fffafa7c3600c0dadc6ac0e8c20 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 10 七月 2020 10:52:13 +0800
Subject: [PATCH] 2020-07-10-01

---
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs |   37 ++++++++++++++++++++-----------------
 1 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
index 18168ad..b4cd0ff 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
@@ -77,11 +77,8 @@
                     this.ShowReLoadView();
                     return;
                 }
-                //浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃
-                HdlShardLogic.Current.GetMemberShardContentListFromLocal(memberShardInfo);
                 //鍒濆鍖栧尯鍩熷垪琛�
                 this.InitAreaListRow();
-
             });
         }
 
@@ -127,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)
@@ -157,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)
@@ -183,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)
             {
@@ -266,25 +263,31 @@
         {
             //鑾峰彇鍏ㄩ儴璁惧
             var listDevice = new List<CommonDevice>();
-            foreach (var deviceUi in room.DeviceUIList)
+            foreach (var deviceKeys in room.ListDevice)
             {
-                var device = deviceUi.CommonDevice;
-                if (device == null)
+                string deviceFile = HdlShardLogic.Current.GetShardDeviceFileName(deviceKeys);
+                if (deviceFile == string.Empty)
                 {
-                    string deviceFile = deviceUi.FileName;
-                    var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
-                    if (byteData == null)
-                    {
-                        continue;
-                    }
-                    device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
+                    continue;
                 }
+                var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
+                if (byteData == null)
+                {
+                    continue;
+                }
+                var device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
                 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);
             }
 

--
Gitblit v1.8.0