private static void AMLXCompress(string sourceAMLFile = "") { string target, newFile; bool AnotherFile; List <string> FilesToAdd = new List <string>(); PrintHelper.DeCompressor_Choosage(true); if (String.IsNullOrEmpty(sourceAMLFile)) { PrintHelper.printCentredLine("What is your Input AML-File?\n\n"); sourceAMLFile = PrintHelper.GetFile("AML-File", "*.AML"); } // User Aborted Compress if (String.IsNullOrEmpty(sourceAMLFile)) { return; } PrintHelper.printCentredLine("Do you want to add another File?(Yes/No)\n\n"); AnotherFile = Console.ReadLine().ToUpper() == "YES"; while (AnotherFile) { newFile = PrintHelper.GetFile(); if (!String.IsNullOrEmpty(newFile)) { if (FilesToAdd.Contains(newFile) || newFile == sourceAMLFile) { PrintHelper.printCentredLine("You already added this File"); } else { FilesToAdd.Add(newFile); } PrintHelper.printCentredLine("Do you want to add more Files?(Yes/No)\n\n"); AnotherFile = Console.ReadLine().ToUpper() == "YES"; } else { break; } } PrintHelper.printCentredLine("Where do you want to save the Output?\n\n\n"); target = PrintHelper.GetDirectory(); if (String.IsNullOrEmpty(target)) { return; } DeCompressor.Compress(sourceAMLFile, target, FilesToAdd); }
private static void AMLXDeCompress() { string src, target; PrintHelper.DeCompressor_Choosage(false); PrintHelper.printCentredLine("What is your Input?\n\n"); src = PrintHelper.GetFile("AMLX-File", "*.AMLX"); if (String.IsNullOrEmpty(src) || (Path.GetExtension(src).ToUpper() != ".AMLX")) { return; } PrintHelper.printCentredLine("Where do you want to save the Output?\n\n"); target = PrintHelper.GetDirectory(); if (String.IsNullOrEmpty(target)) { return; } DeCompressor.DeCompress(src, target); }