Sonarr/src/NzbDrone.Core/Annotations/FieldDefinitionAttribute.cs

49 lines
1.1 KiB
C#
Raw Normal View History

2017-02-11 06:46:39 +00:00
using System;
2013-05-03 05:24:52 +00:00
namespace NzbDrone.Core.Annotations
{
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class FieldDefinitionAttribute : Attribute
{
public FieldDefinitionAttribute(int order)
{
Order = order;
}
public int Order { get; private set; }
public string Label { get; set; }
2018-05-03 21:07:48 +00:00
public string Unit { get; set; }
public string HelpText { get; set; }
public string HelpLink { get; set; }
2013-05-20 04:19:54 +00:00
public FieldType Type { get; set; }
public bool Advanced { get; set; }
2013-06-13 07:20:33 +00:00
public Type SelectOptions { get; set; }
2017-02-11 06:46:39 +00:00
public string Section { get; set; }
public HiddenType Hidden { get; set; }
2013-05-20 04:19:54 +00:00
}
public enum FieldType
{
Textbox,
2017-02-11 06:46:39 +00:00
Number,
2013-05-20 04:19:54 +00:00
Password,
2013-06-13 07:20:33 +00:00
Checkbox,
Select,
Path,
FilePath,
Tag,
Action,
2016-08-10 18:45:48 +00:00
Url,
2017-02-11 06:46:39 +00:00
Captcha,
OAuth,
Device
2013-05-03 05:24:52 +00:00
}
public enum HiddenType
{
Visible,
Hidden,
HiddenIfNotSet
}
2018-05-03 21:07:48 +00:00
}