예제 #1
0
파일: Theme.cs 프로젝트: 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);
            }
        }