Exemplo n.º 1
0
        private async Task AfterMenuSelection(IDialogContext context, IAwaitable <string> result)
        {
            var message        = context.MakeMessage();
            var optionSelected = await result;

            switch (optionSelected)
            {
            case SettingsCardDialog.InTSearchDocuments:
                CardUtil.ShowSearchDocumentCard(context);
                Thread.Sleep(4000);
                await SelectedConfirmTI(context);

                break;

            case SettingsCardDialog.OPComputer:
                message.Attachments.Add(SettingsCardDialog.CardComputerOptions().ToAttachment());
                await context.PostAsync(message);

                Thread.Sleep(4000);
                await SelectedConfirmTI(context);

                break;

            case SettingsCardDialog.OPPcPrint:
                message.Attachments.Add(SettingsCardDialog.CardPCPrintOptions().ToAttachment());
                await context.PostAsync(message);

                Thread.Sleep(4000);
                await SelectedConfirmTI(context);

                break;

            case SettingsCardDialog.OPTicket:
                message.Attachments.Add(SettingsCardDialog.CardTickesOptions().ToAttachment());
                await context.PostAsync(message);

                Thread.Sleep(4000);
                await SelectedConfirmTI(context);

                break;

            case SettingsCardDialog.OPProyector:
                message.Attachments.Add(SettingsCardDialog.CardProyectorOptions().ToAttachment());
                await context.PostAsync(message);

                Thread.Sleep(4000);
                await SelectedConfirmTI(context);

                break;

            case SettingsCardDialog.OPConnectivity:
                message.Attachments.Add(SettingsCardDialog.CardConnectivityOptions().ToAttachment());
                await context.PostAsync(message);

                Thread.Sleep(4000);
                await SelectedConfirmTI(context);

                break;

            case SettingsCardDialog.OPEmailOutlook:
                message.Attachments.Add(SettingsCardDialog.CardEmailOutlookOptions().ToAttachment());
                await context.PostAsync(message);

                Thread.Sleep(4000);
                await SelectedConfirmTI(context);

                break;

            default:
                await context.PostAsync(string.Format(CultureInfo.CurrentCulture, "La opción {0} no es válida. Por favor intente de nuevo", optionSelected));
                await SelectedITOptionsk(context);

                break;
            }
        }