System.Drawing.KnownColorTable.EnsureColorTable C# (CSharp) Method

EnsureColorTable() private static method

private static EnsureColorTable ( ) : void
return void
        private static void EnsureColorTable()
        {
            // no need to lock... worse case is a double create of the table...
            //
            if (s_colorTable == null)
            {
                InitColorTable();
            }
        }

Usage Example

示例#1
0
 public static int KnownColorToArgb(KnownColor color)
 {
     KnownColorTable.EnsureColorTable();
     if (color <= KnownColor.MenuHighlight)
     {
         return(KnownColorTable.colorTable[(int)color]);
     }
     return(0);
 }
All Usage Examples Of System.Drawing.KnownColorTable::EnsureColorTable