Dictionary<string, ClassLibrary3.CakeImage> list = cakeImageManager.SelectCakeImage();
foreach (ClassLibrary3.CakeImage var in list.Values)
{
PictureBox pic = new PictureBox();
pic.Image = Image.FromFile(var.IImage);
pic.Tag = var.IID;
pic.Size = new Size(220, 220);
pic.SizeMode = PictureBoxSizeMode.AutoSize;
pic.ContextMenuStrip = this.contextMenuStrip1;
for (int i = 1; i <= 3; i++)
{
for (int y = 0; y < 5; y++)
{
if (i == 1)
pic.Location = new Point(shu += 226, 1);
else if (i == 2)
pic.Location = new Point(shu += 226, 227);
else if (i == 3)
pic.Location = new Point(shu += 226, 453);
this.Controls.Add(pic);
}
}
}
foreach (ClassLibrary3.CakeImage var in list.Values)
{
PictureBox pic = new PictureBox();
pic.Image = Image.FromFile(var.IImage);
pic.Tag = var.IID;
pic.Size = new Size(220, 220);
pic.SizeMode = PictureBoxSizeMode.AutoSize;
pic.ContextMenuStrip = this.contextMenuStrip1;
for (int i = 1; i <= 3; i++)
{
for (int y = 0; y < 5; y++)
{
if (i == 1)
pic.Location = new Point(shu += 226, 1);
else if (i == 2)
pic.Location = new Point(shu += 226, 227);
else if (i == 3)
pic.Location = new Point(shu += 226, 453);
this.Controls.Add(pic);
}
}
}
pic.Visible=true;