From 9c8baf7e7e1169ebdf7d5f7ed33ab29dd5fcbf18 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 14 十二月 2020 17:45:17 +0800
Subject: [PATCH] 2020-12-14 1.解锁设置问题修复,增加面容ID验证。2.错误码对接增加。

---
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 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 c98be11..cc90c39 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs
@@ -437,7 +437,7 @@
                     }.Show(bodyView);
                     return;
                 }
-                foreach (var tempRoom in DB_ResidenceData.residenceData.Rooms)
+                foreach (var tempRoom in SpatialInfo.CurrentSpatial.RoomList)
                 {
                     if (room.roomName == tempRoom.roomName)
                     {
@@ -445,7 +445,7 @@
                         return;
                     }
                 }
-                var addResult = SpatialInfo.CurrentSpatial.AddRoom(room);//妫�鏌oom鏄惁涓轰簯绔繑鍥炵殑鏈�鏂版暟鎹�
+                var addResult = SpatialInfo.CurrentSpatial.AddRoom(room,out room);//妫�鏌oom鏄惁涓轰簯绔繑鍥炵殑鏈�鏂版暟鎹�
                 if (addResult == StateCode.SUCCESS)
                 {
                     var deviceIds = new List<string>();
@@ -456,6 +456,10 @@
                     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);
                     }
                     else
@@ -503,7 +507,7 @@
             EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
             {
                 List<string> roomNameList = new List<string>();
-                foreach (var temp in DB_ResidenceData.residenceData.Rooms)
+                foreach (var temp in SpatialInfo.CurrentSpatial.RoomList)
                 {
                     roomNameList.Add(temp.roomName);
                 }
@@ -661,7 +665,7 @@
             {
                 //MainPage.Log("SelectPicture 瑁佸壀鍥剧墖杩斿洖璺緞: " + selectImagePath);
                 //1.璇诲彇瑁佸壀鍚庣殑鍥剧墖锛岀劧鍚庡垹闄�
-                var imageBytes = Shared.IO.FileUtils.ReadFile(selectImagePath);
+                var imageBytes = ImageUtlis.Current.ReadFile(selectImagePath);
                 System.IO.File.Delete(selectImagePath);
 
                 var waitPage = new Loading();
@@ -695,7 +699,7 @@
                                     System.IO.File.Delete(imageView.ImagePath);
                                 }
                                 //閲嶅懡鍚嶄繚瀛�
-                                Common.FileUtlis.Files.WriteFileByBytes(imageUrl, imageBytes);
+                                ImageUtlis.Current.WriteFileByBytes(imageUrl, imageBytes);
                                 imageView.ImagePath = null;
                                 imageView.ImageBytes = imageBytes;
                                 //涓婁紶鎴愬姛

--
Gitblit v1.8.0