Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool isWorking = true;
- ShowMain();
- while (isWorking)
- {
- ConsoleKeyInfo cki;
- if (Console.KeyAvailable)
- {
- cki = Console.ReadKey();
- switch (cki.Key)
- {
- case ConsoleKey.LeftArrow:
- Console.Clear();
- ShowMain();
- break;
- default:
- break;
- }
- }
- string password = "";
- WriteColored("\nВведите пароль: ");
- string userInput = "";
- bool isContinue = true;
- while (isContinue)
- {
- ConsoleKeyInfo condoleKeyInfo = Console.ReadKey(true);
- switch (condoleKeyInfo.Key)
- {
- case ConsoleKey.Enter:
- if (userInput == password)
- {
- WriteColored("\nВерный пароль)", ConsoleColor.Green);
- isContinue = false;
- isWorking = false;
- }
- else
- {
- WriteColored("\nТы кто такой? Не знаешь пароль, так и не пытайся вводить", ConsoleColor.Red);
- userInput = "";
- isContinue = false;
- }
- break;
- default:
- WriteColored("*", ConsoleColor.Green);
- userInput += Convert.ToString(condoleKeyInfo.Key);
- break;
- }
- }
- }
- bool isFap = true;
- while (isFap)
- {
- WriteColored("\nМеню:");
- string userInput = Console.ReadLine();
- switch (userInput)
- {
- case "1":
- string url = "";
- OpenLink(url);
- break;
- case "2":
- url = "";
- OpenLink(url);
- break;
- case "3":
- List<string> links = new List<string>();
- for (int i = 0; i < links.Count; i++)
- {
- OpenLink(links[i]);
- }
- break;
- case "4":
- isFap = false;
- break;
- }
- }
- }
- public static void OpenLink(string url)
- {
- url = url.Replace("&", "^&");
- Process.Start(new ProcessStartInfo("cmd", $"/c start {url}") { CreateNoWindow = true });
- }
- public static void ShowMain()
- {
- Random random = new Random();
- List<ConsoleColor> colors = new List<ConsoleColor>() { ConsoleColor.Red, ConsoleColor.Green, ConsoleColor.Cyan, ConsoleColor.Blue, ConsoleColor.DarkRed };
- List<string> text = new List<string>() {
- " _____ ___ _ ",
- " |_ _| ___ _ __ / __| ___ __ _ _ ___ | |_ ",
- " | | / _ \\ | '_ \\ \\__ \\ / -_) / _| | '_| / -_) | _|",
- " |_| \\___/ | .__/ |___/ \\___| \\__| |_| \\___| \\__|",
- " |_| "};
- for (int i = 0; i < text.Count; i++)
- {
- ConsoleColor variantColor = colors[random.Next(0, colors.Count)];
- int indexColor = random.Next(0, 5);
- WriteColored($"\n{text[i]}",variantColor);
- }
- }
- public static void WriteColored(string text, ConsoleColor color = ConsoleColor.Yellow)
- {
- Console.ForegroundColor = color;
- Console.Write(text);
- Console.ResetColor();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment