C# Class AK.F1.Timing.Live.LiveDriver

Mostra file Open project: simoneb/ak-f1-timing Class Usage Examples

Private Properties

Property Type Description
GetBitForColumn int
IsValidSectorNumber bool

Public Methods

Method Description
ChangeStatus ( DriverStatus newStatus ) : void

Tries to change the status of this driver.

ColumnHasValue ( GridColumn column ) : bool

Returns a value indicating if the specified column has a value.

ComputeLapNumber ( int raceLapNumber ) : int

Computes the lap number of this driver given the current race lap number.

GetLastSector ( int sectorNumber ) : PostedTime

Gets the last sector time for the specified sector number.

IsCurrentSectorNumber ( int sectorNumber ) : bool

Returns a value indicating if the specfied sector number is the sector this driver is currently completing.

IsPreviousSectorNumber ( int sectorNumber ) : bool

Returns a value indicating if the specfied sector number is the one previous to that this driver completed.

LiveDriver ( int id ) : System

Initialises a new instance of the LiveDriver class.

MatchesName ( string s ) : bool

Returns a value indicating if the specified string matches this driver's name.

Reset ( ) : void

Resets all state information associated with this driver.

SetColumnHasValue ( GridColumn column, bool value ) : void

Sets a value indicating if the specified column has a value.

SetLastSector ( int sectorNumber, PostedTime time ) : void

Sets this driver's last sector time.

ToString ( ) : string

Private Methods

Method Description
GetBitForColumn ( GridColumn column ) : int
IsValidSectorNumber ( int sectorNumber ) : bool

Method Details

ChangeStatus() public method

Tries to change the status of this driver.
public ChangeStatus ( DriverStatus newStatus ) : void
newStatus DriverStatus The new driver status.
return void

ColumnHasValue() public method

Returns a value indicating if the specified column has a value.
public ColumnHasValue ( GridColumn column ) : bool
column GridColumn The column to test.
return bool

ComputeLapNumber() public method

Computes the lap number of this driver given the current race lap number.
/// Thrown when is negative. ///
public ComputeLapNumber ( int raceLapNumber ) : int
raceLapNumber int The race lap number
return int

GetLastSector() public method

Gets the last sector time for the specified sector number.
/// Thrown when is zero or greater than three. ///
public GetLastSector ( int sectorNumber ) : PostedTime
sectorNumber int The one-based sector number.
return PostedTime

IsCurrentSectorNumber() public method

Returns a value indicating if the specfied sector number is the sector this driver is currently completing.
public IsCurrentSectorNumber ( int sectorNumber ) : bool
sectorNumber int The one-based sector number.
return bool

IsPreviousSectorNumber() public method

Returns a value indicating if the specfied sector number is the one previous to that this driver completed.
public IsPreviousSectorNumber ( int sectorNumber ) : bool
sectorNumber int The one-based sector number.
return bool

LiveDriver() public method

Initialises a new instance of the LiveDriver class.
public LiveDriver ( int id ) : System
id int
return System

MatchesName() public method

Returns a value indicating if the specified string matches this driver's name.
public MatchesName ( string s ) : bool
s string The string to test.
return bool

Reset() public method

Resets all state information associated with this driver.
public Reset ( ) : void
return void

SetColumnHasValue() public method

Sets a value indicating if the specified column has a value.
public SetColumnHasValue ( GridColumn column, bool value ) : void
column GridColumn The column to set.
value bool if the specified column has a value, /// otherwise;
return void

SetLastSector() public method

Sets this driver's last sector time.
/// Thrown when is zero or greater than three. /// /// Thrown when is . ///
public SetLastSector ( int sectorNumber, PostedTime time ) : void
sectorNumber int The one-based sector number.
time PostedTime The sector time.
return void

ToString() public method

public ToString ( ) : string
return string