From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 21 七月 2020 09:46:53 +0800 Subject: [PATCH] 请合并最新多功能面板代码 --- ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs index 626e387..c80a36f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs @@ -93,7 +93,7 @@ var listRoom = new List<Common.Room>(); foreach (string roomId in this.dicAllData.Keys) { - listRoom.Add(Common.Room.CurrentRoom.GetRoomById(roomId)); + listRoom.Add(HdlRoomLogic.Current.GetRoomById(roomId)); } //鍒濆鍖栨埧闂磋彍鍗曟帶浠� @@ -129,7 +129,7 @@ private void InitTopRightMenuControl() { //鑾峰彇妤煎眰 - var dicFloor = Common.Room.CurrentRoom.GetFloorSortList(); + var dicFloor = HdlRoomLogic.Current.GetFloorSortList(); if (dicFloor.Count == 0) { return; @@ -143,6 +143,7 @@ btnFloor.Gravity = Gravity.CenterVertical; btnFloor.X = btnIconContr.X + btnIconContr.btnIcon.X - Application.GetRealWidth(300); btnFloor.TextAlignment = TextAlignment.CenterRight; + btnFloor.IsBold = true; topFrameLayout.AddChidren(btnFloor); foreach (var floorId in dicFloor.Keys) @@ -156,10 +157,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; @@ -242,7 +243,7 @@ var dicData = new Dictionary<string, Dictionary<int, uRowInformation>>(); //鑾峰彇鏈湴瀹夐槻鐨勫満鏅� Dictionary<int, string> dicScene = HdlSafeguardLogic.Current.GetLocalSceneByZoneID(this.zoonID); - var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(this.nowSelectFloorId); + var listRoom = HdlRoomLogic.Current.GetFloorSortRoom(this.nowSelectFloorId); for (int i = 0; i < listRoom.Count; i++) { @@ -271,9 +272,9 @@ } var dicRoomData = new Dictionary<int, uRowInformation>(); - for (int j = 0; j < i_room.DeviceUIList.Count; j++) + for (int j = 0; j < i_room.ListDevice.Count; j++) { - var device = i_room.DeviceUIList[j].CommonDevice; + var device = Common.LocalDevice.Current.GetDevice(i_room.ListDevice[j]); //濡傛灉閭d釜璁惧宸茬粡娣诲姞浜嗭紝鍒欎笉鍐嶆樉绀� if (device == null || HdlSafeguardLogic.Current.IsAlarmDeviceExist(this.zoonID, device) == true) { @@ -290,7 +291,7 @@ var typeInfo = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device); //鑾峰彇鍥剧墖 - Common.LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref unSelectPath, ref selectPath); + Common.LocalDevice.Current.GetDeviceFunctionTypeMenuIcon(typeInfo.ConcreteType, ref unSelectPath, ref selectPath); if (dicRoomData.ContainsKey(typeInfo.BeloneTextId) == false) { dicRoomData[typeInfo.BeloneTextId] = new uRowInformation(); @@ -299,10 +300,15 @@ dicRoomData[typeInfo.BeloneTextId].listDevice.Add(device); } } - for (int j = 0; j < i_room.SceneUIList.Count; j++) + for (int j = 0; j < i_room.ListSceneId.Count; j++) { //濡傛灉閭d釜鍦烘櫙宸茬粡娣诲姞浜嗭紝鍒欎笉鍐嶆樉绀� - if (dicScene.ContainsKey(i_room.SceneUIList[j].Id) == true) + if (dicScene.ContainsKey(i_room.ListSceneId[j]) == true) + { + continue; + } + var sceneUi = HdlSceneLogic.Current.GetSceneUIBySceneId(i_room.ListSceneId[j]); + if (sceneUi == null) { continue; } @@ -312,7 +318,7 @@ dicRoomData[R.MyInternationalizationString.uScence].IconPath = "Scene/SceneIcon.png"; dicRoomData[R.MyInternationalizationString.uScence].listScene = new List<Common.SceneUI>(); } - dicRoomData[R.MyInternationalizationString.uScence].listScene.Add(i_room.SceneUIList[j]); + dicRoomData[R.MyInternationalizationString.uScence].listScene.Add(sceneUi); } return dicRoomData; } -- Gitblit v1.8.0