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