/// <summary> /// Starts the service. /// </summary> public void Startup() { this.monitor = new WindowMonitor(); this.timer = new Timer(1000); this.timer.Elapsed += this.OnTimerElapsed; this.timer.Start(); }
/// <summary> /// Stops the service. /// </summary> public void Shutdown() { this.timer.Stop(); this.timer.Elapsed -= this.OnTimerElapsed; this.timer.Dispose(); this.timer = null; this.monitor = null; }