Exemplo n.º 1
0
        public void reset()
        {
            queue.Clear();
            currentSongPointer = -1;
            cmdControl         = new CommandInvoker();
            slot    = 0;            //slot to be used when setting commands
            subject = new Subject();
            subject.setState(currentSongPointer);
            new Observer1(subject);

            it = new SongIterator();
            Player.mplayer.Stop();
        }
Exemplo n.º 2
0
        private Player()
        {
            mplayer = new MediaPlayer();
            queue   = new ObservableCollection <Song>();
            //queue = new List<Song>();
            currentSongPointer = -1;
            cmdControl         = new CommandInvoker();
            slot    = 0;            //slot to be used when setting commands
            subject = new Subject();
            subject.setState(currentSongPointer);
            new Observer1(subject);

            it = new SongIterator();
        }
Exemplo n.º 3
0
        /* OLD WAY
         * public DiscJockey(SongsOfThe70s newSongs70s, SongsOfThe80s newSongs80s, SongsOfThe90s newSongs90s) {
         *
         *     songs70s = newSongs70s;
         *     songs80s = newSongs80s;
         *     songs90s = newSongs90s;
         *
         * }
         */

        // NEW WAY Initialize the iterators

        public DiscJockey(SongIterator newSongs70s, SongIterator newSongs80s, SongIterator newSongs90s)
        {
            iter70sSongs = newSongs70s;
            iter80sSongs = newSongs80s;
            iter90sSongs = newSongs90s;
        }