Exemple #1
0
        private StyleUnit GetStyleUnit(string styleName, string val)
        {
            string    numString = Util.ExtractNumberString(val);
            decimal   num       = Decimal.Parse(numString, System.Globalization.CultureInfo.InvariantCulture);
            string    unit      = val.Substring(numString.Length);
            StyleUnit su        = new StyleUnit(num, unit);

            return(su);
        }
Exemple #2
0
 /// <summary>
 /// Adds a unit to the collection.
 /// </summary>
 /// <param name="property">The name of the property.</param>
 /// <param name="o">The unit value.</param>
 public void Add(string property, StyleUnit o)
 {
     baseTable.Add(property, o);
 }