Exemple #1
0
 public static void AsRowsChart(StatusEventArgs status)
 {
     foreach (var item in status.Data)
     {
         ConsoleExtensions.ClearCurrentLine();
         SetColors(status, item);
         var value = new string('■', item);
         Console.WriteLine($"  {value} ({item})");
         Console.ResetColor();
     }
     Console.WriteLine();
 }
Exemple #2
0
        public static void UpdateStatus(StatusEventArgs status)
        {
            Console.SetCursorPosition(0, 0);
            Display.AsRowsChart(status);

            Console.WriteLine($" * ALGORITHM: {status.AlgorithmName}");

            Console.ForegroundColor = status.CurrentProcess switch
            {
                ManagerProcessStatus.Operating => ConsoleColor.DarkYellow,
                ManagerProcessStatus.Exchanging => ConsoleColor.Yellow,
                ManagerProcessStatus.Exchanged => ConsoleColor.Yellow,
                _ => ConsoleColor.DarkGray
            };
            ConsoleExtensions.ClearCurrentLine();
            Console.WriteLine($" * PROCESS: {status.CurrentProcess}");
            Console.ResetColor();

            Console.WriteLine($" * OPERATIONS: {status.Operations}");
        }