public static void PrintFrameLine(int positionX, int positionY, int sizeX, int sizeY, ConsoleColor text, ConsoleColor background) { int SizeX = positionX + sizeX; int SizeY = positionY + sizeY; FrameLine f = new FrameLine(0); Console.ForegroundColor = text; Console.BackgroundColor = background; for (int y = positionY; y < SizeY; y++) { for (int x = positionX; x < SizeX; x++) { if (y == positionY && x == positionX) { Console.SetCursorPosition(x, y); Console.Write(f.topLeft); } if (y == positionY && x > positionX && x < SizeX - 1) { Console.SetCursorPosition(x, y); Console.Write(f.lineX); } if (y == positionY && x == SizeX - 1) { Console.SetCursorPosition(x, y); Console.Write(f.topRight); } if (y > positionY && y < SizeY - 1 && x == positionX || y > positionY && y < SizeY - 1 && x == SizeX - 1) { Console.SetCursorPosition(x, y); Console.Write(f.lineY); } if (y == SizeY - 1 && x == positionX) { Console.SetCursorPosition(x, y); Console.Write(f.bottomLeft); } if (y == SizeY - 1 && x > positionX && x < SizeX - 1) { Console.SetCursorPosition(x, y); Console.Write(f.lineX); } if (y == SizeY - 1 && x == SizeX - 1) { Console.SetCursorPosition(x, y); Console.Write(f.bottomRight); } } } Console.ForegroundColor = ConsoleColor.White; Console.BackgroundColor = ConsoleColor.Black; }