public async Task CantDoChart(IDialogContext context, LuisResult result)
        {
            XDocument dialog = UIBuilder.CreateDialog();

            UIBuilder.SetClearScreen(dialog, true);
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.antenna_glow);
            UIBuilder.AppendLabel(dialog, "You think so? Let me show you a chart:");
            UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/chart.png");
            UIBuilder.AppendLabel(dialog, "See, this is a Power <say-as type=\"letters\">BI</say-as> chart showing how wrong you are");
            IMessageActivity message = context.MakeMessage();

            this.AddCustomCard(message, dialog);
            await context.PostAsync(message);

            await Task.Delay(13000);

            dialog = UIBuilder.CreateDialog();
            UIBuilder.SetClearScreen(dialog, true);
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile);
            UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/chart2.png");
            UIBuilder.AppendLabel(dialog, "See there? <prosody pitch=\"x-low\" rate=\"x-slow\">You</prosody>.");
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile_end);
            UIBuilder.AppendLabel(dialog, "But seriously: Would you find me more interesting if all I could do was text? The real natural experiences are a mix of everything, including text, rich controls and voice. <prosody pitch=\"x-low\" rate=\"slow\">I can do it all</prosody>");

            message = context.MakeMessage();
            this.AddCustomCard(message, dialog);
            await context.PostAsync(message);

            context.Wait(MessageReceived);
        }
Beispiel #2
0
        public async Task CantDoChart(IDialogContext context, LuisResult result)
        {
            XDocument dialog = UIBuilder.CreateDialog();

            UIBuilder.SetClearScreen(dialog, true);
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.antenna_glow);
            UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Ah, você acha? Veja só:</prosody>");
            UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/chart.png");
            UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Esse é um gráfico em Power <phoneme alphabet=\"x-microsoft-ups\" ph=\"B I . A I\">BI</phoneme> mostrando o quanto você está errado</prosody>");
            IMessageActivity message = context.MakeMessage();

            this.AddCustomCard(message, dialog);
            await context.PostAsync(message);

            await Task.Delay(13000);

            dialog = UIBuilder.CreateDialog();
            UIBuilder.SetClearScreen(dialog, true);
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile);
            UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/chart2.png");
            UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Viu? Ali, ó:</prosody> <prosody pitch=\"x-high\" rate=\"slow\">Você</prosody>.");
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile_end);
            UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Mas falando sério: Você ia me achar mais interessante se eu só soubesse me comunicar por texto? As experiências realmente naturais são uma mistura de tudo: Texto, voz, interface gráfica, tudo junto.</prosody>");

            message = context.MakeMessage();
            this.AddCustomCard(message, dialog);
            await context.PostAsync(message);

            context.Wait(MessageReceived);
        }
Beispiel #3
0
        public async Task CantDoChart(IDialogContext context, LuisResult result)
        {
            XDocument dialog = UIBuilder.CreateDialog();

            UIBuilder.SetClearScreen(dialog, true);
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.antenna_glow);
            UIBuilder.AppendLabel(dialog, "Ahhhhh, ¿eso crees? Permitime mostrarte un gráfico");
            UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/chart.png");
            UIBuilder.AppendLabel(dialog, "Este es un gráfico de Power <phoneme alphabet=\"x-microsoft-ups\" ph=\"B I . A I\">BI</phoneme> mostrando lo equivocado que estas");
            IMessageActivity message = context.MakeMessage();

            this.AddCustomCard(message, dialog);
            await context.PostAsync(message);

            await Task.Delay(13000);

            dialog = UIBuilder.CreateDialog();
            UIBuilder.SetClearScreen(dialog, true);
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile);
            UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/chart2.png");
            UIBuilder.AppendLabel(dialog, "¿Ves ahi? <prosody pitch=\"x-high\" rate=\"slow\">Ese sos vos</prosody>.");
            UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile_end);
            UIBuilder.AppendLabel(dialog, "Pero en serio, ¿Me encontrarías más interesante si todo lo que pudiera hacer fuera solo texto? Las experiencias realmente naturales son una mezcla de todo, incluyendo texto, controles ricos, voz. <prosody pitch=\"x-low\" rate=\"slow\">Yo puedo hacerlo todo</prosody>.");

            message = context.MakeMessage();
            this.AddCustomCard(message, dialog);
            await context.PostAsync(message);

            context.Wait(MessageReceived);
        }
