/// <summary> /// btnSitePhoto Click event. /// Allows the user to take a photo by using the TakePhoto.CallCamera function. /// Requires the entrySiteName field to be not null or a non-empty string. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> public async void btnSitePhoto_Clicked(object sender, EventArgs e) { // get site name if (entrySiteName.Text is null || entrySiteName.Text.Equals("")) { DependencyService.Get <ICrossPlatformToast>().ShortAlert("Name the Site before taking photo."); return; } await TakePhoto.CallCamera(trip.TripName + "-" + entrySiteName.Text); }
/// <summary> /// btnSetSpecimenPhoto Click event. /// Allows the User to take a photo that is saved with the filename site#-specimen#. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> public async void btnSetSpecimenPhoto_Clicked(object sender, EventArgs e) { await TakePhoto.CallCamera(site.RecordNo.ToString() + "-" + specimen.SpecimenNumber.ToString()); }