public static void Main(string[] args) { IntPtr hWnd = Process.GetCurrentProcess().MainWindowHandle; SetWindowPos(hWnd, new IntPtr(HWND_TOPMOST), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); main = new TTSConsoleLib.Main(); main.Start(QuestionUser, Write, WriteLine); _hookID = SetHook(_proc); //Set our hook Application.Run(); //Start a standard application method loop while (true) { try { var writeMessage = Console.ReadLine(); if (writeMessage?.Trim() == "q") { break; } if (writeMessage?.Trim() != string.Empty) { main.SendIRCMessage(writeMessage); } } catch (Exception ex) { Logger.Log(ex.ToString()); } } }
private static void Main(string[] args) { IntPtr hWnd = Process.GetCurrentProcess().MainWindowHandle; SetWindowPos(hWnd, new IntPtr(HWND_TOPMOST), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); TTSConsoleLib.Main main = new TTSConsoleLib.Main(); main.Start(QuestionUser, Write, WriteLine); }