Beispiel #1
0
        /// <summary>
        /// 服务启动
        /// </summary>
        /// <param name="args"></param>
        protected override void OnStart(string[] args)
        {
            TimerCallback callBack = new TimerCallback(checkStatus);
            DoScanJob     doScan   = new DoScanJob();

            tim = new Timer(checkStatus, doScan, 0, mint * 60000);
        }
Beispiel #2
0
        private void checkStatus(object state)
        {
            DoScanJob s = (DoScanJob)state;

            s.DoJob();
        }