static void Main(string[] args) { Console.WriteLine("P2TZX - Command line ZX80\\ZX81 .O, .P to .TZX file conversion tool"); Console.WriteLine("(C) Brendan Alford 2016 ([email protected])\n"); bool debug = System.Diagnostics.Debugger.IsAttached; if (args.Length == 0 && !debug) { DisplayUsage(); return; } string fileName = debug ? "romcheck.tzx" : ParseCommandLine(args); IConverter converter = new TZXConverter(); try { if (batchConv) { string[] files; files = Directory.GetFiles(Directory.GetCurrentDirectory(), fileName, doSubdirs ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly); foreach (string file in files) { converter.Convert(file); } } else { converter.Convert(fileName); } } catch (Exception e) { Console.WriteLine("ERROR: " + e.Message); } }
static void Main(string[] args) { Console.WriteLine("P2TZX - Command line ZX80\\ZX81 .O, .P to .TZX file conversion tool"); Console.WriteLine("(C) Brendan Alford 2016 ([email protected])\n"); bool debug = System.Diagnostics.Debugger.IsAttached; if (args.Length == 0 && !debug) { DisplayUsage(); return; } string fileName = debug ? "crash.p" : ParseCommandLine(args); IConverter converter = new TZXConverter(); try { if (batchConv) { string[] files; files = Directory.GetFiles(Directory.GetCurrentDirectory(), fileName, doSubdirs ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly); foreach (string file in files) { converter.Convert(file); } } else { converter.Convert(fileName); } } catch (Exception e) { Console.WriteLine("ERROR: " + e.Message); } }