private
void
PictureLoad()
{
int
k = 0;
for
(
i = 0; i < pb.GetLength(0); i++)
j = 0; j < pb.GetLength(1); j++)
switch
(Balls[k].EzColor)
case
Color.RED:
pb[i, j].Image = Properties.Resources.red;
break
;
Color.BLUE:
pb[i, j].Image = Properties.Resources.blue;
Color.YELLOW:
pb[i, j].Image = Properties.Resources.yellow;
Color.GREEN:
pb[i, j].Image = Properties.Resources.green;
Color.PURPLE:
pb[i, j].Image = Properties.Resources.purple
}
k++;
Later can you check two elements in the array by the picture? So i have to check if the pk[0,1] and pb[0,2] have the same picture?I tried this:
public bool Check() { if (pb[0, 0].Image == pb[0, 1].Image) { return true; } else return false; }Its not working, if i have the same picture in the 0. and 1. place this code cant see that is the same picture.