public void LoadProject() { int h = 5; int i = 0; foreach (string c in d) { OpenProjectShort s = new OpenProjectShort(); s.Location = new Point(0, h); s.Width = pa.Width; s.Height = 27; s.SetMainText(c); s.LoadBitmap(bmps[i++]); if (i == 1) { s.GetAndClearLink().Click += StartPageForm_Click; } else if (i == 2) { s.GetAndClearLink().Click += StartPageForm_FolderClick; } s.SetTipInfoText(c); pp.Controls.Add(s); h += 27; } }
public void LoadProjectTemplate() { List <string> tmps = NewProjectForm.GetProjectTemplates(); int h = 5; foreach (string c in tmps) { OpenProjectShort s = new OpenProjectShort(); s.Location = new Point(0, h); s.Width = pa.Width; s.Height = 27; s.SetLink(c); s.SetMainText(Path.GetFileName(c)); s.GetAndClearLink().Click += StartPageForm_Click1; pb.Controls.Add(s); h += 27; } }