static void Main(string[] args) { Console.SetWindowSize(Math.Min(Console.LargestWindowWidth, 100), Math.Min(Console.LargestWindowHeight, 40)); Console.Title = String.Format("Awesomium.NET - {0}", AssemblyInfo.AssemblyTitle); WriteHeader(); Console.Write("Starting Awesomium..."); // Start a dedicated thread for Awesomium. Thread awesomiumThread = new Thread(AwesomiumThread) { Name = "Awesomium Thread" }; awesomiumThread.Start(); // Wait for the WebCore to start. while (!webCoreStarted) { Thread.Sleep(10); } Console.Write("Complete"); ConsoleBuffer.ClearLine((short)Console.CursorTop); Console.SetCursorPosition(0, Console.CursorTop); // Show menu. ListenUserChoice(); }
private static void ReplaceLine(string text, int line) { text = text.Length > Console.WindowWidth ? text.Substring(0, Console.WindowWidth - 3) + "..." : text; ConsoleBuffer.ClearLine((short)line); ConsoleBuffer.WriteAt(0, (short)line, text); }