示例#1
0
        public bool InputYesNo(bool silent = true)
        {
            ConsoleU.WriteLine("Yes/No", Palette.Question);
            if (silentMode)
            {
                // still shows up that we were asking the user a question
                ConsoleU.WriteLine(silent ? "Yes" : "No", Palette.Question);
                ConsoleU.WriteLine("yes");
                return(silent);
            }

            string yesno = ConsoleU.ReadLine().ToLower();

            return(yesno.StartsWith("y"));
        }