Exemplo n.º 1
0
        public static bool SetIconFontByTag(this Widget w, string iconFontTag)
        {
            if (w != null && !w.IsDisposed && ReflectionUtils.HasProperty(w.GetType(), "IconFont"))
            {
                IGUIContext ctx = SummerGUIWindow.CurrentContext;
                //IGUIContext ctx = w.ParentWindow as IGUIContext;
                if (ctx != null)
                {
                    ReflectionUtils.SetPropertyValue(w, "IconFont", ctx.GetIconFont(iconFontTag));
                    return(true);
                }

                /***
                 * else {
                 *      w._IconFontTag = iconFontTag;
                 * }
                 ***/
            }
            return(false);
        }
Exemplo n.º 2
0
 public static IGUIFont GetIconFont(this IGUIContext ctx, CommonFontTags tag)
 {
     return(ctx.GetIconFont(tag.ToString()));
 }