32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
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
|
||
/// eg:Click,Click
|
||
/// </summary>
|
||
public string CrEventName;
|
||
/// <summary>
|
||
/// 1.控件事件关联的类方法,使用英文逗号隔开,与CrPropName想对应
|
||
/// eg:ControlSelect_Click,ControlSelect_Click
|
||
/// </summary>
|
||
public string ClMethodName;
|
||
public string Tag;
|
||
public RelationMethodAttribute(string clEventName, string crMethodName)
|
||
{
|
||
CrEventName = crMethodName;
|
||
ClMethodName = clEventName;
|
||
}
|
||
}
|
||
}
|