C# Class SourceGrid.RangeRegion

RangeRegion is a collection of range that are never overlying each other.
Exibir arquivo Open project: zhuangyy/Motion Class Usage Examples

Public Methods

Method Description
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

Protected Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

Add() public method

Add the specified cell and add the cell to the collection.
public Add ( Position pCell ) : bool
pCell Position
return bool

Add() public method

Add the specified Range of cells
public Add ( Range pRange ) : bool
pRange Range
return bool

Add() public method

Add the specified ranges of cells
public Add ( RangeRegion pRange ) : bool
pRange RangeRegion
return bool

Clear() public method

Remove all the cells
public Clear ( ) : void
return void

Clear() public method

Remove all the cells excluse the specified range
public Clear ( Range pRangeToLeave ) : void
pRangeToLeave Range
return void

Contains() public method

Indicates if the specified cell is selected
public Contains ( Position p_Cell ) : bool
p_Cell Position
return bool

Contains() public method

Indicates if the specified range of cells is selected
public Contains ( Range p_Range ) : bool
p_Range Range
return bool

Contains() public method

Indicates if the specified range of cells is selected
public Contains ( RangeRegion p_Range ) : bool
p_Range RangeRegion
return bool

ContainsColumn() public method

Indicates if the specified column is selected
public ContainsColumn ( int p_Column ) : bool
p_Column int
return bool

ContainsRow() public method

Indicates if the specified row is selected
public ContainsRow ( int p_Row ) : bool
p_Row int
return bool

Exclude() public method

Returns the cells of the current range that don't intersect with the specified range
public Exclude ( Range pRange ) : RangeRegion
pRange Range
return RangeRegion

Exclude() public method

public Exclude ( RangeRegion pRange ) : RangeRegion
pRange RangeRegion
return RangeRegion

GetCellsPositions() public method

Returns a Collection of cells that represents the current class
public GetCellsPositions ( ) : PositionCollection
return PositionCollection

GetColumnsIndex() public method

Returns all the selected columns index
public GetColumnsIndex ( ) : int[]
return int[]

GetRanges() public method

Returns a Collection of range that represents the current class
public GetRanges ( ) : RangeCollection
return RangeCollection

GetRowsIndex() public method

Returns all the selected rows index
public GetRowsIndex ( ) : int[]
return int[]

Intersect() public method

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
return RangeRegion

Intersect() public method

public Intersect ( RangeRegion pRange ) : RangeRegion
pRange RangeRegion
return RangeRegion

IntersectsWith() public method

Indicates if the specified range of cells is selected
public IntersectsWith ( Range p_Range ) : bool
p_Range Range
return bool

IsEmpty() public method

public IsEmpty ( ) : bool
return bool

OnAddedRange() public method

public OnAddedRange ( RangeRegionEventArgs e ) : void
e RangeRegionEventArgs
return void

OnAddingRange() public method

public OnAddingRange ( RangeRegionCancelEventArgs e ) : void
e RangeRegionCancelEventArgs
return void

OnChanged() public method

public OnChanged ( EventArgs e ) : void
e System.EventArgs
return void

OnRemovedRange() public method

public OnRemovedRange ( RangeRegionEventArgs e ) : void
e RangeRegionEventArgs
return void

OnRemovingRange() public method

public OnRemovingRange ( RangeRegionCancelEventArgs e ) : void
e RangeRegionCancelEventArgs
return void

RangeRegion() public method

public RangeRegion ( ) : System
return System

RangeRegion() public method

public RangeRegion ( Range pRange ) : System
pRange Range
return System

RangeRegion() public method

Copy constructor
public RangeRegion ( RangeRegion other ) : System
other RangeRegion
return System

Remove() public method

Remove from the collection the specified cell
public Remove ( Position pCell ) : bool
pCell Position
return bool

Remove() public method

Remove from the collection the specified range of cells
public Remove ( Range pRange ) : bool
pRange Range
return bool

Remove() public method

Remove the specified ranges of cells
public Remove ( RangeRegion pRange ) : bool
pRange RangeRegion
return bool

ResetRange() protected method

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
return void

ToString() public method

public ToString ( ) : string
return string