private async Task JobCompleted() { if (_cancellationTokenSource != null && !_cancellationTokenSource.IsCancellationRequested) { _cancellationTokenSource.Cancel(); } _running = false; Threads.IsEnabled = true; Duration.IsEnabled = true; Url.IsEnabled = true; StartButton.IsEnabled = false; _cancellationTokenSource = null; var result = new ResultWindow(this); result.Closing += ResultWindowClosing; _resultWindows.Add(result); await result.Load(_task.Result, _baselineResult); result.Show(); _task = null; StatusProgressbar.Visibility = Visibility.Hidden; StartButton.IsEnabled = true; StartButton.Content = "Run"; }
private async Task JobCompleted() { _running = false; Threads.IsEnabled = true; Duration.IsEnabled = true; Url.IsEnabled = true; Pipelining.IsEnabled = true; ThreadAffinity.IsEnabled = true; StartButton.IsEnabled = false; _cancellationTokenSource = null; var result = new ResultWindow(this); await result.Load(_task.Result); _task = null; result.Show(); StatusProgressbar.Visibility = Visibility.Hidden; StartButton.IsEnabled = true; StartButton.Content = "Run"; }