I built a service which is showing in the Event Log that it starts, but the timer never "ticks". Is there something special to get a timer to tick or does someone see what I am doing wrong? In the event log it does write "TS_Tracker Done reading config"
but it never fires the "TS_Tracker Timer Tick". The timer is set at a Interval of 1000 and Enabled.
<pre lang="x-c# public TS_Tracker()
{
InitializeComponent();
if (!System.Diagnostics.EventLog.SourceExists("TS_Tracker"))
{
System.Diagnostics.EventLog.CreateEventSource("TS_Tracker", "TS_Log");
}
eventLog1.Source = "TS_Tracker";
eventLog1.WriteEntry("TS_Tracker Lets get started");
}
protected override void OnStart(string[] args)
{
eventLog1.WriteEntry("TS_Tracker OnStart");
timerInternetChecker.Interval = (inc_config.Application.MinutesBetweenSyncCheck * 1000);
// Lets load the config
inc_functions.General.ReadConfig();
eventLog1.WriteEntry("TS_Tracker Done reading config");
}[/code]
<pre lang="x-c# private void timerInternetChecker_Tick(object sender, EventArgs e)
{
eventLog1.WriteEntry("TS_Tracker Timer Tick");
}[/code]
View the full article
but it never fires the "TS_Tracker Timer Tick". The timer is set at a Interval of 1000 and Enabled.
<pre lang="x-c# public TS_Tracker()
{
InitializeComponent();
if (!System.Diagnostics.EventLog.SourceExists("TS_Tracker"))
{
System.Diagnostics.EventLog.CreateEventSource("TS_Tracker", "TS_Log");
}
eventLog1.Source = "TS_Tracker";
eventLog1.WriteEntry("TS_Tracker Lets get started");
}
protected override void OnStart(string[] args)
{
eventLog1.WriteEntry("TS_Tracker OnStart");
timerInternetChecker.Interval = (inc_config.Application.MinutesBetweenSyncCheck * 1000);
// Lets load the config
inc_functions.General.ReadConfig();
eventLog1.WriteEntry("TS_Tracker Done reading config");
}[/code]
<pre lang="x-c# private void timerInternetChecker_Tick(object sender, EventArgs e)
{
eventLog1.WriteEntry("TS_Tracker Timer Tick");
}[/code]
View the full article