Files
MileageTraker/Web/Utility/FormatHintAttribute.cs
T

47 lines
1.1 KiB
C#

using System;
namespace MileageTraker.Web.Utility
{
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class FormatHintAttribute : Attribute
{
public string Text { get; private set; }
public FormatHintAttribute(string text)
{
Text = text;
}
}
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class UnitsAttribute : Attribute
{
public string Text { get; private set; }
public UnitsAttribute(string text)
{
Text = text;
}
}
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class InputSizeAttribute : Attribute
{
public string Size { get; private set; }
public string ClassName { get { return "input-" + Size.ToLower(); } }
/// <summary>
/// Specify width of input element
/// </summary>
/// <param name="size">mini, small, medium, large, xlarge, xxlarge</param>
public InputSizeAttribute(string size)
{
Size = size;
}
}
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class NoEditLabelAttribute : Attribute
{
}
}