private void ShowAlbumDetail(ContentPublishPanel.AlbumType at, HGAlbumItem hgai) { // MessageBox.Show("显示专辑详情"); if (SwitchToPP != null) { SwitchToPP(hgai); } }
/* * private void LoadAlbums() * { * for (int i = 0; i < 10; i++) * { * AlbumInfo ai = new AlbumInfo(m_album_type); * * if (i == 0) * { * ai.ClickEventHandler += NewAlbum; * ai.AlbumName = "新建专辑"; * } * else * ai.ClickEventHandler += ShowAlbumDetail; * * m_albums.Add(ai); * } * } */ private void NewAlbum(ContentPublishPanel.AlbumType album_type, HGAlbumItem hgai) { NewAlbumForm naf = new NewAlbumForm(album_type); // OpacityWindow naf2 = new OpacityWindow(naf); // naf2.ShowDialog(); naf.ShowDialog(); // naf2.Close(); }
private void SwitchToMAP(ContentPublishPanel.AlbumType at) { m_current_album_type = at; if (m_ctl_navbar != null) { m_ctl_navbar.Hide(); } if (m_ctl_program != null) { m_ctl_program.Hide(); } if (m_searchbar != null) { m_searchbar.Show(); } if (at == ContentPublishPanel.AlbumType.AllAlbum) { if (m_map != null) { m_map.Hide(); } if (m_alp_video != null) { m_alp_video.Show(); } if (m_alp_audio != null) { m_alp_audio.Show(); } // Use AutoScrollMinSize instead of AutoScroll可以帮助优化弹出MessageBox之后直接往上跳的情况,但是不能完全解决。 // this.AutoScrollMinSize = new Size(ClientRectangle.Width, ClientRectangle.Height); return; } else { m_alp_video.Hide(); m_alp_audio.Hide(); if (m_map == null) { m_map = new MoreAlbumsPanel(); m_map.SwitchToMAP = SwitchToMAP; m_map.SwitchToPP = SwitchToPP; m_map.HeightChanged = HeightChanged; m_map.Size = new Size(m_subcontrol_width, m_map_height); m_map.Location = new Point(0, m_searchbar_y + m_searchbar.Height); this.Controls.Add(m_map); m_map.BringToFront(); } m_map.PanelAlbumType = at; m_map.Show(); // Use AutoScrollMinSize instead of AutoScroll可以帮助优化弹出MessageBox之后直接往上跳的情况,但是不能完全解决。 // this.AutoScrollMinSize = new Size(ClientRectangle.Width, ClientRectangle.Height); // this.AutoScroll = true; } }
public NewAlbumForm(ContentPublishPanel.AlbumType album_type) { InitializeComponent(); m_album_type = album_type; m_cbx_albumcat1.Items.AddRange(HGData.getInstance().ComCategory); if (m_cbx_albumcat1.Items.Count > 0) { m_cbx_albumcat1.SelectedItem = m_cbx_albumcat1.Items[0]; } }
public AlbumInfo(ContentPublishPanel.AlbumType album_type, HGAlbumItem hgai) { InitializeComponent(); m_album_type = album_type; m_hgai = hgai; }
public AlbumListPanel(ContentPublishPanel.AlbumType album_type) { InitializeComponent(); this.PanelAlbumType = album_type; }