private bool AskAbort() { do { ConsoleKeyInfo keyInfo = Console.ReadKey(true); if (keyInfo.IsInList(CharacterBuilderConsts.AbortOptions)) { return(ContinueBuilding(keyInfo.Key)); } } while (true); }
private int AskUserTeamPlace() { DisplayPlaceQuestion(); do { ConsoleKeyInfo keyInfo = Console.ReadKey(true); if (keyInfo.IsInList(TeamBuilderConsts.TeamPlaces)) { return(keyInfo.GetKeyInt()); } } while (true); }
public OptionChoices AskUserValidInput() { do { ConsoleKeyInfo keyInfo = Console.ReadKey(true); if (keyInfo.IsInList(ConsoleConsts.HomeOptions)) { return(keyInfo.ToOptionChoices()); } else { Thread message = new Thread(() => FlashDisplayDialog(" Unrecognized option, please try again")); message.Start(); } } while (true); }
private int GetUserInput() { do { ConsoleKeyInfo keyInfo = Console.ReadKey(true); try { if (keyInfo.IsInList(UserConsts.UserTargetOptions)) { return(keyInfo.GetKeyInt()); } } catch { Display.DialogMessage(" Invalid Input ! (Number between 0-3) "); } Display.DialogMessage(" Invalid Input ! (Number between 0-3) "); } while (true); }