コード例 #1
0
        public static int[] PromptUser(List <option> opts, GlobalSettings settings, Boolean hideUndo)
        {
            var sCW = new UserChooseWindow(opts, settings, hideUndo);

            sCW.ShowDialog();
            return(sCW.choice);
        }
コード例 #2
0
 public override int[] choose(List <option> options, candidate cand)
 {
     option.AssignOptionConfluence(options, cand, ConfluenceAnalysis.Full);
     SearchIO.output("There are " + options.Count + " recognized locations.", 2);
     if (options.Count == 0)
     {
         SearchIO.output("Sorry there are no rules recognized.");
         return(new[] { -2 });
     }
     if (options.Count > settings.MaxRulesToDisplay)
     {
         SearchIO.output("Sorry there are too many rules to show.");
         return(new[] { -2 });
     }
     SearchIO.output("Double-click on one to show the location.", 2);
     return(UserChooseWindow.PromptUser(options, settings, (cand.recipe.Count == 0)));
 }