예제 #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            DOSService monitoring;

            if (args.Length > 0 && args[0] == "-console")
            {
                monitoring = new DOSService(true);
            }
            else
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[]
                {
                    new Service1()
                };
                ServiceBase.Run(ServicesToRun);
            }
        }
예제 #2
0
 protected override void OnStart(string[] args)
 {
     monitoring = new DOSService(false);
 }