コード例 #1
0
ファイル: Form1.cs プロジェクト: Abstractize/Odyssey
        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);
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Abstractize/Odyssey
        //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);
            }
        }
コード例 #3
0
        public void drawOnAlbumList()
        {
            int imageindex = 0;

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

                    //album.SubItems.Add(alb.getArtist().getName());
                    //album.SubItems.Add(alb.getYear().ToString());
                    listView2.Items.Add(album);
                }
            }
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: Abstractize/Odyssey
        private void toolStrip3_ItemClicked_1(object sender, ToolStripItemClickedEventArgs e)
        {
            //SongOrAlbumLV1 = false;
            listView1.FullRowSelect = true;
            listView1.Groups.Clear();
            listView1.Items.Clear();
            AlbumForArtist.Images.Clear();
            listView1.Visible = true;
            ToolStripItem var = e.ClickedItem;

            Console.WriteLine(var.Name);
            Artist art = Artists.searchArtist(var.Name);

            for (int i = 0; i < art.getAlbums().getLength(); i++)
            {
                Album alb = art.getAlbums().getValue(i);
                AlbumForArtist.Images.Add(alb.GetBitImage());
                ListViewGroup albumArt = new ListViewGroup(alb.getName(), HorizontalAlignment.Left);
                albumArt.Name = alb.getName();
                listView1.Groups.Add(albumArt);
                Console.WriteLine("album" + listView1.Groups[i].Name);
                //listView1.Items.Add(new ListViewItem("", i,albumArt)); #Tried to display image



                for (int j = 0; j < alb.getSongs().getLength(); j++)
                {
                    Song         song    = alb.getSongs().getValue(j);
                    ListViewItem songArt = new ListViewItem(song.getName(), albumArt);
                    songArt.Name = song.getName();

                    albumArt.Items[j].Text = song.getAlbumIndex().ToString();
                    songArt.SubItems.Add(song.getName());
                    songArt.SubItems.Add(setTime(TagLib.File.Create(song.getURL()).Properties.Duration.ToString()));
                    songArt.SubItems.Add(song.getArtist().getName());
                    Console.WriteLine("song" + albumArt.Items[j].Name);
                    listView1.Items.Add(songArt);
                }
            }
        }