Ejemplo n.º 1
0
 //============================================================
 // <T>加载设置节点。</T>
 //
 // @param xconfig 配置节点
 //============================================================
 public void LoadConfig(FXmlNode xconfig)
 {
     _name = xconfig.Get("name");
     // 加载属性集合
     foreach (FXmlNode xnode in xconfig.Nodes)
     {
         if (xnode.IsName("Property"))
         {
             FTplThemeStyleProperty property = new FTplThemeStyleProperty();
             property.LoadConfig(xnode);
             _properties.Set(property.Name, property);
         }
     }
 }
Ejemplo n.º 2
0
        //============================================================
        // <T>根据样式名称获得样式。</T>
        //
        // @param styleName 样式名称
        // @param propertyName 样式名称
        // @return 样式
        //============================================================
        public FTplThemeStyleProperty FindActiveProperty(string styleName, string propertyName)
        {
            if (_activeTheme == null)
            {
                return(null);
            }
            FTplThemeStyle style = _activeTheme.FindStyle(styleName);

            if (style == null)
            {
                return(null);
            }
            FTplThemeStyleProperty property = style.FindProperty(propertyName);

            return(property);
        }