Beispiel #1
0
        public SessionEvaluationDialog(ISessionService sessionService) : base(Id)
        {
            _sessionService = sessionService;

            Dialogs.Add(Id, new WaterfallStep[]
            {
                // collection of delegates
                SpeakerNameStep,
                SpeakerConfirmStep,
                SessionStep,
                PresentationSkillsStep,
                ContentStep,
                FeedbackStep,
                DoneStep
            });

            //Define the prompts used in this conversation flow.
            Dialogs.Add("text", new TextPrompt());

            var pickList = new ChoicePrompt(Culture.English);

            pickList.Style = ListStyle.SuggestedAction;
            Dialogs.Add("pickList", pickList);
            Dialogs.Add("confirm", new Microsoft.Bot.Builder.Dialogs.ConfirmPrompt(Culture.English));
        }
        private async Task ChooseProductsToBuy(DialogContext dc, IDictionary <string, object> args, SkipStepFunction next)
        {
            var cardPrompt = new Microsoft.Bot.Builder.Dialogs.ChoicePrompt(Culture.English)
            {
                Style = Microsoft.Bot.Builder.Prompts.ListStyle.List
            };
            ChoicePromptOptions cardOptions = GenerateOptions(dc);

            await dc.Prompt("productsPrompt", "Which of our popular items would you like to add to your order:", cardOptions).ConfigureAwait(false);
        }
        public PlaceOrderDialog(KenticoRestServiceSettings kenticoRestServiceSettings) : base(_dialogId)
        {
            _kenticoRestService = new KenticoRestService(kenticoRestServiceSettings);

            Dialogs.Add(_dialogId, new WaterfallStep[]
            {
                ChooseProductsToBuy,
                AskHowManyToBuy,
                PassProductToShoppingCartOnWebsite
            });

            var dynamicPrompt = new Microsoft.Bot.Builder.Dialogs.ChoicePrompt(Culture.English);

            dynamicPrompt.Style = ListStyle.Auto;
            //dynamicPrompt.ChoiceOptions.IncludeNumbers = false;

            Dialogs.Add("productsPrompt", dynamicPrompt);
            Dialogs.Add("textPrompt", new Microsoft.Bot.Builder.Dialogs.TextPrompt());
            Dialogs.Add("numberPrompt", new Microsoft.Bot.Builder.Dialogs.NumberPrompt <int>(Culture.English));
        }
        public TicketInfoDialog() : base(Id)
        {
            Dialogs.Add(Id, new WaterfallStep[]
            {
                QuantityPrompt,
                TicketTypePrompt,
                WorkshopPrompt,
                ConfirmationPrompt,
                DonePrompt
            });

            //Define the prompts used in this conversation flow.
            Dialogs.Add("number", new TextPrompt());

            var pickList = new ChoicePrompt(Culture.English);

            pickList.Style = ListStyle.SuggestedAction;

            Dialogs.Add("pickList", pickList);

            Dialogs.Add("confirm", new Microsoft.Bot.Builder.Dialogs.ConfirmPrompt(Culture.English));
        }
        public AAAClaimBot()
        {
            dialogs = new DialogSet();
            var cardPrompt = new PromptsDialog.ChoicePrompt(Culture.English)
            {
                Style = Microsoft.Bot.Builder.Prompts.ListStyle.List
            };

            cardOptions = GenerateOptions();

            dialogs.Add(PromptStep.NamePrompt,
                        new PromptsDialog.TextPrompt(NameValidator));

            // Add a dialog that uses both prompts to gather information from the user
            dialogs.Add(PromptStep.GatherInfo,
                        new WaterfallStep[] { AskNameStep, GatherInfoStep });

            dialogs.Add(CARD_PROMPT_ID, cardPrompt);
            dialogs.Add(CARD_SELECTOR_ID, new WaterfallStep[] {
                ChoiceCardStep,
                ShowCardStep
            });
            dialogs.Add("session", new StartSessionDialog());
        }
        public ChoicesExamplesDialog() : base(Id)
        {
            Dialogs.Add(Id, new WaterfallStep[]
            {
                AutoPrompt,
                SuggestedActionPrompt,
                InlinePrompt,
                ListPrompt,
                NonePrompt,
                DonePrompt
            });

            var auto = new ChoicePrompt(Culture.English)
            {
                Style = ListStyle.Auto
            };

            Dialogs.Add("auto", auto);

            var suggestedAction = new ChoicePrompt(Culture.English)
            {
                Style = ListStyle.SuggestedAction
            };

            Dialogs.Add("suggestedAction", suggestedAction);

            var inline = new ChoicePrompt(Culture.English)
            {
                Style = ListStyle.Inline
            };

            Dialogs.Add("inline", inline);

            var list = new ChoicePrompt(Culture.English)
            {
                Style = ListStyle.List,
            };

            Dialogs.Add("list", list);

            var none = new ChoicePrompt(Culture.English)
            {
                Style = ListStyle.None
            };

            Dialogs.Add("none", none);

            var choices = new List <Choice>();

            choices.Add(new Choice {
                Value = "Plain Pizza", Synonyms = new List <string> {
                    "plain"
                }
            });
            choices.Add(new Choice {
                Value = "Pizza with Pepperoni", Synonyms = new List <string> {
                    "4 Day", "workshop", "full"
                }
            });
            choices.Add(new Choice {
                Value = "Pizza with Mushrooms", Synonyms = new List <string> {
                    "mushroom", "mushrooms", "shrooms"
                }
            });
            choices.Add(new Choice {
                Value = "Pizza with Peppers, Mushrooms and Brocolli", Synonyms = new List <string> {
                    "vegtable", "veggie"
                }
            });
            choices.Add(new Choice {
                Value = "Pizza with Anchovies"
            });

            _choicePromptOptions = new ChoicePromptOptions {
                Choices = choices, RetryPromptString = "Sorry, that isn't on the list. Please pick again."
            };
        }