/// <summary> /// Displays subsequent progress dot /// </summary> public void Dot() { lock (ConsoleState.Lock) { B = C; C = L; Console.Write('.'); L = C; C = B; } }
/// <summary> /// Ends current dot bar with message or "OK." if no message provided /// </summary> /// <param name="msg"></param> public void Done(string msg) { lock (ConsoleState.Lock) { B = C; C = L; if (Ex == null) Console.WriteLine(msg); else Ex.WriteLine(msg); L = C; C = B; } }
public static void Set(ConsoleState s) { Console.BackgroundColor = s.BackgroundColor; Console.ForegroundColor = s.ForegroundColor; Console.SetCursorPosition(s.X, s.Y); }
/// <summary> /// Creates console state dot bar at current cursor position /// </summary> public ConsoleProgress(IConsoleExtension extension = null) { Ex = extension; L = C; Console.WriteLine(); }