Beispiel #1
0
        private static void exportFile(StringBuilder file, fileSelectionName fileName)
        {
            string exportFile = Path.Combine(Directory.GetCurrentDirectory(), "ScriptsFiles", string.Format("{0}.sql", fileName.ToString()));

            File.WriteAllText(exportFile, file.ToString(), new UTF8Encoding(false));
            Console.WriteLine($"File {fileName}.spl has been created");
        }
Beispiel #2
0
        private static void exportFileOption(StringBuilder file, fileSelectionName fileSelectionName)
        {
            Console.WriteLine("Press 1 to export the file separately and continue");
            Console.WriteLine("Press 2 to export the file separately and exit");
            Console.WriteLine("Press any other key to continue ");
            ConsoleKeyInfo keyOption = Console.ReadKey();

            Console.WriteLine("");
            int  number;
            bool result = Int32.TryParse(keyOption.KeyChar.ToString(), out number);

            switch (number)
            {
            case 1:
                exportFile(file, fileSelectionName);
                getWindowApplicationListSelection();
                break;

            case 2:
                exportFile(file, fileSelectionName);
                Console.ReadKey();
                break;

            case 3:
                getWindowApplicationListSelection();
                break;
            }
        }