Exemplo n.º 1
0
 static string GetEnumDescription(Bootstarp图标样式类型 value)
 {
     Type enumType = typeof(Bootstarp图标样式类型);
     var name = Enum.GetName(enumType, Convert.ToInt32(value));
     if (name == null)
         return string.Empty;
     object[] objs = enumType.GetField(name).GetCustomAttributes(typeof(DescriptionAttribute), false);
     if (objs == null || objs.Length == 0)
     {
         return string.Empty;
     }
     else
     {
         DescriptionAttribute attr = objs[0] as DescriptionAttribute;
         return attr.Description;
     }
 }
Exemplo n.º 2
0
        static string GetEnumDescription(Bootstarp图标样式类型 value)
        {
            Type enumType = typeof(Bootstarp图标样式类型);
            var  name     = Enum.GetName(enumType, Convert.ToInt32(value));

            if (name == null)
            {
                return(string.Empty);
            }
            object[] objs = enumType.GetField(name).GetCustomAttributes(typeof(DescriptionAttribute), false);
            if (objs == null || objs.Length == 0)
            {
                return(string.Empty);
            }
            else
            {
                DescriptionAttribute attr = objs[0] as DescriptionAttribute;
                return(attr.Description);
            }
        }
Exemplo n.º 3
0
 public Bootstarp图标(Bootstarp图标样式类型 样式类型) : base("span")
 {
     this.样式类型 = 样式类型;
     添加Css类("glyphicon");
 }
Exemplo n.º 4
0
 public Bootstarp图标(Bootstarp图标样式类型 样式类型) : base("span")
 {
     this.样式类型 = 样式类型;
     添加Css类("glyphicon");
 }