Пример #1
0
 public void addFiles(string pathName, string[] names)
 {
     List<string> fullPaths = new List<string>();
     for (int i = 0; i < names.Count(); ++i)
         fullPaths.Add(pathName + names[i]);
     MediaFactory f = new MediaFactory();
     List<IMedia> medias = new List<IMedia>();
     foreach (string fullPath in fullPaths)
     {
             IMedia m = f.createMedia(fullPath);
             if (m != null)
             {
                 _oc.Add(m);
                 medias.Add(m);
             }
     }
        this.addToPlaylist(medias);
 }
Пример #2
0
 public void addFolder(string[] pathNames)
 {
     MediaFactory f = new MediaFactory();
     List<IMedia> medias = new List<IMedia>();
     for (int i = 0; i < pathNames.Count(); ++i)
     {
         IMedia m = f.createMedia(pathNames[i]);
         if (m != null)
         {
             _oc.Add(m);
             medias.Add(m);
         }
     }
     this.addToPlaylist(medias);
 }