From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/Common/Logic/HdlRoomLogic.cs | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Common/Logic/HdlRoomLogic.cs b/ZigbeeApp/Shared/Phone/Common/Logic/HdlRoomLogic.cs index 7373ce4..ac738b2 100644 --- a/ZigbeeApp/Shared/Phone/Common/Logic/HdlRoomLogic.cs +++ b/ZigbeeApp/Shared/Phone/Common/Logic/HdlRoomLogic.cs @@ -257,7 +257,7 @@ //鐢熸垚鏂囦欢 room.Save(); //澶囦唤 - HdlAutoBackupLogic.AddOrEditorFile(room.FileName); + HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(room.FileName); if (refreshRoomView == true) { //鍒锋柊鎴块棿瑙嗗浘鍒楄〃 @@ -302,7 +302,7 @@ { Global.DeleteFilebyHomeId(room.BackgroundImage); //鍒犻櫎澶囦唤 - HdlAutoBackupLogic.DeleteFile(room.BackgroundImage); + HdlBackupLogic.Current.DeleteAutoBackFileStatu(room.BackgroundImage); } } //鎴戠殑鍠滅埍 @@ -329,7 +329,7 @@ //鍒犻櫎鏂囦欢 Global.DeleteFilebyHomeId(roomFilePath); } - HdlAutoBackupLogic.DeleteFile(roomFilePath); + HdlBackupLogic.Current.DeleteAutoBackFileStatu(roomFilePath); if (refreshLeftView == true) { @@ -879,7 +879,7 @@ room.ListDevice.Remove(mainkeys); room.Save(); //鏇存敼鑷姩澶囦唤 - HdlAutoBackupLogic.AddOrEditorFile(room.FileName); + HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(room.FileName); //閫掑綊锛氬垹闄ゆ帀浠ュ墠鐨勬棫鏁版嵁瀵艰嚧鐨勫涓埧闂寸殑闂 this.DeleteDevice(device, deleteReal); @@ -904,7 +904,7 @@ loveRoom.ListDevice.Remove(mainkeys); loveRoom.Save(); //鏇存敼鑷姩澶囦唤 - HdlAutoBackupLogic.AddOrEditorFile(loveRoom.FileName); + HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(loveRoom.FileName); //娣诲姞鏀惰棌璁惧鏃�,闇�瑕佸埛鏂颁富椤� UserView.UserPage.Instance.RefreshAllForm = true; } @@ -1181,31 +1181,36 @@ /// <summary> /// 鑾峰彇鎺掑簭鍚庣殑妤煎眰 /// </summary> + /// <param name="i_dicFloor">闇�瑕佹帓搴忕殑妤煎眰闆嗗悎,濡傛灉璁剧疆涓簄ull,鍒欎細杩斿洖褰撳墠浣忓畢鎺掑簭浜嗙殑妤煎眰</param> /// <returns></returns> - public Dictionary<string, string> GetFloorSortList() + public Dictionary<string, string> GetFloorSortList(Dictionary<string, string> i_dicFloor = null) { + if (i_dicFloor == null) + { + i_dicFloor = Config.Instance.Home.FloorDics; + } //娌℃湁妤煎眰 - if (Config.Instance.Home.FloorDics.Count == 0) + if (i_dicFloor.Count == 0) { return new Dictionary<string, string>(); } //浠庝竴鍫嗘枃瀛椾腑,鑾峰彇杩欎竴鍫嗘枃瀛楅噷闈㈡暟瀛楀瓧绗︿覆鐨勬渶闀块暱搴� var listName = new List<string>(); - foreach (var floorName in Config.Instance.Home.FloorDics.Values) + foreach (var floorName in i_dicFloor.Values) { listName.Add(floorName); } int numberLength = HdlCommonLogic.Current.GetNumberMaxLength(listName); var listSort = new List<string[]>(); - foreach (var floorId in Config.Instance.Home.FloorDics.Keys) + foreach (var floorId in i_dicFloor.Keys) { var strArry = new string[2]; strArry[0] = floorId; strArry[1] = string.Empty; string value = string.Empty; - string floorName = Config.Instance.Home.FloorDics[floorId]; + string floorName = i_dicFloor[floorId]; foreach (var c in floorName) { if (char.IsNumber(c) == true) @@ -1241,7 +1246,7 @@ var dic = new Dictionary<string, string>(); foreach (var strArry in listSort) { - dic[strArry[0]] = Config.Instance.Home.FloorDics[strArry[0]]; + dic[strArry[0]] = i_dicFloor[strArry[0]]; } return dic; } @@ -1405,7 +1410,7 @@ { //鐢熸垚鎴块棿鍜屾ゼ灞傜殑json var roomInfo = string.Empty; - TemplateData.TemplateCommonLogic.Current.CrearWriteRoomTemplateData(ref roomInfo); + HdlTemplateCommonLogic.Current.CrearWriteRoomTemplateData(ref roomInfo); var realMain = ZbGateway.MainGateWay; //鍒涘缓鏂囦欢瀵硅薄 -- Gitblit v1.8.0