BrightIdeasSoftware.CheckStateRenderer.GetCheckBoxState(System.Windows.Forms.CheckState)

Here are the examples of the csharp api class BrightIdeasSoftware.CheckStateRenderer.GetCheckBoxState(System.Windows.Forms.CheckState) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: tesvsnip
Source File: Renderers.cs
public override void Render(Graphics g, Rectangle r)
        {
            DrawBackground(g, r);
            CheckState state = Column.GetCheckState(RowObject);
            if (IsPrinting)
            {
                // Renderers don't work onto printer DCs, so we have to draw the image ourselves
                string key = ObjectListView.CHECKED_KEY;
                if (state == CheckState.Unchecked)
                    key = ObjectListView.UNCHECKED_KEY;
                if (state == CheckState.Indeterminate)
                    key = ObjectListView.INDETERMINATE_KEY;
                DrawAlignedImage(g, r, ListView.SmallImageList.Images[key]);
            }
            else
            {
                r = CalculateCheckBoxBounds(g, r);
                CheckBoxRenderer.DrawCheckBox(g, r.Location, GetCheckBoxState(state));
            }
        }

2. Example

Project: falloutsnip
Source File: Renderers.cs
public override void Render(Graphics g, Rectangle r)
        {
            DrawBackground(g, r);
            CheckState state = Column.GetCheckState(RowObject);
            if (IsPrinting)
            {
                // Renderers don't work onto printer DCs, so we have to draw the image ourselves
                string key = ObjectListView.CHECKED_KEY;
                if (state == CheckState.Unchecked)
                    key = ObjectListView.UNCHECKED_KEY;
                if (state == CheckState.Indeterminate)
                    key = ObjectListView.INDETERMINATE_KEY;
                DrawAlignedImage(g, r, ListView.SmallImageList.Images[key]);
            }
            else
            {
                r = CalculateCheckBoxBounds(g, r);
                CheckBoxRenderer.DrawCheckBox(g, r.Location, GetCheckBoxState(state));
            }
        }