public void RenderLeague()
        {
            LeaguesListView.Items.Clear();
            foreach (LeagueListDTO leagues in MyLeagues.SummonerLeagues)
            {
                if (leagues.Queue == Queue)
                {
                    if (SelectedRank == "V")
                    {
                        UpTierButton.IsEnabled = true;
                        DownTierButton.IsEnabled = false;
                    }
                    else if (SelectedRank == "I")
                    {
                        UpTierButton.IsEnabled = false;
                        DownTierButton.IsEnabled = true;
                    }
                    else
                    {
                        UpTierButton.IsEnabled = true;
                        DownTierButton.IsEnabled = true;
                    }

                    CurrentLeagueLabel.Content = leagues.Tier + " " + SelectedRank;
                    CurrentLeagueNameLabel.Content = leagues.Name;
                    List<LeagueItemDTO> players = leagues.Entries.OrderBy(o => o.LeaguePoints).Where(item => item.Rank == SelectedRank).ToList();
                    players.Reverse();
                    int i = 0;
                    foreach (LeagueItemDTO player in players)
                    {
                        i++;
                        LeagueItem item = new LeagueItem();
                        item.DataContext = player;
                        item.PlayerLabel.Content = player.PlayerOrTeamName;

                        item.PlayerRankLabel.Content = i;
                        if (i - player.PreviousDayLeaguePosition != 0)
                            item.RankChangeLabel.Content = i - player.PreviousDayLeaguePosition;

                        //TypedObject miniSeries = player.MiniSeries as TypedObject;
                        //if (miniSeries != null)
                        //    item.LPLabel.Content = ((string)miniSeries["progress"]).Replace('N', '-');

                        LeaguesListView.Items.Add(item);
                    }
                }
            }
            LeaguesListView.SelectedIndex = 0;
        }
        public void RenderLeague()
        {
            if (myLeagues == null)
            {
                //MessageBox.Show("You are not in League.");
                var overlay = new MessageOverlay
                {
                    MessageTextBox =
                    {
                        Text = "You are not in League."
                    },
                    MessageTitle = { Content = "Not in League" }
                };
                Client.OverlayContainer.Content = overlay.Content;
                Client.OverlayContainer.Visibility = Visibility.Visible;
                return;
            }
            LeaguesListView.Items.Clear();
            foreach (var leagues in myLeagues.SummonerLeagues.Where(leagues => leagues.Queue == queue))
            {
                switch (selectedRank)
                {
                    case "V":
                        UpTierButton.IsEnabled = true;
                        DownTierButton.IsEnabled = false;
                        break;
                    case "I":
                        UpTierButton.IsEnabled = false;
                        DownTierButton.IsEnabled = true;
                        break;
                    default:
                        UpTierButton.IsEnabled = true;
                        DownTierButton.IsEnabled = true;
                        break;
                }

                CurrentLeagueLabel.Content = leagues.Tier + " " + selectedRank;
                CurrentLeagueNameLabel.Content = leagues.Name;
                var players =
                    leagues.Entries.OrderBy(o => o.LeaguePoints).Where(item => item.Rank == selectedRank).ToList();
                players.Reverse();
                var i = 0;
                foreach (var player in players)
                {
                    i++;
                    var item = new LeagueItem
                    {
                        PlayerRankLabel = {Content = i}
                    };
                    if (i - player.PreviousDayLeaguePosition != 0)
                    {
                        item.RankChangeLabel.Content = i - player.PreviousDayLeaguePosition;
                    }

                    item.PlayerLabel.Content = player.PlayerOrTeamName;
                    if (player.FreshBlood)
                    {
                        item.RecruitLabel.Visibility = Visibility.Visible;
                    }

                    if (player.Veteran)
                    {
                        item.VeteranLabel.Visibility = Visibility.Visible;
                    }

                    if (player.HotStreak)
                    {
                        item.HotStreakLabel.Visibility = Visibility.Visible;
                    }

                    item.WinsLabel.Content = player.Wins;
                    item.LpLabel.Content = player.LeaguePoints;

                    var miniSeries = player.MiniSeries;
                    if (miniSeries != null)
                    {
                        item.LpLabel.Content = player.MiniSeries.Progress.Replace('N', '-');
                    }

                    LeaguesListView.Items.Add(item);
                }
            }
            LeaguesListView.SelectedIndex = 0;
        }