public Service1() { this.InitializeComponent(); if (this._work == null) { this._work = new BatchWork(); } }
static void Main(string[] args) { BatchWork work = new BatchWork(); work.Start(); Console.WriteLine("按任意鍵繼續,按ESC離開"); var key = Console.ReadKey(true); if (key.Key == ConsoleKey.Escape) { Console.WriteLine("再會~!"); Console.ReadLine(); return; } }