public override int PromptForChoice(string caption,
                                            string message,
                                            Collection <ChoiceDescription> choices,
                                            int defaultChoice)
        {
            if (externalUI == null)
            {
                throw new InvalidOperationException("Unable to prompt user for choice in headless session");
            }

            int result = externalUI.PromptForChoice(caption, message, choices, defaultChoice);

            SendToSubscribers(s => s.ChoicePrompt(choices[result]));

            return(result);
        }
示例#2
0
文件: Tracer.cs 项目: svetek/Profiler
 public override int PromptForChoice(string caption, string message, Collection <ChoiceDescription> choices, int defaultChoice)
 {
     return(_ui.PromptForChoice(caption, message, choices, defaultChoice));
 }