private GameGroupLayout BuildGameGroupLayout(GameGroupLayoutViewModel gamesGroupViewModel) { var gamesGroupLayout = new GameGroupLayout(gamesGroupViewModel.PlayerStatus.Id); foreach (var game in gamesGroupViewModel.Games) { gamesGroupLayout.Games.Add(new Game(game.GameType, game.Name)); } return(gamesGroupLayout); }
private void LoadGamesGroupCollection(string description, GameGroupLayoutCollection source, GameGroupLayoutCollectionViewModel destination) { foreach (var layout in source) { var viewModel = new GameGroupLayoutViewModel(new PlayerStatusTypeViewModel(PlayerStatusType.FromId(layout.PlayerStatus), _skinDefinition.Triggers)); foreach (var game in layout.Games) { AddGameToCollection(game.Id, viewModel.Games, description); } destination.Add(viewModel); } }