Пример #1
0
 /// <summary>
 /// Displays subsequent progress dot
 /// </summary>
 public void Dot() {
     lock (ConsoleState.Lock) {
         B = C;
         C = L;
         Console.Write('.');
         L = C;
         C = B;
     }
 }
Пример #2
0
 /// <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;
     }
 }
Пример #3
0
 public static void Set(ConsoleState s) {
     Console.BackgroundColor = s.BackgroundColor;
     Console.ForegroundColor = s.ForegroundColor;
     Console.SetCursorPosition(s.X, s.Y);
 }
Пример #4
0
 /// <summary>
 /// Creates console state dot bar at current cursor position
 /// </summary>
 public ConsoleProgress(IConsoleExtension extension = null) {
     Ex = extension;
     L = C;
     Console.WriteLine();
 }