/*
         * // TODO call a setMedia method from CardMediaCarouselPage!!!!
         * public void initialize(CardMediaCarouselPage cardMediaCarouselPage)
         * {
         *  this.cardMediaCarouselPage = cardMediaCarouselPage;
         * }
         */

        protected override async Task handleImageTapped(MediaContentType mediaType)
        {
            AbMediaContent otherMedia = await MediaCaptureUtilities.takeMedia(mediaType, base.card, base.parentPage);

            if (otherMedia != null)
            {
                LinkManager linkManager;

                if (card != null)
                {
                    linkManager = card.linkManager;
                }
                else
                {
                    linkManager = MediaManager.mediaLinkManager;
                }

                linkManager.addLink(this.rootMedia, otherMedia);

                if (card != null)
                {
                    card.saveToFile();
                }
                else
                {
                    MediaManager.saveMediaLinkManager();
                }
            }
        }
Exemple #2
0
        private async void takeNoteButton_Clicked(object sender, EventArgs e)
        {
            if (cardProvider != null)
            {
                this.card = await cardProvider.getCardAsync();
            }

            await MediaCaptureUtilities.takeNote(card, parentPage);
        }
Exemple #3
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);
        }
        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);
            }
        }
Exemple #5
0
        public async void addClicked()
        {
            switch (curMediaType)
            {
            case MediaContentType.Note:
                await MediaCaptureUtilities.takeNote(this.card, this.parentPage);

                break;

            case MediaContentType.Audio:
                await MediaCaptureUtilities.takeAudio(this.card, this.parentPage);

                break;

            default:     //audio or note not supported
                break;
            }
        }
        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;
                }
            }
        }
 protected virtual async Task handleImageTapped(MediaContentType mediaType)
 {
     await MediaCaptureUtilities.takeMedia(mediaType, card, parentPage);
 }