Esempio n. 1
0
        private void AddAlbumControl(Album album)
        {
            var ac = new AlbumControl();

            ac.LoadAlbum(album);
            panel.Controls.Add(ac);

            ac.DoubleClick += Ac_DoubleClick;
        }
Esempio n. 2
0
        private void LoadAlbums()
        {
            IEnumerable <Album> albumList = source;

            if (!string.IsNullOrEmpty(query))
            {
                albumList = source.SearchByTitle(query);
            }

            SuspendLayout();
            panel.Controls.Clear();

            foreach (Album a in albumList)
            {
                var ac = new AlbumControl();
                ac.LoadAlbum(a);
                panel.Controls.Add(ac);

                ac.DoubleClick += Ac_DoubleClick;
            }

            ResumeLayout();
        }