You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
490 B
27 lines
490 B
1 year ago
|
using System.ServiceProcess;
|
||
|
|
||
|
namespace SSWMS.Service
|
||
|
{
|
||
|
public partial class Service1 : ServiceBase
|
||
|
{
|
||
|
public Service1()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
}
|
||
|
|
||
|
protected override void OnStart(string[] args)
|
||
|
{
|
||
|
ExitCode = Program.Start();
|
||
|
if (ExitCode > 0)
|
||
|
{
|
||
|
Stop();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
protected override void OnStop()
|
||
|
{
|
||
|
Program.Stop();
|
||
|
}
|
||
|
}
|
||
|
}
|