Beispiel #1
0
        public ProcessChoiceDialog(string name, SchedulerViewModel vm, List <Choice> options, MainDialog md)
        {
            this.userName   = name;
            this.viewModel  = vm;
            this.choices    = options;
            this.mainDialog = md;

            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                DateTimeEchoStepAsync,
                FinalStepAsync
            }));
            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new ChoicePrompt(nameof(ChoicePrompt)));
            if (md.viewAppointmentDialog == null)
            {
                md.viewAppointmentDialog = new ViewAppointmentDialog("", this.viewModel, this.mainDialog, this.choices);
            }
            AddDialog(md.viewAppointmentDialog);

            if (md.addAppointmentDialog == null)
            {
                md.addAppointmentDialog = new AddAppointmentDialog("", this.viewModel, this.mainDialog, this.choices);
            }
            AddDialog(md.addAppointmentDialog);
        }
        public ChoiceDialog(string name, SchedulerViewModel vm, List <Choice> options, MainDialog md)
        {
            this.userName   = name;
            this.viewModel  = vm;
            this.choices    = options;
            this.mainDialog = md;

            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                ChoiceEchoStepAsync,
                FinalStepAsync
            }));
            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new ChoicePrompt(nameof(ChoicePrompt)));
        }
        public ViewAppointmentDialog(string name, SchedulerViewModel vm, MainDialog md, List <Choice> options)
        {
            this.userName   = name;
            this.viewModel  = vm;
            this.mainDialog = md;
            this.choices    = options;

            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
            }));
            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new ChoicePrompt(nameof(ChoicePrompt)));
            if (this.mainDialog.choiceDialog == null)
            {
                this.mainDialog.choiceDialog = new ChoiceDialog("", this.viewModel, this.choices, this.mainDialog);
            }
            AddDialog(this.mainDialog.choiceDialog);
        }