Exemplo n.º 1
0
        void WriteTwiddler(string s, bool showElapsed, bool skipLogFile = true)
        {
            int curRow    = Utilities.ConsoleCursorTop;
            int curColumn = 0;             // Console.CursorLeft is curiously unreliable on Mono, the cursor jumps around

            try {
                Utilities.ConsoleSetCursorPosition(0, Utilities.ConsoleWindowHeight - 1);
                string message;
                if (!showElapsed)
                {
                    message = s;
                }
                else
                {
                    message = $"{s} {GetElapsedTime ()}";
                }

                Log.Status(message, ConsoleColor.White, skipLogFile: skipLogFile);
            } catch {
                // ignore
            } finally {
                Utilities.ConsoleSetCursorPosition(curColumn, curRow);
            }
        }