Exemplo n.º 1
0
 public async Task Fechar()
 {
     if (!IsBusy)
     {
         try
         {
             await Tela.FecharModal();
         }
         catch (Exception ex)
         {
             await Tela.Alerta(ex?.Message);
         }
     }
 }
Exemplo n.º 2
0
        public async Task btnFechar_Click()
        {
            if (!IsBusy)
            {
                try
                {
                    IsBusy = true;

                    await Task.Delay(100);

                    await PopupNavigation.Instance.PopAsync();
                }
                catch (Exception ex)
                {
                    await Tela.Alerta(ex?.Message);
                }
                finally
                {
                    IsBusy = false;
                }
            }
        }
Exemplo n.º 3
0
        public async Task LigarEmergencia()
        {
            if (!IsBusy)
            {
                try
                {
                    IsBusy = true;

                    await Task.Delay(100);

                    Device.OpenUri(new Uri($"tel:{192}"));
                }
                catch (Exception ex)
                {
                    await Tela.Alerta(ex.Message);
                }
                finally
                {
                    IsBusy = false;
                }
            }
        }
Exemplo n.º 4
0
        public async Task btnVoltar_Click()
        {
            if (!IsBusy)
            {
                try
                {
                    IsBusy = true;

                    await Task.Delay(100);

                    Application.Current.MainPage = new NavigationPage(new LoginPage());
                }
                catch (Exception ex)
                {
                    await Tela.Alerta(ex?.Message);
                }
                finally
                {
                    IsBusy = false;
                }
            }
        }