Exemple #1
0
        void BtnTakePic_TouchUpInside(object sender, EventArgs e)
        {
            UICameraController cameraController = parentController.Storyboard.InstantiateViewController("UICameraController") as UICameraController;

            cameraController.ClearCamearaView();
            cameraController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
            cameraController.picture = this.UpdateCollectionImageView;
            if (cameraController.MediaLst != null)
            {
                cameraController.MediaLst.Clear();
            }

            if (MediaLst != null && MediaLst.Count > 0)
            {
                MediaLst.Clear();
            }

            foreach (UIImage image in imagesList)
            {
                UIImageView imageView = new UIImageView();
                imageView.Image = image;
                MediaLst.Add(imageView);
            }
            cameraController.MediaLst = MediaLst;
            IsPunchValueChanged       = true;
            parentController.PresentViewController(cameraController, false, null);
        }
Exemple #2
0
        /// <summary>
        /// Guided photo take picture button touch up inside.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        void guidedPhotoTkPicBtn_TouchUpInside(object sender, EventArgs e)
        {
            try {
                ResetTheCameraImageView();
                if (parentController != null)
                {
                    UICameraController cameraController = parentController.Storyboard.InstantiateViewController("UICameraController") as UICameraController;
                    cameraController.ClearCamearaView();
                    cameraController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
                    cameraController.picture = this.UpdateCollectionImageView;
                    if (cameraController.MediaLst != null)
                    {
                        foreach (var view in cameraController.MediaLst)
                        {
                            view.RemoveFromSuperview();
                        }
                        cameraController.MediaLst.Clear();
                    }
                    if (cameraController.imagesList != null)
                    {
                        cameraController.imagesList.Clear();
                    }

                    if (this.ImageLst == null)
                    {
                        this.ImageLst = new List <UIImage> ();
                    }

                    List <UIImageView> MediaLst = new List <UIImageView> ();
                    if (this.ImageLst.Count > 0)
                    {
                        foreach (UIImage image in this.ImageLst)
                        {
                            UIImageView imageView = new UIImageView();
                            imageView.Image = image;
                            MediaLst.Add(imageView);
                        }
                    }
                    cameraController.MediaLst = MediaLst;
                    parentController.PresentViewController(cameraController, false, null);
                }
            } catch (Exception ex) {
                Debug.WriteLine("Exception Occured in BtnTakePic_TouchUpInside method due to " + ex.Message);
            }
        }
Exemple #3
0
 void takePictureBtn_TouchUpInside(object sender, EventArgs e)
 {
     try {
         ResetTheCameraImageView();
         UICameraController cameraController = parentController.Storyboard.InstantiateViewController("UICameraController") as UICameraController;
         cameraController.ClearCamearaView();
         cameraController.ModalPresentationStyle = UIModalPresentationStyle.OverCurrentContext;
         cameraController.picture = this.UpdateCollectionImageView;
         if (cameraController.MediaLst != null)
         {
             cameraController.MediaLst.Clear();
         }
         cameraController.MediaLst = ImageLst;
         parentController.PresentViewController(cameraController, false, null);
     } catch (Exception ex) {
         Debug.WriteLine("Exception Occured in BtnTakePic_TouchUpInside method due to " + ex.Message);
     }
 }