예제 #1
0
        public MainPage()
        {
            InitializeComponent();

            WonderWomen.Source     = "https://mdh-chat.metasix.solutions/livechat?mode=popout";
            WonderWomen.Navigated += (o, s) =>
            {
                _ = DelayActionAsync(2000);
            };

            var newCadastro = new WonderWoman();

            newCadastro.Nome  = "Teste Fiap da Silva";
            newCadastro.Email = "*****@*****.**";
            newCadastro.Cel   = "(11)99999-8888";

            App.DbCon.SaveWonderWomanAsync(newCadastro);

            async void Mostrar()
            {
                var s = await App.DbCon.GetWonderWomanAsync();

                foreach (var z in s)
                {
                    nome  = z.Nome;
                    email = z.Email;
                    cel   = z.Cel;
                }
            }

            Mostrar();

            async Task DelayActionAsync(int delay)
            {
                await Task.Delay(delay);

                await WonderWomen.EvaluateJavaScriptAsync($"document.getElementById('guestName').value = '{nome}'");

                await WonderWomen.EvaluateJavaScriptAsync($"document.getElementById('guestEmail').value = '{email}'");

                await WonderWomen.EvaluateJavaScriptAsync($"document.getElementById('guestPhone').value = '{cel}'");
            }
        }
예제 #2
0
 public Task <int> SaveWonderWomanAsync(WonderWoman woman)
 {
     return(_database.InsertAsync(woman));
 }