C# Class SourceGrid.Range

Afficher le fichier Open project: zhuangyy/Motion Class Usage Examples

Méthodes publiques

Свойство Type Description
Empty Range

Méthodes publiques

Méthode Description
Contains ( Position p_Position ) : bool

Returns true if the specified cell position is present in the current range.

Contains ( Range p_Range ) : bool

Returns true if the specified range is present in the current range.

ContainsColumn ( int p_Col ) : bool

Returns true if the specified column is present in the current range.

ContainsRow ( int p_Row ) : bool

Returns true if the specified row is present in the current range.

Equals ( Range p_Range ) : bool

Equals ( object obj ) : bool

Exclude ( Range range ) : RangeRegion

Return all the cells that don't intersect with the specified cells. (Remove the specified cells from the current cells ad returns the remaining cells)

GetBounds ( Range p_Range1, Range p_Range2 ) : Range

Returns a range with the smaller Start and the bigger End. The Union of the 2 Range. If one of the range is empty then the return is the other range.

GetCellsPositions ( ) : PositionCollection

GetHashCode ( ) : int

Intersect ( Range p_Range ) : Range

Returns the intersection between the 2 Range. If one of the range is empty then the return is empty.

Intersect ( Range p_Range1, Range p_Range2 ) : Range

Returns the intersection between the 2 Range. If one of the range is empty then the return is empty.

IntersectsWith ( Range p_Range ) : bool

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.

IntersectsWith ( Range p_Range1, Range p_Range2 ) : bool

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.

IsEmpty ( ) : bool

Determines if the current range is empty

MoveTo ( Position p_StartPosition ) : void

Move the current range to the specified position, leaving the current ColumnsCount and RowsCount

Range ( Position p_SinglePosition ) : System

Construct a Range of a single cell

Range ( Position p_Start, Position p_End ) : System

Constructor

Range ( int p_StartRow, int p_StartCol, int p_EndRow, int p_EndCol ) : System

Constructor

ToString ( ) : string

Union ( Range p_Range1, Range p_Range2 ) : RangeRegion

Returns a range with the smaller Start and the bigger End. The Union of the 2 Range. If one of the range is empty then the return is the other range.

operator ( ) : bool

Private Methods

Méthode Description
Normalize ( ) : void

Check and fix the range to always have Start smaller than End

Range ( ) : System
Range ( Position p_Start, Position p_End, bool p_bCheck ) : System

Method Details

Contains() public méthode

Returns true if the specified cell position is present in the current range.
public Contains ( Position p_Position ) : bool
p_Position Position
Résultat bool

Contains() public méthode

Returns true if the specified range is present in the current range.
public Contains ( Range p_Range ) : bool
p_Range Range
Résultat bool

ContainsColumn() public méthode

Returns true if the specified column is present in the current range.
public ContainsColumn ( int p_Col ) : bool
p_Col int
Résultat bool

ContainsRow() public méthode

Returns true if the specified row is present in the current range.
public ContainsRow ( int p_Row ) : bool
p_Row int
Résultat bool

Equals() public méthode

public Equals ( Range p_Range ) : bool
p_Range Range
Résultat bool

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

Exclude() public méthode

Return all the cells that don't intersect with the specified cells. (Remove the specified cells from the current cells ad returns the remaining cells)
public Exclude ( Range range ) : RangeRegion
range Range
Résultat RangeRegion

GetBounds() public static méthode

Returns a range with the smaller Start and the bigger End. The Union of the 2 Range. If one of the range is empty then the return is the other range.
public static GetBounds ( Range p_Range1, Range p_Range2 ) : Range
p_Range1 Range
p_Range2 Range
Résultat Range

GetCellsPositions() public méthode

public GetCellsPositions ( ) : PositionCollection
Résultat PositionCollection

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

Intersect() public méthode

Returns the intersection between the 2 Range. If one of the range is empty then the return is empty.
public Intersect ( Range p_Range ) : Range
p_Range Range
Résultat Range

Intersect() public static méthode

Returns the intersection between the 2 Range. If one of the range is empty then the return is empty.
public static Intersect ( Range p_Range1, Range p_Range2 ) : Range
p_Range1 Range
p_Range2 Range
Résultat Range

IntersectsWith() public méthode

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
Résultat bool

IntersectsWith() public static méthode

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 static IntersectsWith ( Range p_Range1, Range p_Range2 ) : bool
p_Range1 Range
p_Range2 Range
Résultat bool

IsEmpty() public méthode

Determines if the current range is empty
public IsEmpty ( ) : bool
Résultat bool

MoveTo() public méthode

Move the current range to the specified position, leaving the current ColumnsCount and RowsCount
public MoveTo ( Position p_StartPosition ) : void
p_StartPosition Position
Résultat void

Range() public méthode

Construct a Range of a single cell
public Range ( Position p_SinglePosition ) : System
p_SinglePosition Position
Résultat System

Range() public méthode

Constructor
public Range ( Position p_Start, Position p_End ) : System
p_Start Position
p_End Position
Résultat System

Range() public méthode

Constructor
public Range ( int p_StartRow, int p_StartCol, int p_EndRow, int p_EndCol ) : System
p_StartRow int
p_StartCol int
p_EndRow int
p_EndCol int
Résultat System

ToString() public méthode

public ToString ( ) : string
Résultat string

Union() public static méthode

Returns a range with the smaller Start and the bigger End. The Union of the 2 Range. If one of the range is empty then the return is the other range.
public static Union ( Range p_Range1, Range p_Range2 ) : RangeRegion
p_Range1 Range
p_Range2 Range
Résultat RangeRegion

operator() public static méthode

public static operator ( ) : bool
Résultat bool

Property Details

Empty public_oe static_oe property

Represents an empty range
public static Range,SourceGrid Empty
Résultat Range