Exemple #1
0
        public static bool GetUserConfirmation(PromptTypes pType)
        {
            string message = "";

            switch (pType)
            {
            case PromptTypes.AddTriangle:
                message = TRIANGLE_INPUT_PROMPT;
                break;

            case PromptTypes.ExitApp:
                message = EXIT_PROMPT;
                break;

            default:
                break;
            }

            Console.WriteLine(message);

            string userInput = Console.ReadLine();

            userInput = userInput.Trim().ToLower();

            return(userInput == YES_PROMPT_FULL || userInput == YES_PROMPT_SHORT);
        }
Exemple #2
0
            public static void WriteInformation(string __info)
            {
                PromptTypes oldprompt = prompt;

                SwitchPrompt(PromptTypes.Info);
                c.WriteLine(__info);
                SwitchPrompt(oldprompt);
            }
Exemple #3
0
            public static void WriteError(string __excpt)
            {
                PromptTypes oldprompt = prompt;

                SwitchPrompt(PromptTypes.Error);
                c.WriteLine(__excpt);
                SwitchPrompt(oldprompt);
            }
Exemple #4
0
 public static void SwitchPrompt(PromptTypes __prompt = PromptTypes.Standard)
 {
     prompt = __prompt;
 }