public void dragImg() { flowLayoutPanel1.Controls.Clear(); UserControl1 uc = null; VerifyEntity ve = null; startIndex = (pageIndex - 1) * pageCount; endIndex = pageIndex * pageCount; endIndex = endIndex > libArr.Count ? libArr.Count : endIndex; for (int i = startIndex; i < endIndex; i++) { ve = (VerifyEntity)libArr[i]; uc = new UserControl1(); uc.SetText(ve.Code); uc.SetPic(ConfigStore.appDir + ve.ImgPath); uc.SetAttr1(ve.Data); flowLayoutPanel1.Controls.Add(uc); } label3.Text = "当前第" + pageIndex + "/" + allIndex + "页。共" + libArr.Count + "条记录"; if (allIndex > 1 && pageIndex < allIndex) { btn_next.Enabled = true; } else { btn_next.Enabled = false; } if (pageIndex > 1) { btn_per.Enabled = true; button1.Enabled = true; } else { btn_per.Enabled = false; button1.Enabled = false; } }
public void dragImg() { flowLayoutPanel1.Controls.Clear(); UserControl1 uc = null; VerifyEntity ve = null; startIndex = (pageIndex - 1) * pageCount; endIndex = pageIndex * pageCount; endIndex = endIndex > libArr.Count ? libArr.Count : endIndex; for (int i = startIndex; i < endIndex; i++) { ve = (VerifyEntity)libArr[i]; uc = new UserControl1(); uc.SetText(ve.Code); uc.SetPic(ConfigStore.appDir + ve.ImgPath); uc.SetAttr1(ve.Data); flowLayoutPanel1.Controls.Add(uc); } label3.Text = "当前第" + pageIndex + "/" + allIndex + "页。共" + libArr.Count + "条记录"; if (allIndex > 1 && pageIndex < allIndex) { btn_next.Enabled = true; } else { btn_next.Enabled = false; } if (pageIndex > 1) { btn_per.Enabled = true; button1.Enabled = true; } else { btn_per.Enabled = false; button1.Enabled = false; } }