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 removePendingJobsToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("All jobs in the jobs queue that are waiting for execution will remove from the queue, are you sure?", "Remove pending jobs from jobs queue", MessageBoxButtons.YesNo); if (result == System.Windows.Forms.DialogResult.Yes) { WorkerAgentObject.ClearJobsQueue(); } }
private void stopListiningForJobsToolStripMenuItem_Click(object sender, EventArgs e) { WorkerAgentObject.Stop(); }