Пример #1
0
 public static async Task <int> AdddGameEntryAsync(string name, bool humanWon, string gameTime)
 {
     using (var client = Utils.NewAPIClient())
     {
         Leaderboard l = new Leaderboard(client);
         LeaderboardExtensions.PostLeaderboardEntryByEntry(l, new Models.LeaderboardEntry(null, name, humanWon, gameTime)
                                                           );
         // TODO change
         var a = 5 * 5;
         return(a);
     }
 }
Пример #2
0
        private void UpdateTable()
        {
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
            Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                                                                  () =>
            {
                using (var client = Utils.NewAPIClient())
                {
                    AllGames = Utils.ToObservableCollection(LeaderboardExtensions.GetLeaderboardEntries(new Leaderboard(client)));     //table_entries
                    LeaderboardListView.Visibility      = Visibility.Visible;
                    LeaderboardListViewReal.ItemsSource = AllGames;
                }
            }
                                                                                                  );
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
        }