Пример #1
0
        private void tapGestureAction()
        {
            Action tapAction = new Action(
                delegate {
                {
                    if (this.parentCell is PunchCell)
                    {
                        ImagePeviewViewController imagePreviewController = (this.parentCell as PunchCell).parentController.Storyboard.InstantiateViewController("ImagePeviewViewController") as ImagePeviewViewController;
                        imagePreviewController.ModalPresentationStyle    = UIModalPresentationStyle.FullScreen;
                        imagePreviewController.previewImage = ImageView;

                        (this.parentCell as PunchCell).parentController.PresentViewController(imagePreviewController, false, null);
                    }
                    else if (this.parentCell is GuidedPhotoCell)
                    {
                        ImagePeviewViewController imagePreviewController = (this.parentCell as GuidedPhotoCell).parentController.Storyboard.InstantiateViewController("ImagePeviewViewController") as ImagePeviewViewController;
                        imagePreviewController.ModalPresentationStyle    = UIModalPresentationStyle.FullScreen;
                        imagePreviewController.previewImage = ImageView;
                        (this.parentCell as GuidedPhotoCell).parentController.PresentViewController(imagePreviewController, false, null);
                    }
                }
            });

            UITapGestureRecognizer tb = new UITapGestureRecognizer();

            tb.AddTarget(tapAction);
            ImageView.AddGestureRecognizer(tb);
        }
Пример #2
0
        /// <summary>
        /// Updates the cell.
        /// </summary>
        /// <param name="collectionView">Collection view.</param>
        /// <param name="indexpath">Indexpath.</param>
        /// <param name="image">Image.</param>
        /// <param name="itemsList">Items list.</param>
        /// <param name="controller">Controller.</param>
        public void UpdateCell(UICollectionView collectionView, NSIndexPath indexpath, UIImage image, List <UIImage> itemsList, UIViewController controller)
        {
            ImageView.RemoveGestureRecognizer(gr);
            ImageView.RemoveGestureRecognizer(tb);

            ImageView.AddGestureRecognizer(gr);
            ImageView.AddGestureRecognizer(tb);
            ImageView.UserInteractionEnabled = true;


            if (controller.GetType() == typeof(UICameraController))
            {
                this.cameraController = controller as UICameraController;
            }
            else if (controller.GetType() == typeof(InspectionViewController))
            {
                this.inspectionController = controller as InspectionViewController;
            }

            this.itemsList  = itemsList;
            count           = (itemsList.Count) - 1;
            ImageView.Image = image;
            this.indexpath  = indexpath;

            this.CollectionView = collectionView;
        }
Пример #3
0
        public void UpdateCell(UICollectionView collectionView, NSIndexPath indexpath, UIImage image, List <UIImage> itemsList, UITableViewCell cell)
        {
            ImageView.AddGestureRecognizer(gr);
            ImageView.AddGestureRecognizer(tb);
            ImageView.UserInteractionEnabled = true;


            this.itemsList = itemsList;

            ImageView.Image     = image;
            this.indexpath      = indexpath;
            this.parentCell     = cell;
            this.CollectionView = collectionView;
        }
Пример #4
0
        /// <summary>
        /// Gesture Action(On tap)
        /// This is used here to display the image which is selected from the collection view to imageShow View.
        /// </summary>
        private void tapGestureAction()
        {
            Action tapAction = new Action(
                delegate {
                if (ImageView != null)
                {
                    if (cameraController != null)
                    {
                        this.cameraController.UpdateCameraImageView(ImageView.Image);
                    }
                    else
                    {
                        this.inspectionController.UpdateLocationIDImageView(ImageView.Image);
                    }
                }
            });

            UITapGestureRecognizer tb = new UITapGestureRecognizer();

            tb.AddTarget(tapAction);
            ImageView.AddGestureRecognizer(tb);
        }