using System; using System.Collections.ObjectModel; using System.ComponentModel; using System.Xml.Serialization; using System.Windows; namespace GummingCommon { [Serializable] public class TableView : INotifyPropertyChanged { [XmlIgnore] public string RecId { get; set; } private string _DisplayName; public string DisplayName { get { return _DisplayName; } set { _DisplayName = value; OnPropertyChanged("DisplayName"); } } private string _PageType; public string PageType { get { return _PageType; } set { _PageType = value; OnPropertyChanged("PageType"); } } private int _PageIndex; public int PageIndex { get { return _PageIndex; } set { _PageIndex = value; OnPropertyChanged("PageIndex"); } } private bool _IsFolder; public bool IsFolder { get { return _IsFolder; } set { _IsFolder = value; OnPropertyChanged("IsFolder"); } } private bool _IsSelected; [XmlIgnore] public bool IsSelected { get { return _IsSelected; } set { _IsSelected = value; OnPropertyChanged("IsSelected"); } } private bool _IsPage; [XmlIgnore] public bool IsPage { get { return _IsPage; } set { _IsPage = value; OnPropertyChanged("IsPage"); } } private int? _EvaluationType; [XmlIgnore] public int? EvaluationType { get { return _EvaluationType; } set { _EvaluationType = value; OnPropertyChanged("EvaluationType"); } } private Visibility _IsShowCheckBox; [XmlIgnore] public Visibility IsShowCheckBox { get { return _IsShowCheckBox; } set { _IsShowCheckBox = value; OnPropertyChanged("IsShowCheckBox"); } } private bool? _IsCheckedInBox; [XmlIgnore] public bool? IsCheckedInBox { get { return _IsCheckedInBox; } set { _IsCheckedInBox = value; OnPropertyChanged("IsCheckedInBox"); } } private string _ParentId; [XmlIgnore] public string ParentId { get { return _ParentId; } set { _ParentId = value; OnPropertyChanged("ParentId"); } } private bool _IsExpanded; [XmlIgnore] public bool IsExpanded { get { return _IsExpanded; } set { _IsExpanded = value; OnPropertyChanged("IsExpanded"); } } public ObservableCollection SubViews { get; set; } public TableView() { RecId = Guid.NewGuid().ToString(); IsShowCheckBox = Visibility.Collapsed; } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged = delegate { }; private void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = this.PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } }