C# 클래스 Hourglass.Timing.Timer

A countdown timer.
상속: Hourglass.Timing.TimerBase
파일 보기 프로젝트 열기: Dziemborowicz/Hourglass 1 사용 예제들

공개 메소드들

메소드 설명
FromTimerInfo ( Hourglass.Serialization.TimerInfo timerInfo ) : Timer

Returns a Timer for a TimerInfo.

Start ( TimerStart newTimerStart ) : bool

Starts the timer.

Timer ( ) : System

Initializes a new instance of the Timer class.

Timer ( Hourglass.Serialization.TimerInfo timerInfo ) : System

Initializes a new instance of the Timer class.

Timer ( TimerOptions options ) : System

Initializes a new instance of the Timer class.

ToString ( ) : string

Returns a string that represents the current object.

ToTimerInfo ( ) : Hourglass.Serialization.TimerInfo

Returns the representation of the TimerInfo used for XML serialization.

보호된 메소드들

메소드 설명
OnExpired ( ) : void

Invoked before the TimerBase.Expired event is raised

OnPaused ( ) : void

Invoked before the TimerBase.Paused event is raised

OnResumed ( ) : void

Invoked before the TimerBase.Resumed event is raised

OnStarted ( ) : void

Invoked before the TimerBase.Started event is raised

OnStopped ( ) : void

Invoked before the TimerBase.Stopped event is raised

OnTick ( ) : void

Invoked before the TimerBase.Tick event is raised

비공개 메소드들

메소드 설명
GetTimeElapsedAsPercentage ( ) : double?

Returns the percentage of time elapsed since the timer was started.

GetTimeElapsedAsString ( ) : string

Returns the string representation of the time elapsed since the timer was started.

GetTimeExpiredAsString ( ) : string

Returns the string representation of the time since the timer expired.

GetTimeLeftAsPercentage ( ) : double?

Returns the percentage of time left until the timer expires.

GetTimeLeftAsString ( ) : string

Returns the string representation of the time left until the timer expires.

Loop ( ) : void

Restarts the timer with the current TimerStart.

UpdateHourglassTimer ( ) : void

Updates the Timer state.

메소드 상세

FromTimerInfo() 공개 정적인 메소드

Returns a Timer for a TimerInfo.
public static FromTimerInfo ( Hourglass.Serialization.TimerInfo timerInfo ) : Timer
timerInfo Hourglass.Serialization.TimerInfo A .
리턴 Timer

OnExpired() 보호된 메소드

Invoked before the TimerBase.Expired event is raised
protected OnExpired ( ) : void
리턴 void

OnPaused() 보호된 메소드

Invoked before the TimerBase.Paused event is raised
protected OnPaused ( ) : void
리턴 void

OnResumed() 보호된 메소드

Invoked before the TimerBase.Resumed event is raised
protected OnResumed ( ) : void
리턴 void

OnStarted() 보호된 메소드

Invoked before the TimerBase.Started event is raised
protected OnStarted ( ) : void
리턴 void

OnStopped() 보호된 메소드

Invoked before the TimerBase.Stopped event is raised
protected OnStopped ( ) : void
리턴 void

OnTick() 보호된 메소드

Invoked before the TimerBase.Tick event is raised
protected OnTick ( ) : void
리턴 void

Start() 공개 메소드

Starts the timer.
If the timer has been disposed.
public Start ( TimerStart newTimerStart ) : bool
newTimerStart TimerStart A .
리턴 bool

Timer() 공개 메소드

Initializes a new instance of the Timer class.
public Timer ( ) : System
리턴 System

Timer() 공개 메소드

Initializes a new instance of the Timer class.
public Timer ( Hourglass.Serialization.TimerInfo timerInfo ) : System
timerInfo Hourglass.Serialization.TimerInfo A representing the state of the .
리턴 System

Timer() 공개 메소드

Initializes a new instance of the Timer class.
public Timer ( TimerOptions options ) : System
options TimerOptions Configuration data for this timer.
리턴 System

ToString() 공개 메소드

Returns a string that represents the current object.
public ToString ( ) : string
리턴 string

ToTimerInfo() 공개 메소드

Returns the representation of the TimerInfo used for XML serialization.
public ToTimerInfo ( ) : Hourglass.Serialization.TimerInfo
리턴 Hourglass.Serialization.TimerInfo