Esempio n. 1
0
        internal static string ToIconValue(this object icon)
        {
            if (icon.IsUsed())
            {
                var value = Convert.ToInt32(icon);

                if (icon.GetType() == typeof(FlatIcon))
                {
                    return(Flat.Get((FlatIcon)value));
                }
                else if (icon.GetType() == typeof(Flat2Icon))
                {
                    return(Flat2.Get((Flat2Icon)value));
                }
                else if (icon.GetType() == typeof(FontawesomeIcon))
                {
                    return(Fontawesome.Get((FontawesomeIcon)value));
                }
                else if (icon.GetType() == typeof(LineawesomeIcon))
                {
                    return(Lineawesome.Get((LineawesomeIcon)value));
                }
                else if (icon.GetType() == typeof(SocIcon))
                {
                    return(Soc.Get((SocIcon)value));
                }
                else if (icon.GetType() == typeof(SvgIcon))
                {
                    return(Svg.Get((SvgIcon)value));
                }
            }

            return("");
        }
 protected override string GetIcon() => Fontawesome.Get(Name);