Esempio n. 1
0
        private async static Task <List <AbMediaContent> > deserializeMediaFilesAsync(IFolder dir)
        {
            IList <IFile> files = await dir.GetFilesAsync();

            List <AbMediaContent> filesRead = new List <AbMediaContent>(files.Count);

            foreach (IFile file in files)
            {
                filesRead.Add(AbMediaContent.createMediaContent(FileUtilities.filePathToMediaType(file.Path), file.Path));
            }
            return(filesRead);
        }
Esempio n. 2
0
        public void addLink(AbMediaContent rootMedia, AbMediaContent otherMedia)
        {
            ObservableCollection <AbMediaContent> links;

            cardMediaLinks.TryGetValue(rootMedia, out links);

            if (links == null)
            {
                links = new ObservableCollection <AbMediaContent>();
            }

            //Create new media content to reference to
            if (!links.Contains(otherMedia))
            {
                links.Add(AbMediaContent.createMediaContent(otherMedia.getMediaType(), otherMedia.filePath));
            }


            cardMediaLinks[rootMedia] = links;
        }