using SqlSugar;
|
using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace XImagingXhandler.XDAL
|
{
|
/// <summary>
|
/// TreeView 增加展开和选中属性
|
/// </summary>
|
public class TreeViewItemBase: Object,INotifyPropertyChanged
|
{
|
private bool isSelected;
|
[SugarColumn(IsIgnore = true, IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
|
public bool IsSelected
|
{
|
get { return this.isSelected; }
|
set
|
{
|
if (value != this.isSelected)
|
{
|
this.isSelected = value;
|
NotifyPropertyChanged("IsSelected");
|
}
|
}
|
}
|
private bool isExpanded;
|
[SugarColumn(IsIgnore = true, IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
|
public bool IsExpanded
|
{
|
get { return this.isExpanded; }
|
set
|
{
|
if (value != this.isExpanded)
|
{
|
this.isExpanded = value;
|
NotifyPropertyChanged("IsExpanded");
|
}
|
}
|
}
|
public event PropertyChangedEventHandler PropertyChanged;
|
public void NotifyPropertyChanged(string propName)
|
{
|
if (this.PropertyChanged != null)
|
this.PropertyChanged(this, new PropertyChangedEventArgs(propName));
|
}
|
}
|
}
|