예제 #1
0
        public void AddFile(string file)
        {
            IMusic temp = MusicFactory.GetMusic(new FileInfo(file), control);

            if (temp != null)
            {
                FileList.Add(temp);
            }
        }
예제 #2
0
        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);
                }
            }
        }