| | |
| | | |
| | | public Action<string> FloorAction; |
| | | /// <summary> |
| | | /// 是否切换为当前楼层 |
| | | /// </summary> |
| | | public bool changeFloor = true; |
| | | /// <summary> |
| | | /// 当前传过来的floorid |
| | | /// </summary> |
| | | public string CurFloorId = string.Empty; |
| | |
| | | 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); |
| | | }; |