您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
31 行
840 B
31 行
840 B
using System;
|
|
|
|
namespace NaughtyAttributes
|
|
{
|
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
|
|
public class InfoBoxAttribute : MetaAttribute
|
|
{
|
|
public string Text { get; private set; }
|
|
public InfoBoxType Type { get; private set; }
|
|
public string VisibleIf { get; private set; }
|
|
|
|
public InfoBoxAttribute(string text, InfoBoxType type = InfoBoxType.Normal, string visibleIf = null)
|
|
{
|
|
this.Text = text;
|
|
this.Type = type;
|
|
this.VisibleIf = visibleIf;
|
|
}
|
|
|
|
public InfoBoxAttribute(string text, string visibleIf)
|
|
: this(text, InfoBoxType.Normal, visibleIf)
|
|
{
|
|
}
|
|
}
|
|
|
|
public enum InfoBoxType
|
|
{
|
|
Normal,
|
|
Warning,
|
|
Error
|
|
}
|
|
}
|