Пример #1
0
 static void Main(string[] args)
 {
     if (Environment.UserInteractive || Environment.OSVersion.Platform == PlatformID.Unix)
     {
         // start thread directly
         HtpService.Start(args);
         // and wait for finish before closing console
         HtpService.rst.WaitOne();
     }
     else
     {
         // running as service
         HtpService.enabled = true;
         ServiceBase.Run(new Service());
     }
 }
Пример #2
0
 protected override void OnStop()
 {
     GlobObj.OutL("Hashtopus service was stopped.");
     HtpService.Stop();
 }
Пример #3
0
 protected override void OnStart(string[] args)
 {
     HtpService.Start(args);
 }