C# Class ITimeU.Models.TimerModel

Show file Open project: heinek/ITimeU Class Usage Examples

Public Properties

Property Type Description
endTime DateTime?

Public Methods

Method Description
AddRuntime ( int milliseconds, int checkpointid ) : RuntimeModel

Adds the runtime.

AddRuntime ( RuntimeModel runtimemodel ) : void

Adds the runtime.

ChangeCheckpoint ( int checkpointid ) : void

Changes the checkpoint.

Delete ( ) : void

Deletes this timer.

DeleteRuntime ( RuntimeModel runtime ) : void

Deletes the runtime.

DeleteRuntime ( int runtimeid ) : void

Deletes the runtime.

EditRuntime ( int runtimeId, int h, int m, int s, int ms ) : void

Edits the runtime.

Equals ( object obj ) : bool

Determines whether the specified System.Object is equal to this instance.

GetCheckpoints ( ) : List

Gets all the checkpoints for .

GetFirstCheckpointId ( ) : int

Gets the first checkpoint.

GetHashCode ( ) : int
GetTimerById ( int id ) : TimerModel

Gets the timer by id.

GetTimers ( int raceId ) : List
SaveToDb ( ) : void

Saves the stop time stamp to db.

Start ( ) : void
Stop ( ) : void

Stops the timer.

TimerModel ( ) : System

Initializes a new instance of the TimerModel class.

TimerModel ( Timer timer ) : System

Initializes a new instance of the TimerModel class.

TimerModel ( int id ) : System

Initializes a new instance of the TimerModel class.

ToString ( ) : string

Returns a System.String that represents this instance.

Private Methods

Method Description
CreateDbEntity ( ) : int

Creates the db entity.

updateDbEntry ( ) : void

Updates the db entry.

Method Details

AddRuntime() public method

Adds the runtime.
public AddRuntime ( int milliseconds, int checkpointid ) : RuntimeModel
milliseconds int The milliseconds.
checkpointid int The checkpointid.
return RuntimeModel

AddRuntime() public method

Adds the runtime.
public AddRuntime ( RuntimeModel runtimemodel ) : void
runtimemodel RuntimeModel The runtimemodel.
return void

ChangeCheckpoint() public method

Changes the checkpoint.
public ChangeCheckpoint ( int checkpointid ) : void
checkpointid int The checkpointid.
return void

Delete() public method

Deletes this timer.
public Delete ( ) : void
return void

DeleteRuntime() public method

Deletes the runtime.
public DeleteRuntime ( RuntimeModel runtime ) : void
runtime RuntimeModel The runtime.
return void

DeleteRuntime() public method

Deletes the runtime.
public DeleteRuntime ( int runtimeid ) : void
runtimeid int The runtimeid.
return void

EditRuntime() public method

Edits the runtime.
public EditRuntime ( int runtimeId, int h, int m, int s, int ms ) : void
runtimeId int The runtime id.
h int The hour.
m int The minutes.
s int The seconds.
ms int
return void

Equals() public method

Determines whether the specified System.Object is equal to this instance.
public Equals ( object obj ) : bool
obj object The to compare with this instance.
return bool

GetCheckpoints() public method

Gets all the checkpoints for .
public GetCheckpoints ( ) : List
return List

GetFirstCheckpointId() public method

Gets the first checkpoint.
public GetFirstCheckpointId ( ) : int
return int

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetTimerById() public static method

Gets the timer by id.
public static GetTimerById ( int id ) : TimerModel
id int The id.
return TimerModel

GetTimers() public static method

public static GetTimers ( int raceId ) : List
raceId int
return List

SaveToDb() public method

Saves the stop time stamp to db.
public SaveToDb ( ) : void
return void

Start() public method

public Start ( ) : void
return void

Stop() public method

Stops the timer.
public Stop ( ) : void
return void

TimerModel() public method

Initializes a new instance of the TimerModel class.
public TimerModel ( ) : System
return System

TimerModel() public method

Initializes a new instance of the TimerModel class.
public TimerModel ( Timer timer ) : System
timer Timer The timer.
return System

TimerModel() public method

Initializes a new instance of the TimerModel class.
public TimerModel ( int id ) : System
id int The id.
return System

ToString() public method

Returns a System.String that represents this instance.
public ToString ( ) : string
return string

Property Details

endTime public property

public DateTime? endTime
return DateTime?