Exemplo n.º 1
0
        protected override void OnShutdown()
        {
            try
            {
                Supervisor.Shutdown();
            }
            catch { }

            base.OnShutdown();

            this.Stop();
        }
Exemplo n.º 2
0
        protected override void OnCustomCommand(int command)
        {
            if (command == SERVICE_CONTROL_PRESHUTDOWN)
            {
                try
                {
                    Supervisor.Shutdown();
                }
                catch { }
            }

            base.OnCustomCommand(command);

            this.Stop();
        }