Example #1
0
        public void drawOnAlbumList()
        {
            listView2Mode = "album";
            listView2.Items.Clear();
            listView2.View = View.LargeIcon;
            int imageindex = 0;

            AlbumForArtist.Images.Clear();
            for (int i = 0; i < Albums.getLength(); i++)
            {
                Album alb = Albums.getValue(i);
                AlbumForArtist.Images.Add(alb.GetBitImage());
                ListViewItem album = new ListViewItem(alb.getName(), imageindex);
                imageindex++;


                listView2.Items.Add(album);
            }
        }
Example #2
0
        //Search
        private void toolStripButton6_Click(object sender, EventArgs e)
        {
            AlbumForArtist.Images.Clear();
            Searches.Visible = true;
            String     search   = toolStripTextBox2.Text;
            ArtistList artList  = toServer.getSearchedArtist(search);
            AlbumList  albList  = toServer.getSearchedAlbum(search);
            List       songList = toServer.getSearchedSong(search);

            //Artists
            for (int i = 0; i < artList.getLength(); i++)
            {
                Artist       artist = artList.getValue(i);
                ListViewItem art    = new ListViewItem(artist.getName(), i, listView3.Groups[0]);
                AlbumForArtist.Images.Add(artist.GetImage());

                art.Text = artist.getName();
                listView3.Items.Add(art);
            }
            //Albums
            for (int i = 0; i < albList.getLength(); i++)
            {
                Album        album = albList.getValue(i);
                ListViewItem art   = new ListViewItem(album.getName(), (artList.getLength() - 1 + i), listView3.Groups[1]);
                AlbumForArtist.Images.Add(album.GetBitImage());
                art.SubItems.Add(album.getArtist().getName());
                art.Text = album.getName();
                listView3.Items.Add(art);
            }
            //Songs
            for (int i = 0; i < songList.getLength(); i++)
            {
                Song         song = songList.getValue(i);
                ListViewItem art  = new ListViewItem(song.getName(), (artList.getLength() - 1 + albList.getLength() - 1 + i), listView3.Groups[2]);
                AlbumForArtist.Images.Add(song.getAlbum().GetBitImage());
                art.SubItems.Add(song.getArtist().getName());
                art.SubItems.Add(song.getAlbum().getName());
                art.Text = song.getName();
                listView3.Items.Add(art);
            }
        }