public void Update(SummonerLeaguesDTO result) { MyLeagues = result; foreach (LeagueListDTO leagues in MyLeagues.SummonerLeagues) { if (leagues.Queue == "RANKED_SOLO_5x5") SelectedRank = leagues.RequestorsRank; } Queue = "RANKED_SOLO_5x5"; RenderLeague(); }
public SummonerLeaguesDTO GetAllLeaguesForPlayer(double summonerId) { int Id = Invoke("leaguesServiceProxy", "getAllLeaguesForPlayer", new object[] { summonerId }); while (!results.ContainsKey(Id)) System.Threading.Thread.Sleep(10); TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); SummonerLeaguesDTO result = new SummonerLeaguesDTO(messageBody); results.Remove(Id); return result; }
/// 33.) public void GetAllLeaguesForPlayer(double summonerId, SummonerLeaguesDTO.Callback callback) { SummonerLeaguesDTO cb = new SummonerLeaguesDTO(callback); InvokeWithCallback("leaguesServiceProxy", "getAllLeaguesForPlayer", new object[] { summonerId }, cb); }
public SummonerLeaguesDTO GetLeaguesForTeam(String teamName) { int Id = Invoke("leaguesServiceProxy", "getLeaguesForTeam", new object[] { teamName }); while (!results.ContainsKey(Id)) System.Threading.Thread.Sleep(10); TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); SummonerLeaguesDTO result = new SummonerLeaguesDTO(messageBody); results.Remove(Id); return result; }
/// 24.) public void GetLeaguesForTeam(String teamName, SummonerLeaguesDTO.Callback callback) { SummonerLeaguesDTO cb = new SummonerLeaguesDTO(callback); InvokeWithCallback("leaguesServiceProxy", "getLeaguesForTeam", new object[] { teamName }, cb); }
/// 13.) public void GetAllMyLeagues(SummonerLeaguesDTO.Callback callback) { SummonerLeaguesDTO cb = new SummonerLeaguesDTO(callback); InvokeWithCallback("leaguesServiceProxy", "getAllMyLeagues", new object[] { }, cb); }
private void GotLeaguesForPlayer(SummonerLeaguesDTO result) { Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() => { string CurrentLP = ""; string CurrentTier = ""; bool InPromo = false; if (result.SummonerLeagues != null && result.SummonerLeagues.Count > 0) { foreach (LeagueListDTO leagues in result.SummonerLeagues) { if (leagues.Queue == "RANKED_SOLO_5x5") { Client.Tier = leagues.RequestorsRank; Client.TierName = leagues.Tier; Client.LeagueName = leagues.Name; CurrentTier = leagues.Tier + " " + leagues.RequestorsRank; List<LeagueItemDTO> players = leagues.Entries.OrderBy(o => o.LeaguePoints).Where(item => item.Rank == leagues.RequestorsRank).ToList(); foreach (LeagueItemDTO player in players) { if (player.PlayerOrTeamName == Client.LoginPacket.AllSummonerData.Summoner.Name) { TypedObject miniSeries = player.MiniSeries as TypedObject; string Series = ""; if (miniSeries != null) { Series = (string)miniSeries["progress"]; InPromo = true; } CurrentLP = (player.LeaguePoints == 100 ? Series : Convert.ToString(player.LeaguePoints)); } } } } } else { PlayerProgressBar.Value = 100; PlayerProgressLabel.Content = "Level 30"; PlayerCurrentProgressLabel.Content = ""; PlayerAimProgressLabel.Content = ""; return; } PlayerProgressLabel.Content = CurrentTier; if (InPromo) { PlayerCurrentProgressLabel.Content = CurrentLP; PlayerProgressBar.Value = 100; } else { PlayerCurrentProgressLabel.Content = CurrentLP + "LP"; PlayerProgressBar.Value = Convert.ToInt32(CurrentLP); } })); }
private void GotLeaguesForPlayer(SummonerLeaguesDTO result) { Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() => { if (result.SummonerLeagues != null && result.SummonerLeagues.Count > 0) { LeagueHeader.Visibility = System.Windows.Visibility.Visible; Leagues overview = LeaguesContainer.Content as Leagues; overview.Update(result); } else { LeagueHeader.Visibility = System.Windows.Visibility.Collapsed; } })); }
public async Task<SummonerLeaguesDTO> GetAllLeaguesForPlayer(Double summonerId) { int Id = Invoke("leaguesServiceProxy", "getAllLeaguesForPlayer", new object[] { summonerId }); while (!results.ContainsKey(Id)) await Task.Delay(10); TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); SummonerLeaguesDTO result = new SummonerLeaguesDTO(messageBody); results.Remove(Id); return result; }
public async Task<SummonerLeaguesDTO> GetLeaguesForTeam(String teamName) { int Id = Invoke("leaguesServiceProxy", "getLeaguesForTeam", new object[] { teamName }); while (!results.ContainsKey(Id)) await Task.Delay(10); TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); SummonerLeaguesDTO result = new SummonerLeaguesDTO(messageBody); results.Remove(Id); return result; }