Exemplo n.º 1
0
        private async Task <DialogTurnResult> IntroStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
        {
            queries = MainDialog.getQueries();

            var messageText   = "Do you want to edit one fo them?";
            var promptMessage = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput);

            promptMessage.SuggestedActions = new SuggestedActions()
            {
                Actions = new List <CardAction>()
                {
                    new CardAction()
                    {
                        Title = "Yes", Type = ActionTypes.ImBack, Value = "Yes"
                    },
                    new CardAction()
                    {
                        Title = "No", Type = ActionTypes.ImBack, Value = "No"
                    },
                },
            };
            return(await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions()
            {
                Prompt = promptMessage
            }, cancellationToken));
        }
Exemplo n.º 2
0
        private IList <Choice> GetProjectChoices(string sProject, string sRole)
        {
            switch (sProject.ToUpper())
            {
            case "BUILD_DEPLOYMENT":
                var cardOptions = new List <Choice>()
                {
                    new Choice()
                    {
                        Value = "App-Deployment", Synonyms = new List <string>()
                        {
                            "App"
                        }
                    },
                    new Choice()
                    {
                        Value = "Informatica-Deployment", Synonyms = new List <string>()
                        {
                            "ETL"
                        }
                    },
                    new Choice()
                    {
                        Value = "RMI-Deployment", Synonyms = new List <string>()
                        {
                            "RMI"
                        }
                    },
                    new Choice()
                    {
                        Value = "CIT-Deployment", Synonyms = new List <string>()
                        {
                            "CIT", "WIT"
                        }
                    },
                    new Choice()
                    {
                        Value = "DB-Deployment", Synonyms = new List <string>()
                        {
                            "DB"
                        }
                    }
                };
                return(cardOptions);

            case "DB-DEPLOYMENT":
                MainDialog mainDialog = new MainDialog(Configuration, null, null);
                string[]   actions    = mainDialog.getActions(sRole, "SubAction");
                cardOptions = new List <Choice>();
                foreach (string action in actions)
                {
                    cardOptions.Add(new Choice()
                    {
                        Value = action, Synonyms = new List <string>()
                        {
                            action
                        }
                    });
                }
                //{
                //new Choice() { Value = "PM.SQL", Synonyms = new List<string>() { "QA(VPMTST1)" } },
                //new Choice() { Value = "API.SQL", Synonyms = new List<string>() { "SprintTest(VPMSPTE)" } },
                //new Choice() { Value = "ICMSDB.SQL", Synonyms = new List<string>() { "Sprint Demo(VPMDEMO)" } },
                //new Choice() { Value = "Others", Synonyms = new List<string>() { "CICD(VPMCICD)" } }, };
                return(cardOptions);

            default:
                return(null);
            }
        }