Ejemplo n.º 1
0
        private async void setBindingContext(int gamePlayedTime)
        {
            // get the list of games owned by the user and filtered by game played time
            List <SteamGame> steamGames = await GetSteamGames.GetGames(gamePlayedTime);

            // get a random number from 0 to size of games
            int steamGameNumber = randomNumber(steamGames.Count);
            // get the steam game out of the list
            SteamGame steamGame = steamGames[steamGameNumber];
            // get the steam game name
            string gameName = await GetSteamGames.GetGameName(steamGame.AppId);

            // set the steam game title
            steamGame.Title = gameName;
            // set the binding context
            BindingContext = steamGame;
        }
Ejemplo n.º 2
0
 public SteamPage()
 {
     InitializeComponent();
     BindingContext = new SteamGame();
 }