示例#1
0
        /// <summary>
        /// This function fill the UserControl MusicCDs.
        /// </summary>
        /// <param name="BoMusicCDListokList">This parameter is Product List.</param>
        /// <returns>This function returns User Control MusicCDs.</returns>
        public static UC_MusicCDs FillUC_MusicCDList(List <Product> MusicCDList)
        {
            UC_MusicCDs ucCD = new UC_MusicCDs();

            foreach (MusicCD _musidCD in MusicCDList)
            {
                ucCD.flowLayoutMusicCDs.Controls.Add(new UC_MusicCD(_musidCD));
            }
            ucCD.Dock = DockStyle.Fill;
            return(ucCD);
        }
示例#2
0
 /// <summary>
 /// This function brings user control musicCDs to front.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnMusicCDs_Click(object sender, EventArgs e)
 {
     Logger.log("Click to MusicCDs button");
     btnDashboard.BackColor     = Color.LightBlue;
     btnBooks.BackColor         = Color.LightBlue;
     btnMusicCDs.BackColor      = Color.Teal;
     btnMagazine.BackColor      = Color.LightBlue;
     btnMyOrders.BackColor      = Color.LightBlue;
     btnMyCart.BackColor        = Color.LightBlue;
     pnlSelectedButton.Visible  = true;
     pnlSelectedButton.Location = new Point(0, 120);
     if (pnlContainer.Controls["UC_MusicCDs"] == null)
     {
         UC_MusicCDs ucCD = new UC_MusicCDs();
         ucCD.Dock = DockStyle.Fill;
         pnlContainer.Controls.Add(ucCD);
     }
     pnlContainer.Controls["UC_MusicCDs"].BringToFront();
 }