Example #1
0
        public void drawOnArtistList()
        {
            toolStrip3.Items.Clear();
            for (int i = 0; i < Artists.getLength(); i++)
            {
                Artist          art    = Artists.getValue(i);
                ToolStripButton Artist = new ToolStripButton();
                Artist.AutoSize = false;
                Artist.Size     = new Size(182, 70);

                Artist.Name              = (art.getName());
                Artist.AutoSize          = false;
                Artist.Text              = art.getName();
                Artist.Image             = art.GetImage();
                Artist.ImageAlign        = ContentAlignment.MiddleLeft;
                Artist.TextImageRelation = TextImageRelation.ImageBeforeText;

                Artist.ImageScaling = ToolStripItemImageScaling.None;
                Artist.Font         = new Font("MS Reference Sans Serif", 9);
                Artist.ForeColor    = SystemColors.ControlLightLight;



                Artist.BackColor = Color.Transparent;
                toolStrip3.Items.Add(Artist);
            }
        }
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);
            }
        }