Beispiel #4
0
        private async Task Music(IDialogContext context, IAwaitable <IMessageActivity> item)
        {
            string answer = (await item).Text;

            if (answer.ToLower().Contains("não"))
            {
                await context.PostAsync("<prosody rate=\"fast\">OK, esquece...</prosody>");

                context.Wait(MessageReceived);
            }
            else
            {
                XDocument dialog = UIBuilder.CreateDialog();
                UIBuilder.SetClearScreen(dialog, true);
                UIBuilder.AppendMusic(dialog, "./Content/Music2.mp3");
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Os <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme> estão evoluindo. Texto apenas não basta.</prosody>");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/Skypecards.png");
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Skype tem uma interface gráfica rica que nós chamamos de cards.</prosody>");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/slack.png");
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Slack, Facebook e outros estão seguindo o mesmo caminho.</prosody>");
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Enquanto uma app multi plataforma típica é muito cara de se construir e suportar, <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme> são simples.</prosody>");
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Apenas imagine apps que existem em qualquer lugar e podem ser usadas até quando você não pode ver ou usar suas mãos, usando apenas áudio.</prosody>");
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">E ao mesmo tempo, podem ser ricas quando um desktop está disponível. Quer uma interface gráfica rica? Nós podemos fazer isso</prosody>");
                UIBuilder.AppendIframe(dialog, "http://www.azurelens.net");

                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Então você quer saber como o futuro dos <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme> vai ser? Eu te digo:</prosody>");
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">O futuro dos <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme> parece muito com apps.</prosody>");
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">E o futuro das apps parece muito com <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme>.</prosody>");
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.wave_flag);
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Porque a experiência mais natural é uma combinação de tudo.</prosody>");
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.wave_flag_end);

                UIBuilder.AppendCalendar(dialog, DateTime.Now);

                IMessageActivity message = context.MakeMessage();
                this.AddCustomCard(message, dialog);
                await context.PostAsync(message);

                context.Wait(MessageReceived);
            }
        }
        private async Task Music(IDialogContext context, IAwaitable <IMessageActivity> item)
        {
            string answer = (await item).Text;

            if (answer.ToLower().Contains("no"))
            {
                await context.PostAsync("OK, never mind then...");

                context.Wait(MessageReceived);
            }
            else
            {
                XDocument dialog = UIBuilder.CreateDialog();
                UIBuilder.SetClearScreen(dialog, true);
                UIBuilder.AppendMusic(dialog, "./Content/Music2.mp3");
                UIBuilder.AppendLabel(dialog, "Bots are evolving. Just text isn't enough anymore.");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/Skypecards.png");
                UIBuilder.AppendLabel(dialog, "Skype has a range of rich controls. We call them cards.");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/slack.png");
                UIBuilder.AppendLabel(dialog, "Slack, Facebook and others are following the same path.");
                UIBuilder.AppendLabel(dialog, "While a typical cross platform app is very expensive to build and support. Bots are simple.");
                UIBuilder.AppendLabel(dialog, "Just imagine apps that exist anywhere and can be used even if you can't see, via audio only.");
                UIBuilder.AppendLabel(dialog, "And at the same time, can be rich when a desktop is available. Want a rich user interface control? We can do that");
                UIBuilder.AppendIframe(dialog, "http://www.azurelens.net");

                UIBuilder.AppendLabel(dialog, "So you want to know how the future looks like? I tell you:");
                UIBuilder.AppendLabel(dialog, "The future of bots looks more like apps.");
                UIBuilder.AppendLabel(dialog, "And the future of apps looks more like bots.");
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.wave_flag);
                UIBuilder.AppendLabel(dialog, "Because the most natural user experience is all of it combined.");
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.wave_flag_end);

                UIBuilder.AppendCalendar(dialog, DateTime.Now);

                IMessageActivity message = context.MakeMessage();
                this.AddCustomCard(message, dialog);
                await context.PostAsync(message);

                context.Wait(MessageReceived);
            }
        }
        private async Task ArchitectureConfirm(IDialogContext context, IAwaitable <string> result)
        {
            string answer = await result;

            if (answer.ToLower().Contains("no"))
            {
                await context.PostAsync("OK, never mind then...");

                context.Wait(MessageReceived);
            }
            else
            {
                XDocument dialog = UIBuilder.CreateDialog();
                UIBuilder.SetClearScreen(dialog, true);
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile);
                UIBuilder.AppendLabel(dialog, "There you go!");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/xray.png");
                IMessageActivity message = context.MakeMessage();
                this.AddCustomCard(message, dialog);
                await context.PostAsync(message);

                await Task.Delay(5000);

                message = context.MakeMessage();
                dialog  = UIBuilder.CreateDialog();


                UIBuilder.AppendLabel(dialog, "I am so funny sometimes... But seriously, you should explain them yourself now. Perhaps start with this link:");
                UIBuilder.AppendLink(dialog, "https://aka.ms/botarchitecture");

                UIBuilder.AppendLabel(dialog, "But here's my source code if you want to take a look at it:");
                UIBuilder.AppendLink(dialog, "http://www.github.com/matvelloso/presenterbot");


                this.AddCustomCard(message, dialog);

                await context.PostAsync(message);

                context.Wait(MessageReceived);
            }
        }
