Beispiel #1
0
        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);
        }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
        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);
            }
        }