Advertisement
MrVeiran

rabota na zavode

Mar 21st, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 62.05 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7. using System.Threading;
  8.  
  9. namespace ConsoleApp63
  10. {
  11.     class Program
  12.     {
  13.  
  14.         public static void Main(string[] args)
  15.         {
  16.             Console.CursorVisible = false;
  17.             Console.BackgroundColor = ConsoleColor.White;
  18.             Console.ForegroundColor = ConsoleColor.Black;
  19.  
  20.             char[,] monitor1;
  21.             sozdaniemonitor(out monitor1, "monitor.txt");
  22.             Console.WindowWidth = 70;
  23.             int width = Console.WindowWidth;
  24.             int height = Console.WindowHeight;
  25.  
  26.  
  27.  
  28.             Console.SetCursorPosition(0, 0);
  29.             for (int i = 0; i < height; i++)
  30.             {
  31.                 for (int j = 0; j < width; j++)
  32.                 {
  33.                     Console.Write(" ");
  34.                 }
  35.                 Console.WriteLine();
  36.             }
  37.  
  38.  
  39.             Console.SetCursorPosition(width / 2 - 20, 10);
  40.             Console.Write("Добрый вечер. Это симулятор работы на заводе. ");
  41.             Console.SetCursorPosition(width / 2 - 20, 12);
  42.             Console.Write("При проблеме с какой-либо системой экран");
  43.             Console.SetCursorPosition(width / 2 - 20, 13);
  44.             Console.Write("загорится красным");
  45.             Console.SetCursorPosition(width / 2 - 20, 15);
  46.             Console.Write("Требуется решить проблему клавишами  B, R,K,D,T,F");
  47.             Console.SetCursorPosition(width / 2 - 20, 17);
  48.             Console.Write("Нажмите Enter для продолжения");
  49.  
  50.             Console.SetCursorPosition(0, 0);
  51.             Console.ReadLine();
  52.             Console.Clear();
  53.             Console.SetCursorPosition(width / 2 - 20, 10);
  54.             Console.Write("Клавиша B(Beton) заполняет бетон.");
  55.             Console.SetCursorPosition(width / 2 - 20, 11);
  56.             Console.Write("Если будет ошибка то загорится экран 1");
  57.             Console.SetCursorPosition(width / 2 - 20, 13);
  58.             Console.Write("R (Reset) сбрасывает ошибку у погрузчика");
  59.             Console.SetCursorPosition(width / 2 - 20, 14);
  60.             Console.Write("Соответственно, экран 2 покажет ошибку");
  61.             Console.SetCursorPosition(0, 0);
  62.  
  63.             Console.ReadLine();
  64.             Console.Clear();
  65.             Console.SetCursorPosition(width / 2 - 20, 10);
  66.             Console.Write("K(kick) пиздануть по компьютеру. ");
  67.             Console.SetCursorPosition(width / 2 - 20, 11);
  68.             Console.Write("Вы не поверите, но это помогает.");
  69.             Console.SetCursorPosition(width / 2 - 20, 12);
  70.             Console.Write("Экран 3 покажет это");
  71.             Console.SetCursorPosition(0, 0);
  72.  
  73.  
  74.             Console.ReadLine();
  75.             Console.Clear();
  76.             Console.SetCursorPosition(width / 2 - 20, 10);
  77.             Console.Write("D(del) убрать брак на конвейере");
  78.             Console.SetCursorPosition(width / 2 - 20, 11);
  79.             Console.Write("Экран 4 скажет об этой проблеме");
  80.             Console.SetCursorPosition(width / 2 - 20, 13);
  81.             Console.Write("T(transp) поможет убрать выпавшую плитку");
  82.             Console.SetCursorPosition(width / 2 - 20, 14);
  83.             Console.Write("Экран 5 расскажет об этом");
  84.  
  85.             Console.SetCursorPosition(0, 0);
  86.  
  87.             Console.ReadLine();
  88.             Console.Clear();
  89.             Console.SetCursorPosition(width / 2 - 20, 10);
  90.             Console.Write("F(Fill) заполнит пленкой автомат");
  91.             Console.SetCursorPosition(width / 2 - 20, 11);
  92.             Console.Write("Экран 6 демонстрирует эту ошибку");
  93.             Console.SetCursorPosition(width / 2 - 20, 13);
  94.             Console.Write("Если вы что-то забыли, нажав на Enter");
  95.             Console.SetCursorPosition(width / 2 - 20, 14);
  96.             Console.Write("вам скажут за что ответственна эта система");
  97.             Console.SetCursorPosition(width / 2 - 20, 16);
  98.             Console.Write("Чтобы отладить систему курсором не надо выделять");
  99.             Console.SetCursorPosition(width / 2 - 20, 18);
  100.             Console.Write("Просто нажмите на клавишу");
  101.  
  102.             Console.SetCursorPosition(0, 0);
  103.  
  104.  
  105.             Console.ReadLine();
  106.             Console.Clear();
  107.             Console.SetCursorPosition(width / 2 - 20, 10);
  108.             Console.Write("Трата на проблему больше 20 минут приведет к -премии");
  109.             Console.SetCursorPosition(width / 2 - 20, 13);
  110.             Console.Write("Решение ошибок, даже в холостую");
  111.             Console.SetCursorPosition(width / 2 - 20, 14);
  112.             Console.Write("+5 минут ко времени бездействия");
  113.             Console.SetCursorPosition(width / 2 - 20, 16);
  114.             Console.Write("Если вы готовы то нажмите Enter");
  115.             Console.SetCursorPosition(width / 2 - 20, 18);
  116.             Console.Write("И ваш 12 часовой рабочий день начнется");
  117.  
  118.             Console.SetCursorPosition(0, 0);
  119.  
  120.  
  121.             Console.ReadLine();
  122.             Console.Clear();
  123.             Console.SetCursorPosition(0, 0);
  124.             Console.BackgroundColor = ConsoleColor.Blue;
  125.             for (int i = 0; i < height; i++)
  126.             {
  127.                 for (int j = 0; j < width; j++)
  128.                 {
  129.                     Console.Write(" ");
  130.                 }
  131.                 Console.WriteLine();
  132.             }
  133.            
  134.             Console.ForegroundColor = ConsoleColor.White;
  135.             Console.SetCursorPosition(width / 2 - 20, 10);
  136.             Console.Write("Welcome!");
  137.             Thread.Sleep(225);
  138.             Console.SetCursorPosition(width / 2 - 20, 13);
  139.             Console.Write("Doistori4eskaya");
  140.             Thread.Sleep(225);
  141.             Console.SetCursorPosition(width / 2 - 20, 14);
  142.             Console.Write("Obaldennaya system загружена");
  143.             Thread.Sleep(225);
  144.             Console.SetCursorPosition(width / 2 - 20, 16);
  145.             Console.Write("Версия 0.0000021с");
  146.             Thread.Sleep(225);
  147.             Console.SetCursorPosition(width / 2 - 20, 18);
  148.             Console.Write("Удачи вам, и не заебись, и не ебимы будете)");
  149.  
  150.             Thread.Sleep(5000);
  151.  
  152.             Console.ForegroundColor = ConsoleColor.Black;
  153.             Console.BackgroundColor = ConsoleColor.White;
  154.             Console.SetCursorPosition(0, 0);
  155.             for (int i = 0; i < height; i++)
  156.             {
  157.                 for (int j = 0; j < width; j++)
  158.                 {
  159.                     Console.Write(" ");
  160.                 }
  161.                 Console.WriteLine();
  162.             }
  163.  
  164.             Thread.Sleep(500);
  165.             Console.SetCursorPosition(width / 2 - 30, 10);
  166.             for (int i = 0; i < 30; i++)
  167.             {
  168.                 Console.Write("-");
  169.                 Thread.Sleep(25);
  170.                 Console.Write("\b \b");
  171.                 Console.Write("=");
  172.                 Thread.Sleep(25);
  173.                 Console.Write("\b \b");
  174.                 Console.Write("#");
  175.             }
  176.             Console.Write("  ..100%  1 Система работает");
  177.             Thread.Sleep(225);
  178.             Console.SetCursorPosition(width / 2 - 30, 11);
  179.             for (int i = 0; i < 30; i++)
  180.             {
  181.                 Console.Write("-");
  182.                 Thread.Sleep(25);
  183.                 Console.Write("\b \b");
  184.                 Console.Write("=");
  185.                 Thread.Sleep(25);
  186.                 Console.Write("\b \b");
  187.                 Console.Write("#");
  188.             }
  189.             Console.Write("  ..100%  2 Система работает");
  190.             Thread.Sleep(225);
  191.             Console.SetCursorPosition(width / 2 - 30, 12);
  192.             for (int i = 0; i < 24; i++)
  193.             {
  194.                 Console.Write("-");
  195.                 Thread.Sleep(25);
  196.                 Console.Write("\b \b");
  197.                 Console.Write("=");
  198.                 Thread.Sleep(25);
  199.                 Console.Write("\b \b");
  200.                 Console.Write("#");
  201.             }
  202.  
  203.             Console.Write("  ..80% Система не загрузилась");
  204.             Console.SetCursorPosition(width / 2 - 30, 13);
  205.             Console.Write("  Пизданите по компьютеру");
  206.             Console.ReadLine();
  207.             Thread.Sleep(225);
  208.             Console.SetCursorPosition(width / 2 - 6, 12);
  209.             Console.Write("                                    ");
  210.             Console.SetCursorPosition(width / 2 - 30, 13);
  211.             Console.Write("                                    ");
  212.             Console.SetCursorPosition(width / 2 - 6, 12);
  213.             for (int i = 24; i < 30; i++)
  214.             {
  215.                 Console.Write("-");
  216.                 Thread.Sleep(25);
  217.                 Console.Write("\b \b");
  218.                 Console.Write("=");
  219.                 Thread.Sleep(25);
  220.                 Console.Write("\b \b");
  221.                 Console.Write("#");
  222.             }
  223.             Console.Write("  ..100%  3 Система работает");
  224.             Thread.Sleep(225);
  225.             Console.SetCursorPosition(width / 2 - 30, 13);
  226.             for (int i = 0; i < 30; i++)
  227.             {
  228.                 Console.Write("-");
  229.                 Thread.Sleep(25);
  230.                 Console.Write("\b \b");
  231.                 Console.Write("=");
  232.                 Thread.Sleep(25);
  233.                 Console.Write("\b \b");
  234.                 Console.Write("#");
  235.             }
  236.             Console.Write("  ..100%  4 Система работает");
  237.             Thread.Sleep(225);
  238.             Console.SetCursorPosition(width / 2 - 30, 14);
  239.             for (int i = 0; i < 30; i++)
  240.             {
  241.                 Console.Write("-");
  242.                 Thread.Sleep(25);
  243.                 Console.Write("\b \b");
  244.                 Console.Write("=");
  245.                 Thread.Sleep(25);
  246.                 Console.Write("\b \b");
  247.                 Console.Write("#");
  248.             }
  249.             Console.Write("  ..100%  5 Система работает");
  250.             Thread.Sleep(225);
  251.             Console.SetCursorPosition(width / 2 - 30, 15);
  252.             for (int i = 0; i < 30; i++)
  253.             {
  254.                 Console.Write("-");
  255.                 Thread.Sleep(25);
  256.                 Console.Write("\b \b");
  257.                 Console.Write("=");
  258.                 Thread.Sleep(25);
  259.                 Console.Write("\b \b");
  260.                 Console.Write("#");
  261.             }
  262.             Console.Write("  ..100%  6 Система работает");
  263.  
  264.             Console.SetCursorPosition(width / 2 - 30, 17);
  265.             Console.Write(" Все заработало. Нажмите enter чтобы продолжить");
  266.             Console.ReadLine();
  267.             Console.Clear();
  268.             Console.SetCursorPosition(0, 0);
  269.             int nap = 2;
  270.             int end = 0;
  271.             int miganie1 = 0; //мигание 1-6
  272.             int miganie2 = 0;
  273.             int miganie3 = 0;
  274.             int miganie4 = 0;
  275.             int miganie5 = 0;
  276.             int miganie6 = 0;
  277.  
  278.  
  279.             int problem = 0; //если есть проблема чтобы другие не возникали
  280.             int trigProb = 0;// триггер счет минут
  281.             int minProb = 0; // минут сколько было проблем
  282.             int hours = 9;// начало рабочего дня
  283.             int second = 0;
  284.             int counProb = 0;// считает количество проблем
  285.             int prev = 0;
  286.             int trigvuv = 0;
  287.             Random rnd1 = new Random();//шанс гавна
  288.             Random rnd2 = new Random(); //выбор проблемы
  289.             ConsoleKeyInfo Key;
  290.  
  291.             for (int i = 0; i < 22; i++)
  292.  
  293.             {
  294.  
  295.                 Console.SetCursorPosition(1 + i, 4);
  296.                 Console.ForegroundColor = ConsoleColor.Yellow;
  297.                 Console.Write('#');
  298.                 Console.SetCursorPosition(1 + i, 8);
  299.                 Console.Write('#');
  300.                 Console.ForegroundColor = ConsoleColor.Black;
  301.             }
  302.             for (int i = 0; i < 5; i++)
  303.             {
  304.                 Console.SetCursorPosition(1, 4 + i);
  305.                 Console.ForegroundColor = ConsoleColor.Yellow;
  306.                 Console.Write('#');
  307.                 Console.SetCursorPosition(22, 4 + i);
  308.                 Console.Write('#');
  309.                 Console.ForegroundColor = ConsoleColor.Black;
  310.             }
  311.             while (end < 2)
  312.             {
  313.                 if (trigvuv == 0)//триггер вывода первых экранов
  314.                 {
  315.                     Console.SetCursorPosition(8, 3);
  316.                     Console.WriteLine("Экран 1");
  317.                     Console.WriteLine();
  318.                     for (int i = 0; i < monitor1.GetLength(0); i++)
  319.  
  320.                     {
  321.                         for (int j = 0; j < monitor1.GetLength(1); j++)
  322.                         {
  323.                             Console.SetCursorPosition(1 + j, 4 + i);
  324.                             if (monitor1[i, j] == '~')
  325.                             {
  326.                                 Console.ForegroundColor = ConsoleColor.Blue;
  327.                                 Console.Write(monitor1[i, j]);
  328.                                 Console.ForegroundColor = ConsoleColor.Black;
  329.                             }
  330.                             else
  331.                             {
  332.                                 Console.Write(monitor1[i, j]);
  333.                             }
  334.  
  335.                         }
  336.  
  337.                     }
  338.                     Console.SetCursorPosition(23, 5);
  339.                     Console.Write("=");
  340.                     Console.SetCursorPosition(23, 6);
  341.                     Console.Write("=");
  342.                     Console.SetCursorPosition(22, 0);
  343.  
  344.                     Console.SetCursorPosition(8 + 23, 3);
  345.                     Console.WriteLine("Экран 2");
  346.  
  347.                     for (int i = 0; i < monitor1.GetLength(0); i++)
  348.  
  349.                     {
  350.                         for (int j = 0; j < monitor1.GetLength(1); j++)
  351.                         {
  352.                             Console.SetCursorPosition(24 + j, 4 + i);
  353.                             if (monitor1[i, j] == '~')
  354.                             {
  355.                                 Console.ForegroundColor = ConsoleColor.Blue;
  356.                                 Console.Write(monitor1[i, j]);
  357.                                 Console.ForegroundColor = ConsoleColor.Black;
  358.                             }
  359.                             else
  360.                             {
  361.                                 Console.Write(monitor1[i, j]);
  362.                             }
  363.                         }
  364.  
  365.                     }
  366.                     Console.SetCursorPosition(46, 5);
  367.                     Console.Write("=");
  368.                     Console.SetCursorPosition(46, 6);
  369.                     Console.Write("=");
  370.                     Console.SetCursorPosition(22, 0);
  371.  
  372.                     Console.SetCursorPosition(8 + 23 + 23, 3);
  373.                     Console.WriteLine("Экран 3");
  374.  
  375.                     for (int i = 0; i < monitor1.GetLength(0); i++)
  376.  
  377.                     {
  378.                         for (int j = 0; j < monitor1.GetLength(1); j++)
  379.                         {
  380.                             Console.SetCursorPosition(47 + j, 4 + i);
  381.                             if (monitor1[i, j] == '~')
  382.                             {
  383.                                 Console.ForegroundColor = ConsoleColor.Blue;
  384.                                 Console.Write(monitor1[i, j]);
  385.                                 Console.ForegroundColor = ConsoleColor.Black;
  386.                             }
  387.                             else
  388.                             {
  389.                                 Console.Write(monitor1[i, j]);
  390.                             }
  391.                         }
  392.  
  393.                     }
  394.                     Console.SetCursorPosition(8, 10);
  395.                     Console.WriteLine("Экран 4");
  396.                     for (int i = 0; i < monitor1.GetLength(0); i++)
  397.  
  398.                     {
  399.                         for (int j = 0; j < monitor1.GetLength(1); j++)
  400.                         {
  401.                             Console.SetCursorPosition(1 + j, 11 + i);
  402.                             if (monitor1[i, j] == '~')
  403.                             {
  404.                                 Console.ForegroundColor = ConsoleColor.Blue;
  405.                                 Console.Write(monitor1[i, j]);
  406.                                 Console.ForegroundColor = ConsoleColor.Black;
  407.                             }
  408.                             else
  409.                             {
  410.                                 Console.Write(monitor1[i, j]);
  411.                             }
  412.                         }
  413.  
  414.                     }
  415.                     Console.SetCursorPosition(8 + 23, 10);
  416.                     Console.WriteLine("Экран 5");
  417.                     for (int i = 0; i < monitor1.GetLength(0); i++)
  418.  
  419.                     {
  420.                         for (int j = 0; j < monitor1.GetLength(1); j++)
  421.                         {
  422.                             Console.SetCursorPosition(24 + j, 11 + i);
  423.                             if (monitor1[i, j] == '~')
  424.                             {
  425.                                 Console.ForegroundColor = ConsoleColor.Blue;
  426.                                 Console.Write(monitor1[i, j]);
  427.                                 Console.ForegroundColor = ConsoleColor.Black;
  428.                             }
  429.                             else
  430.                             {
  431.                                 Console.Write(monitor1[i, j]);
  432.                             }
  433.                         }
  434.  
  435.                     }
  436.                     Console.SetCursorPosition(8 + 23 + 23, 10);
  437.                     Console.WriteLine("Экран 6");
  438.                     for (int i = 0; i < monitor1.GetLength(0); i++)
  439.  
  440.                     {
  441.                         for (int j = 0; j < monitor1.GetLength(1); j++)
  442.                         {
  443.                             Console.SetCursorPosition(47 + j, 11 + i);
  444.                             if (monitor1[i, j] == '~')
  445.                             {
  446.                                 Console.ForegroundColor = ConsoleColor.Blue;
  447.                                 Console.Write(monitor1[i, j]);
  448.                                 Console.ForegroundColor = ConsoleColor.Black;
  449.                             }
  450.                             else
  451.                             {
  452.                                 Console.Write(monitor1[i, j]);
  453.                             }
  454.                         }
  455.  
  456.                     }
  457.                     trigvuv = 1;
  458.                 }
  459.  
  460.                 Vudelenie(ref nap, monitor1, ref prev, 1);
  461.  
  462.                 if (rnd1.Next(100) < 10 && problem == 0)// шанс проблемы и проблема не должна быть
  463.                 {
  464.                     int vubor = rnd2.Next(5); //рандом 2
  465.                     if (problem == 0)
  466.                     {
  467.                         switch (vubor)
  468.                         {
  469.                             case 0: //первый экран
  470.  
  471.                                 miganie1 = 1;
  472.                                 problem = 1;
  473.                                 counProb++;
  474.                                 trigProb = 1;
  475.  
  476.                                 break;
  477.                             case 1:// второй экран
  478.                                 miganie2 = 1;
  479.                                 problem = 1;
  480.                                 counProb++;
  481.                                 trigProb = 1;
  482.  
  483.  
  484.  
  485.  
  486.                                 break;
  487.                             case 2:// третий экран
  488.                                 miganie3 = 1;
  489.                                 problem = 1;
  490.                                 counProb++;
  491.                                 trigProb = 1;
  492.                                 break;
  493.                             case 3://четвертый экран
  494.                                 miganie4 = 1;
  495.                                 problem = 1;
  496.                                 counProb++;
  497.                                 trigProb = 1;
  498.                                 break;
  499.                             case 4://пятый
  500.                                 miganie5 = 1;
  501.                                 problem = 1;
  502.                                 counProb++;
  503.                                 trigProb = 1;
  504.                                 break;
  505.                             case 5://шестой
  506.                                 miganie6 = 1;
  507.                                 problem = 1;
  508.                                 counProb++;
  509.                                 trigProb = 1;
  510.                                 break;
  511.                         }
  512.                     }
  513.  
  514.  
  515.                 }
  516.  
  517.  
  518.  
  519.                 if (miganie1 == 1 && problem == 1)
  520.                 {
  521.  
  522.                     for (int i = 1; i < monitor1.GetLength(0) - 1; i++)
  523.  
  524.                     {
  525.                         for (int j = 1; j < monitor1.GetLength(1) - 1; j++)
  526.                         {
  527.                             Console.SetCursorPosition(1 + j, 4 + i);
  528.  
  529.                             Console.ForegroundColor = ConsoleColor.Red;
  530.                             Console.BackgroundColor = ConsoleColor.Red;
  531.                             Console.Write(monitor1[i, j]);
  532.                             Console.ForegroundColor = ConsoleColor.Black;
  533.                             Console.BackgroundColor = ConsoleColor.White;
  534.  
  535.  
  536.                         }
  537.  
  538.                     }
  539.  
  540.                     Console.Beep(699, 150);
  541.                     Thread.Sleep(10);
  542.  
  543.  
  544.  
  545.  
  546.                 }
  547.                 if (miganie2 == 1 && problem == 1)
  548.                 {
  549.  
  550.                     for (int i = 1; i < monitor1.GetLength(0) - 1; i++)
  551.  
  552.                     {
  553.                         for (int j = 1; j < monitor1.GetLength(1) - 1; j++)
  554.                         {
  555.                             Console.SetCursorPosition(24 + j, 4 + i);
  556.  
  557.                             Console.ForegroundColor = ConsoleColor.Red;
  558.                             Console.BackgroundColor = ConsoleColor.Red;
  559.                             Console.Write(monitor1[i, j]);
  560.                             Console.ForegroundColor = ConsoleColor.Black;
  561.                             Console.BackgroundColor = ConsoleColor.White;
  562.  
  563.  
  564.                         }
  565.  
  566.                     }
  567.  
  568.                     Console.Beep(699, 150);
  569.                     Thread.Sleep(10);
  570.  
  571.  
  572.  
  573.  
  574.                 }
  575.                 if (miganie3 == 1 && problem == 1)
  576.                 {
  577.  
  578.                     for (int i = 1; i < monitor1.GetLength(0) - 1; i++)
  579.  
  580.                     {
  581.                         for (int j = 1; j < monitor1.GetLength(1) - 1; j++)
  582.                         {
  583.                             Console.SetCursorPosition(47 + j, 4 + i);
  584.  
  585.                             Console.ForegroundColor = ConsoleColor.Red;
  586.                             Console.BackgroundColor = ConsoleColor.Red;
  587.                             Console.Write(monitor1[i, j]);
  588.                             Console.ForegroundColor = ConsoleColor.Black;
  589.                             Console.BackgroundColor = ConsoleColor.White;
  590.  
  591.  
  592.                         }
  593.  
  594.                     }
  595.  
  596.                     Console.Beep(699, 150);
  597.                     Thread.Sleep(10);
  598.  
  599.  
  600.  
  601.  
  602.                 }
  603.                 if (miganie4 == 1 && problem == 1)
  604.                 {
  605.  
  606.                     for (int i = 1; i < monitor1.GetLength(0) - 1; i++)
  607.  
  608.                     {
  609.                         for (int j = 1; j < monitor1.GetLength(1) - 1; j++)
  610.                         {
  611.                             Console.SetCursorPosition(1 + j, 11 + i);
  612.  
  613.                             Console.ForegroundColor = ConsoleColor.Red;
  614.                             Console.BackgroundColor = ConsoleColor.Red;
  615.                             Console.Write(monitor1[i, j]);
  616.                             Console.ForegroundColor = ConsoleColor.Black;
  617.                             Console.BackgroundColor = ConsoleColor.White;
  618.  
  619.  
  620.                         }
  621.  
  622.                     }
  623.  
  624.                     Console.Beep(699, 150);
  625.                     Thread.Sleep(10);
  626.  
  627.  
  628.  
  629.  
  630.                 }
  631.                 if (miganie5 == 1 && problem == 1)
  632.                 {
  633.  
  634.                     for (int i = 1; i < monitor1.GetLength(0) - 1; i++)
  635.  
  636.                     {
  637.                         for (int j = 1; j < monitor1.GetLength(1) - 1; j++)
  638.                         {
  639.                             Console.SetCursorPosition(24 + j, 11 + i);
  640.  
  641.                             Console.ForegroundColor = ConsoleColor.Red;
  642.                             Console.BackgroundColor = ConsoleColor.Red;
  643.                             Console.Write(monitor1[i, j]);
  644.                             Console.ForegroundColor = ConsoleColor.Black;
  645.                             Console.BackgroundColor = ConsoleColor.White;
  646.  
  647.  
  648.                         }
  649.  
  650.                     }
  651.  
  652.                     Console.Beep(699, 150);
  653.                     Thread.Sleep(10);
  654.  
  655.  
  656.  
  657.  
  658.                 }
  659.                 if (miganie6 == 1 && problem == 1)
  660.                 {
  661.  
  662.                     for (int i = 1; i < monitor1.GetLength(0) - 1; i++)
  663.  
  664.                     {
  665.                         for (int j = 1; j < monitor1.GetLength(1) - 1; j++)
  666.                         {
  667.                             Console.SetCursorPosition(47 + j, 11 + i);
  668.  
  669.                             Console.ForegroundColor = ConsoleColor.Red;
  670.                             Console.BackgroundColor = ConsoleColor.Red;
  671.                             Console.Write(monitor1[i, j]);
  672.                             Console.ForegroundColor = ConsoleColor.Black;
  673.                             Console.BackgroundColor = ConsoleColor.White;
  674.  
  675.  
  676.                         }
  677.  
  678.                     }
  679.  
  680.                     Console.Beep(699, 150);
  681.                     Thread.Sleep(10);
  682.  
  683.  
  684.  
  685.  
  686.                 }
  687.                 if (Console.KeyAvailable)
  688.                 {
  689.                     Key = Console.ReadKey(true);
  690.                     prev = nap;
  691.                     switch (Key.Key)
  692.                     {
  693.                         case ConsoleKey.LeftArrow:
  694.                             nap--;
  695.                             if (nap == 1)
  696.                                 nap = 2;
  697.                             if (nap == 9)
  698.                                 nap = 10;
  699.  
  700.                             break;
  701.                         case ConsoleKey.RightArrow:
  702.                             nap++;
  703.                             if (nap == 5)
  704.                             {
  705.                                 nap = 4;
  706.                             }
  707.                             if (nap == 13)
  708.                             {
  709.                                 nap = 12;
  710.                             }
  711.  
  712.                             break;
  713.                         case ConsoleKey.UpArrow:
  714.                             nap -= 8;
  715.                             if (nap == -6)
  716.                                 nap = 2;
  717.                             if (nap == -5)
  718.                                 nap = 3;
  719.                             if (nap == -4)
  720.                                 nap = 4;
  721.  
  722.  
  723.                             break;
  724.                         case ConsoleKey.DownArrow:
  725.                             nap += 8;
  726.                             if (nap == 18)
  727.                                 nap = 10;
  728.                             if (nap == 19)
  729.                                 nap = 11;
  730.                             if (nap == 20)
  731.                                 nap = 12;
  732.  
  733.                             break;
  734.                         case ConsoleKey.B:
  735.                             Console.Clear();
  736.                             minProb += 5;
  737.                             second += 5;
  738.                             if (miganie1 == 0)
  739.                             {
  740.  
  741.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  742.                                 trigvuv = 0;
  743.                                 Console.WriteLine("Полный бак бетона");
  744.                                 Console.ReadLine();
  745.                                 Console.Clear();
  746.  
  747.                             }
  748.                             if (miganie1 == 1)
  749.                             {
  750.  
  751.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  752.                                 Console.WriteLine("Бетонама заполнили нащальника");
  753.                                 trigvuv = 0;
  754.                                 miganie1 = 0;
  755.                                 trigProb = 0;
  756.                                 problem = 0;
  757.                                 Console.ReadLine();
  758.                                 Console.Clear();
  759.  
  760.                             }
  761.  
  762.  
  763.                             break;
  764.  
  765.                         case ConsoleKey.R:
  766.                             Console.Clear();
  767.                             minProb += 5;
  768.                             second += 5;
  769.                             if (miganie2 == 0)
  770.                             {
  771.  
  772.                                 Console.SetCursorPosition(width / 2 - 18, 10);
  773.                                 trigvuv = 0;
  774.                                 Console.WriteLine("Нечего сбрасывать. Погрузчик работает нормально");
  775.                                 Console.ReadLine();
  776.                                 Console.Clear();
  777.  
  778.                             }
  779.                             if (miganie2 == 1)
  780.                             {
  781.  
  782.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  783.                                 Console.WriteLine("Сброс ошибки прошел успешно");
  784.                                 Thread.Sleep(300);
  785.                                 Console.SetCursorPosition(width / 2 - 15, 11);
  786.                                 Console.WriteLine("Всё заработало");
  787.                                 trigvuv = 0;
  788.                                 miganie2 = 0;
  789.                                 trigProb = 0;
  790.                                 problem = 0;
  791.                                 Console.ReadLine();
  792.                                 Console.Clear();
  793.  
  794.                             }
  795.  
  796.  
  797.                             break;
  798.                         case ConsoleKey.K:
  799.                             minProb += 5;
  800.                             second += 5;
  801.                             Console.Clear();
  802.                             if (miganie3 == 0)
  803.                             {
  804.  
  805.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  806.                                 trigvuv = 0;
  807.                                 Console.WriteLine("Зачем пинать и так работающий механизм?");
  808.                                 Console.ReadLine();
  809.                                 Console.Clear();
  810.  
  811.                             }
  812.                             if (miganie3 == 1)
  813.                             {
  814.  
  815.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  816.                                 Console.WriteLine("ХДЫЩ!");
  817.                                 Thread.Sleep(300);
  818.                                 Console.SetCursorPosition(width / 2 - 15, 11);
  819.                                 Console.WriteLine("Всё заработало");
  820.                                 trigvuv = 0;
  821.                                 miganie3 = 0;
  822.                                 trigProb = 0;
  823.                                 problem = 0;
  824.                                 Console.ReadLine();
  825.                                 Console.Clear();
  826.  
  827.                             }
  828.  
  829.  
  830.                             break;
  831.                         case ConsoleKey.D:
  832.                             minProb += 5;
  833.                             second += 5;
  834.                             Console.Clear();
  835.                             if (miganie4 == 0)
  836.                             {
  837.  
  838.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  839.                                 trigvuv = 0;
  840.                                 Console.WriteLine("Зачем приостанавливать если нет брака?");
  841.                                 Console.ReadLine();
  842.                                 Console.Clear();
  843.  
  844.                             }
  845.                             if (miganie4 == 1)
  846.                             {
  847.  
  848.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  849.                                 Console.WriteLine("Брак сняли");
  850.                                 Thread.Sleep(300);
  851.                                 Console.SetCursorPosition(width / 2 - 15, 11);
  852.                                 Console.WriteLine("Всё заработало");
  853.                                 trigvuv = 0;
  854.                                 miganie4 = 0;
  855.                                 trigProb = 0;
  856.                                 problem = 0;
  857.                                 Console.ReadLine();
  858.                                 Console.Clear();
  859.  
  860.                             }
  861.  
  862.                             break;
  863.  
  864.                         case ConsoleKey.T:
  865.                             minProb += 5;
  866.                             second += 5;
  867.                             Console.Clear();
  868.                             if (miganie5 == 0)
  869.                             {
  870.  
  871.                                 Console.SetCursorPosition(width / 2 - 10, 10);
  872.                                 trigvuv = 0;
  873.                                 Console.WriteLine("Датчики не видят помех");
  874.                                 Console.ReadLine();
  875.                                 Console.Clear();
  876.  
  877.                             }
  878.                             if (miganie5 == 1)
  879.                             {
  880.  
  881.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  882.                                 Console.WriteLine("Убрали упавшую плитку");
  883.                                 Thread.Sleep(300);
  884.                                 Console.SetCursorPosition(width / 2 - 15, 11);
  885.                                 Console.WriteLine("Датчики не видят помех");
  886.                                 trigvuv = 0;
  887.                                 miganie5 = 0;
  888.                                 trigProb = 0;
  889.                                 problem = 0;
  890.                                 Console.ReadLine();
  891.                                 Console.Clear();
  892.  
  893.                             }
  894.  
  895.                             break;
  896.  
  897.                         case ConsoleKey.F:
  898.                             minProb += 5;
  899.                             second += 5;
  900.                             Console.Clear();
  901.                             if (miganie6 == 0)
  902.                             {
  903.  
  904.                                 Console.SetCursorPosition(width / 2 - 10, 10);
  905.                                 trigvuv = 0;
  906.                                 Console.WriteLine("Обмотки полно");
  907.                                 Console.ReadLine();
  908.                                 Console.Clear();
  909.  
  910.                             }
  911.                             if (miganie6 == 1)
  912.                             {
  913.  
  914.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  915.                                 Console.WriteLine("Заправили обмотку");
  916.                                 Thread.Sleep(300);
  917.                                 Console.SetCursorPosition(width / 2 - 15, 11);
  918.                                 Console.WriteLine("Все выполнено");
  919.                                 trigvuv = 0;
  920.                                 miganie6 = 0;
  921.                                 trigProb = 0;
  922.                                 problem = 0;
  923.                                 Console.ReadLine();
  924.                                 Console.Clear();
  925.  
  926.                             }
  927.  
  928.                             break;
  929.  
  930.                         case ConsoleKey.Enter:
  931.  
  932.  
  933.                             Console.Clear();
  934.  
  935.                             if (nap == 2 && miganie1 == 1)
  936.                             {
  937.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  938.                                 Console.Write("Закочнился бетон. Заполните его");
  939.                                 Console.ReadLine();
  940.                                 trigvuv = 0;
  941.                                 Console.Clear();
  942.  
  943.  
  944.  
  945.  
  946.  
  947.                             }
  948.                             if (nap == 2 && miganie1 == 0)
  949.                             {
  950.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  951.                                 Console.Write("Система работает в норме");
  952.                                 Console.ReadLine();
  953.                                 Console.Clear();
  954.                                 trigvuv = 0;
  955.  
  956.  
  957.                             }
  958.                             if (nap == 3 && miganie2 == 1)
  959.                             {
  960.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  961.                                 Console.Write("Ошибка погрузчика. Сбросьте её");
  962.                                 Console.ReadLine();
  963.                                 trigvuv = 0;
  964.                                 Console.Clear();
  965.  
  966.  
  967.  
  968.  
  969.  
  970.                             }
  971.                             if (nap == 3 && miganie2 == 0)
  972.                             {
  973.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  974.                                 Console.Write("Система работает в норме");
  975.                                 Console.ReadLine();
  976.                                 Console.Clear();
  977.                                 trigvuv = 0;
  978.  
  979.  
  980.                             }
  981.                             if (nap == 4 && miganie3 == 1)
  982.                             {
  983.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  984.                                 Console.Write("Хз что, ебаните ногой по компу");
  985.                                 Console.ReadLine();
  986.                                 trigvuv = 0;
  987.                                 Console.Clear();
  988.  
  989.  
  990.  
  991.  
  992.  
  993.                             }
  994.                             if (nap == 4 && miganie3 == 0)
  995.                             {
  996.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  997.                                 Console.Write("Система работает в норме");
  998.                                 Console.ReadLine();
  999.                                 Console.Clear();
  1000.                                 trigvuv = 0;
  1001.  
  1002.  
  1003.                             }
  1004.                             if (nap == 10 && miganie4 == 1)
  1005.                             {
  1006.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  1007.                                 Console.Write("Нашелся брак. Снимите его");
  1008.                                 Console.ReadLine();
  1009.                                 trigvuv = 0;
  1010.                                 Console.Clear();
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.                             }
  1017.                             if (nap == 10 && miganie4 == 0)
  1018.                             {
  1019.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  1020.                                 Console.Write("Система работает в норме");
  1021.                                 Console.ReadLine();
  1022.                                 Console.Clear();
  1023.                                 trigvuv = 0;
  1024.  
  1025.  
  1026.                             }
  1027.                             if (nap == 11 && miganie5 == 1)
  1028.                             {
  1029.                                 Console.SetCursorPosition(width / 2 - 12, 10);
  1030.                                 Console.Write("Упала плитка. Она мешает датчикам, уберите её");
  1031.                                 Console.ReadLine();
  1032.                                 trigvuv = 0;
  1033.                                 Console.Clear();
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.                             }
  1040.                             if (nap == 11 && miganie5 == 0)
  1041.                             {
  1042.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  1043.                                 Console.Write("Закончилась обмотка. Пополните её");
  1044.                                 Console.ReadLine();
  1045.                                 Console.Clear();
  1046.                                 trigvuv = 0;
  1047.  
  1048.  
  1049.                             }
  1050.                             if (nap == 12 && miganie6 == 1)
  1051.                             {
  1052.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  1053.                                 Console.Write("Нашелся брак. Снимите его");
  1054.                                 Console.ReadLine();
  1055.                                 trigvuv = 0;
  1056.                                 Console.Clear();
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.                             }
  1063.                             if (nap == 12 && miganie6 == 0)
  1064.                             {
  1065.                                 Console.SetCursorPosition(width / 2 - 15, 10);
  1066.                                 Console.Write("Система работает в норме");
  1067.                                 Console.ReadLine();
  1068.                                 Console.Clear();
  1069.                                 trigvuv = 0;
  1070.  
  1071.  
  1072.                             }
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.                             break;
  1089.  
  1090.                     }
  1091.                    
  1092.  
  1093.                 }
  1094.  
  1095.  
  1096.  
  1097.                 Vudelenie(ref nap, monitor1, ref prev,0);
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.                 Console.SetCursorPosition(25, 0);
  1104.                 if (second == 60)
  1105.                 {
  1106.  
  1107.  
  1108.                     second = 0;
  1109.                     hours++;
  1110.                 }
  1111.                 if (second > 60)
  1112.                 {
  1113.  
  1114.  
  1115.                     second -= 60;
  1116.                     hours++;
  1117.                 }
  1118.  
  1119.                 if (second < 10)
  1120.                     Console.Write("Время: " + hours + ":0" + second);
  1121.                 if (second > 9)
  1122.                     Console.Write("Время: " + hours + ":" + second);
  1123.                 Console.SetCursorPosition(15, 1);
  1124.                 Console.Write("Проблем: " + counProb + " Время без работы: " + minProb);
  1125.                 second += 2;
  1126.                 if (trigProb == 1)
  1127.                 {
  1128.                     minProb += 2;
  1129.                 }
  1130.                 Console.SetCursorPosition(1, 18);
  1131.                 Console.Write("B(заполнить бетон),R((сбросить ошибку),K((пиздануть)");
  1132.                 Console.SetCursorPosition(1, 20);
  1133.                 Console.Write("D(удалить брак), T(убрать плитку),F(Заполнить обмотку)");
  1134.  
  1135.  
  1136.                 Thread.Sleep(500);
  1137.  
  1138.                 if (hours == 21)
  1139.                     end = 7;
  1140.             }
  1141.             Console.Clear();
  1142.             int ka4 = 0;
  1143.             ka4 = minProb / counProb;
  1144.             if (ka4 > 19)
  1145.             {
  1146.                 Console.SetCursorPosition(width / 2 - 15, 10);
  1147.                 Console.WriteLine("Долго решал проблемы. Минус премия!");
  1148.             }
  1149.             if (ka4 < 20)
  1150.             {
  1151.                 Console.SetCursorPosition(width / 2 - 15, 10);
  1152.                 Console.Write("Молодец, будет двойная премия за этот день");
  1153.             }
  1154.             //сообщение об работе
  1155.         }
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.         static void Vudelenie(ref int nap, char[,] mon, ref int prev,int nt)
  1170.         {
  1171.             if (nap != prev)
  1172.             {
  1173.                 switch (prev)
  1174.                 {
  1175.                     case 2:
  1176.                         for (int i = 0; i < mon.GetLength(0); i++)
  1177.  
  1178.                         {
  1179.                             for (int j = 0; j < mon.GetLength(1); j++)
  1180.                             {
  1181.                                 Console.SetCursorPosition(1 + j, 4 + i);
  1182.                                 if (mon[i, j] == '#')
  1183.                                 {
  1184.                                     Console.ForegroundColor = ConsoleColor.Black;
  1185.                                     Console.Write(mon[i, j]);
  1186.  
  1187.                                 }
  1188.  
  1189.                             }
  1190.  
  1191.                         }
  1192.  
  1193.                         break;
  1194.                     case 3:
  1195.                         for (int i = 0; i < mon.GetLength(0); i++)
  1196.  
  1197.                         {
  1198.                             for (int j = 0; j < mon.GetLength(1); j++)
  1199.                             {
  1200.                                 Console.SetCursorPosition(24 + j, 4 + i);
  1201.                                 if (mon[i, j] == '#')
  1202.                                 {
  1203.                                     Console.ForegroundColor = ConsoleColor.Black;
  1204.                                     Console.Write(mon[i, j]);
  1205.                                     Console.ForegroundColor = ConsoleColor.Black;
  1206.                                 }
  1207.  
  1208.                             }
  1209.  
  1210.                         }
  1211.                         break;
  1212.                     case 4:
  1213.                         for (int i = 0; i < mon.GetLength(0); i++)
  1214.  
  1215.                         {
  1216.                             for (int j = 0; j < mon.GetLength(1); j++)
  1217.                             {
  1218.                                 Console.SetCursorPosition(47 + j, 4 + i);
  1219.                                 if (mon[i, j] == '#')
  1220.                                 {
  1221.                                     Console.ForegroundColor = ConsoleColor.Black;
  1222.                                     Console.Write(mon[i, j]);
  1223.                                     Console.ForegroundColor = ConsoleColor.Black;
  1224.                                 }
  1225.  
  1226.                             }
  1227.  
  1228.                         }
  1229.                         break;
  1230.                     case 10:
  1231.                         for (int i = 0; i < mon.GetLength(0); i++)
  1232.  
  1233.                         {
  1234.                             for (int j = 0; j < mon.GetLength(1); j++)
  1235.                             {
  1236.                                 Console.SetCursorPosition(1 + j, 11 + i);
  1237.                                 if (mon[i, j] == '#')
  1238.                                 {
  1239.                                     Console.ForegroundColor = ConsoleColor.Black;
  1240.                                     Console.Write(mon[i, j]);
  1241.                                     Console.ForegroundColor = ConsoleColor.Black;
  1242.                                 }
  1243.  
  1244.                             }
  1245.  
  1246.                         }
  1247.                         break;
  1248.                     case 11:
  1249.                         for (int i = 0; i < mon.GetLength(0); i++)
  1250.  
  1251.                         {
  1252.                             for (int j = 0; j < mon.GetLength(1); j++)
  1253.                             {
  1254.                                 Console.SetCursorPosition(24 + j, 11 + i);
  1255.                                 if (mon[i, j] == '#')
  1256.                                 {
  1257.                                     Console.ForegroundColor = ConsoleColor.Black;
  1258.                                     Console.Write(mon[i, j]);
  1259.                                     Console.ForegroundColor = ConsoleColor.Black;
  1260.                                 }
  1261.  
  1262.                             }
  1263.  
  1264.                         }
  1265.                         break;
  1266.                     case 12:
  1267.                         for (int i = 0; i < mon.GetLength(0); i++)
  1268.  
  1269.                         {
  1270.                             for (int j = 0; j < mon.GetLength(1); j++)
  1271.                             {
  1272.                                 Console.SetCursorPosition(47 + j, 11 + i);
  1273.                                 if (mon[i, j] == '#')
  1274.                                 {
  1275.                                     Console.ForegroundColor = ConsoleColor.Black;
  1276.                                     Console.Write(mon[i, j]);
  1277.                                     Console.ForegroundColor = ConsoleColor.Black;
  1278.                                 }
  1279.  
  1280.                             }
  1281.  
  1282.                         }
  1283.                         break;
  1284.                 }
  1285.                 switch (nap)
  1286.                 {
  1287.                     case 2:
  1288.                         for (int i = 0; i < 22; i++)
  1289.  
  1290.                         {
  1291.  
  1292.                             Console.SetCursorPosition(1 + i, 4);
  1293.                             Console.ForegroundColor = ConsoleColor.Yellow;
  1294.                             Console.Write('#');
  1295.                             Console.SetCursorPosition(1 + i, 8);
  1296.                             Console.Write('#');
  1297.                             Console.ForegroundColor = ConsoleColor.Black;
  1298.                         }
  1299.                         for (int i = 0; i < 5; i++)
  1300.                         {
  1301.                             Console.SetCursorPosition(1, 4 + i);
  1302.                             Console.ForegroundColor = ConsoleColor.Yellow;
  1303.                             Console.Write('#');
  1304.                             Console.SetCursorPosition(22, 4 + i);
  1305.                             Console.Write('#');
  1306.                             Console.ForegroundColor = ConsoleColor.Black;
  1307.                         }
  1308.  
  1309.                         break;
  1310.                     case 3:
  1311.                         for (int i = 0; i < mon.GetLength(0); i++)
  1312.  
  1313.                         {
  1314.                             for (int j = 0; j < mon.GetLength(1); j++)
  1315.                             {
  1316.                                 Console.SetCursorPosition(24 + j, 4 + i);
  1317.                                 if (mon[i, j] == '#')
  1318.                                 {
  1319.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1320.                                     Console.Write(mon[i, j]);
  1321.                                     Console.ForegroundColor = ConsoleColor.Black;
  1322.                                 }
  1323.  
  1324.                             }
  1325.  
  1326.                         }
  1327.                         break;
  1328.                     case 4:
  1329.                         for (int i = 0; i < mon.GetLength(0); i++)
  1330.  
  1331.                         {
  1332.                             for (int j = 0; j < mon.GetLength(1); j++)
  1333.                             {
  1334.                                 Console.SetCursorPosition(47 + j, 4 + i);
  1335.                                 if (mon[i, j] == '#')
  1336.                                 {
  1337.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1338.                                     Console.Write(mon[i, j]);
  1339.                                     Console.ForegroundColor = ConsoleColor.Black;
  1340.                                 }
  1341.  
  1342.                             }
  1343.  
  1344.                         }
  1345.                         break;
  1346.                     case 10:
  1347.                         for (int i = 0; i < mon.GetLength(0); i++)
  1348.  
  1349.                         {
  1350.                             for (int j = 0; j < mon.GetLength(1); j++)
  1351.                             {
  1352.                                 Console.SetCursorPosition(1 + j, 11 + i);
  1353.                                 if (mon[i, j] == '#')
  1354.                                 {
  1355.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1356.                                     Console.Write(mon[i, j]);
  1357.                                     Console.ForegroundColor = ConsoleColor.Black;
  1358.                                 }
  1359.  
  1360.                             }
  1361.  
  1362.                         }
  1363.                         break;
  1364.                     case 11:
  1365.                         for (int i = 0; i < mon.GetLength(0); i++)
  1366.  
  1367.                         {
  1368.                             for (int j = 0; j < mon.GetLength(1); j++)
  1369.                             {
  1370.                                 Console.SetCursorPosition(24 + j, 11 + i);
  1371.                                 if (mon[i, j] == '#')
  1372.                                 {
  1373.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1374.                                     Console.Write(mon[i, j]);
  1375.                                     Console.ForegroundColor = ConsoleColor.Black;
  1376.                                 }
  1377.  
  1378.                             }
  1379.  
  1380.                         }
  1381.                         break;
  1382.                     case 12:
  1383.                         for (int i = 0; i < mon.GetLength(0); i++)
  1384.  
  1385.                         {
  1386.                             for (int j = 0; j < mon.GetLength(1); j++)
  1387.                             {
  1388.                                 Console.SetCursorPosition(47 + j, 11 + i);
  1389.                                 if (mon[i, j] == '#')
  1390.                                 {
  1391.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1392.                                     Console.Write(mon[i, j]);
  1393.                                     Console.ForegroundColor = ConsoleColor.Black;
  1394.                                 }
  1395.  
  1396.                             }
  1397.  
  1398.                         }
  1399.                         break;
  1400.                 }
  1401.             }
  1402.             if (nt==1)
  1403.             {
  1404.                 switch (nap)
  1405.                 {
  1406.                     case 2:
  1407.                         for (int i = 0; i < 22; i++)
  1408.  
  1409.                         {
  1410.  
  1411.                             Console.SetCursorPosition(1 + i, 4);
  1412.                             Console.ForegroundColor = ConsoleColor.Yellow;
  1413.                             Console.Write('#');
  1414.                             Console.SetCursorPosition(1 + i, 8);
  1415.                             Console.Write('#');
  1416.                             Console.ForegroundColor = ConsoleColor.Black;
  1417.                         }
  1418.                         for (int i = 0; i < 5; i++)
  1419.                         {
  1420.                             Console.SetCursorPosition(1, 4 + i);
  1421.                             Console.ForegroundColor = ConsoleColor.Yellow;
  1422.                             Console.Write('#');
  1423.                             Console.SetCursorPosition(22, 4 + i);
  1424.                             Console.Write('#');
  1425.                             Console.ForegroundColor = ConsoleColor.Black;
  1426.                         }
  1427.  
  1428.                         break;
  1429.                     case 3:
  1430.                         for (int i = 0; i < mon.GetLength(0); i++)
  1431.  
  1432.                         {
  1433.                             for (int j = 0; j < mon.GetLength(1); j++)
  1434.                             {
  1435.                                 Console.SetCursorPosition(24 + j, 4 + i);
  1436.                                 if (mon[i, j] == '#')
  1437.                                 {
  1438.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1439.                                     Console.Write(mon[i, j]);
  1440.                                     Console.ForegroundColor = ConsoleColor.Black;
  1441.                                 }
  1442.  
  1443.                             }
  1444.  
  1445.                         }
  1446.                         break;
  1447.                     case 4:
  1448.                         for (int i = 0; i < mon.GetLength(0); i++)
  1449.  
  1450.                         {
  1451.                             for (int j = 0; j < mon.GetLength(1); j++)
  1452.                             {
  1453.                                 Console.SetCursorPosition(47 + j, 4 + i);
  1454.                                 if (mon[i, j] == '#')
  1455.                                 {
  1456.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1457.                                     Console.Write(mon[i, j]);
  1458.                                     Console.ForegroundColor = ConsoleColor.Black;
  1459.                                 }
  1460.  
  1461.                             }
  1462.  
  1463.                         }
  1464.                         break;
  1465.                     case 10:
  1466.                         for (int i = 0; i < mon.GetLength(0); i++)
  1467.  
  1468.                         {
  1469.                             for (int j = 0; j < mon.GetLength(1); j++)
  1470.                             {
  1471.                                 Console.SetCursorPosition(1 + j, 11 + i);
  1472.                                 if (mon[i, j] == '#')
  1473.                                 {
  1474.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1475.                                     Console.Write(mon[i, j]);
  1476.                                     Console.ForegroundColor = ConsoleColor.Black;
  1477.                                 }
  1478.  
  1479.                             }
  1480.  
  1481.                         }
  1482.                         break;
  1483.                     case 11:
  1484.                         for (int i = 0; i < mon.GetLength(0); i++)
  1485.  
  1486.                         {
  1487.                             for (int j = 0; j < mon.GetLength(1); j++)
  1488.                             {
  1489.                                 Console.SetCursorPosition(24 + j, 11 + i);
  1490.                                 if (mon[i, j] == '#')
  1491.                                 {
  1492.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1493.                                     Console.Write(mon[i, j]);
  1494.                                     Console.ForegroundColor = ConsoleColor.Black;
  1495.                                 }
  1496.  
  1497.                             }
  1498.  
  1499.                         }
  1500.                         break;
  1501.                     case 12:
  1502.                         for (int i = 0; i < mon.GetLength(0); i++)
  1503.  
  1504.                         {
  1505.                             for (int j = 0; j < mon.GetLength(1); j++)
  1506.                             {
  1507.                                 Console.SetCursorPosition(47 + j, 11 + i);
  1508.                                 if (mon[i, j] == '#')
  1509.                                 {
  1510.                                     Console.ForegroundColor = ConsoleColor.Yellow;
  1511.                                     Console.Write(mon[i, j]);
  1512.                                     Console.ForegroundColor = ConsoleColor.Black;
  1513.                                 }
  1514.  
  1515.                             }
  1516.  
  1517.                         }
  1518.                         break;
  1519.                 }
  1520.             }
  1521.  
  1522.         }
  1523.  
  1524.  
  1525.         static void vuvodmonitor(ref char[,] monitor1)
  1526.         {
  1527.             Console.SetCursorPosition(8, 3);
  1528.             Console.WriteLine("Экран 1");
  1529.             Console.WriteLine();
  1530.             for (int i = 0; i < monitor1.GetLength(0); i++)
  1531.  
  1532.             {
  1533.                 for (int j = 0; j < monitor1.GetLength(1); j++)
  1534.                 {
  1535.                     Console.SetCursorPosition(1 + j, 4 + i);
  1536.                     Console.Write(monitor1[i, j]);
  1537.                 }
  1538.  
  1539.             }
  1540.             Console.SetCursorPosition(23, 5);
  1541.             Console.Write("=");
  1542.             Console.SetCursorPosition(23, 6);
  1543.             Console.Write("=");
  1544.             Console.SetCursorPosition(22, 0);
  1545.  
  1546.             Console.SetCursorPosition(8 + 23, 3);
  1547.             Console.WriteLine("Экран 2");
  1548.  
  1549.             for (int i = 0; i < monitor1.GetLength(0); i++)
  1550.  
  1551.             {
  1552.                 for (int j = 0; j < monitor1.GetLength(1); j++)
  1553.                 {
  1554.                     Console.SetCursorPosition(24 + j, 4 + i);
  1555.                     if (monitor1[i, j] == '~')
  1556.                     {
  1557.                         Console.ForegroundColor = ConsoleColor.Blue;
  1558.                         Console.Write(monitor1[i, j]);
  1559.                         Console.ForegroundColor = ConsoleColor.Black;
  1560.                     }
  1561.                     else
  1562.                     {
  1563.                         Console.Write(monitor1[i, j]);
  1564.                     }
  1565.                 }
  1566.  
  1567.             }
  1568.             Console.SetCursorPosition(46, 5);
  1569.             Console.Write("=");
  1570.             Console.SetCursorPosition(46, 6);
  1571.             Console.Write("=");
  1572.             Console.SetCursorPosition(22, 0);
  1573.  
  1574.             Console.SetCursorPosition(8 + 23 + 23, 3);
  1575.             Console.WriteLine("Экран 3");
  1576.  
  1577.             for (int i = 0; i < monitor1.GetLength(0); i++)
  1578.  
  1579.             {
  1580.                 for (int j = 0; j < monitor1.GetLength(1); j++)
  1581.                 {
  1582.                     Console.SetCursorPosition(47 + j, 4 + i);
  1583.                     Console.Write(monitor1[i, j]);
  1584.                 }
  1585.  
  1586.             }
  1587.             Console.SetCursorPosition(8, 10);
  1588.             Console.WriteLine("Экран 4");
  1589.             for (int i = 0; i < monitor1.GetLength(0); i++)
  1590.  
  1591.             {
  1592.                 for (int j = 0; j < monitor1.GetLength(1); j++)
  1593.                 {
  1594.                     Console.SetCursorPosition(1 + j, 11 + i);
  1595.                     Console.Write(monitor1[i, j]);
  1596.                 }
  1597.  
  1598.             }
  1599.             Console.SetCursorPosition(8 + 23, 10);
  1600.             Console.WriteLine("Экран 5");
  1601.             for (int i = 0; i < monitor1.GetLength(0); i++)
  1602.  
  1603.             {
  1604.                 for (int j = 0; j < monitor1.GetLength(1); j++)
  1605.                 {
  1606.                     Console.SetCursorPosition(24 + j, 11 + i);
  1607.                     Console.Write(monitor1[i, j]);
  1608.                 }
  1609.  
  1610.             }
  1611.             Console.SetCursorPosition(8 + 23 + 23, 10);
  1612.             Console.WriteLine("Экран 6");
  1613.             for (int i = 0; i < monitor1.GetLength(0); i++)
  1614.  
  1615.             {
  1616.                 for (int j = 0; j < monitor1.GetLength(1); j++)
  1617.                 {
  1618.                     Console.SetCursorPosition(47 + j, 11 + i);
  1619.                     Console.Write(monitor1[i, j]);
  1620.                 }
  1621.  
  1622.             }
  1623.         }
  1624.  
  1625.  
  1626.         static void sozdaniemonitor(out char[,] mon, string sre)
  1627.         {
  1628.             string[] NewFile = File.ReadAllLines(sre);
  1629.             mon = new char[NewFile.Length, NewFile[1].Length];
  1630.             for (int i = 0; i < mon.GetLength(0); i++)
  1631.  
  1632.             {
  1633.                 for (int j = 0; j < mon.GetLength(1); j++)
  1634.                 {
  1635.                     mon[i, j] = NewFile[i][j];
  1636.  
  1637.                 }
  1638.  
  1639.             }
  1640.  
  1641.  
  1642.  
  1643.         }
  1644.  
  1645.     }
  1646. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement