黄学彪
2020-07-13 23420922845c9e77019a55c3b3e3271eb1ec261e
ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs
@@ -9,10 +9,6 @@
        public Action<string> FloorAction;
        /// <summary>
        /// 是否切换为当前楼层
        /// </summary>
        public bool changeFloor = true;
        /// <summary>
        /// 当前传过来的floorid
        /// </summary>
        public string CurFloorId = string.Empty;
@@ -127,32 +123,11 @@
            frow.Width = this.GetPictrueRealSize(449);
            frow.Height = this.GetPictrueRealSize(150);
            frow.Init("Floor/Floor.png", "Floor/FloorSelected.png", floorName);
            verticalScrolView.AddChidren(frow);
            if (string.IsNullOrEmpty(CurFloorId))
            {
                if (Config.Instance.Home.CurrentFloorId == floorId)
                {
                    frow.IsSelected = true;
                }
            }
            else
            {
                if (CurFloorId == floorId)
                {
                    frow.IsSelected = true;
                }
            }
            verticalScrolView.AddChidren(frow);
            frow.IsSelected = floorId == this.CurFloorId;
            frow.ButtonClickEvent += (sender, e) =>
            {
                frow.IsSelected = true;
                if (changeFloor)
                {
                    Config.Instance.Home.CurrentFloorId = floorId;
                    Config.Instance.Home.Save(false);
                    UserCenter.HdlRoomLogic.Current.RefreshRoomListView();
                }
                RemoveView();
                FloorAction?.Invoke(floorId);
            };