Exemple #1
0
        /// <summary>
        /// Draws a RadioButton in the specified state, on the specified graphics
        /// surface, and within the specified bounds
        /// </summary>
        /// <param name="g">The Graphics to draw on</param>
        /// <param name="checkRect">The Rectangle that represents the dimensions
        /// of the RadioButton</param>
        /// <param name="clipRect">The Rectangle that represents the clipping area</param>
        /// <param name="state">A RadioButtonStates value that specifies the
        /// state to draw the RadioButton in</param>
        public static void DrawRadioButton(Graphics g, Rectangle checkRect, Rectangle clipRect, I3RadioButtonStates state)
        {
            if (g == null || checkRect.Width <= 0 || checkRect.Height <= 0)
            {
                return;
            }

            if (I3ThemeManager.VisualStylesEnabled)
            {
                I3ThemeManager.DrawThemeBackground(g, I3ThemeClasses.Button, (int)I3ButtonParts.RadioButton, (int)state, checkRect, clipRect);
            }
            else
            {
                ControlPaint.DrawRadioButton(g, checkRect, I3ThemeManager.ConvertRadioButtonStateToButtonState(state));
            }
        }