Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CSLight
- {
- class Menu
- {
- static void Main(string[] args)
- {
- int menuNum;
- string userName;
- Console.WriteLine("ДОБРО ПОЖАЛОВАТЬ В КОНСОЛЬ");
- Console.WriteLine("");
- Console.WriteLine("Для выхода нажмите \"ESC\"");
- do
- {
- Console.WriteLine("");
- Console.WriteLine("МЕНЮ");
- Console.WriteLine("");
- Console.WriteLine("1. Знакомство \n2. Сменить цвет фона \n3. Сменить цвет шрифта \n4. Сброс настроек \n5. ЛУЧШЕ НЕ НАЖИМАТЬ...");
- Console.WriteLine("");
- Console.Write("Что ты выберешь? ");
- menuNum = Convert.ToInt32(Console.ReadLine());
- switch (menuNum)
- {
- case 1:
- Console.Clear();
- Console.WriteLine("");
- Console.WriteLine("Ну давай знакомиться! Я Конси, а как зовут тебя?");
- Console.WriteLine("");
- userName = Console.ReadLine();
- Console.WriteLine("");
- Console.WriteLine("Приятно познакомиться " + userName + "!");
- Console.WriteLine("");
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- break;
- case 2:
- Console.Clear();
- Console.WriteLine("1. Красный \n2. Синий \n3. Зеленый");
- Console.WriteLine("");
- Console.Write("Какой цвет тебе по душе? ");
- int colorBgNum = Convert.ToInt32(Console.ReadLine());
- if (colorBgNum == 1)
- {
- Console.BackgroundColor = ConsoleColor.Red;
- Console.Clear();
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- }
- else if (colorBgNum == 2)
- {
- Console.BackgroundColor = ConsoleColor.Blue;
- Console.Clear();
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- }
- else if (colorBgNum == 3)
- {
- Console.BackgroundColor = ConsoleColor.DarkGreen;
- Console.Clear();
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- }
- break;
- case 3:
- Console.Clear();
- Console.WriteLine("1. Голубой \n2. Желтый \n3. Розовый");
- Console.WriteLine("");
- Console.Write("Какой цвет шрифта ты предпочитаешь? ");
- int colorFgNum = Convert.ToInt32(Console.ReadLine());
- if (colorFgNum == 1)
- {
- Console.ForegroundColor = ConsoleColor.DarkCyan;
- Console.Clear();
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- }
- else if (colorFgNum == 2)
- {
- Console.ForegroundColor = ConsoleColor.DarkYellow;
- Console.Clear();
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- }
- else if (colorFgNum == 3)
- {
- Console.ForegroundColor = ConsoleColor.Magenta;
- Console.Clear();
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- }
- break;
- case 4:
- Console.Clear();
- Console.ResetColor();
- Console.Clear();
- Console.WriteLine("Настройки выставлены по умолчанию!");
- Console.WriteLine("");
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- break;
- case 5:
- Console.Clear();
- Console.WriteLine("С ВАШЕЙ КАРТЫ СПИСАНЫ ВСЕ ДЕНЕЖНЫЕ СРЕДСТВА! СПАСИБО!");
- Console.WriteLine("");
- Console.WriteLine("Для возврата в меню нажмите \"ENTER\" \nДля выхода нажмите \"ESC\"");
- break;
- }
- } while (Console.ReadKey(true).Key != ConsoleKey.Escape);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment