2025-08-15 16:34:31 +08:00

32 lines
1.0 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SWS.CAD.Views.CustomControl
{
/// <summary>
/// 类的方法和控件事件绑定
/// </summary>
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)]
public class RelationMethodAttribute : Attribute
{
/// <summary>
/// 1.同一控件需要关联的事件名称,使用英文逗号隔开 不同的写多个 RelationMethodAttribute
/// egClick,Click
/// </summary>
public string CrEventName;
/// <summary>
/// 1.控件事件关联的类方法使用英文逗号隔开与CrPropName想对应
/// egControlSelect_Click,ControlSelect_Click
/// </summary>
public string ClMethodName;
public string Tag;
public RelationMethodAttribute(string clEventName, string crMethodName)
{
CrEventName = crMethodName;
ClMethodName = clEventName;
}
}
}