mirror of
https://github.com/fasteddy516/SimplySerial.git
synced 2024-11-24 10:04:35 +00:00
added "-list" command-line argument to list available ports
This commit is contained in:
parent
521f83724a
commit
1cb42eabfa
@ -149,6 +149,18 @@ namespace SimplySerial
|
|||||||
ExitProgram(silent: true);
|
ExitProgram(silent: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// list available ports
|
||||||
|
else if (argument[0].StartsWith("l"))
|
||||||
|
{
|
||||||
|
Console.WriteLine("\nAvailable Ports:");
|
||||||
|
foreach (string potentialPort in SerialPort.GetPortNames())
|
||||||
|
{
|
||||||
|
Console.WriteLine(" {0}", potentialPort);
|
||||||
|
}
|
||||||
|
Console.WriteLine("");
|
||||||
|
ExitProgram(silent: true);
|
||||||
|
}
|
||||||
|
|
||||||
// quiet (no output to console other than comes in via serial)
|
// quiet (no output to console other than comes in via serial)
|
||||||
else if (argument[0].StartsWith("q"))
|
else if (argument[0].StartsWith("q"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user