public virtual async Task ShowAnnuvalConferenceTicket(IDialogContext context, IAwaitable<IMessageActivity> activity)
{
var message = await activity;
PromptDialog.Choice(
context: context,
resume:ChoiceReceivedAsync ,
options: (IEnumerable<ProductGroups>)Enum.GetValues(typeof(ProductGroups)),
prompt: " ",
promptStyle: PromptStyle.Auto
);
}
public virtual async Task ChoiceReceivedAsync(IDialogContext context, IAwaitable<ProductGroups> activity)
{
ProductGroups response = await activity;
context.Call<object>(new AnnualPlanDialog(response.ToString()), ChildDialogComplete);
}
public virtual async Task ChildDialogComplete(IDialogContext context, IAwaitable<object> response)
{
var respond = await response as Activity;
if (respond = ProductGroups.MoreCategories)
{
await context.PostAsync("Click here to view more categories");
context.Done(this);
}
}
public enum ProductGroups …Run Code Online (Sandbox Code Playgroud) 请我已经能够将机器人定位在想要的位置,我需要帮助以进行切换,这是我的代码
(function () {
var div = document.createElement("div");
document.getElementsByTagName('body')[0].appendChild(div);
div.outerHTML = "<div id='botDiv' style='width: 400px; height: 438px; position: fixed; bottom: 0; right:0; z-index: 1000;><div id='botTitleBar' style='height: 40px; width: 400px; position:fixed; background: #6819bf; cursor: pointer;'></div></div>";
BotChat.App({
directLine: { secret: 'Your Secret Key Here' },
user: { id: 'userid' },
bot: { id: '' }
}, document.getElementById("botDiv"));
document.querySelector('body').addEventListener('click', function (e) {
e.target.matches = e.target.matches || e.target.msMatchesSelector;
if (e.target.matches('#botTitleBar')) {
var botDiv = document.querySelector('#botDiv');
botDiv.style.height = botDiv.style.height == '400px' ? '38px' : '400px'; …Run Code Online (Sandbox Code Playgroud)