private static void EnsureColorTable() { // no need to lock... worse case is a double create of the table... // if (s_colorTable == null) { InitColorTable(); } }
public static int KnownColorToArgb(KnownColor color) { KnownColorTable.EnsureColorTable(); if (color <= KnownColor.MenuHighlight) { return(KnownColorTable.colorTable[(int)color]); } return(0); }