private async Task AddImageAsync()
        {
            try
            {
                PlantTaggerV1.Models.Image img = await _photoPickerService.PickPhotoAsync();

                await _plantService.AddImage(CurrentPlant.Uuid, img);
                await RefreshAsync();
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Error: " + ex.Message);
                await DialogService.ShowAlertAsync(ex.Message, "Add Image Failed", "Ok");
            }
        }
Exemplo n.º 2
0
        private async Task UpdateProfilePictureAsync()
        {
            try
            {
                PlantTaggerV1.Models.Image img = await _photoPickerService.PickPhotoAsync();

                if (img != null)
                {
                    this.CurrentUserProfile.ProfileImage = img;
                    await _userService.SaveProfileImage(img);
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Error: " + ex.Message);
            }
        }
Exemplo n.º 3
0
        protected async Task ChoosePhotoAsync()
        {
            PlantTaggerV1.Models.Image img = await _photoPickerService.PickPhotoAsync();

            NewPlant.ProfileImage = img;
        }