private static async Task <PromptOptions> CardOptions(GreetingState greetingState)
        {
            List <CardAction> listCategories = await Categories();

            var card = new HeroCard()
            {
                //Buttons = new List<CardAction>()
                //{
                //    //new CardAction(ActionTypes.ImBack, title: "Clothing", value: "Clothing"),
                //    //new CardAction(ActionTypes.ImBack, title: "Shoes", value: "Shoes"),
                //    //new CardAction(ActionTypes.ImBack, title: "Accessories", value: "Accessories"),
                //},
                Buttons = listCategories,
            };
            var opts = new PromptOptions
            {
                Prompt = new Activity
                {
                    Text        = $"Hello {greetingState.Name}, what are you looking for today?",
                    Type        = ActivityTypes.Message,
                    Attachments = new List <Attachment>
                    {
                        card.ToAttachment(),
                    },
                },
            };

            return(opts);
        }
示例#2
0
        private static PromptOptions CardOptions(GreetingState greetingState)
        {
            var card = new HeroCard()
            {
                Buttons = new List <CardAction>()
                {
                    new CardAction(ActionTypes.ImBack, title: "Clothing", value: "Clothing"),
                    new CardAction(ActionTypes.ImBack, title: "Shoes", value: "Shoes"),
                    new CardAction(ActionTypes.ImBack, title: "Accessories", value: "Accessories"),
                },
            };
            var opts = new PromptOptions
            {
                Prompt = new Activity
                {
                    Text        = $"Hello {greetingState.Name}, what are you looking for today?",
                    Type        = ActivityTypes.Message,
                    Attachments = new List <Attachment>
                    {
                        card.ToAttachment(),
                    },
                },
            };

            return(opts);
        }