Inheritance: System.Collections.Hashtable
コード例 #1
0
        /**
         * Converts a <CODE>BaseColor</CODE> into a HTML representation of this <CODE>
         * BaseColor</CODE>.
         *
         * @param s
         *            the <CODE>BaseColor</CODE> that has to be converted.
         * @return the HTML representation of this <COLOR>BaseColor </COLOR>
         */

        public static BaseColor DecodeColor(String s)
        {
            if (s == null)
            {
                return(null);
            }
            s = s.ToLowerInvariant().Trim();
            try {
                return(WebColors.GetRGBColor(s));
            }
            catch {
                return(null);
            }
        }
コード例 #2
0
ファイル: Markup.cs プロジェクト: PasysxaWebApp/CameraMap
 /// <summary>
 /// Converts a <CODE>Color</CODE> into a HTML representation of this <CODE>Color</CODE>.
 /// </summary>
 /// <param name="color">the <CODE>Color</CODE> that has to be converted.</param>
 /// <returns>the HTML representation of this <CODE>Color</CODE></returns>
 public static Color DecodeColor(String s)
 {
     if (s == null)
     {
         return(null);
     }
     s = s.ToLower(CultureInfo.InvariantCulture).Trim();
     try {
         return(WebColors.GetRGBColor(s));
     }
     catch {
     }
     return(null);
 }