diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-03-17 19:02:30 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-03-17 19:02:30 +0300 |
commit | 554d98db57f98c252c10b480fabcbf0aa8189fd1 (patch) | |
tree | 8ece251bed3e537c9976fdfe1ac9dcc1ac384e5c /mcs/class/System/System.Timers | |
parent | 8a88d4db7598d998920bebc5c4f9e44dfd7b4f50 (diff) |
2003-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Timer.cs: Elapsed is an event. Added a few attributes.
svn path=/trunk/mcs/; revision=12620
Diffstat (limited to 'mcs/class/System/System.Timers')
-rw-r--r-- | mcs/class/System/System.Timers/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System/System.Timers/Timer.cs | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/mcs/class/System/System.Timers/ChangeLog b/mcs/class/System/System.Timers/ChangeLog index bbfd5e59eb8..7d284ee7245 100644 --- a/mcs/class/System/System.Timers/ChangeLog +++ b/mcs/class/System/System.Timers/ChangeLog @@ -1,3 +1,7 @@ +2003-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * Timer.cs: Elapsed is an event. Added a few attributes. + 2002-11-20 Gonzalo Paniagua Javier <gonzalo@ximian.com> * ChangeLog: diff --git a/mcs/class/System/System.Timers/Timer.cs b/mcs/class/System/System.Timers/Timer.cs index 56bcaa7dbda..382ee8b8708 100644 --- a/mcs/class/System/System.Timers/Timer.cs +++ b/mcs/class/System/System.Timers/Timer.cs @@ -24,8 +24,9 @@ namespace System.Timers ISynchronizeInvoke so; ManualResetEvent wait; + [Category("Behavior")] [TimersDescription("Occurs when the Interval has elapsed.")] - public ElapsedEventHandler Elapsed; + public event ElapsedEventHandler Elapsed; public Timer () : this (100) { @@ -41,6 +42,7 @@ namespace System.Timers } + [Category("Behavior")] [DefaultValue(true)] [TimersDescription("Indicates whether the timer will be restarted when it is enabled.")] public bool AutoReset @@ -49,6 +51,7 @@ namespace System.Timers set { autoReset = value; } } + [Category("Behavior")] [DefaultValue(false)] [TimersDescription("Indicates whether the timer is enabled to fire events at a defined interval.")] public bool Enabled @@ -60,8 +63,6 @@ namespace System.Timers enabled = value; if (value) { - // May be we can use ThreadPool for these once i figure out how to finalize - // the ThreadPool main thread on program termination. Thread t = new Thread (new ThreadStart (StartTimer)); t.Start (); } else { @@ -70,6 +71,7 @@ namespace System.Timers } } + [Category("Behavior")] [DefaultValue(100)] [RecommendedAsConfigurable(true)] [TimersDescription( "The number of milliseconds between timer events.")] |