You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
166 lines
4.3 KiB
166 lines
4.3 KiB
using Kingo.Plugin.EngineEditor.Enum; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.ComponentModel; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Threading.Tasks; |
|
|
|
namespace Kingo.Plugin.EngineEditor.Model |
|
{ |
|
public class PropertyGridDataStruct : INotifyPropertyChanged |
|
{ |
|
public string HeaderToolTip { get; set; } |
|
|
|
|
|
/// <summary> |
|
/// 属性名(键) |
|
/// </summary> |
|
public string Key { get; set; } |
|
|
|
|
|
public string Text { get; set; } |
|
|
|
private string _SelectText; |
|
public string SelectText |
|
{ |
|
get |
|
{ |
|
return _SelectText; |
|
} |
|
set |
|
{ |
|
_SelectText = value; |
|
|
|
//if (PropertyChanged != null) |
|
// PropertyChanged(this, new PropertyChangedEventArgs("SelectText")); |
|
} |
|
} |
|
/// <summary> |
|
/// 显示字体颜色 |
|
/// </summary> |
|
public string FontColor { get; set; } |
|
|
|
private string _Value; |
|
/// <summary> |
|
/// 属性值 |
|
/// </summary> |
|
public string Value |
|
{ |
|
get |
|
{ |
|
return _Value; |
|
} |
|
set |
|
{ |
|
_Value = value; |
|
if (PropertyChanged != null) |
|
PropertyChanged(this, new PropertyChangedEventArgs("Value")); |
|
} |
|
} |
|
|
|
public int KeyIndex { get; set; } |
|
public int ValueIndex { get; set; } |
|
|
|
/// <summary> |
|
/// 属性类型 |
|
/// </summary> |
|
public enumPropertyType PropertyType { get; set; } |
|
/// <summary> |
|
/// 字典Code;当PropertyType=ComboBox时必填 |
|
/// </summary> |
|
public string DicCode { get; set; } |
|
private List<DataDicTionary> _DicData; |
|
public List<DataDicTionary> DicData |
|
{ |
|
get |
|
{ |
|
return _DicData; |
|
} |
|
set |
|
{ |
|
_DicData = value; |
|
if (PropertyChanged != null) |
|
{ |
|
PropertyChanged(this, new PropertyChangedEventArgs("DicData")); |
|
} |
|
} |
|
} |
|
private string _DisplayPath; |
|
/// <summary> |
|
/// 显示字段(初始化字典绑定) |
|
/// </summary> |
|
public string DisplayMemberPath |
|
{ |
|
get |
|
{ |
|
if (string.IsNullOrWhiteSpace(_DisplayPath)) |
|
return "NAME"; |
|
return _DisplayPath; |
|
} |
|
set |
|
{ |
|
_DisplayPath = value; |
|
if (PropertyChanged != null) |
|
{ |
|
PropertyChanged(this, new PropertyChangedEventArgs("DisplayMemberPath")); |
|
} |
|
} |
|
} |
|
private string _ValuePath; |
|
/// <summary> |
|
/// 值字段(初始化字典绑定) |
|
/// </summary> |
|
public string ValuePath |
|
{ |
|
get |
|
{ |
|
if (string.IsNullOrWhiteSpace(_ValuePath)) |
|
return "CODE"; |
|
return _ValuePath; |
|
} |
|
set |
|
{ |
|
_ValuePath = value; |
|
if (PropertyChanged != null) |
|
{ |
|
PropertyChanged(this, new PropertyChangedEventArgs("ValuePath")); |
|
} |
|
} |
|
} |
|
private bool _IsReadOnly; |
|
/// <summary> |
|
/// 是否只读 |
|
/// </summary> |
|
public bool IsReadOnly |
|
{ |
|
get |
|
{ |
|
return _IsReadOnly; |
|
} |
|
set |
|
{ |
|
_IsReadOnly = value; |
|
if (PropertyChanged != null) |
|
{ |
|
PropertyChanged(this, new PropertyChangedEventArgs("IsReadOnly")); |
|
} |
|
} |
|
} |
|
/// <summary> |
|
/// 允许空值 |
|
/// </summary> |
|
public bool AllowNull { get; set; } |
|
/// <summary> |
|
/// 表示下拉框是否需要分组(树形)显示 |
|
/// </summary> |
|
public bool IsGroup { get; set; } |
|
public bool CheckBoxValue { get; set; } |
|
|
|
public event PropertyChangedEventHandler PropertyChanged;// = delegate { }; |
|
|
|
|
|
|
|
|
|
} |
|
}
|
|
|