コード例 #1
0
        /// <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;
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: JeyKip/TimeTracker
        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.");
            }
        }