2025-09-04 18:28:02 +08:00

40 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}
}