From 02a4825ca5d4f7b3edcd3f47fec66c2672f7253e Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 23 十二月 2020 15:35:56 +0800
Subject: [PATCH] 2020-12-23-3
---
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 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..e57df22 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>();
@@ -453,14 +453,17 @@
{
deviceIds.Add(f.deviceId);
}
- var bindResult = FunctionList.List.FunctionsBindRooms(new List<string>() { room.roomId }, deviceIds);
- if (bindResult == StateCode.SUCCESS)
+ if (deviceIds.Count > 0)
{
- room.GetRoomFunctions(true);
- }
- else
- {
- //Utlis.ShowTip(Language.StringByID(StringId.EditFunctionInfoFail) + "\r\nCode:" + pack.Code);
+ 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);
+ }
}
backAction(room);
RemoveFromParent();
@@ -503,7 +506,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 +664,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 +698,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