Timer
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Implements a timer that raises an event at user-defined intervals.
- C#
- VB.NET
public class Timer : Component
Public Class Timer
Inherits Component
Constructors
Timer()
Initializes a new instance of the Timer class.
Timer(container)
Initializes a new instance of the Timer class together with the specified container.
| Name | Type | Description |
|---|---|---|
| container | IContainer | A IContainer that represents the container for the timer. |
Properties
Enabled
Boolean: Returns or sets whether the timer is running. (Default: False)
Interval
Int32: Returns or sets the time, in milliseconds, before the Tick event is raised relative to the last occurrence of the Tick event. (Default: 1000)
Tag
Object: Returns or sets an arbitrary string representing some type of user state. (Default: null)
Methods
Dispose(disposing)
Disposes of the resources, other than memory, used by the timer.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | true when this method is called by the application rather than a finalizer. |
OnTick(e)
Fires the Tick event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | A EventArgs that contains the event data. This is always Empty. |
OnWebEvent(e)
Processes the event from the client.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | Event arguments. |
OnWebRender(config)
Renders the client component.
| Parameter | Type | Description |
|---|---|---|
| config | Object | Dynamic configuration object. |
Restart()
Resets the timer.
Start()
Starts the timer.
Stop()
Stops the timer.
Events
Tick
EventHandler Fired when the specified timer interval has elapsed and the timer is enabled.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |