From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 30 八月 2022 09:37:38 +0800 Subject: [PATCH] 合并了IOS的代码 --- ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs | 33 ++++++++++++++++++--------------- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs index 7cf0cff..6f0377a 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs @@ -117,7 +117,7 @@ private void InitTopRightMenuControl() { //鑾峰彇妤煎眰 - var dicFloor = Common.Room.CurrentRoom.GetFloorSortList(); + var dicFloor = HdlRoomLogic.Current.GetFloorSortList(); if (dicFloor.Count == 0) { return; @@ -144,10 +144,10 @@ btnIconContr.ButtonClickEvent += (sender, e) => { //妤煎眰鑿滃崟 - var contr = new TopRightMenuControl(dicFloor.Count, 2, Language.StringByID(R.MyInternationalizationString.SelectFloor)); + var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor)); foreach (var floorId in dicFloor.Keys) { - contr.AddRowMenu(dicFloor[floorId], "Floor/Floor.png", "Floor/FloorSelected.png", () => + contr.AddRowMenu(floorId, () => { //璁板綍璧烽�夋嫨鐨処D this.nowSelectFloorId = floorId; @@ -170,7 +170,7 @@ private void InitAreaListRow(string floorId) { dicSelectRoom.Clear(); - var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(floorId, false); + var listRoom = HdlRoomLogic.Current.GetFloorSortRoom(floorId, false); HdlThreadLogic.Current.RunMain(() => { var listDataRoom = new List<Common.Room>(); @@ -282,7 +282,7 @@ int fileCount = this.GetUpLoadRoomData(listRoom, dicDevice, dicScene); var listCheckFile = new HashSet<string>(); - HdlThreadLogic.Current.RunThread(async () => + HdlThreadLogic.Current.RunThread(() => { //鎵撳紑杩涘害鏉� this.ShowProgressBar(); @@ -290,7 +290,7 @@ for (int index = 0; index < listRoom.Count; index++) { //鎵ц涓婁紶 - var result = await HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, listRoom[index], dicDevice[index], dicScene[index], fileCount, listCheckFile); + var result = HdlShardLogic.Current.DoUploadSharedContent(memberShardInfo, listRoom[index], dicDevice[index], dicScene[index], fileCount, listCheckFile); if (result == false) { break; @@ -300,7 +300,7 @@ this.CloseProgressBar(); //涓嶇鎴愬姛杩樻槸澶辫触,閮藉埛鏂扮晫闈� - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { if (this.Parent != null) { @@ -331,9 +331,9 @@ dicScene[i] = listScene; //鑾峰彇鎴块棿鍏ㄩ儴璁惧 - foreach (var deviceUi in listRoom[i].DeviceUIList) + foreach (var deviceKeys in listRoom[i].ListDevice) { - var device = deviceUi.CommonDevice; + var device = Common.LocalDevice.Current.GetDevice(deviceKeys); if (device == null || memberShardInfo.dicAllShardKeys.ContainsKey(device.FilePath) == true) { //寮傚父 @@ -356,8 +356,9 @@ var listChirdDevice = new List<CommonDevice>(); var listChirdScene = new List<Common.SceneUI>(); //鑾峰彇鎴块棿鍏ㄩ儴鍦烘櫙 - foreach (var sceneUi in listRoom[i].SceneUIList) + foreach (var sceneId in listRoom[i].ListSceneId) { + var sceneUi = HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId); if (sceneUi == null || memberShardInfo.dicAllShardKeys.ContainsKey(sceneUi.FileName) == true) { //寮傚父锛屾垨鑰呭凡缁忓垎浜簡鐨勶紝涓嶅啀鏄剧ず @@ -424,7 +425,7 @@ /// <returns></returns> private bool CheckCanShowRow(Common.Room room) { - if (room.DeviceUIList.Count == 0 && room.SceneUIList.Count == 0) + if (room.ListDevice.Count == 0 && room.ListSceneId.Count == 0) { return false; } @@ -437,20 +438,22 @@ //娌℃湁杩欎釜鎴块棿 return true; } - foreach (var deviceUi in room.DeviceUIList) + foreach (var deviceKeys in room.ListDevice) { - if (deviceUi.CommonDevice == null) + var device = Common.LocalDevice.Current.GetDevice(deviceKeys); + if (device == null) { continue; } - if (memberShardInfo.dicAllShardKeys.ContainsKey(deviceUi.CommonDevice.FilePath) == false) + if (memberShardInfo.dicAllShardKeys.ContainsKey(device.FilePath) == false) { //瀛樺湪鏈垎浜殑璁惧鐨勮瘽锛屾鎴块棿鍙互鏄剧ず return true; } } - foreach (var sceneUi in room.SceneUIList) + foreach (var sceneId in room.ListSceneId) { + var sceneUi = HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId); if (sceneUi == null) { continue; -- Gitblit v1.8.0