private void refreshPicture() { img = labirint.ToImg(cellSize, xEnd, yEnd, preyX, preyY, false); pictureBox1.Image = img; pc2.Image = labirint.drawPrey(preyX, preyY, cellSize); Cursor.Position = PointToScreen(startingPoint); lastPoint = Point.Empty; isMouseDown = false; }