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