Exemplo n.º 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());
     }
 }
Exemplo n.º 2
0
 protected override void OnStop()
 {
     GlobObj.OutL("Hashtopus service was stopped.");
     HtpService.Stop();
 }
Exemplo n.º 3
0
 protected override void OnStart(string[] args)
 {
     HtpService.Start(args);
 }