private void Terminado2_Clicked(object sender, EventArgs e) { try { terminado2.IsEnabled = false; terminado2.IsVisible = false; UploadImages upload = new UploadImages(); var response = upload.uploadfrontspicture(localpathimg1); if (response.IsSuccessful) { pbar.ProgressTo(1, 300, Easing.Linear); localpathimg1.Text = null; btnimagenenfriador3.IsEnabled = true; DisplayAlert("Correcto!", "Imagen Subida!", "OK"); } else { DisplayAlert("Error!", "Imagen no subida!", "OK"); App.Current.MainPage = new photosenfriador(); } } catch (Exception) { DisplayAlert("Oops!", "Algo ocurrio mal!", "OK"); App.Current.MainPage = new photosenfriador(); } }