|
using System;
using System.Collections.Generic;
using System.ServiceProcess;
using System.Text;
using System.Threading;
namespace SystemTrayIconInSvc
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
string[] args = Environment.GetCommandLineArgs();
for (int i = 1; i < args.Length; i++)
{
// start with debug mode
if (string.Compare(args[i], "-debug", true) == 0)
{
Svc svc = new Svc();
svc.DebugStart();
Thread.Sleep(Timeout.Infinite);
return;
}
}
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Svc()
};
ServiceBase.Run(ServicesToRun);
}
}
}
|
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.
Jerry is from China. He was captivated by computer programming since 13 years old when first time played with Q-Basic.
- Windows / Linux & C++
- iOS & Obj-C
- .Net & C#
- Flex/Flash & ActionScript
- HTML / CSS / Javascript
- Gaming Server programming / video, audio processing / image & graphics
Contact: vcer(at)qq.com
Chinese Blog: http://blog.csdn.net/wangjia184