Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.62 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6.  
  7. namespace ConsoleApplication2
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.ForegroundColor = ConsoleColor.DarkGreen;
  14.             MainMenu();
  15.         }
  16.         static void MainMenu()
  17.         {
  18.             Logo("Please enter command.");
  19.             Console.WriteLine("> Access system information");
  20.             N();
  21.             Console.WriteLine("> Access user information");
  22.             N();
  23.             Console.WriteLine("> Quit");
  24.             N(); N(); N(); N(); N(); N(); N(); N();
  25.             Console.Write("> ");
  26.             string MainInput = Console.ReadLine();
  27.             if (MainInput == "Access system information")
  28.             {
  29.                 MenuSystem();
  30.             }
  31.             else if (MainInput == "Access user information")
  32.             {
  33.                 MenuUser();
  34.             }
  35.             else if (MainInput == "Quit")
  36.             {
  37.             }
  38.             else
  39.             {
  40.                 Console.Clear();
  41.                 MainMenu();
  42.             }
  43.         }
  44.         static void MenuSystem()
  45.         {
  46.             Logo("Please enter command.");
  47.             Console.ForegroundColor = ConsoleColor.Green;
  48.             Console.WriteLine("Robco Industries Unified OS");
  49.             Console.WriteLine("Version 4 build 4.02.682.101");
  50.             Console.WriteLine("Robco Dentium Processing Unit 70175 @ 24 MHZ");
  51.             Console.WriteLine("8 MB Allocated RAM, 3MB Available");
  52.             Console.BackgroundColor = ConsoleColor.Red;
  53.             Console.ForegroundColor = ConsoleColor.White;
  54.             WriteFullLine("**ERROR!**");
  55.             WriteFullLine("CANNOT FIND ACCEPTABLE STORAGE MEDIUM, PLEASE CONTACT YOUR LOCAL ADMINISTRATOR!");
  56.             Console.ResetColor();
  57.             Console.ForegroundColor = ConsoleColor.Green;
  58.             Console.WriteLine("Currently connected to: RobcoServer 8.2");
  59.             N(); N();
  60.             Console.ForegroundColor = ConsoleColor.DarkGreen;
  61.             Console.WriteLine("> Initiate system purge");
  62.             N();
  63.             Console.WriteLine("> Back");
  64.             N();
  65.             N();
  66.             Console.Write("> ");
  67.             string SystemInput = Console.ReadLine();
  68.             if (SystemInput == "Initiate system purge")
  69.             {
  70.                 SystemPurge();
  71.             }
  72.             else if (SystemInput == "Back")
  73.             {
  74.                 MainMenu();
  75.             }
  76.             else
  77.             {
  78.                 MenuSystem();
  79.             }
  80.         }
  81.         static void SystemPurge()
  82.         {
  83.             Logo("");
  84.             Console.Write("Commencing system purge");
  85.             Wait(".", 1, 5);
  86.             N();
  87.             Console.Write("Flashing system files");
  88.             Wait(".", 1, 5);
  89.             N();
  90.         }
  91.         static void MenuUser()
  92.         {
  93.             Logo("Please enter command.");
  94.         }
  95.         static void WriteFullLine(string value)
  96.         {
  97.             // Color entire line
  98.             Console.WriteLine(value.PadRight(Console.WindowWidth - 1));
  99.         }
  100.         static void Logo(string warning)
  101.         {
  102.             Console.Clear();
  103.             // Logo output
  104.             WriteFullLine("╔═════════════════════════════════════════════════════════════════════════════╗");
  105.             WriteFullLine("║                 ROBCO INDUSTRIES UNIFIED OPERATING SYSTEM                   ║");
  106.             WriteFullLine("║                   COPYRIGHT 2075-2077 ROBCO. INDUSTRIES                     ║");
  107.             WriteFullLine("║                                -VERSION 4-                                  ║");
  108.             WriteFullLine("╚═════════════════════════════════════════════════════════════════════════════╝");
  109.             Console.WriteLine(warning);
  110.             N();
  111.             N();
  112.         }
  113.         static void N()
  114.         {
  115.             Console.WriteLine();
  116.         }
  117.         static void Wait(string text, int delay, int repeat)
  118.         {
  119.             TimeSpan interval = new TimeSpan(0, 0, delay);
  120.  
  121.             for (int i = 0; i < repeat; i++)
  122.             {
  123.                 Console.Write(text);
  124.                 Thread.Sleep(interval);
  125.             }
  126.         }
  127.  
  128.  
  129.  
  130.     }
  131. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement