private void timer1_Tick(object sender, EventArgs e) { _queryScript.LoadResultsFromPowershellTask(_powershellTask); UpdateTaskStatusControls(); UpdateResultControls(); if (!toolStripStatusLabel_QueryStatus.Text.Contains("RUNNING") && _powershellTask.TaskCompleted) { timer1.Enabled = false; toolStripButton_Start.Enabled = true; toolStripButton_Cancel.Enabled = false; } }