Example #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            bool startService = NetService.startService();

            if (startService)
            {
                label1.Text = "打印服务启动成功";
            }
            else
            {
                label1.Text = "打印服务启动失败";
            }
        }
Example #2
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     NetService.stopService();
 }
Example #3
0
 protected override void OnStop()
 {
     NetService.stopService();
     // TODO: 在此处添加代码以执行停止服务所需的关闭操作。
 }
Example #4
0
 protected override void OnStart(string[] args)
 {
     // TODO: 在此处添加代码以启动服务。
     NetService.startService();
 }