calling consoleControl.StopProcess(); from a wpf button or stopping the process from within the process causes an error in the following function.
public bool ShowDiagnostics
{
get { return (bool)GetValue(ShowDiagnosticsProperty); }
set { SetValue(ShowDiagnosticsProperty, value); }
}
An unhandled exception of type 'System.InvalidOperationException' occurred in WindowsBase.dll
Additional information: The calling thread cannot access this object because a different thread owns it."
foreach(ConsoleControl.ConsoleControl console in cmds.Keys) {
if (console.IsProcessRunning) console.StopProcess();
// some console.StartProcess code...
}
calling consoleControl.StopProcess(); from a wpf button or stopping the process from within the process causes an error in the following function.