From a5b3c4bae726ef6770d4bfcbf2f4b50a37ed4a15 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 06 三月 2020 15:31:36 +0800
Subject: [PATCH] 删除了郭雪城的 DeviceUi 这个类

---
 ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
index 2f34fb8..12402f0 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
@@ -102,11 +102,12 @@
                 Y = Application.GetRealHeight(92),
                 UnSelectedImagePath = "ZigeeLogic/drop-down.png",
             };
-            topRowLayout.AddChidren(dropdown);
+            topRowLayout.AddChidren(dropdown);
             #endregion
-        
+
             ///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
-            if (Common.Room.Lists.Count == 0)
+            var listAllRoom = UserCenter.HdlRoomLogic.Current.GetAllListRooms();
+            if (listAllRoom.Count == 0)
             {
                 return;
             }
@@ -283,7 +284,7 @@
                 dropdown.Visible = false;
                 if (Config.Instance.Home.FloorDics.Count == 0)
                 {
-                    roomlists.AddRange(Common.Room.Lists);
+                    roomlists.AddRange(listAllRoom);
                 }
                 else
                 {
@@ -349,7 +350,7 @@
                     roomTextButton.IsSelected = false;
                     roomTextButton = roomnameBtn;
                     roomnameBtn.IsSelected = true;
-                    SceneView(room.SceneUIList);
+                    SceneView(room.ListSceneId);
 
                 }
 
@@ -367,7 +368,7 @@
                     roomTextButton.IsSelected = false;
                     roomTextButton = roomnameBtn;
                     roomnameBtn.IsSelected = true;
-                    SceneView(room.SceneUIList);
+                    SceneView(room.ListSceneId);
                 };
                 roomnameBtn.MouseUpEventHandler += roomclick;
                 roombjBtn.MouseUpEventHandler += roomclick;
@@ -378,11 +379,16 @@
         /// 鏄剧ず鎵�鏈夌殑鍦烘櫙鐨勬柟娉�
         /// </summary>
         /// <param name="scenelist"></param>
-        void SceneView(List<SceneUI>scenelist)
+        void SceneView(List<int>scenelist)
         {
             middle.RemoveAll();
-            foreach (var scene in scenelist)
+            foreach (var sceneId in scenelist)
             {
+                var scene = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
+                if (scene == null)
+                {
+                    continue;
+                }
                 var sceneFramelayout = new FrameLayout
                 {
                     Height = Application.GetRealHeight(160),

--
Gitblit v1.8.0