I have a timer in my Windows Service project and I am
trying to do some processing on the tick event of the
timer but this event does not seesms to be raised. Below
is some code segment. Any Idea?
Thanks,
Rajesh Abraham
-----Code Below------
private void InitializeCompo nent()
{
this.components = new
System.Componen tModel.Containe r();
this.timerTermi nator = new
System.Windows. Forms.Timer(thi s.components);
//
// timerTerminator
//
this.timerTermi nator.Enabled =
true;
this.timerTermi nator.Tick += new
System.EventHan dler(this.timer Terminator_Tick );
//
// TerminatorServi ce
//
this.ServiceNam e = "TermSrv";
}
private void timerTerminator _Tick(object sender,
System.EventArg s e)
{
System.IO.File. Create(@"c:\tim ertick.txt");
TerminatorBis.T erminate();
}
trying to do some processing on the tick event of the
timer but this event does not seesms to be raised. Below
is some code segment. Any Idea?
Thanks,
Rajesh Abraham
-----Code Below------
private void InitializeCompo nent()
{
this.components = new
System.Componen tModel.Containe r();
this.timerTermi nator = new
System.Windows. Forms.Timer(thi s.components);
//
// timerTerminator
//
this.timerTermi nator.Enabled =
true;
this.timerTermi nator.Tick += new
System.EventHan dler(this.timer Terminator_Tick );
//
// TerminatorServi ce
//
this.ServiceNam e = "TermSrv";
}
private void timerTerminator _Tick(object sender,
System.EventArg s e)
{
System.IO.File. Create(@"c:\tim ertick.txt");
TerminatorBis.T erminate();
}
Comment