private void checkDoneTimer_Tick(object state) { if (!workerThread.IsAlive && working) { checkDoneTimer.Dispose(); working = false; if (InvokeRequired) { Invoke(new WorkerDelegate(Close)); } if (WorkComplete != null) WorkComplete(); } }