public static void Choice() { int caseSwitch; string input; while (true) { GUI.MenuGui(); input = Console.ReadLine(); if (input == "1" || input == "2" || input == "3" || input == "4" || input == "5" || input == "6") { caseSwitch = int.Parse(input); } else { caseSwitch = 0; } switch (caseSwitch) { case 1: ShowList(); return; case 2: AddVinyl(); return; case 3: EditList(); return; case 4: RemoveVinyl(); return; case 5: ImportFiles.FileChoice(); return; case 6: GUI.ByeByeGui(); Program.Timer(1.5); Environment.Exit(0); return; default: Console.WriteLine("Vänlligen skriv in ett giltigt val 1,2,3 eller 4!"); Program.Timer(1); Console.Clear(); break; } } }
static void Main(string[] args) { ImportFiles.PathCreator(); GUI.StartGui(); ImportFiles.FileChoice(); }