Пример #1
0
 private void ShowSummonerProfile(SummonerProfile s)
 {
     pnlSearchPlayer.Visible          = false;
     pnlResultSummonerProfile.Visible = true;
     lblNameSummonerR.Text            = s.name;
     lblIDSummonerR.Text        = s.id.ToString();
     lblIDAccountSummonerR.Text = s.accountId.ToString();
     lblLevelSummonerR.Text     = s.summonerLevel.ToString();
     lblRevisionSummonerR.Text  = s.revisionDate.ToString();
 }
Пример #2
0
        public static bool SearchPlayer(string name, out SummonerProfile s)
        {
            try
            {
                s = null;
                if (online)
                {
                    ConnectionAPI connection =
                        new ConnectionAPI(name, APILinks.GetLink(
                                              APILinks.Link.SummonerProfile), true);

                    json = connection.json;
                }
                else
                {
                    GetOfflineData(name.ToLower() + "-" + Region.linkRegion.ToLower() +
                                   SummonerProfile.fileName);
                }

                s = JsonConvert.DeserializeObject <SummonerProfile>(json);

                json = null;

                return(true);
            }
            catch
            {
                s = null;
                if (ggLoL.language == "en-EN")
                {
                    MessageBox.Show("Non-Existing Summoner Profile");
                }
                else if (ggLoL.language == "es-ES")
                {
                    MessageBox.Show("Perfil de Invocador no Existente");
                }
                return(false);
            }
        }