private void Button1_Click(object sender, System.EventArgs e) { FolderListing listing = new FolderListing(this, ""); _folders.Add(listing); listing.Location = new Point(10, 10 + (10 + listing.Height) * (_folders.Count - 1)); Controls.Add(listing); }
public void InitButtons(List <string> folders) { foreach (var folder in folders) { FolderListing listing = new FolderListing(this, folder); _folders.Add(listing); listing.Location = new Point(10, 10 + (10 + listing.Height) * (_folders.Count - 1)); Controls.Add(listing); } }
public void Remove(FolderListing child) { _changed = true; _folders.Remove(child); Controls.Remove(child); for (int i = 0; i < _folders.Count; i++) { _folders[i].Location = new Point(10, 10 + (10 + _folders[i].Height) * i); } }