Example #1
0
File: Theme.cs Project: yonder/mono
        public CPColor GetCPColor(Color color)
        {
            lock (cpcolors) {
                object tmp = cpcolors [color];

                if (tmp == null)
                {
                    CPColor cpcolor = new CPColor();
                    cpcolor.Dark       = ControlPaint.Dark(color);
                    cpcolor.DarkDark   = ControlPaint.DarkDark(color);
                    cpcolor.Light      = ControlPaint.Light(color);
                    cpcolor.LightLight = ControlPaint.LightLight(color);

                    cpcolors.Add(color, cpcolor);

                    return(cpcolor);
                }

                return((CPColor)tmp);
            }
        }