https://github.com/namankumar/timedevent
Class to fire events at a particular interval
https://github.com/namankumar/timedevent
Last synced: 8 months ago
JSON representation
Class to fire events at a particular interval
- Host: GitHub
- URL: https://github.com/namankumar/timedevent
- Owner: namankumar
- License: other
- Created: 2010-12-19T23:04:30.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-12-19T23:19:14.000Z (over 15 years ago)
- Last Synced: 2025-04-13T16:16:20.925Z (about 1 year ago)
- Language: C#
- Homepage: http://www.namank.com
- Size: 85.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE.TXT
Awesome Lists containing this project
README
A stand alone class that fires an event at a particular interval. This frees the user from having to know about timer, events, and delegates. Also, you can pass arguments each time the timer is fired.
Include this namespace in your project and follow the instructions below:
-----instantiate
TimedEvent event = new TimedEvent(int timeDelay, int fireInterval, object parameters)
-----enable firing events
event.eventTrigger += new TimedEvent.fireEvent(methodToBeCalledWhenTimerFired);
public void methodToBeCalledWhenTimerFired(object sender, EventArgs e)
{
//Do something
//Note the method signature...the method and delegate (fireEvent) signature MUST match
//"object sender" can be used to pass any sort of information
}
-----stop timer
event.disposeTimer();
Version 1.0 by Naman Kumar, August 25,2009