Table of Contents

Class Timer

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Implements a timer that raises an event at user-defined intervals. This timer is optimized for use in AlterNET UI applications and must be used in a GUI environment instead of any other timers.

public class Timer : BaseComponent, IBaseObject, IDisposableObject, IComponent, IDisposable
Inheritance
Timer
Implements

Constructors

Timer()

Initializes a new instance of the Timer class.

Timer(int)

Initializes a new instance of the Timer class with the specified tick interval (in milliseconds).

Timer(int, EventHandler)

Initializes a new instance of the Timer class with the specified tick interval (in milliseconds) and Tick handler.

Timer(TimeSpan)

Initializes a new instance of the Timer class with the specified tick interval.

Timer(TimeSpan, EventHandler)

Initializes a new instance of the Timer class with the specified tick interval and Tick handler.

Properties

AutoReset

Gets or sets a bool indicating whether the Timer should raise events only once (false) or repeatedly (true).

Enabled

Gets or sets whether the timer is running.

Handler

Gets native timer.

Interval

Gets or sets the time duration (in milliseconds), before the Tick event is raised.

IntervalAsTimeSpan

Gets or sets the time duration, before the Tick event is raised relative to the last occurrence of the Tick event.

Methods

DisposeManaged()

Override to dispose managed resources. Here we dispose all used object references.

OnTick(EventArgs)

Raises the Tick event.

Start()

Starts the timer.

Stop()

Stops the timer.

Events

Elapsed

Occurs when the specified timer interval has elapsed.

Tick

Occurs when the specified timer interval has elapsed.