/// <summary> /// Stops the task manager /// </summary> public void Stop() { for (int i = 0; i < TaskRunners.Count; i++) { ITaskRunner taskRunner = TaskRunners[i]; taskRunner.Stop(); } m_IsRunning = false; }
private void BtnStop_Click(object sender, EventArgs e) { try { _taskRunner.Stop(); ToggleTaskRunnerButtons(false); } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Stop Tracking", MessageBoxButtons.OK, MessageBoxIcon.Error); _logger.LogError(ex, "Error occurred during stopping task runner."); } }