private async void GoToMatchDetails()
        {
            IsBusy = true;
            var result = await OpenDotaApi.GetMatchDetails(selectedMatchHistory.match_id);

            IsBusy = false;
            await Navigation.PushAsync(new MatchHistoryDetailsView(result, new MatchHistoryDetailsVM(SteamPlayer.PersonaName)));
        }
Example #2
0
        private async void SearchSteamPersona()
        {
            if (!string.IsNullOrWhiteSpace(steamPersona))
            {
                IsBusy = true;
                List <SteamUser> result = await OpenDotaApi.SearchSteamUserByPersona(steamPersona);

                IsBusy = false;
                await Navigation.PushAsync(new SearchSteamPersonaResultView(result, new SearchSteamPersonaResultVM(steamPersona)));
            }
        }
Example #3
0
        private async void GoToPlayerMatchHistoryPage()
        {
            IsBusy = true;
            var userData = App.SteamUserDb.GetUserData(UserData.AccountId);
            var playerMatchHistoryList = await OpenDotaApi.GetPlayerMatchHistory(UserData.AccountId);

            var steamUser     = JsonConvert.DeserializeObject <SteamUser>(userData.SteamUser);
            var playerWinLose = JsonConvert.DeserializeObject <PlayerWinLose>(userData.PlayerWinLose);

            IsBusy = false;
            //await Navigation.PushAsync(new PlayerMatchHistoryView(playerMatchHistoryList, steamUser, playerWinLose, new PlayerMatchHistoryVM()));
        }
Example #4
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()));
        }
Example #5
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()));
                }
            }
        }