void endOperation(object sender, EndOperationEventArgs args) { if (cts != null) { cts.Dispose(); cts = null; } this.Dispatcher.Invoke(() => { commandPanel.IsEnabled = true; btnStop.Visibility = Visibility.Collapsed; if (args != null) { tbReport.Text = args.Report; if (args.Failed) { MessageBox.Show("Operation failed, check console for error."); } } else { tbReport.Text = "Missing managed event args."; } }); }
static void endOperation(object sender, EndOperationEventArgs args) { Console.WriteLine(args.Report); if (args.Failed) { Environment.ExitCode = -1; } }
void endOperation(object sender, EndOperationEventArgs args) { if (cts != null) { cts.Dispose(); cts = null; } this.Dispatcher.Invoke(() => { commandPanel.IsEnabled = true; btnStop.Visibility = Visibility.Collapsed; if (args != null) { tbReport.Text = args.Report; } else { tbReport.Text = "Missing managed event args."; } }); }