public void StartProcess(string fileName, string arguments)
{
// Are we showing diagnostics?
if(ShowDiagnostics) {
WriteOutput("Preparing to run " + fileName, Color.FromArgb(255, 0, 255, 0));
if(!string.IsNullOrEmpty(arguments))
WriteOutput(" with arguments " + arguments + "." + Environment.NewLine, Color.FromArgb(255, 0, 255, 0));
else
WriteOutput("." + Environment.NewLine, Color.FromArgb(255, 0, 255, 0));
}
// Start the process.
processInterace.StartProcess(fileName, arguments);
// If we enable input, make the control not read only.
if(IsInputEnabled) {
if(InvokeRequired) {
Invoke((Action)(() => {
richTextBoxConsole.ReadOnly = false;
}));
} else {
richTextBoxConsole.ReadOnly = false;
}
}
}