protected void AddUnremovableStaff(StaffStruct unremovable) { var item = new ListViewItem(unremovable.Name); Items.Add(item); _unremovableStaffItemDictionary.Add(item, unremovable); }
public void Add(StaffStruct selected) { if (Selected.Any(r => r.ID == selected.ID) || Unremovable.Any(r => r.ID == selected.ID)) { return; } ListViewItem item; item = SmallImageList.Images.Count > 0 ? new ListViewItem(selected.Name, 0) : new ListViewItem(selected.Name); Items.Add(item); _staffItemDictionary.Add(item, selected); Selected.Add(selected); }