Пример #1
0
 static void DrawHistory()
 {
     Console.Clear();
     Console.ForegroundColor = ConsoleColor.Green;
     if (HistoryArr.LengthHistory == 0)
     {
         Console.SetCursorPosition(widthScreen / 2 - 5, heightScreen / 2 - 10);
         Console.Write($"Ещё никто не летал");
     }
     else
     {
         for (int i = 0; i < HistoryArr.LengthHistory; i++)
         {
             Console.SetCursorPosition(widthScreen / 2 - 5, heightScreen / 2 - 10 + i);
             Console.Write($"{i + 1} {HistoryArr.GetHistoryByPosStr(i)}");
         }
     }
     Console.ForegroundColor = ConsoleColor.White;
     Console.SetCursorPosition(widthScreen / 2 - 15, heightScreen - 2);
     Console.Write("Для возврата нажмите любую кнопку");
     Console.ReadKey();
     Console.ResetColor();
 }