public void Remove(DownloadListItem item) { lock (this.Items) { this.Items.Remove(item); this.Panel.Controls.Remove(item); } this.UpdateControlsBoundsPreferred(); }
public void Remove(DownloadTask task) { DownloadListItem item = null; lock (this.Items) { item = this.Items.Find(i => i.Task.Equals(task)); } this.Remove(item); }
public void Add(DownloadTask task) { var item = new DownloadListItem(task); item.RemoveRequest += this.OnItemRemoveRequest; lock (this.Items) { this.Items.Add(item); this.Panel.Controls.Add(item); } this.AligenmentItems(); }