示例#1
0
        /// <summary>
        /// Forces the colors to either enabled or disabled
        /// </summary>
        private void SetColors()
        {
            //Ensures they're not null
            currentBackgroundColor = new CustomColor();
            currentBorderColor     = new CustomColor();
            currentTextColor       = new CustomColor();

            Color backgroundColor;
            Color borderColor;
            Color textColor;

            if (Checked)
            {
                backgroundColor = backgroundOnColor;
                borderColor     = borderOnColor;
                textColor       = textOnColor;
            }
            else
            {
                backgroundColor = backgroundOffColor;
                borderColor     = borderOffColor;
                textColor       = textOffColor;
            }

            //Sets the colors to the current colors
            currentBackgroundColor.Set(backgroundColor);
            currentBorderColor.Set(borderColor);
            currentTextColor.Set(textColor);
        }