Example #1
0
 public void ShowItem(DataTable dt)
 {
     this.panelContent.Controls.Clear();
     this.curY = 0;
     foreach (DataRow dr in dt.Rows)
     {               
         UCAnnounceItem ucItem = new UCAnnounceItem(dr);
         this.panelContent.Controls.Add(ucItem);
         ucItem.Width = this.panelContent.Width;
         ucItem.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
         ucItem.Location = new Point(0, this.curY);
         this.curY += ucItem.Height;
     }                       
 }
Example #2
0
 public void ShowItem(DataTable dt)
 {
     this.panelContent.Controls.Clear();
     this.curY = 0;
     foreach (DataRow dr in dt.Rows)
     {
         UCAnnounceItem ucItem = new UCAnnounceItem(dr);
         this.panelContent.Controls.Add(ucItem);
         ucItem.Width    = this.panelContent.Width;
         ucItem.Anchor   = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
         ucItem.Location = new Point(0, this.curY);
         this.curY      += ucItem.Height;
     }
 }