C# 클래스 fCraft.ChatTimer

Provides a way to create and manage publicly-announced countdowns. Long timers announce once an hour (e.g. "7h left"). During the last hour, timer announces more often: every 10 minutes, then every minute, then every 10 seconds, and finally every second - until the timer is up.
파일 보기 프로젝트 열기: fragmer/fCraft 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ID int
Id int
MinDuration System.TimeSpan

Private Properties

프로퍼티 타입 설명
AddTimerToList void
Announce void
ChatTimer System
FindTimerByID ChatTimer
FindTimerById ChatTimer
RaiseStartedEvent void
RaiseStartedEvent void
RaiseStoppedEvent void
RaiseStoppedEvent void
RemoveTimerFromList void
Stop void
TimerCallback void

공개 메소드들

메소드 설명
Abort ( ) : void

Stops this timer, and removes it from the list of timers.

Start ( System.TimeSpan duration, [ message, [ startedBy ) : ChatTimer

Starts this timer with the specified duration, and end message.

Stop ( ) : void

비공개 메소드들

메소드 설명
AddTimerToList ( [ timer ) : void
Announce ( System.TimeSpan timeLeft ) : void
ChatTimer ( System.TimeSpan duration, [ message, [ startedBy ) : System
FindTimerByID ( int id ) : ChatTimer
FindTimerById ( int id ) : ChatTimer
RaiseStartedEvent ( ChatTimer timer ) : void
RaiseStartedEvent ( [ timer ) : void
RaiseStoppedEvent ( ChatTimer timer ) : void
RaiseStoppedEvent ( [ timer ) : void
RemoveTimerFromList ( [ timer ) : void
Stop ( bool aborted ) : void
TimerCallback ( [ task ) : void

메소드 상세

Abort() 공개 메소드

Stops this timer, and removes it from the list of timers.
public Abort ( ) : void
리턴 void

Start() 공개 정적인 메소드

Starts this timer with the specified duration, and end message.
startedBy is null. duration is less than ChatTimer.MinDuration.
public static Start ( System.TimeSpan duration, [ message, [ startedBy ) : ChatTimer
duration System.TimeSpan Amount of time the timer should run before completion. Should not be less than ChatTimer.MinDuration.
message [ Message to display when timer reaches zero. May be null.
startedBy [ Name of player who started timer. May not be null.
리턴 ChatTimer

Stop() 공개 메소드

public Stop ( ) : void
리턴 void

프로퍼티 상세

ID 공개적으로 프로퍼티

Timer's unique numeric ID.
public int ID
리턴 int

Id 공개적으로 프로퍼티

public int Id
리턴 int

MinDuration 공개적으로 정적으로 프로퍼티

Minimum allowed timer duration (one second).
public static TimeSpan,System MinDuration
리턴 System.TimeSpan