TimerExtensions
Wisej.Web.Markup.TimerExtensions
Last updated
Was this helpful?
Wisej.Web.Markup.TimerExtensions
Last updated
Was this helpful?
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the Timer class.
public class TimerExtensions
Sets the Enabled property of the specified Timer.
TTimer
timer
The timer for which to set the Enabled property.
enabled
A boolean indicating whether the timer is enabled.
Returns: TTimer. The modified timer with the updated Enabled property.
This method allows you to enable or disable the timer.
myTimer.Enabled(true);
Sets the interval for the specified Timer.
TTimer
timer
The timer for which to set the interval.
interval
The interval to set for the timer.
Returns: TTimer. The modified timer with the updated interval.
This method allows you to specify the interval between timer events.
myTimer.Interval(1000);
Attaches an event handler for the Tick event of the specified Timer.
TTimer
timer
The timer to attach the event handler to.
action
An action to execute when the timer ticks.
Returns: TTimer. The modified timer with the attached Tick event handler.
This method allows you to execute a custom action whenever the timer ticks.
myTimer.OnTick(t =>
{
AlertBox.Show("Timer ticked!");
});
Sets the Tag property of the specified Timer.
TTimer
timer
The timer for which to set the Tag property.
obj
The object to associate with the timer.
Returns: TTimer. The modified timer with the updated Tag property.
This method allows you to associate an arbitrary object with the timer.
myTimer.Tag("CustomTagData");
The type of the timer, must inherit from .
The type of the timer, must inherit from .
The type of the timer, must inherit from .
The type of the timer, must inherit from .