You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BookingHeChuan/ServiceDeamon/Program.cs

28 lines
593 B
C#

using ServiceDeamon;
using System.Configuration;
using System.ServiceProcess;
1 year ago
public class Program
{
private static Timer timer;
1 year ago
private static int CheckInteval = Convert.ToInt32(ConfigurationManager.AppSettings["CheckInteval"]);
1 year ago
public static void Main(string[] args)
{
timer = new Timer(new TimerCallback(CheckSta));
timer.Change(CheckInteval, Timeout.Infinite);
Console.Read();
}
private static void CheckSta(object sta)
{
CheckServiceHelper.CheckStatus();
timer.Change(CheckInteval, Timeout.Infinite);
}
}