|
using System.Collections.Generic;
using System.ServiceProcess;
using System.Text;
namespace WallpaperChanger
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
// ServiceBase[] ServicesToRun;
// // More than one user Service may run within the same process. To add
// // another service to this process, change the following line to
// // create a second service object. For example,
// //
// // ServicesToRun = new ServiceBase[] {new Service1(), new MySecondUserService()};
// //
// ServicesToRun = new ServiceBase[] { new Service1() };
//ServiceBase.Run(ServicesToRun);
//#if (!DEBUG)
System.ServiceProcess.ServiceBase[] ServicesToRun;
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service1() };
System.ServiceProcess.ServiceBase.Run(ServicesToRun);
//#else
// // Debug code: this allows the process to run as a non-service.
// // It will kick off the service start point, but never kill it.
// // Shut down the debugger to exit
// Service1 service = new Service1();
// service.Start();
// // Put a breakpoint on the following line to always catch
// // your service when it has finished its work
// System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
//#endif
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.