Exemplo n.º 1
0
        private async void GoToPlayerMatchHistory()
        {
            IsBusy = true;
            List <PlayerMatchHistory> result = await OpenDotaApi.GetPlayerMatchHistory(selectedSteamUser.Account_Id);

            PlayerWinLose winloseResult = await OpenDotaApi.GetPlayerWinLose(selectedSteamUser.Account_Id);

            var playerSummaries = await SteamApi.GetPlayerSummaries(Convert.ToInt32(selectedSteamUser.Account_Id));

            SteamPlayer steamPlayer = Utils.GetSteamPlayer(playerSummaries);

            IsBusy = false;
            await Navigation.PushAsync(new PlayerMatchHistoryView(result, steamPlayer, winloseResult, new PlayerMatchHistoryVM()));
        }
Exemplo n.º 2
0
        private async void OnTapPlayerNameCmd(object obj)
        {
            //TODO: Add ActivityIndicator here
            int param = Convert.ToInt32(obj);

            if (Players[param].account_id != null)
            {
                if (Players[param].PersonaName == CurrentUserPersonaName)
                {
                    await Navigation.PopAsync();
                }
                else
                {
                    var playerMatchHistory = await OpenDotaApi.GetPlayerMatchHistory(Players[param].account_id);

                    var playerWinLose = await OpenDotaApi.GetPlayerWinLose(Players[param].account_id);

                    var playerSummaries = await SteamApi.GetPlayerSummaries(Convert.ToInt32(Players[param].account_id));

                    var steamPlayer = Utils.GetSteamPlayer(playerSummaries);
                    await Navigation.PushAsync(new PlayerMatchHistoryView(playerMatchHistory, steamPlayer, playerWinLose, new PlayerMatchHistoryVM()));
                }
            }
        }