Example #1
0
 private bool AskAbort()
 {
     do
     {
         ConsoleKeyInfo keyInfo = Console.ReadKey(true);
         if (keyInfo.IsInList(CharacterBuilderConsts.AbortOptions))
         {
             return(ContinueBuilding(keyInfo.Key));
         }
     } while (true);
 }
Example #2
0
 private int AskUserTeamPlace()
 {
     DisplayPlaceQuestion();
     do
     {
         ConsoleKeyInfo keyInfo = Console.ReadKey(true);
         if (keyInfo.IsInList(TeamBuilderConsts.TeamPlaces))
         {
             return(keyInfo.GetKeyInt());
         }
     } while (true);
 }
Example #3
0
 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);
 }
Example #4
0
 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);
 }