From df30e8562e49b45e7a9a3497d368cebd6085be87 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 30 十二月 2019 17:33:33 +0800
Subject: [PATCH] 2019-12-30-2
---
ZigbeeApp/Shared/Common/Device.cs | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 2139b8b..7259cdb 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -251,7 +251,7 @@
//娣诲姞缂撳瓨
this.AddDeviceToMemory(ref device);
- //绉婚櫎瀛樺湪鐨勮澶囧唴瀛�
+ //绉婚櫎瀛樺湪鐨勮澶囧唴瀛�
string maikey = this.GetDeviceMainKeys(device);
if (dicExist.ContainsKey(maikey) == true)
{
@@ -1524,7 +1524,8 @@
/// </summary>
/// <param name="listDevice">闇�瑕佷繚瀛樼殑璁惧瀵硅薄</param>
/// <param name="roomId">闇�瑕佷繚瀛樼殑鍝釜璁惧鐨勬埧闂碔D</param>
- public void SaveRealDeviceRoomId(List<CommonDevice> listDevice, string roomId)
+ /// <param name="saveRoadDevice">濡傛灉鍙湁涓�涓洖璺�,鏄惁鎶婂洖璺殑鎴块棿涓�璧蜂慨鏀�</param>
+ public void SaveRealDeviceRoomId(List<CommonDevice> listDevice, string roomId, bool saveRoadDevice = true)
{
if (listDevice != null)
{
@@ -1535,10 +1536,13 @@
string fullName = UserCenterLogic.CombinePath(DirNameResourse.DeviceRoomIdFile);
UserCenterLogic.SaveFileContent(fullName, this.dicDeviceRoomId);
+ //娣诲姞鑷姩澶囦唤
+ HdlAutoBackupLogic.AddOrEditorFile(DirNameResourse.DeviceRoomIdFile);
+
//濡傛灉璁惧鍙湁涓�涓洖璺紝濡傛灉鏀瑰彉浜嗙湡瀹炶澶囧尯鍩燂紝鍒欏畠鐨勫洖璺殑鍖哄煙涔熶竴璧锋敼浜�
- if (listDevice != null && listDevice.Count == 1)
+ if (saveRoadDevice == true && listDevice != null && listDevice.Count == 1)
{
- Common.Room.CurrentRoom.ChangedRoom(listDevice[0], roomId);
+ Common.Room.CurrentRoom.ChangedRoom(listDevice[0], roomId, false);
}
}
--
Gitblit v1.8.0