Ejemplo n.º 1
0
        private void cmdAddSongToPlaylist_Click(object sender, EventArgs e)
        {
            String plName = Microsoft.VisualBasic.Interaction.InputBox("Playlist Name:");
            String owner = Microsoft.VisualBasic.Interaction.InputBox("Owner:");

            PlaylistModel playlistModel = new PlaylistModel();
            Playlist thePlaylist = playlistModel.getPlaylist(plName, owner);

            SongModel songModel = new SongModel();
            String artist = Microsoft.VisualBasic.Interaction.InputBox("Search for Artist: ");
            List<Song> songs = songModel.getSongsByArtist(artist);

            Song theSong = new Song();

            if (songs.Count > 0)
            {
                theSong = songs[0];
                if (thePlaylist != null)
                {
                    playlistModel.addSongToPlaylist(thePlaylist, theSong);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void goToArtist(object sender, EventArgs e)
        {
            LinkLabel theLabel = (LinkLabel)sender;
            String artist = theLabel.Text;

            pnlOptions.Visible = false;
            pnlPlaylists.Visible = false;

            SongModel songModel = new SongModel();
            List<Song> songsForArtist = songModel.getSongsByArtist(artist);

            //Call the method in parent to open artist window, passing data back
            parent.artistSelected(artist, songsForArtist);
            this.Hide();
        }
Ejemplo n.º 3
0
        private void cmdArtistSongs_Click(object sender, EventArgs e)
        {
            String artist = Microsoft.VisualBasic.Interaction.InputBox("Artist Name:");

            SongModel songModel = new SongModel();
            List<Song> songsForArtist = songModel.getSongsByArtist(artist);

            ArtistView artistView = new ArtistView(new User(), null);

            artistView.setupVariables(artist, songsForArtist);
            artistView.createAlbums();

            artistView.Show();
        }
Ejemplo n.º 4
0
        //Method when clicking artist
        private void artistClick(object sender, EventArgs e)
        {
            Label theLabel = (Label)sender;
            int id = int.Parse(theLabel.Tag.ToString());

            String artist = artistLabel[id].Text;

            SongModel songModel = new SongModel();
            List<Song> songsForArtist = songModel.getSongsByArtist(artist);

            //Call the method in parent to open artist window, passing data back
            parent.artistSelected(artist, songsForArtist);
            this.Close();
        }