大连融科 WMS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

64 lines
1.4 KiB

//#define DEPLOY
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Reflection;
using Quartz;
using Quartz.Impl;
namespace SiaSun.LMS.WinService
{
static class Program
{
public static string _BaseUrl = SiaSun.LMS.Common.StringUtil.GetConfig("SiaSunSrvUrl");
public static log4net.ILog sysLog = log4net.LogManager.GetLogger("WinServiceLog");
static ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
static IScheduler scheduler;
/// <summary>
/// 应用程序的主入口点。
/// </summary>
static void Main()
{
#if DEPLOY
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new WMSService()
};
ServiceBase.Run(ServicesToRun);
#else
try
{
ServiceHostGroup.StartAllConfiguredServices();
scheduler = schedulerFactory.GetScheduler();
scheduler.Start();
while (true)
{
string sResult = string.Empty;
System.Threading.Thread.Sleep(2000);
}
}
catch (Exception ex)
{
sysLog.Fatal("系统异常", ex);
}
#endif
}
}
}