Language Vulcan.NET
(CA Visual Objects for .NET)
| Date: | 05/26/08 |
| Author: | Russell Diehl |
| URL: | n/a |
| Comments: | 0 |
| Info: | http://www.govulcan.net |
| Score: |
USING System
USING System.ServiceProcess
USING System.Diagnostics
USING System.Timers
FUNCTION Start() AS VOID
ServiceBase.Run(VulcanService{})
RETURN
CLASS VulcanService INHERIT ServiceBase
PROTECTED timer AS Timer
CONSTRUCTOR() CLASS VulcanService
SUPER()
CanPauseAndContinue := TRUE
ServiceName := "Vulcan Sample Service"
timer := Timer{}
timer:Interval := 10000
timer:Elapsed += ElapsedEventHandler{SELF, @VulcanService.OnTimer}
RETURN
METHOD OnContinue() AS VOID CLASS VulcanService
EventLog:WriteEntry("Vulcan Sample Service continued")
timer:Enabled := TRUE
RETURN
METHOD OnPause() AS VOID CLASS VulcanService
EventLog:WriteEntry("Vulcan Sample Service paused")
timer:Enabled := FALSE
RETURN
METHOD OnStart(args AS STRING[]) AS VOID CLASS VulcanService
EventLog:WriteEntry("Vulcan Sample Service started")
timer:Enabled := TRUE
RETURN
METHOD OnStop() AS VOID CLASS VulcanService
EventLog:WriteEntry("Vulcan Sample Service stopped")
timer:Enabled := FALSE
RETURN
METHOD OnTimer(source AS OBJECT, e AS ElapsedEventArgs) AS VOID CLASS VulcanService
EventLog:WriteEntry("Hello Vulcan!")
RETURN
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments