// Redraw the image list public void RefreshList() { foreach (Square sqr in Squares) { sqr.DrawPiece(null); } // Draw last added images in the available list int iStart = 0, iIndex = 0; if (Images.Count > Squares.Count) { iStart = Images.Count - Squares.Count; } for (; iStart < Images.Count; iStart++) { Square sqr = (Square)Squares[iIndex++]; sqr.DrawPiece((Image)Images[iStart]); } }