Exemple #1
0
 public override int choose(List <option> options, candidate cand)
 {
     SearchIO.output("There are " + options.Count.ToString() + " recognized locations.", 2);
     if (options.Count == 0)
     {
         SearchIO.output("Sorry there are no rules recognized.", 0);
         return(int.MinValue);
     }
     else if (options.Count > Program.settings.maxRulesToDisplay)
     {
         SearchIO.output("Sorry there are too many rules to show.", 0);
         return(int.MinValue);
     }
     else
     {
         SearchIO.output("Double-click on one to show the location.", 2);
         chooseDisplay choiceDisplay = new chooseDisplay();
         choiceDisplay.promptUser(options, (Boolean)(cand.recipe.Count == 0));
         return(choiceDisplay.choice);
     }
 }
 public override int choose(List<option> options, candidate cand)
 {
     SearchIO.output("There are " + options.Count.ToString() + " recognized locations.", 2);
     if (options.Count == 0)
     {
         SearchIO.output("Sorry there are no rules recognized.", 0);
         return int.MinValue;
     }
     else if (options.Count > Program.settings.maxRulesToDisplay)
     {
         SearchIO.output("Sorry there are too many rules to show.", 0);
         return int.MinValue;
     }
     else
     {
         SearchIO.output("Double-click on one to show the location.", 2);
         chooseDisplay choiceDisplay = new chooseDisplay();
         choiceDisplay.promptUser(options, (Boolean)(cand.recipe.Count == 0));
         return choiceDisplay.choice;
     }
 }