SourceGrid.Range.IntersectsWith C# (CSharp) Method

IntersectsWith() public method

Returns true if the specified range intersects (one or more cells) with the current range. If one of the range is empty then the return is false.
public IntersectsWith ( Range p_Range ) : bool
p_Range Range
return bool
        public bool IntersectsWith(Range p_Range)
        {
            return IntersectsWith(this, p_Range);
        }

Same methods

Range::IntersectsWith ( Range p_Range1, Range p_Range2 ) : bool

Usage Example

Beispiel #1
0
        /// <summary>
        /// Draw the highlighted cells.
        /// </summary>
        /// <param name="panel"></param>
        /// <param name="graphics"></param>
        /// <param name="pRangeToRedraw">The range of cells that must be redrawed. Consider that can contains also not selected cells.</param>
        public virtual void DrawHighlight(GridSubPanel panel, DevAge.Drawing.GraphicsCache graphics, Range pRangeToRedraw)
        {
            if (mRange.IsEmpty() == false &&
                pRangeToRedraw.IntersectsWith(mRange))
            {
                System.Drawing.Rectangle rect = GetDrawingRectangle();
                if (rect != System.Drawing.Rectangle.Empty)
                {
                    System.Drawing.Rectangle rectangleToDraw = panel.RectangleGridToPanel(rect);

                    Border.DrawBorder(graphics, rectangleToDraw);
                }
            }
        }
All Usage Examples Of SourceGrid.Range::IntersectsWith