Example #1
0
        public void import(Song song, int i)
        {
            mplayer.Open(song.filePath);

            it.addItem(song);
            Itermediary iter = new Itermediary(it);

            queue = iter.printInventory();
            currentSongPointer++;
            cmdControl.setCommand(slot, new PlayCommand(queue[i]), new PauseCommand(queue[i]), new StopCommand(queue[i]));
            slot++;
        }
Example #2
0
        public void import(Song song, int i)
        {
            //OpenFileDialog openFileDialog1 = new OpenFileDialog();
            //openFileDialog1.Multiselect = true;
            // openFileDialog1.ShowDialog();

            //String[] s = openFileDialog1.FileNames;

            //for (int i = 0; i < s.Length; i++)
            // {
            // Uri uri = new Uri(s[i], UriKind.Absolute);
            mplayer.Open(song.filePath);
            //File file = File.Create(uri.OriginalString);
            // queue.Add(new Song(uri, file.Tag.Title, file.Tag.Album, file.Tag.JoinedPerformers, (int)file.Tag.Year));
            //it.addItem(uri, file.Tag.Title, file.Tag.Album, file.Tag.JoinedPerformers, (int)file.Tag.Year);     //add item to iterator
            it.addItem(song);

            /*currentSongPointer++;
             * cmdControl.setCommand(slot, new PlayCommand((Song)queue[currentSongPointer]), new PauseCommand((Song)queue[currentSongPointer]));
             * slot++;*/
            // }
            Itermediary iter = new Itermediary(it);

            queue = iter.printInventory();
            Console.WriteLine("queue count = " + queue.Count);
            currentSongPointer++;
            //for (int i = 0; i < queue.Count; i++)
            //{

            /*Console.WriteLine(i);
             * queue.Add(queue[i]);
             * Console.WriteLine(" added to queue");*/
            cmdControl.setCommand(slot, new PlayCommand(queue[i]), new PauseCommand(queue[i]));
            slot++;
            //}
        }