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.
|
|
|
|
using ServiceDeamon;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
using System.ServiceProcess;
|
|
|
|
|
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
private static Timer timer;
|
|
|
|
|
|
|
|
|
|
private static int CheckInteval = Convert.ToInt32(ConfigurationManager.AppSettings["CheckInteval"]);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|