Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
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);
            }
        }
Exemplo n.º 3
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);
            }
        }