Beispiel #1
0
        private async Task ResumeAfterIntroductionTypeClarification(IDialogContext context, IAwaitable <IntroductionType> result)
        {
            IntroductionType introductionType = await result;

            switch (introductionType)
            {
            case IntroductionType.Hobbies:
                PromptDialog.Text(context, ResumeAfterHobbiesClarification, Response.Introduction_HobbiesStart);
                break;

            case IntroductionType.Picture:
                PromptDialog.Attachment(context, ResumeAfterPictureClarification, Response.Introduction_PictureStart);
                break;

            case IntroductionType.Work:
                PromptDialog.Text(context, ResumeAfterWorkClarification, Response.Introduction_WorkStart);
                break;

            case IntroductionType.Nothing:
                context.Done <object>(null);
                break;

            default:
                await context.PostAsync(Response.Introduction_UnknownStart);

                context.Done <object>(null);
                break;
            }
        }
Beispiel #2
0
        private void IntroductionTypeClarification(IDialogContext context)
        {
            var options      = new IntroductionType[] { IntroductionType.Hobbies, IntroductionType.Picture, IntroductionType.Work, IntroductionType.Residence, IntroductionType.Nothing };
            var descriptions = new string[] { "My hobbies", "A picture of me", "Something about work", "My residence", "Nothing" };

            PromptDialog.Choice <IntroductionType>(context, ResumeAfterIntroductionTypeClarification, options, Response.Introduction_Choice, descriptions: descriptions);
        }
Beispiel #3
0
        public ActionResult AddIntruction(IntroductionType type = IntroductionType.LichSu)
        {
            IIntroductionService introducSrv = IoC.Resolve <IIntroductionService>();
            Introduction         model       = introducSrv.Query.Where(p => p.Type == type).FirstOrDefault() ?? new Introduction();

            model.Type   = type;
            model.Active = true;
            return(View(model));
        }