public static int GetLightIndex(ColorInfo info, byte btnFaceValue, byte highlightValue, byte windowValue)
        {
            int res = (btnFaceValue * info.BtnFaceColorPart) / 100 +
                      (highlightValue * info.HighlightColorPart) / 100 +
                      (windowValue * info.WindowColorPart) / 100;

            if (res < 0)
            {
                res = 0;
            }
            if (res > 255)
            {
                res = 255;
            }
            return(res);
        }
예제 #2
0
 static Office2003Colors()
 {
     colorInfo = new ColorInfo();
     defaultColors = new Office2003Colors();
 }
예제 #3
0
        public int GetLightIndex(ColorInfo info, byte btnFaceValue, byte highlightValue, byte windowValue)
        {
            int res = (btnFaceValue * info.BtnFaceColorPart) / 100 +
                      (highlightValue * info.HighlightColorPart) / 100 +
                      (windowValue * info.WindowColorPart) / 100;

            if (res < 0)
                res = 0;

            if (res > 255)
                res = 255;

            return res;
        }
 static Office2003Colors()
 {
     defaultColors = new Office2003Colors();
     colorInfo     = new ColorInfo();
 }