public MerakiDeviceBoMDialog(QuoteBotAccessors botAccessors) : base(nameof(MerakiDeviceBoMDialog)) { /* * display device options to the customer * depending on which choice is made invoke different device conversations */ _botAccessors = botAccessors; //AddDialog(new FirewallDialog()); // AddDialog(new CameraDialog()); AddDialog(new WaterfallDialog("DeviceBOMDialog", new WaterfallStep[] { DeviceOptionsListAsync, DeviceSpecsStepAsync, //SaveDeviceStepAsync, })); AddDialog(new ChoicePrompt(nameof(ChoicePrompt))); AddDialog(new TextPrompt(nameof(TextPrompt))); AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt))); AddDialog(new WifiDialog(_botAccessors)); AddDialog(new SwitchDialog(_botAccessors)); AddDialog(new FirewallDialog(_botAccessors)); AddDialog(new CameraDialog(_botAccessors)); AddDialog(new AddMoreDevicesDialog(_botAccessors)); }
public AddMoreDevicesDialog(QuoteBotAccessors botaccessors) : base(nameof(AddMoreDevicesDialog)) { _botaccessors = botaccessors; AddDialog(new IntroDialog()); AddDialog(new TextPrompt(nameof(TextPrompt))); AddDialog(new WaterfallDialog("AddMoreDialog", new WaterfallStep[] { EndOrRestartStepAsync, SaveOrContinueStepAsync })); InitialDialogId = "AddMoreDialog"; }
public SwitchDialog(QuoteBotAccessors botAccessors) { _botAccessors = botAccessors; using (StreamReader r = new StreamReader("DataSuitCase/SwitchModels.json")) { string json = r.ReadToEnd(); _switchmodels = JsonConvert.DeserializeObject <List <ProductModel> >(json); } AddDialog(new TextPrompt(nameof(TextPrompt))); AddDialog(new NumberPrompt <int>(nameof(NumberPrompt <int>))); AddDialog(new WaterfallDialog("switchDialog", new WaterfallStep[] { SwitchModelStepAsync, SwitchQuantityStepAsync, SwitchSummaryStepAsync, })); InitialDialogId = "switchDialog"; }
public CameraDialog(QuoteBotAccessors quoteBotAccessors) { _botaccessors = quoteBotAccessors; using (StreamReader r = new StreamReader("DataSuitCase/CameraModels.json")) { string json = r.ReadToEnd(); _cameramodels = JsonConvert.DeserializeObject <List <CameraModel> >(json); } AddDialog(new TextPrompt(nameof(TextPrompt))); AddDialog(new NumberPrompt <int>(nameof(NumberPrompt <int>))); AddDialog(new WaterfallDialog("CameraDialog", new WaterfallStep[] { ModelStepAsync, QuantityStepAsync, SummaryStepAsync, })); InitialDialogId = "CameraDialog"; }
public WifiDialog(QuoteBotAccessors quoteBotAccessors) : base(nameof(WifiDialog)) { _botAccessors = quoteBotAccessors; using (StreamReader r = new StreamReader("Datasuitcase/WifiModels.json")) { string json = r.ReadToEnd(); _wifimodels = JsonConvert.DeserializeObject <List <ProductModel> >(json); } AddDialog(new AddMoreDevicesDialog(_botAccessors)); AddDialog(new TextPrompt(nameof(TextPrompt))); AddDialog(new NumberPrompt <int>(nameof(NumberPrompt <int>))); AddDialog(new WaterfallDialog("wifiDialog", new WaterfallStep[] { WifiModelStepAsync, WifiQuantityStepAsync, WifiSummaryStepAsync, })); InitialDialogId = "wifiDialog"; AddDialog(new AddMoreDevicesDialog(_botAccessors)); }
public CustomerProfileDialog(QuoteBotAccessors quoteBotAccessors) : base(nameof(CustomerProfileDialog)) { _botaccessors = quoteBotAccessors; var customerCaptureSteps = new WaterfallStep[] { PhoneStepAsync, NameStepAsync, LastNameStepAsync, EmailStepAsync, CompanyStepAsync, JumpTopDeviceOptionsStepAsync, }; //AddDialog(new MerakiDeviceBoMDialog()); AddDialog(new WaterfallDialog("CustomerProfileDialog", customerCaptureSteps)); AddDialog(new TextPrompt(nameof(TextPrompt))); AddDialog(new NumberPrompt <int>(nameof(NumberPrompt <int>))); }
public EchoBot(ConversationState paramConvoState, IConfiguration configuration) { if (paramConvoState == null) { throw new System.ArgumentNullException(nameof( paramConvoState)); } Configuration = configuration; _botAccessors = new QuoteBotAccessors(paramConvoState) { ConversationDialogState = paramConvoState.CreateProperty <DialogState>("ConversationState"), UserProfile = paramConvoState.CreateProperty <CustomerModel>("CustomerProfile"), QuoteBasket = paramConvoState.CreateProperty <QuoteBasketModel>("QuoteBasket") }; _dialogs = new DialogSet(_botAccessors.ConversationDialogState); //_dialogs.Add((new WaterfallDialog("QuoteDialog", new WaterfallStep[] { IntroStepAsync }))); _dialogs.Add(new WaterfallDialog("CustomerProfileDialog", new WaterfallStep[] { LicenseDurationStepAsync, PhoneStepAsync, NameStepAsync, LastNameStepAsync, EmailStepAsync, CompanyStepAsync, JumpTopDeviceOptionsStepAsync })); _dialogs.Add(new TextPrompt(nameof(TextPrompt))); _dialogs.Add(new NumberPrompt <int>(nameof(NumberPrompt <int>))); _dialogs.Add(new ChoicePrompt(nameof(ChoicePrompt))); _dialogs.Add (new TextPrompt(nameof(TextPrompt))); _dialogs.Add(new ConfirmPrompt(nameof(ConfirmPrompt))); _dialogs.Add(new WaterfallDialog("WifiDialog", new WaterfallStep[] { ChooseWifiLicenseType, ModelStepAsync, QuantityStepAsync, SummaryStepAsync, })); _dialogs.Add(new WaterfallDialog("SwitchDialog", new WaterfallStep[] { SwitchModelStepAsync, SwitchQuantityStepAsync, SwitchSummaryStepAsync, })); _dialogs.Add(new WaterfallDialog("FirewallDialog", new WaterfallStep[] { firewallLicenseTypeStepAsync, FirewallModelStepAsync, FirewallQuantityStepAsync, FirewallSummaryStepAsync })); _dialogs.Add(new WaterfallDialog("CameraDialog", new WaterfallStep[] { CameraModelStepAsync, CameraQuantityStepAsync, CameraSummaryStepAsync, })); _dialogs.Add(new WaterfallDialog("AddMoreDevicesDialog", new WaterfallStep[] { EndOrRestartStepAsync, SaveOrContinueStepAsync })); _dialogs.Add(new WaterfallDialog("DeviceBOMDialog", new WaterfallStep[] { DeviceOptionsListAsync, DeviceSpecsStepAsync, })); _dialogs.Add(new WaterfallDialog("IntroDialog", new WaterfallStep[] { GreetingStepAsync, })); _dialogs.Add(new ChoicePrompt("ContinueorEnd")); }