/* 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)); } } }
/* 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)); } } }
/* 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)); } } }