コード例 #1
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()));
        }
コード例 #2
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()));
        }
コード例 #3
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()));
                }
            }
        }