C# Класс SourceGrid.RangeRegion

RangeRegion is a collection of range that are never overlying each other.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Add ( Position pCell ) : bool

Add the specified cell and add the cell to the collection.

Add ( Range pRange ) : bool

Add the specified Range of cells

Add ( RangeRegion pRange ) : bool

Add the specified ranges of cells

Clear ( ) : void

Remove all the cells

Clear ( Range pRangeToLeave ) : void

Remove all the cells excluse the specified range

Contains ( Position p_Cell ) : bool

Indicates if the specified cell is selected

Contains ( Range p_Range ) : bool

Indicates if the specified range of cells is selected

Contains ( RangeRegion p_Range ) : bool

Indicates if the specified range of cells is selected

ContainsColumn ( int p_Column ) : bool

Indicates if the specified column is selected

ContainsRow ( int p_Row ) : bool

Indicates if the specified row is selected

Exclude ( Range pRange ) : RangeRegion

Returns the cells of the current range that don't intersect with the specified range

Exclude ( RangeRegion pRange ) : RangeRegion
GetCellsPositions ( ) : PositionCollection

Returns a Collection of cells that represents the current class

GetColumnsIndex ( ) : int[]

Returns all the selected columns index

GetRanges ( ) : RangeCollection

Returns a Collection of range that represents the current class

GetRowsIndex ( ) : int[]

Returns all the selected rows index

Intersect ( Range p_Range ) : RangeRegion

Returns a non contiguous range of cells of the intersection between the current range and the specified range.

Intersect ( RangeRegion pRange ) : RangeRegion
IntersectsWith ( Range p_Range ) : bool

Indicates if the specified range of cells is selected

IsEmpty ( ) : bool
OnAddedRange ( RangeRegionEventArgs e ) : void
OnAddingRange ( RangeRegionCancelEventArgs e ) : void
OnChanged ( EventArgs e ) : void
OnRemovedRange ( RangeRegionEventArgs e ) : void
OnRemovingRange ( RangeRegionCancelEventArgs e ) : void
RangeRegion ( ) : System
RangeRegion ( Range pRange ) : System
RangeRegion ( RangeRegion other ) : System

Copy constructor

Remove ( Position pCell ) : bool

Remove from the collection the specified cell

Remove ( Range pRange ) : bool

Remove from the collection the specified range of cells

Remove ( RangeRegion pRange ) : bool

Remove the specified ranges of cells

ToString ( ) : string

Защищенные методы

Метод Описание
ResetRange ( ) : void

Reset the object to its original state. It is similar to the Clear method but doesn't call any events when removeing the saved positions, usually used when refreshing the cells with new data. To simply clear the object use the Clear method, only use this method when you want to force a reset of the object without calling additional methods.

Приватные методы

Метод Описание
InternalAdd ( RangeRegion pRange ) : bool

Prende un range che è già stato filtrato con solo le celle non presenti nell'attuale range

InternalRemove ( RangeRegion pRange ) : bool

Prende un range che è già stato filtrato con solo le celle presenti nell'attuale range

Описание методов

Add() публичный Метод

Add the specified cell and add the cell to the collection.
public Add ( Position pCell ) : bool
pCell Position
Результат bool

Add() публичный Метод

Add the specified Range of cells
public Add ( Range pRange ) : bool
pRange Range
Результат bool

Add() публичный Метод

Add the specified ranges of cells
public Add ( RangeRegion pRange ) : bool
pRange RangeRegion
Результат bool

Clear() публичный Метод

Remove all the cells
public Clear ( ) : void
Результат void

Clear() публичный Метод

Remove all the cells excluse the specified range
public Clear ( Range pRangeToLeave ) : void
pRangeToLeave Range
Результат void

Contains() публичный Метод

Indicates if the specified cell is selected
public Contains ( Position p_Cell ) : bool
p_Cell Position
Результат bool

Contains() публичный Метод

