Exemple #1
0
        private void FillGamesGroupCollection(GameGroupLayoutCollection gamesGroupsLayoutCollection, SkinDefinitionContext skinDefinitionContext, dynamic gamesGroup)
        {
            if (gamesGroup == null)
            {
                return;
            }

            var gameGroupLayout = new GameGroupLayout();

            foreach (var gameType in gamesGroup)
            {
                gameGroupLayout.Games.Add(skinDefinitionContext.GetGame(ConvertDynamicValue <int>(gameType)));
            }

            gamesGroupsLayoutCollection.Add(gameGroupLayout);
        }
Exemple #2
0
        private void FillGamesGroupCollection(GameGroupLayoutCollection gameGroupLayoutCollection, SkinDefinitionContext skinDefinitionContext, string xmlCollectionElementName, string xmlItemElementName)
        {
            var gamesGroupsElements = _navigationPlanXml.Root.Element(XmlNames.lobby_data_ndl)
                                      ?.Elements(xmlCollectionElementName)
                                      .ToArray();



            foreach (var gameGroupXmlElement in gamesGroupsElements)
            {
                var gameGroupLayout = new GameGroupLayout(gameGroupXmlElement.GetAttributeValue(XmlNames.playerStatus));


                foreach (var itemXmlElement in gameGroupXmlElement.Elements(xmlItemElementName))
                {
                    gameGroupLayout.Games.Add(skinDefinitionContext.GetGame(itemXmlElement.GetAttributeValue <int>(XmlNames.gameType)));
                }

                gameGroupLayoutCollection.Add(gameGroupLayout);
            }
        }