System.Windows.Forms.ControlPaint.DrawCheckBox(System.Drawing.Graphics, int, int, int, int, System.Windows.Forms.ButtonState)

Here are the examples of the csharp api class System.Windows.Forms.ControlPaint.DrawCheckBox(System.Drawing.Graphics, int, int, int, int, System.Windows.Forms.ButtonState) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: xenadmin
Source File: WlbReportCustomFilter.cs
private void listViewFilterItem_DrawItem(object sender, DrawListViewItemEventArgs e)
        {
            if ((WlbReportCustomFilterType)this.comboFilterType.SelectedIndex == WlbReportCustomFilterType.vm)
            {
                if (e.Item.Checked)
                    ControlPaint.DrawCheckBox(e.Graphics, e.Bounds.Left + 3, e.Bounds.Top + 1, 15, 15, ButtonState.Checked);
                else
                    ControlPaint.DrawCheckBox(e.Graphics, e.Bounds.Left + 3, e.Bounds.Top + 1, 15, 15, ButtonState.Normal);
            }
        }

2. Example

Project: xenadmin
Source File: WlbAutomationPage.cs
private void listViewExPowerManagementHosts_DrawItem(object sender, DrawListViewItemEventArgs e)
        {
            Host host = (Host)e.Item.Tag;
            // disallow checking when the host is pool master or PowerOn is disabled (empty string)
            // we have to allow checking when PowerOn is null (unknown) to support PM on older versions of XS
            if (HostCannotParticipateInPowerManagement(host))
            {
                ControlPaint.DrawCheckBox(e.Graphics, e.Bounds.Left + 3, e.Bounds.Top + 1, 15, 15, ButtonState.Inactive);
            }
            else
            {
                if (e.Item.Checked)
                    ControlPaint.DrawCheckBox(e.Graphics, e.Bounds.Left + 3, e.Bounds.Top + 1, 15, 15, ButtonState.Checked);
                else
                    ControlPaint.DrawCheckBox(e.Graphics, e.Bounds.Left + 3, e.Bounds.Top + 1, 15, 15, ButtonState.Normal);
            }
        }