Example #1
0
        async void CameraButtonClicked(object sender, System.EventArgs e)
        {
            var photo = await Plugin.Media.CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions()
            {
                PhotoSize       = Plugin.Media.Abstractions.PhotoSize.Custom,
                CustomPhotoSize = 5
            });

            if (photo != null)
            {
                //PhotoImage.Source = ImageSource.FromStream(() => { return photo.GetStream(); });
                stream = CommonFunctionalities.ImageToBase64(photo.GetStream());
                ProofPhotoImage.Source = ImageSource.FromStream(() => { return(CommonFunctionalities.Base64ToImage(stream)); });
            }
        }
Example #2
0
 public DetailofIssues(Issue issue)
 {
     InitializeComponent();
     numberOfTimePageLoaded++;
     this.issue        = issue;
     aPIService        = RestService.For <IAPIService>(Constants.mongoDBBaseUrl);
     issueImage.Source = ImageSource.FromStream(() => { return(CommonFunctionalities.Base64ToImage(issue.photo)); });
     ratingLabel.Text  = "Rating : " + issue.rating;
     statusLabel.Text  = "Status : " + issue.status;
     addressLabel.Text = issue.address;
     if (string.IsNullOrEmpty(issue.additional_comments))
     {
         additionalCommentsLabel.Text = " NONE";
     }
     else
     {
         additionalCommentsLabel.Text = issue.additional_comments;
     }
 }