private string QueryBox(string prompt) { var width = prompt.Length + 4; var height = 4; var offsetX = (Console.WindowWidth - width) / 2; var offSetY = (Console.WindowHeight - height) / 2; ConsoleDrawing.DrawBoxDouble(offsetX, offSetY, width, height); Console.SetCursorPosition(offsetX + 2, offSetY + 1); Console.Write(prompt); Console.SetCursorPosition(offsetX + 2, offSetY + 2); return(Console.ReadLine()); }
private void ClearAndDrawFrame() { Console.Clear(); var width = Console.WindowWidth; var height = Console.WindowHeight; ConsoleDrawing.DrawBoxDouble(0, 0, width, height); ConsoleDrawing.WriteAt('╠', 0, height - 3); ConsoleDrawing.WriteAt('╠', 0, height - 5); ConsoleDrawing.WriteAt('╣', width - 1, height - 3); ConsoleDrawing.WriteAt('╣', width - 1, height - 5); ConsoleDrawing.DrawLineX('═', 1, height - 3, width - 2); ConsoleDrawing.DrawLineX('═', 1, height - 5, width - 2); }