Why are you using timers to do single actions, they serve no purpose? All you need is:
private void Form1_Load(object sender, EventArgs e)
{
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
string[] files = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "*.rtf");
if (files.Length > 0)
startAction();
}
Although, I suspect it will fail, as your files list is not being passed to the
startAction
method.