/// <summary> /// Resets the array making process /// </summary> void Restart() { Console.WriteLine("Press c to reset array process, or any other key to abort reset"); ConsoleKeyInfo c = Console.ReadKey(true); if (c.KeyChar == 'c') { array = new FileArray(); Console.WriteLine("Reset the array..."); ListFiles(); } else { Console.WriteLine("returning..."); } }
public void OpenMergerConsole() { InitializeFileList(); // initialising files //the actual console ListFiles(); array = new FileArray(); Console.WriteLine("Starting filemerger..."); while (true) { Console.WriteLine("\"h\" for Help, \"r\" to restart merger process, \"a\" add files to array, \"i\" for info about the array" + "\n" + "\"s\" to save files, \"e\" to exit the filemerger."); ConsoleKeyInfo c = Console.ReadKey(true); if (c.KeyChar == 'h') { Help(); } if (c.KeyChar == 'r') { Restart(); } if (c.KeyChar == 'a') { AddFile(); } if (c.KeyChar == 'i') { Info(); } if (c.KeyChar == 's') { Save(); } if (c.KeyChar == 'e') { break; } } }