Ejemplo n.º 1
0
 private void SetPlayerInRowByPlayingStatus(PlayersInRow playersInRow, PlayerOfMatch playerOfMatch)
 {
     if (playerOfMatch.TeamName?.Trim() == Match?.HomeTeam?.Trim())
     {
         playersInRow.FirstPlayer = playerOfMatch;
     }
     if (playerOfMatch.TeamName?.Trim() == Match?.AwayTeam?.Trim())
     {
         playersInRow.SecondPlayer = playerOfMatch;
     }
     ;
 }
Ejemplo n.º 2
0
        private PlayersInRow CreatePlayerInRow(ObservableCollection <PlayerOfMatch> biggerList, ObservableCollection <PlayerOfMatch> smallerList, int index)
        {
            PlayerOfMatch playerOfMatch = biggerList[index];
            PlayersInRow  playersInRow  = new PlayersInRow();

            playersInRow.PlayingStatus = playerOfMatch.PlayingStatus;
            SetPlayerInRowByPlayingStatus(playersInRow, playerOfMatch);
            if (index < smallerList.Count)
            {
                playerOfMatch = smallerList[index];
                SetPlayerInRowByPlayingStatus(playersInRow, playerOfMatch);
            }
            return(playersInRow);
        }