protected override void OnStop() { timer1.Enabled = false; Library.WriteErrorLog("Test window service stopped"); }
private void Timer1_Tick(object sender, ElapsedEventArgs e) { // Write code here to do some job depends on your requirement Library.WriteErrorLog("Timer ticked and some job has been done successfully"); }