public bool PicturesCarpisiyormu() { int rectangleX = ActivePicture.GetLocation().X; int rectangleY = ActivePicture.GetLocation().Y; int rectangleXBound = ActivePicture.GetWidth() + rectangleX; int rectangleYBound = ActivePicture.GetHeight() + rectangleY; int pictureX = 0; int pictureY = 0; int pictureXBound = 0; int pictureYBound = 0; for (int i = 0; i < PictureCount; i++) { if (Pictures[i] != ActivePicture) { pictureX = Pictures[i].GetLocation().X; pictureY = Pictures[i].GetLocation().Y; pictureXBound = Pictures[i].GetLocation().X + Pictures[i].GetWidth(); pictureYBound = Pictures[i].GetLocation().Y + Pictures[i].GetHeight(); if ( (pictureXBound) >= (rectangleX) && (pictureX) <= (rectangleXBound) && (pictureYBound + 2) >= (rectangleY) && (pictureY - 2) <= (rectangleYBound) ) { return(true); } } } return(false); }
public void infoDraw() { Console.ForegroundColor = ConsoleColor.White; Console.CursorTop = y + 4; Console.CursorLeft = x + 10; Console.WriteLine("X............: {0} \n", ActivePicture.GetLocation().X); Console.CursorTop = y + 7; Console.CursorLeft = x + 10; Console.WriteLine("Y............: {0}\n", ActivePicture.GetLocation().Y); Console.CursorTop = y + 10; Console.CursorLeft = x + 10; Console.WriteLine("Width.....: {0}\n", ActivePicture.GetWidth()); Console.CursorTop = y + 13; Console.CursorLeft = x + 10; Console.WriteLine("Height....: {0}\n", ActivePicture.GetHeight()); Console.CursorTop = y + 16; Console.CursorLeft = x + 10; Console.WriteLine("Color.........: {0}\n", ActivePicture.GetColor()); }