Example #1
0
        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;
        }
Example #2
0
 /// <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;
 }
Example #3
0
 public CssStyleType()
 {
     parentTagName = new ArrayList();
     styles = new PropertyList();
 }
Example #4
0
 public HtmlTag(string aText)
 {
     PropertyList aList = new PropertyList();
     aList.Add("value", aText);
     init("text", aList);
 }
Example #5
0
 /// <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;
 }
Example #6
0
 ///<summary> Constructor. </summary>
 public HtmlTag(string aName, string aVarString)
 {
     init(aName, PropertyList.FromString(aVarString));
 }
Example #7
0
 public PropertyList Clone()
 {
     PropertyList retVal = new PropertyList();
     foreach (PropertyItemType item in this)
         retVal.Add(item.key, item.value);
     return retVal;
 }