using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OliviaAddInPro.Helper { class CheckedListItem : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private bool isChecked; private bool isEnabled; private bool isVisible; private T item; public CheckedListItem() { } public CheckedListItem(T item, bool isChecked = false, bool isEnabled = true, bool isVisible=true) { this.item = item; this.isChecked = isChecked; this.isEnabled = isEnabled; this.isVisible = isVisible; } public T Item { get { return item; } set { item = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Item")); } } public bool IsChecked { get { return isChecked; } set { isChecked = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("IsChecked")); } } public bool IsEnabled { get { return isEnabled; } set { isEnabled = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("IsEnabled")); } } public bool IsVisible { get { return isVisible; } set { isVisible = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("IsVisible")); } } } }