using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication2 { class Menu { public static void DisplayMenu() { Console.Clear(); Console.WriteLine("Lovely manager(WARNING VERY VERY ALPHA)"); Console.WriteLine("=================================================="); Console.WriteLine("= 1. Show Media Drives ="); Console.WriteLine("= 2. Show Logs ="); Console.WriteLine("= 3. Copy data ="); Console.WriteLine("= 4. Test Network crap ="); Console.WriteLine("= ="); Console.WriteLine("= ="); Console.WriteLine("= ="); Console.WriteLine("= ="); Console.WriteLine("= ="); Console.WriteLine("= d. Display config params (testing) ="); Console.WriteLine("= q. Quit ="); Console.WriteLine("=================================================="); Drives.DisplayDriveInfo(); Console.Write("Enter option here: "); ParseMenu(Console.Read()); } public static void ParseMenu(int x) { char ch; ch = Convert.ToChar(x); switch (ch) { case '1': Drives.ShowMediaDrives(); break; case '2': //TODO ADD BETTER LOGGING FUNCTION break; case '3': Files.CopyData(Config.config[1], Config.config[0], true); break; case '4': TCPServer.Listen(); break; case 'q': Program.networking.Abort(); Program.running = !Program.running; break; case 'd': Console.WriteLine(); foreach (string a in Config.config) { Console.WriteLine(a); } Console.WriteLine("Press any key to continue"); Console.ReadKey(); break; } } } }