private void button2_Click_2(object sender, EventArgs e) { Instagram test = new Instagram(token); User user = new User(); user.login = textBox3.Text; if (user.GetUserInformation(user).isClosed) { follow(); } else { List <Image> list = user.GetImages(1, 12); //list = user.GetImages(12, 12); for (int x = 0; x < 4; x++) { for (int y = 0; y < 3; y++) { if (list.Count > y * 4 + x) { myPictureBox box = new myPictureBox(); box.Size = new Size(150, 150); box.Click += box_Click; box.link = list[y * 4 + x].highResolution.ToString(); box.Cursor = Cursors.Hand; box.Location = new Point(20 + x * (150 + 40), 62 + y * (150 + 20)); box.ImageLocation = list[y * 4 + x].thumbNail.ToString(); this.Controls.Add(box); } else { // } } } } }
private void button2_Click_2(object sender, EventArgs e) { Instagram test = new Instagram(token); User user = new User(); user.login = textBox3.Text; if (user.GetUserInformation(user).isClosed) { follow(); } else { List<Image> list = user.GetImages(1, 12); //list = user.GetImages(12, 12); for(int x = 0; x< 4; x++) { for(int y = 0; y<3;y++) { if (list.Count > y * 4 + x) { myPictureBox box = new myPictureBox(); box.Size = new Size(150, 150); box.Click += box_Click; box.link = list[y * 4 + x].highResolution.ToString(); box.Cursor = Cursors.Hand; box.Location = new Point(20 + x * (150 + 40), 62 + y * (150 + 20)); box.ImageLocation = list[y * 4 + x].thumbNail.ToString(); this.Controls.Add(box); } else { // } } } } }