初始化
This commit is contained in:
32
Face.WindowsService/FaceService.cs
Normal file
32
Face.WindowsService/FaceService.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using FaceMachines.Services;
|
||||
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 Face.WindowsService
|
||||
{
|
||||
public partial class FaceService : ServiceBase
|
||||
{
|
||||
public FaceService()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnStart(string[] args)
|
||||
{
|
||||
//开启监听
|
||||
UDPHelp.StartReceive();
|
||||
}
|
||||
protected override void OnStop()
|
||||
{
|
||||
//关闭监听
|
||||
UDPHelp.StopReceive();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user