async void Handle_Click(object sender, EventArgs e) { try { if (!CrossMedia.Current.IsTakePhotoSupported) { return; } var imageMediaFile = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions() { MaxWidthHeight = 2048, }); if (imageMediaFile == null) { return; } Console.WriteLine("IMAGE " + imageMediaFile.Path); var i = new HifImage { Id = Guid.NewGuid(), Path = imageMediaFile.Path, }; ImageTaken?.Invoke(i); } catch { //Handle exception } }
async void Handle_AcceptSignature(object sender, System.EventArgs e) { if (signature.IsBlank == false) { // export the signature bitmap using (var stream = await signature.GetImageStreamAsync(SignatureImageFormat.Png)) { hif.TipsSignature?.Delete(); hif.TipsSignature = HifImage.FromPngStream(stream); } await Navigation.PopToRootAsync(true); } else { await DisplayAlert("Please sign", "A signature is needed as proof that you read these tips.", "OK"); } }
async void Handle_AcceptSignature(object sender, EventArgs e) { if (signature.IsBlank == false) { // export the signature bitmap using (var stream = await signature.GetImageStreamAsync(SignatureImageFormat.Png)) { Person.NoIncomeSingurate?.Delete(); Person.NoIncomeSingurate = HifImage.FromPngStream(stream); } await Navigation.PopToRootAsync(true); } else { await DisplayAlert("Please sign", "A signature is needed as proof.", "OK"); } }
public void Handle_IncomesorucedReceiced(HifImage img) { Person.IncomeSourcesImage.Add(img); }
public void Handle_SsnReceived(HifImage img) { Person.SocialSecurityImage?.Delete(); Person.SocialSecurityImage = img; }