private void FormMain_FormClosing(object sender, FormClosingEventArgs e) { if (WorkerAgentObject.IsListening) { WorkerAgentObject.Stop(); } }
private void exitToolStripMenuItem_Click(object sender, EventArgs e) { if (WorkerAgentObject.IsListening) { WorkerAgentObject.Stop(); } Application.Exit(); }
private void stopListiningForJobsToolStripMenuItem_Click(object sender, EventArgs e) { WorkerAgentObject.Stop(); }