示例#1
0
        static void Main()
        {
            string cwd = Directory.GetCurrentDirectory();

            Console.WriteLine("##########################");
            Console.WriteLine("Thank you for using SMMcli");
            Console.WriteLine("##########################");
            if (!File.Exists(cwd + "\\smmcli.conf"))
            {
                Console.Write("\nTo get started we need to configure SMMcli first");
                Console.Write("\nWe need to where your game files are located. \nFor this you need to enter the Path to your game files.");
                Console.Write("\nPlease let me know where you Call of Chernobyl folder is:\n");
                string rootDir = Console.ReadLine();
                if (!Directory.Exists(rootDir))
                {
                    Console.Write("Something went wrong ... Try again");
                    rootDir = Console.ReadLine();
                }
                Console.Write("\nThanks. ");
                Console.Write("Now, where shall SMMcli save stuff:\n");
                string saveLocation = Console.ReadLine();
                if (!Directory.Exists(saveLocation))
                {
                    Console.Write("Something went wrong ... Try again");
                    saveLocation = Console.ReadLine();
                }
                string   saveFileTextRootDir      = "rootDir: \"" + rootDir + "\"";
                string   saveFileTextSaveLocation = "saveLocation: \"" + saveLocation + "\"";
                string[] saveFileText             = { saveFileTextRootDir, saveFileTextSaveLocation };
                SmmcliFunction.WriteFile("smmcli.conf", saveFileText, "DEFAULT");
            }
            Console.WriteLine("smmcli.conf found ...");
            Console.WriteLine("DEBUG: " + cwd + "\\smmcli.conf");

            do
            {
                SmmcliFunction.Menu("menu");
            } while (true);
        }