protected override void OnStop() { timer1.AutoReset = false; timer1.Enabled = false; SendMailService.WriteErrorLog("Service stopped"); }
protected override void OnStart(string[] args) { timer1.AutoReset = true; timer1.Enabled = true; SendMailService.WriteErrorLog("Service started"); }