public void AddFile(string file) { IMusic temp = MusicFactory.GetMusic(new FileInfo(file), control); if (temp != null) { FileList.Add(temp); } }
public void AddDirectory(string directory) { FileList = new List <IMusic>(); DirectoryInfo directoryInfo = new DirectoryInfo(directory); FileInfo[] Files = directoryInfo.GetFiles(); foreach (var file in Files) { IMusic temp = MusicFactory.GetMusic(file, control); if (temp != null) { FileList.Add(temp); } } }