using System; namespace Core.StlMes.Client.Qcm { public enum ControlAttributeType { QueryControl = 1, //如果不填,则二进制只有一位。就无法正常使用枚举的异或、与运算了。 NoQueryControl = 2 } /// /// 用来标识实体类的属性,以被转换器使用。 /// [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] class ControlAttribute : Attribute { private string _controlName = ""; private bool _isGetValue = false; private ControlAttributeType _controlAttributeType; public string ControlName { get { return _controlName; } set { _controlName = value; } } public bool IsGetValue { get { return _isGetValue; } set { _isGetValue = value; } } public ControlAttributeType ControlAttributeType { get { return _controlAttributeType; } set { _controlAttributeType = value; } } /// /// /// /// 控件名称 /// 是获取Value值,还是获取Text值 /// public ControlAttribute(string controlName, bool isGetValue, ControlAttributeType controlAttributeType) { _controlName = controlName; _isGetValue = isGetValue; _controlAttributeType = controlAttributeType; } } }