40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System;
|
||
namespace SWS.CAD.Views.CustomControl
|
||
{
|
||
/// <summary>
|
||
/// 可对字段应用的 PropertyGrid 特征
|
||
/// </summary>
|
||
[AttributeUsage(AttributeTargets.All | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method,
|
||
AllowMultiple = true, Inherited = true)]
|
||
public class LsPropertyGridAttribute : Attribute
|
||
{
|
||
/// <summary>
|
||
/// 生成的控件类型
|
||
/// </summary>
|
||
public SWS.Model.PROPERTYType TypeName;
|
||
/// <summary>
|
||
/// 对应的板块
|
||
/// </summary>
|
||
public string Plate;
|
||
/// <summary>
|
||
/// 显示名称
|
||
/// </summary>
|
||
public string ShowName;
|
||
/// <summary>
|
||
/// 生成控件的显示内容,不同控件可以使用的不一样,目前用与button
|
||
/// </summary>
|
||
public string Content;
|
||
/// <summary>
|
||
/// 预留Tag 携带数据对象
|
||
/// </summary>
|
||
public object Tag;
|
||
public LsPropertyGridAttribute(SWS.Model.PROPERTYType type, string plate, string showName, object tag = null)
|
||
{
|
||
TypeName = type;
|
||
Tag = tag;
|
||
Plate = plate;
|
||
ShowName = showName;
|
||
}
|
||
}
|
||
}
|