public void RenderKudos(LcdsResponseString totalKudos) { KudosListView.Items.Clear(); totalKudos.Value = totalKudos.Value.Replace("{\"totals\":[0,", string.Empty).Replace("]}", string.Empty); var kudos = totalKudos.Value.Split(','); var item = new KudosItem("Friendly", kudos[0]) { Height = 52 }; KudosListView.Items.Add(item); item = new KudosItem("Helpful", kudos[1]) { Height = 52 }; KudosListView.Items.Add(item); item = new KudosItem("Teamwork", kudos[2]) { Height = 52 }; KudosListView.Items.Add(item); item = new KudosItem("Honorable Opponent", kudos[3]) { Height = 52 }; KudosListView.Items.Add(item); }
public RemotingMessageReceivedEventArgs HandleMessage(object sender, RemotingMessageReceivedEventArgs e) { SummonerClient summonerSender = sender as SummonerClient; int[] points = new int[4] { 9, 9, 9, 9 }; var obj = new Dictionary <string, int[]> { { "totals", new int[4] { 4, 4, 4, 4 } } }; var res = new LcdsResponseString { Value = JsonConvert.SerializeObject(obj) }; e.ReturnRequired = true; e.Data = res; return(e); }
public async void Update(double SummonerId, double AccountId) { AccId = AccountId; LcdsResponseString TotalKudos = await Client.PVPNet.CallKudos("{\"commandName\":\"TOTALS\",\"summonerId\": " + SummonerId + "}"); RenderKudos(TotalKudos); ChampionStatInfo[] TopChampions = await Client.PVPNet.RetrieveTopPlayedChampions(AccountId, "CLASSIC"); RenderTopPlayedChampions(TopChampions); Client.PVPNet.RetrievePlayerStatsByAccountId(AccountId, "3", new PlayerLifetimeStats.Callback(GotPlayerStats)); }
public async void Update(double summonerId, double accountId) { AccId = accountId; LcdsResponseString totalKudos = await Client.PVPNet.CallKudos("{\"commandName\":\"TOTALS\",\"summonerId\": " + summonerId + "}"); RenderKudos(totalKudos); ChampionStatInfo[] topChampions = await Client.PVPNet.RetrieveTopPlayedChampions(accountId, "CLASSIC"); RenderTopPlayedChampions(topChampions); Client.PVPNet.RetrievePlayerStatsByAccountId(accountId, "3", GotPlayerStats); }
public async Task <LcdsResponseString> CallKudos(String arg0) { int Id = Invoke("clientFacadeService", "callKudos", new object[] { arg0 }); while (!results.ContainsKey(Id)) { await Task.Delay(10); } TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); LcdsResponseString result = new LcdsResponseString(messageBody); results.Remove(Id); return(result); }
public void RenderKudos(LcdsResponseString TotalKudos) { KudosListView.Items.Clear(); TotalKudos.Value = TotalKudos.Value.Replace("{\"totals\":[0,", "").Replace("]}", ""); string[] Kudos = TotalKudos.Value.Split(','); KudosItem item = new KudosItem("Friendly", Kudos[0]); KudosListView.Items.Add(item); item = new KudosItem("Helpful", Kudos[1]); KudosListView.Items.Add(item); item = new KudosItem("Teamwork", Kudos[2]); KudosListView.Items.Add(item); item = new KudosItem("Honorable Opponent", Kudos[3]); KudosListView.Items.Add(item); }
/// 17.) public void CallKudos(String arg0, LcdsResponseString.Callback callback) { LcdsResponseString cb = new LcdsResponseString(callback); InvokeWithCallback("clientFacadeService", "callKudos", new object[] { arg0 }, cb); }