Пример #1
0
        public ExamesViewModel(Exame exame)
        {
            Carregando = true;
            Exame      = exame;
            Task.Run(async() =>
            {
                var client   = new HMedHttpClient();
                var url      = Apis.ApiExameCaminhoArquivo.Replace("[idExame]", Exame.Id.ToString());
                var resposta = await client.GetAync <string>(url);

                PdfUrl = Device.RuntimePlatform != Device.Android ?
                         resposta :
                         "https://docs.google.com/viewer?url=" + resposta;

                //  if(Device.RuntimePlatform != Device.Android)
                Carregando = false;
                Change(nameof(PdfUrl));
                Change(nameof(Carregando));
                Change(nameof(Carregado));
            });
        }
Пример #2
0
 public ExameDetailPage(Exame exame)
 {
     viewModel           = new ExamesViewModel(exame);
     this.BindingContext = viewModel;
     InitializeComponent();
 }