| 123456789101112131415161718192021222324252627282930313233 |
-
- using System.ServiceProcess;
- using PLC_S;
- namespace PLC_WS
- {
- public partial class Service1 : ServiceBase
- {
- public Service1()
- {
- InitializeComponent();
- }
- protected override void OnStart(string[] args)
- {
- //if (args.IsNullOrEmpty())
- //{
- // Logger.Debug("Service1 args is null");
- //}
- //else
- //{
- // Logger.Debug("Service1 args is " + JsonHelper.FromObject(args));
- //}
- PLC_Server.Start();
- }
- protected override void OnStop()
- {
- PLC_Server.Stop();
- }
- }
- }
|