internal override void PaintUp(PaintEventArgs e, CheckState state) { if (Control.Appearance == Appearance.Button) { ButtonPopupAdapter adapter = new ButtonPopupAdapter(Control); adapter.PaintUp(e, Control.CheckState); } else { System.Drawing.Graphics g = e.Graphics; ColorData colors = PaintPopupRender(e.Graphics).Calculate(); LayoutData layout = PaintPopupLayout(e, false).Layout(); Region original = e.Graphics.Clip; PaintButtonBackground(e, Control.ClientRectangle, null); PaintImage(e, layout); DrawCheckBackground(e, layout.checkBounds, colors.windowText, colors.options.highContrast ? colors.buttonFace : colors.highlight, true, colors); DrawFlatBorder(e.Graphics, layout.checkBounds, (colors.options.highContrast && !Control.Enabled && AccessibilityImprovements.Level1) ? colors.windowFrame : colors.buttonShadow); DrawCheckOnly(e, layout, colors, colors.windowText, colors.highlight); AdjustFocusRectangle(layout); PaintField(e, layout, colors, colors.windowText, true); } }
internal override void PaintUp(PaintEventArgs e, CheckState state) { if (Control.Appearance == Appearance.Button) { ButtonPopupAdapter adapter = new ButtonPopupAdapter(Control); adapter.PaintUp(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked); } else { ColorData colors = PaintPopupRender(e).Calculate(); LayoutData layout = Layout(e).Layout(); PaintButtonBackground(e, Control.ClientRectangle, null); PaintImage(e, layout); DrawCheckBackgroundFlat( e, layout.CheckBounds, colors.ButtonShadow, colors.Options.HighContrast ? colors.ButtonFace : colors.Highlight); DrawCheckOnly(e, layout, colors.WindowText, colors.Highlight, true); AdjustFocusRectangle(layout); PaintField(e, layout, colors, colors.WindowText, true); } }
internal override void PaintUp(PaintEventArgs e, CheckState state) { if (Control.Appearance == Appearance.Button) { ButtonPopupAdapter adapter = new ButtonPopupAdapter(Control); adapter.PaintUp(e, Control.CheckState); } else { ColorData colors = PaintPopupRender(e).Calculate(); LayoutData layout = PaintPopupLayout(show3D: false).Layout(); PaintButtonBackground(e, Control.ClientRectangle, null); PaintImage(e, layout); DrawCheckBackground( e, layout.CheckBounds, colors.Options.HighContrast ? colors.ButtonFace : colors.Highlight, disabledColors: true, colors); ControlPaint.DrawBorderSimple( e, layout.CheckBounds, (colors.Options.HighContrast && !Control.Enabled) ? colors.WindowFrame : colors.ButtonShadow); DrawCheckOnly(e, layout, colors, colors.WindowText); AdjustFocusRectangle(layout); PaintField(e, layout, colors, colors.WindowText, true); } }
internal override void PaintUp(PaintEventArgs e, CheckState state) { System.Drawing.Graphics g = e.Graphics; if (Control.Appearance == Appearance.Button) { ButtonPopupAdapter adapter = new ButtonPopupAdapter(Control); adapter.PaintUp(e, Control.Checked ? CheckState.Checked : CheckState.Unchecked); } else { ColorData colors = PaintPopupRender(e.Graphics).Calculate(); LayoutData layout = Layout(e).Layout(); PaintButtonBackground(e, Control.ClientRectangle, null); PaintImage(e, layout); DrawCheckBackgroundFlat(e, layout.checkBounds, colors.buttonShadow, colors.options.highContrast ? colors.buttonFace : colors.highlight, true); DrawCheckOnly(e, layout, colors.windowText, colors.highlight, true); PaintField(e, layout, colors, colors.windowText, true); } }