using System; using System.Diagnostics; using System.ServiceProcess; namespace IEWService { [Microsoft.VisualBasic.CompilerServices.DesignerGenerated()] public partial class IEWService : ServiceBase { // UserService 覆寫 Dispose 以清除元件清單。 [DebuggerNonUserCode()] protected override void Dispose(bool disposing) { try { if (disposing && components != null) { components.Dispose(); } } finally { base.Dispose(disposing); } } // 處理序的主要進入點 [MTAThread()] [DebuggerNonUserCode()] public static void Main() { ServiceBase[] ServicesToRun; // 在同一個處理序中可以執行多個 NT 服務。若要在這個處理序中 // 加入另一項服務,請修改下行程式碼, // 以建立第二個服務物件。例如, // // ServicesToRun = New System.ServiceProcess.ServiceBase () {New IEWService, New MySecondUserService} // ServicesToRun = new ServiceBase[] { new IEWService() }; Run(ServicesToRun); } // 為元件設計工具的必要項 private System.ComponentModel.IContainer components; // 注意: 以下為元件設計工具的所需的程序 // 您可以使用元件設計工具進行修改。 // 請不要使用程式碼編輯器進行修改。 [DebuggerStepThrough()] private void InitializeComponent() { TimerCheckEvent = new System.Timers.Timer(); TimerCheckEvent.Elapsed += new System.Timers.ElapsedEventHandler(TimerCheckEvent_Elapsed); ((System.ComponentModel.ISupportInitialize)TimerCheckEvent).BeginInit(); // // TimerCheckEvent // TimerCheckEvent.Interval = 300000.0d; // // IEWService // ServiceName = "MES IEW Service"; ((System.ComponentModel.ISupportInitialize)TimerCheckEvent).EndInit(); } internal System.Timers.Timer TimerCheckEvent; } }