From 09dfbfd9b77ec887c17b10f15799a1d3f56e4e17 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 15 十二月 2020 12:04:42 +0800 Subject: [PATCH] 2020-12-15-1 --- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs index 943470e..8bb99ac 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs @@ -56,14 +56,27 @@ /// 琚慨鏀规暟鎹殑鍔熻兘鍒楄〃锛屽湪闇�瑕佷繚瀛樼殑鏃跺�欏啀淇濆瓨鏁版嵁 /// </summary> List<Function> changeList = new List<Function>(); + /// <summary> + /// 鏂板鐨勬埧闂寸粦瀹氬姛鑳戒簨浠讹紝鐢ㄦ埛纭畾鐢熸垚鎴块棿涔嬪悗锛屽啀灏嗗姛鑳界粦瀹氬埌鎴块棿 + /// </summary> + Action<List<Function>> newRoomAddFunction; #endregion - + /// <summary> + /// 缂栬緫鐜版湁鎴块棿鐨勬瀯閫犲嚱鏁� + /// </summary> + /// <param name="r"></param> public RoomEditFunctionPage(Room r) { bodyView = this; room = r; } + public RoomEditFunctionPage(Room r, Action<List<Function>> action) + { + bodyView = this; + room = r; + newRoomAddFunction = action; + } /// <summary> /// 鍔犺浇鐣岄潰 /// </summary> @@ -71,7 +84,6 @@ { bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, Language.StringByID(StringId.AddFunction)).LoadTopView(); - //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.AddFunction)); #region 鏄剧ず鐨勫姛鑳界被鍨嬪垏鎹㈠尯鍩� showdFunctionTypeRow = new FrameLayout() @@ -144,10 +156,10 @@ }; bodyView.AddChidren(functionListView); - foreach (var function in DB_ResidenceData.functionList.GetAllFunction()) + foreach (var function in FunctionList.List.GetDeviceFunctionList()) { - function.roomIdList.Remove(null); - if (function.roomIdList.Count > 0 ) + function.roomIds.Remove(null); + if (function.roomIds.Count > 0 ) { allocatedList.Add(function); } @@ -328,7 +340,7 @@ Height = Application.GetRealWidth(28), UnSelectedImagePath = "Public/ChooseIcon.png", SelectedImagePath = "Public/ChooseOnIcon.png", - IsSelected = function.roomIdList.Contains(room.sid) + IsSelected = function.roomIds.Contains(room.roomId) }; functionRow.AddChidren(btnChooseIcon); LoadEvent_ChangeRoomFunctionList(functionRow, btnChooseIcon, function); @@ -402,7 +414,7 @@ Height = Application.GetRealWidth(1), BackgroundColor = CSS_Color.DividingLineColor, }); - foreach (var tempRoom in DB_ResidenceData.rooms) + foreach (var tempRoom in SpatialInfo.CurrentSpatial.RoomList) { Button btnRoom = new Button() @@ -410,16 +422,16 @@ X = Application.GetRealWidth(16), Width = Application.GetRealWidth(128), Height = Application.GetRealHeight(50), - Text = tempRoom.name, + Text = tempRoom.roomName, TextColor = CSS_Color.FirstLevelTitleColor, SelectedTextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.SubheadingFontSize, TextAlignment = TextAlignment.CenterLeft, - IsSelected = showedFunctionRoomId == tempRoom.sid, - Tag = tempRoom.sid, + IsSelected = showedFunctionRoomId == tempRoom.roomId, + Tag = tempRoom.roomId, }; roomListView.AddChidren(btnRoom); - LoadEvent_ChangeShowedFunctionList(btnRoom, dialog, tempRoom.name); + LoadEvent_ChangeShowedFunctionList(btnRoom, dialog, tempRoom.roomName); roomListView.AddChidren(new Button() { -- Gitblit v1.8.0