到目前为止我已经
了var championNamelist = new List<string>(championName);
var first5Names = championNamelist.Take(5);
var skip5Names = championNamelist.Skip(5);
foreach (string name in first5Names)
{
string getPNG = "http://ddragon.leagueoflegends.com/cdn/6.11.1/img/champion/" + png + ".png";
}
在championNamelist
中是从XML中找到的所有名称。
如何获取表单上显示的所有图片?
答案 0 :(得分:0)
如果想动态创建图片框,请尝试
PictureBox[] p = new PictureBox[10];
for (int i = 0; i < 10; i++)
{
p[i] = new PictureBox();
p[i].ImageLocation = "location";
p[i].Location = new Point(0,0);
p[i].Size = new Size(50, 50);
this.Controls.Add(p[i]);
}