Beispiel #1
0
        private void btn_click(object o, EventArgs e)
        {
            wal = new WebapiLibrary();
            try
            {
                string nameAPI = string.Format("https://kr.api.riotgames.com/lol/summoner/v4/summoners/by-name/{0}?api_key={1}", tb.Text, wal.myapikey());
                close                 = new SummonerINFO(this, suminfo(nameAPI));
                close.WindowState     = FormWindowState.Maximized;
                close.FormBorderStyle = FormBorderStyle.None;
                close.MdiParent       = this;
                close.Dock            = DockStyle.Fill;
                championList.Controls.Add(close);
                close.Show();
            }

            catch
            {
                MessageBox.Show("올바른 아이디를 입력해주세요.");
                this.Show();
            }
        }
Beispiel #2
0
        private void SummonerINFO_Load(object sender, EventArgs e)
        {
            url            = string.Format("https://kr.api.riotgames.com/lol/league/v4/positions/by-summoner/{0}?api_key={1}", name, wal.myapikey());
            this.BackColor = Color.White;
            Summoner_info(url);
            accountapi = string.Format("https://kr.api.riotgames.com/lol/summoner/v4/summoners/by-name/{0}?api_key={1}", ht["summonerName"].ToString(), wal.myapikey());
            matchlist  = string.Format("https://kr.api.riotgames.com/lol/match/v4/matchlists/by-account/{0}?endIndex=10&api_key={1}", accountfuc(accountapi), wal.myapikey());

            cm        = new Commons();
            hashtable = new Hashtable();
            hashtable.Add("size", new Size(50, 50));
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("pictureboxsizemode", PictureBoxSizeMode.Zoom);
            hashtable.Add("click", (EventHandler)Back_click);
            back        = cm.getPictureBox(hashtable, this);
            back.Image  = Properties.Resources.images;
            back.Cursor = Cursors.Hand;

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(150, 150));
            hashtable.Add("point", new Point(115, 60));
            hashtable.Add("pictureboxsizemode", PictureBoxSizeMode.Zoom);
            tierpic           = cm.getPictureBox(hashtable, this);
            tierpic.BackColor = Color.White;
            tierpic.Load(string.Format("http://gdc3.gudi.kr:42001/emblems/Emblem_{0}.png", ht["tier"].ToString()));

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(300, 40));
            hashtable.Add("point", new Point(270, 60));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "summonerName");
            //hashtable.Add("text", "서머너이름");
            hashtable.Add("text", ht["summonerName"]);
            SummonerName      = cm.getLabel(hashtable, this);
            SummonerName.Font = new Font("맑은 고딕", 20, FontStyle.Bold);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(150, 40));
            hashtable.Add("point", new Point(270, 110));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "tier");
            //hashtable.Add("text", "티어");
            hashtable.Add("text", ht["tier"]);
            tierlb      = cm.getLabel(hashtable, this);
            tierlb.Font = new Font("맑은 고딕", 20, FontStyle.Bold);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(30, 40));
            hashtable.Add("point", new Point(430, 110));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "rank");
            //hashtable.Add("text", "랭크");
            hashtable.Add("text", ht["rank"]);
            rankPoint      = cm.getLabel(hashtable, this);
            rankPoint.Font = new Font("맑은 고딕", 20, FontStyle.Bold);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 40));
            hashtable.Add("point", new Point(470, 110));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "LP");
            //hashtable.Add("text", "포인트");
            hashtable.Add("text", ht["leaguePoints"]);
            ranknum      = cm.getLabel(hashtable, this);
            ranknum.Font = new Font("맑은 고딕", 20, FontStyle.Bold);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(150, 150));
            hashtable.Add("point", new Point(600, 60));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "BackgroundPN");
            chartpn = cm.getPanel(hashtable, this);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(985, 400));
            hashtable.Add("point", new Point(0, 220));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "summonerLOG");
            summonerLog            = cm.getPanel(hashtable, this);
            summonerLog.AutoScroll = true;

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(150, 40));
            hashtable.Add("point", new Point(270, 160));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "position");
            //hashtable.Add("text", "포지션");
            hashtable.Add("text", ht["position"]);
            mainpostition      = cm.getLabel(hashtable, this);
            mainpostition.Font = new Font("맑은 고딕", 20, FontStyle.Bold);


            gameID_PULL(matchlist);
        }