System.Windows.Forms.Timer を実行しているフォームで Winforms アプリから Application.Exit を呼び出すと、タイマーも自動的に停止しますか?
public void StartProcessing()
{
int i = 0;
while (true)
{
if (BatchNumbersQueue.Count > 0)
{
i = BatchNumbersQueue[0];
}
else
{
//stop the time that queues batches and exit
timer1.Stop();
Application.Exit();
}
ProcessQueue();
QueueOfBatches.RemoveBatchToQueue(i);
i = 0;
}
}
//timer tick event
private void timer1_Tick(object sender, EventArgs e)
{
UpdateProcessingQueue();
}