コード例 #1
0
        /* LOAD IMAGES FROM XML */
        private void LoadImagesFromXML()
        {
            XMLMedia XMLImage = new XMLMedia();
            XMLImage.LoadXML("Image.XML");

            List<String> imagesList = XMLImage.ExtractMedias();

            foreach (var image in imagesList)
            {
                var DirectoriesImages = from DirectoryImage in ImageList where DirectoryImage.Path == image select DirectoryImage;

                if (DirectoriesImages.Count() == 0)
                {
                    ImageList.Add(new Model.Image(image));
                }
            }
        }
コード例 #2
0
        /* LOAD VIDEO FROM XML */
        private void LoadVideosFromXML()
        {
            XMLMedia XMLVideo = new XMLMedia();
            XMLVideo.LoadXML("Video.XML");

            List<String> videoList = XMLVideo.ExtractMedias();

            foreach (var video in videoList)
            {
                var DirectoriesVideos = from DirectoryVideo in VideoList where DirectoryVideo.Path == video select DirectoryVideo;

                if (DirectoriesVideos.Count() == 0)
                {
                    VideoList.Add(new Model.Video(video));
                }
            }
        }
コード例 #3
0
        /* LOAD IMAGE FROM XML */
        private void LoadMusicsFromXML()
        {
            XMLMedia XMLMusic = new XMLMedia();
            XMLMusic.LoadXML("Music.XML");

            List<String> musicList = XMLMusic.ExtractMedias();

            foreach (var music in musicList)
            {
                var DirectoriesMusics = from DirectoryMusic in MusicList where DirectoryMusic.Path == music select DirectoryMusic;

                if (DirectoriesMusics.Count() == 0)
                {
                    MusicList.Add(new Model.Music(music));
                }
            }
        }