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); }
public static void WriteInformation(string __info) { PromptTypes oldprompt = prompt; SwitchPrompt(PromptTypes.Info); c.WriteLine(__info); SwitchPrompt(oldprompt); }
public static void WriteError(string __excpt) { PromptTypes oldprompt = prompt; SwitchPrompt(PromptTypes.Error); c.WriteLine(__excpt); SwitchPrompt(oldprompt); }
public static void SwitchPrompt(PromptTypes __prompt = PromptTypes.Standard) { prompt = __prompt; }