private static bool readTagDeclare(string input, PropertyList styles) { string k = Utils.getDeclareSection(input); string nextDeclare = Utils.ExtractBefore(ref k, ';'); if (nextDeclare == "") { nextDeclare = k; k = ""; } while (nextDeclare != "") { string key, value; readOneDeclare(nextDeclare, out key, out value); if (key != "") styles.Add(key, new PropertyItemType(key, value)); nextDeclare = Utils.ExtractBefore(ref k, ';'); if (nextDeclare == "") { nextDeclare = k; k = ""; } } return true; }
/// <summary> /// Extract html tag variables (e.g. href="xyz" name="abc") /// </summary> public static PropertyList ExtravtVariables(string input) { PropertyList retVal = new PropertyList(); string working = input; string varName = "", varValue = ""; while (working != "") { locateNextVariable(ref working, ref varName, ref varValue); retVal.Add(varName, varValue); } return retVal; }
public CssStyleType() { parentTagName = new ArrayList(); styles = new PropertyList(); }
public HtmlTag(string aText) { PropertyList aList = new PropertyList(); aList.Add("value", aText); init("text", aList); }
/// <summary> /// Initialite procedure, can be used by child tags. /// </summary> protected void init(string aName, PropertyList aVariables) { name = aName.ToLower(); if (aVariables == null) variables = new PropertyList(); else variables = aVariables; }
///<summary> Constructor. </summary> public HtmlTag(string aName, string aVarString) { init(aName, PropertyList.FromString(aVarString)); }
public PropertyList Clone() { PropertyList retVal = new PropertyList(); foreach (PropertyItemType item in this) retVal.Add(item.key, item.value); return retVal; }