Esempio n. 1
0
        private StyleColor GetStyleColor(string styleName, string val)
        {
            StyleColor sc = new StyleColor();
            Regex      rx = new Regex(@"rgb(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*)");
            Match      m;

            if ((m = rx.Match(val)).Success)
            {
                val = String.Format("{0:X2}{1:X2}:{2:X2}", m.Groups[1], m.Groups[2], m.Groups[3]);
            }
            sc.Name = val;
            return(sc);
        }
Esempio n. 2
0
 /// <summary>
 /// Adds a color to the collection.
 /// </summary>
 /// <param name="property">The name of the property.</param>
 /// <param name="o">The color value.</param>
 public void Add(string property, StyleColor o)
 {
     baseTable.Add(property, o);
 }