Outputting the results of ls -la or iostat to the listbox is okay, columns are a bit off, more formatting required.
This is okay for these commands, top for example doesn't display.
This is okay for these commands, top for example doesn't display.
var output = client.RunCommand(command);
string[] lines = Regex.Split(output.Result, "\n");
//String[] lines = output.Result.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string line in lines)
{
listBox1.Items.Add(line);
this.Invoke(new Action(() => listBox1.TopIndex = listBox1.Items.Count - 1));
}