Пример #1
0
 private void OnImageSelected()
 {
     if (Configuration.CropImage)
     {
         Console.WriteLine("Cropping image before handing it over");
         AlbumDataSource.GetCroppedImage(croppedImage =>
         {
             ImageSelected?.Invoke(this, croppedImage);
             Dismiss();
         });
     }
     else
     {
         Console.WriteLine("Not cropping image");
         ImageSelected?.Invoke(this, _album.ImageCropView.Image);
         Dismiss();
     }
 }
Пример #2
0
        private void DoneButtonPressed(object sender, EventArgs e)
        {
            if (AlbumDataSource.CurrentMediaType == MediaType.Image)
            {
                if (Configuration.CropImage)
                {
                    Console.WriteLine("Cropping image before handing it over");
                    AlbumDataSource.GetCroppedImage(OnImageFinished);
                }
                else
                {
                    Console.WriteLine("Not cropping image");
                    OnImageFinished(AlbumView.ImageCropView.Image);
                }
            }

            if (AlbumDataSource.CurrentMediaType == MediaType.Video)
            {
                var url = AlbumView.MoviePlayerController.ContentUrl;
                OnVideoFinished(url);
            }
        }