Indicates if the specified range of cells is selected
public Contains ( Range p_Range ) : bool
p_Range Range
Результат bool

Contains() публичный Метод

Indicates if the specified range of cells is selected
public Contains ( RangeRegion p_Range ) : bool
p_Range RangeRegion
Результат bool

ContainsColumn() публичный Метод

Indicates if the specified column is selected
public ContainsColumn ( int p_Column ) : bool
p_Column int
Результат bool

ContainsRow() публичный Метод

Indicates if the specified row is selected
public ContainsRow ( int p_Row ) : bool
p_Row int
Результат bool

Exclude() публичный Метод

Returns the cells of the current range that don't intersect with the specified range
public Exclude ( Range pRange ) : RangeRegion
pRange Range
Результат RangeRegion

Exclude() публичный Метод

public Exclude ( RangeRegion pRange ) : RangeRegion
pRange RangeRegion
Результат RangeRegion

GetCellsPositions() публичный Метод

Returns a Collection of cells that represents the current class
public GetCellsPositions ( ) : PositionCollection
Результат PositionCollection

GetColumnsIndex() публичный Метод

Returns all the selected columns index
public GetColumnsIndex ( ) : int[]
Результат int[]

GetRanges() публичный Метод

Returns a Collection of range that represents the current class
public GetRanges ( ) : RangeCollection
Результат RangeCollection

GetRowsIndex() публичный Метод

Returns all the selected rows index
public GetRowsIndex ( ) : int[]
Результат int[]

Intersect() публичный Метод

Returns a non contiguous range of cells of the intersection between the current range and the specified range.
public Intersect ( Range p_Range ) : RangeRegion
p_Range Range
Результат RangeRegion

Intersect() публичный Метод

public Intersect ( RangeRegion pRange ) : RangeRegion
pRange RangeRegion
Результат RangeRegion

IntersectsWith() публичный Метод

Indicates if the specified range of cells is selected
public IntersectsWith ( Range p_Range ) : bool
p_Range Range
Результат bool

IsEmpty() публичный Метод

public IsEmpty ( ) : bool
Результат bool

OnAddedRange() публичный Метод

public OnAddedRange ( RangeRegionEventArgs e ) : void
e RangeRegionEventArgs
Результат void

OnAddingRange() публичный Метод

public OnAddingRange ( RangeRegionCancelEventArgs e ) : void
e RangeRegionCancelEventArgs
Результат void

OnChanged() публичный Метод

public OnChanged ( EventArgs e ) : void
e System.EventArgs
Результат void

OnRemovedRange() публичный Метод

public OnRemovedRange ( RangeRegionEventArgs e ) : void
e RangeRegionEventArgs
Результат void

OnRemovingRange() публичный Метод

public OnRemovingRange ( RangeRegionCancelEventArgs e ) : void
e RangeRegionCancelEventArgs
Результат void

RangeRegion() публичный Метод

public RangeRegion ( ) : System
Результат System

RangeRegion() публичный Метод

public RangeRegion ( Range pRange ) : System
pRange Range
Результат System

RangeRegion() публичный Метод

Copy constructor
public RangeRegion ( RangeRegion other ) : System
other RangeRegion
Результат System

Remove() публичный Метод

Remove from the collection the specified cell
public Remove ( Position pCell ) : bool
pCell Position
Результат bool

Remove() публичный Метод

Remove from the collection the specified range of cells
public Remove ( Range pRange ) : bool
pRange Range
Результат bool

Remove() публичный Метод

Remove the specified ranges of cells
public Remove ( RangeRegion pRange ) : bool
pRange RangeRegion
Результат bool

ResetRange() защищенный Метод

Reset the object to its original state. It is similar to the Clear method but doesn't call any events when removeing the saved positions, usually used when refreshing the cells with new data. To simply clear the object use the Clear method, only use this method when you want to force a reset of the object without calling additional methods.
protected ResetRange ( ) : void
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string