Last active
March 14, 2018 13:35
-
-
Save pictos/69114d498284adb2fbdc1ad1935dff03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Bot.Builder.Dialogs; | |
using Microsoft.Bot.Builder.FormFlow; | |
using System; | |
using System.Collections.Generic; | |
namespace FormExemplo.Modelos | |
{ | |
[Serializable] | |
public class Aluguel | |
{ | |
public string Nome { get; set; } | |
public string CNH { get; set; } | |
public Fabricante Fabricantes { get; set; } | |
public Porta Portas { get; set; } | |
public Cor Cores { get; set; } | |
public int Dias { get; set; } | |
public List<Extra> Extras { get; set; } | |
public static IForm<Aluguel> BuildForm() | |
{ | |
return new FormBuilder<Aluguel>() | |
.Message("Bem vindo, vamos iniciar o procedimento para o aluguel!") | |
.OnCompletion(async (contexto, estado) => | |
{ | |
await contexto.PostAsync("Seu pedido está sendo processado!"); | |
}) | |
.Build(); | |
} | |
} | |
#region Campos | |
public enum Fabricante | |
{ | |
Audi=1, | |
BMW, | |
Fiat, | |
Mercedes | |
} | |
public enum Porta | |
{ | |
Duas=1, | |
Quatro | |
} | |
public enum Cor | |
{ | |
Preto=1, | |
Branco, | |
Prata | |
} | |
public enum Extra | |
{ | |
DVD=1, | |
ArCondicionado, | |
Som, | |
GPS | |
} | |
#endregion | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment