Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2003-03-17 19:02:30 +0300
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2003-03-17 19:02:30 +0300
commit554d98db57f98c252c10b480fabcbf0aa8189fd1 (patch)
tree8ece251bed3e537c9976fdfe1ac9dcc1ac384e5c /mcs/class/System/System.Timers/Timer.cs
parent8a88d4db7598d998920bebc5c4f9e44dfd7b4f50 (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/Timer.cs')
-rw-r--r--mcs/class/System/System.Timers/Timer.cs8
1 files changed, 5 insertions, 3 deletions
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.")]