JLChen
2020-12-23 320d7cc8feb394d0ce3db2ec1d01593b554d990f
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs
old mode 100644 new mode 100755
@@ -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);
                }
@@ -165,8 +177,8 @@
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(582),
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                Radius = (uint)Application.GetRealHeight(22),
                Height = Application.GetRealWidth(44),
                Radius = (uint)Application.GetRealWidth(22),
                BackgroundColor = CSS_Color.MainColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
@@ -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()
                {