예제 #1
0
        private async void camera_Tapped(object sender, EventArgs e)
        {
            AbMediaContent image = await MediaCaptureUtilities.takePicture(parentCard, parentPage);

            if (image != null)
            {
                this.imageFilePath  = image.filePath;
                contactImage.Source = ImageSource.FromFile(imageFilePath);
            }
        }
예제 #2
0
        private async void takePictureButton_Clicked(object sender, EventArgs e)
        {
            //mediaCapturePreClick?.Invoke();
            if (cardProvider != null)
            {
                this.card = await cardProvider.getCardAsync();
            }

            await MediaCaptureUtilities.takePicture(card, parentPage);
        }
        public async void addClicked()
        {
            MediaContentType mediaType;

            if (Enum.TryParse <MediaContentType>(this.title, out mediaType))
            {
                switch (mediaType)
                {
                case MediaContentType.Image:
                    await MediaCaptureUtilities.takePicture(this.card, this.parentPage);

                    break;

                case MediaContentType.Video:
                    await MediaCaptureUtilities.takeVideo(this.card, this.parentPage);

                    break;

                default:     //audio or note not supported
                    break;
                }
            }
        }