Beispiel #7
0
        private async Task Music(IDialogContext context, IAwaitable <IMessageActivity> item)
        {
            string answer = (await item).Text;

            if (answer.ToLower().Contains("no"))
            {
                await context.PostAsync("OK, no importa entonces...");

                context.Wait(MessageReceived);
            }
            else
            {
                XDocument dialog = UIBuilder.CreateDialog();
                UIBuilder.SetClearScreen(dialog, true);
                UIBuilder.AppendMusic(dialog, "./Content/Music2.mp3");
                UIBuilder.AppendLabel(dialog, "Los <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme> están evolucionando. Texto solo ya no alcanza.");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/Skypecards.png");
                UIBuilder.AppendLabel(dialog, "Skype tiene una interfaz gráfica rica. La llamamos cards.");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/slack.png");
                UIBuilder.AppendLabel(dialog, "Slack, Facebook y otros estan siguiendo el mismo camino.");
                UIBuilder.AppendLabel(dialog, "Mientras que una típica aplicación multi-plataforma es muy costosa de construir y mantener, los <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme> son simples.");
                UIBuilder.AppendLabel(dialog, "Solo imagina aplicaciones que existan en todas partes y que se puedan usar aunque no se puedan ver o no se puedan utilizar las manos, usando solo audio.");
                UIBuilder.AppendLabel(dialog, "Y que al mismo tiempo, pueden ser ricas cuando una computadora de escritorio esta disponible. ¿Queres una interfaz gráfica rica? Podemos hacerlo");
                UIBuilder.AppendIframe(dialog, "http://www.azurelens.net");

                UIBuilder.AppendLabel(dialog, "¿Así que queres saber como va a ser el futuro de los <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme>? Yo te digo:");
                UIBuilder.AppendLabel(dialog, "El futuro de los <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme> se parece mucho a las aplicaciones");
                UIBuilder.AppendLabel(dialog, "Y el futuro de las aplicaciones se parece mucho a los <phoneme alphabet=\"x-microsoft-ups\" ph=\"B AO . T S\">bots</phoneme>.");
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.wave_flag);
                UIBuilder.AppendLabel(dialog, "Porque la experiencia de usuario más natural es una combinacion de todo.");
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.wave_flag_end);

                UIBuilder.AppendCalendar(dialog, DateTime.Now);

                IMessageActivity message = context.MakeMessage();
                this.AddCustomCard(message, dialog);
                await context.PostAsync(message);

                context.Wait(MessageReceived);
            }
        }
Beispiel #8
0
        private async Task ArchitectureConfirm(IDialogContext context, IAwaitable <string> result)
        {
            string answer = await result;

            if (answer.ToLower().Contains("não"))
            {
                await context.PostAsync("<prosody rate=\"fast\">OK, esquece...</prosody>");

                context.Wait(MessageReceived);
            }
            else
            {
                XDocument dialog = UIBuilder.CreateDialog();
                UIBuilder.SetClearScreen(dialog, true);
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile);
                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Aqui vai!</prosody>");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/xray.png");
                IMessageActivity message = context.MakeMessage();
                this.AddCustomCard(message, dialog);
                await context.PostAsync(message);

                await Task.Delay(5000);

                message = context.MakeMessage();
                dialog  = UIBuilder.CreateDialog();


                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Eu sou tão engraçado... Mas sério, você devia explicar para audiência agora. Talvez comece por esse link:</prosody>");
                UIBuilder.AppendLink(dialog, "https://aka.ms/botarchitecture");

                UIBuilder.AppendLabel(dialog, "<prosody rate=\"fast\">Mas aqui está meu código fonte se você quiser ver:</prosody>");
                UIBuilder.AppendLink(dialog, "http://www.github.com/matvelloso/presenterbot");

                this.AddCustomCard(message, dialog);

                await context.PostAsync(message);

                context.Wait(MessageReceived);
            }
        }
Beispiel #9
0
        private async Task ArchitectureConfirm(IDialogContext context, IAwaitable <string> result)
        {
            string answer = await result;

            if (answer.ToLower().Contains("no"))
            {
                await context.PostAsync("OK, no importa entonces...");

                context.Wait(MessageReceived);
            }
            else
            {
                XDocument dialog = UIBuilder.CreateDialog();
                UIBuilder.SetClearScreen(dialog, true);
                UIBuilder.AppendAnimation(dialog, UIBuilder.Animation.smile);
                UIBuilder.AppendLabel(dialog, "¡Aquí tienes!");
                UIBuilder.AppendImage(dialog, "https://presenterbot.blob.core.windows.net/images/xray.png");
                IMessageActivity message = context.MakeMessage();
                this.AddCustomCard(message, dialog);
                await context.PostAsync(message);

                await Task.Delay(5000);

                message = context.MakeMessage();
                dialog  = UIBuilder.CreateDialog();


                UIBuilder.AppendLabel(dialog, "Soy tan gracioso a veces... Pero en serio, ahora vos deberias explicarle esto a la audiencia. Tal vez podrias comenzar con este link:");
                UIBuilder.AppendLink(dialog, "https://aka.ms/botarchitecture");

                UIBuilder.AppendLabel(dialog, "Pero aquí está mi código fuente si quieres darle una mirada:");
                UIBuilder.AppendLink(dialog, "http://www.github.com/matvelloso/presenterbot");

                this.AddCustomCard(message, dialog);

                await context.PostAsync(message);

                context.Wait(MessageReceived);
            }
        }