コード例 #1
0
 public void GotPlayerStats(PlayerLifetimeStats stats)
 {
     Summaries = new List<PlayerStatSummary>();
     Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() =>
     {
         StatsComboBox.Items.Clear();
         StatsListView.Items.Clear();
         foreach (PlayerStatSummary x in stats.PlayerStatSummaries.PlayerStatSummarySet)
         {
             if (x.AggregatedStats.Stats.Count > 0)
             {
                 Summaries.Add(x);
                 string SummaryString = x.PlayerStatSummaryTypeString;
                 SummaryString = string.Concat(SummaryString.Select(e => Char.IsUpper(e) ? " " + e : e.ToString())).TrimStart(' ');
                 SummaryString = SummaryString.Replace("Odin", "Dominion");
                 SummaryString = SummaryString.Replace("x", "v");
                 StatsComboBox.Items.Add(SummaryString);
             }
         }
     }));
 }
コード例 #2
0
 public PlayerLifetimeStats RetrievePlayerStatsByAccountId(double accountId, string season)
 {
     int Id = Invoke("playerStatsService", "retrievePlayerStatsByAccountId", new object[] { accountId, season });
     while (!results.ContainsKey(Id))
         System.Threading.Thread.Sleep(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     PlayerLifetimeStats result = new PlayerLifetimeStats(messageBody);
     results.Remove(Id);
     return result;
 }
コード例 #3
0
 /// 18.)
 public void RetrievePlayerStatsByAccountId(double accountId, string season,
     PlayerLifetimeStats.Callback callback)
 {
     PlayerLifetimeStats cb = new PlayerLifetimeStats(callback);
     InvokeWithCallback("playerStatsService", "retrievePlayerStatsByAccountId", new object[] { accountId, season },
         cb);
 }
コード例 #4
0
 public async Task<PlayerLifetimeStats> RetrievePlayerStatsByAccountId(Double accountId, String season)
 {
     int Id = Invoke("playerStatsService", "retrievePlayerStatsByAccountId", new object[] { accountId, season });
     while (!results.ContainsKey(Id))
         await Task.Delay(10);
     TypedObject messageBody = results[Id].GetTO("data").GetTO("body");
     PlayerLifetimeStats result = new PlayerLifetimeStats(messageBody);
     results.Remove(Id);
     return result;
 }