using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CollaborativePlatformMain.DFEntity.MessageSubUtil
{
///
///
/// 文件名(File Name): OperatEntity.cs
///
/// 描述(Description): 工作台展示数据
///
/// 数据表(Tables): nothing
///
/// 作者(Author): Ou Rui Song
///
/// 日期(Create Date): 2024年5月5日16:18:46
///
/// 修改记录(Revision History):
/// R1:
/// 修改作者:
/// 修改日期:
/// 修改理由:
///
///
public class OperatEntity: INotifyPropertyChanged
{
///
/// 展示数据
///
/// 内容
/// 图纸地址
/// 子级数据
/// 是否为图层
public OperatEntity(string node, string drawPath, ObservableCollection subDatas, bool isLayer)
{
Node = node;
DrawPath = drawPath;
SubDatas = subDatas;
IsLayer = isLayer;
}
///
/// 唯一id
///
public string Id { get; set; } = Guid.NewGuid().ToString();
///
/// 内容
///
public string Node { get; set; }
///
/// 图纸地址
///
public string DrawPath { get; set; }
///
/// 子级数据
///
public ObservableCollection SubDatas { get; set; } = new ObservableCollection();
///
/// 是否为图层
///
public bool IsLayer { get; set; } = false;
///
/// 是否展示
///
public string isShow { get; set; } = "Collapsed";
///
/// 是否展示
///
public string IsShow
{
get { return isShow; }
set
{
if (value != isShow)
{
isShow = value;
NotifyPropertyChanged("IsShow");
}
}
}
///
/// 是否选中
///
public bool isCheck { get; set; } = false;
///
/// 是否选中
///
public bool IsCheck
{
get { return isCheck; }
set
{
if (value != isCheck)
{
isCheck = value;
NotifyPropertyChanged("IsCheck");
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(string propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}