public string GetPropValue(string PropName) { FieldInfo[] CSSProps = this.GetType().GetFields(); foreach (FieldInfo CSSProp in CSSProps) { if (CSSProp.Name == PropName) { return(CSSProp.GetValue(this).ToString()); } } return("error"); }
public string GetCompiledCode(string ClassName, string Extention) { string CompiledCSS = "." + ClassName + Extention + "{\n"; FieldInfo[] CSSProps = this.GetType().GetFields(); foreach (FieldInfo CSSProp in CSSProps) { if (CSSProp.GetValue(this).ToString() != "") { CompiledCSS += CSSProp.Name.Replace('_', '-') + ':' + CSSProp.GetValue(this) + ";\n"; } } CompiledCSS += "}\n"; return(CompiledCSS); }
public string GetEmbemdedCSS(WebObject.Base ClassObject) { string CompiledCSS = ""; FieldInfo[] CSSProps = this.GetType().GetFields(); foreach (FieldInfo CSSProp in CSSProps) { if (CSSProp.GetValue(this).ToString() != "") { if (ClassObject.CSS.GetPropValue(CSSProp.Name) != CSSProp.GetValue(this).ToString()) { CompiledCSS += CSSProp.Name.Replace('_', '-') + ':' + CSSProp.GetValue(this) + ";"; } } } return(CompiledCSS); }