public async void GetSummonerProfile(string s) { PublicSummoner Summoner = await Client.PVPNet.GetSummonerByName(String.IsNullOrWhiteSpace(s)?Client.LoginPacket.AllSummonerData.Summoner.Name : s); if (String.IsNullOrWhiteSpace(Summoner.Name)) { MessageOverlay overlay = new MessageOverlay(); overlay.MessageTitle.Content = "No Summoner Found"; overlay.MessageTextBox.Text = "The summoner \"" + s + "\" does not exist."; Client.OverlayContainer.Content = overlay.Content; Client.OverlayContainer.Visibility = Visibility.Visible; return; } SummonerNameLabel.Content = Summoner.Name; SummonerLevelLabel.Content = "Level " + Summoner.SummonerLevel; if (Summoner.SummonerLevel < 30) { LeagueHeader.Visibility = System.Windows.Visibility.Collapsed; } else { Client.PVPNet.GetAllLeaguesForPlayer(Summoner.SummonerId, new SummonerLeaguesDTO.Callback(GotLeaguesForPlayer)); } int ProfileIconID = Summoner.ProfileIconId; var uriSource = Path.Combine(Client.ExecutingDirectory, "Assets", "profileicon", ProfileIconID + ".png"); ProfileImage.Source = Client.GetImage(uriSource); PlatformGameLifecycleDTO n = await Client.PVPNet.RetrieveInProgressSpectatorGameInfo(s); if (n.GameName != null) { InGameHeader.Visibility = Visibility.Visible; InGameHeader.IsSelected = true; Ingame ingame = InGameContainer.Content as Ingame; ingame.Update(n); } else { InGameHeader.Visibility = Visibility.Collapsed; OverviewHeader.IsSelected = true; } if (Summoner.InternalName == Client.LoginPacket.AllSummonerData.Summoner.InternalName) { ChampionsTab.Visibility = System.Windows.Visibility.Visible; SkinsTab.Visibility = System.Windows.Visibility.Visible; } else { ChampionsTab.Visibility = System.Windows.Visibility.Hidden; SkinsTab.Visibility = System.Windows.Visibility.Hidden; } MatchHistory history = MatchHistoryContainer.Content as MatchHistory; history.Update(Summoner.AcctId); Overview overview = OverviewContainer.Content as Overview; overview.Update(Summoner.SummonerId, Summoner.AcctId); }