33 lines
685 B
C#
33 lines
685 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.ServiceProcess;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AUTS.WindowsService
|
|
{
|
|
public partial class AUTSService : ServiceBase
|
|
{
|
|
public AUTSService()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override void OnStart(string[] args)
|
|
{
|
|
//开启监听
|
|
Services.UDPHelp.StartReceive();
|
|
}
|
|
|
|
protected override void OnStop()
|
|
{
|
|
//关闭监听
|
|
Services.UDPHelp.StopReceive();
|
|
}
|
|
}
|
|
}
|