1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Data;
5
using System.Diagnostics;
6
using System.ServiceProcess;
7
using System.Text;
8
using System.Windows.Forms;
9
using System.Threading;
10
11
namespace EyeService
12
添加安装程序,将serviceInstaller1启动类型改为:Automatic以便开机即运行此服务.其他属性根据个人爱好更改即可.最后安装下此服务后,在控制面板的服务列表中就可以看到了.2
3
4
5
6
7
8
9
10
11
12
运行一小时后弹出信息框: