static void Main(string[] args)
        {
            WatchdogService service = new WatchdogService();

            if (Environment.UserInteractive)
            {
                service.OnStart(args);
                Application.Run();
            }
            else
            {
                ServiceBase.Run(service);
            }
        }
        static void Main(string[] args)
        {
            WatchdogService service = new WatchdogService();

            if (Environment.UserInteractive)
            {
                service.OnStart(args);
                Application.Run();
            }
            else
            {
                ServiceBase.Run(service);
            }
        }