private void RemoveDisabledItem(DisabledItem targetItem) { if (targetItem != null) { _disabledItems.Remove(targetItem); } }
private void AddDisabledItem(object item, DisabledItem targetItem) { if (targetItem == null) { bool isChecked = this.CheckedItems.Contains(item); var addItem = new DisabledItem { Item = item, Checked = isChecked }; _disabledItems.Add(addItem); } }
private void RefreshItems(object item, bool enabled, DisabledItem targetItem) { if (enabled) { RemoveDisabledItem(targetItem); } else { AddDisabledItem(item, targetItem); } this.Refresh(); }