コード例 #1
0
        private async void takeVideoButton_Clicked(object sender, EventArgs e)
        {
            if (cardProvider != null)
            {
                this.card = await cardProvider.getCardAsync();
            }

            await MediaCaptureUtilities.takeVideo(card, parentPage);
        }
コード例 #2
0
        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;
                }
            }
        }