DP.DMX.GetPortNames C# (CSharp) Method

GetPortNames() private method

List the avilable serial ports
private GetPortNames ( ) : void
return void
	private void GetPortNames()
	{
		int p = (int)System.Environment.OSVersion.Platform;
		serialPorts = new List<string>();
		serialPorts.Add("");
		
		if(p == 4 || p == 128 || p == 6)
		{
			string[] ttys = Directory.GetFiles("/dev/", "tty.*");
			foreach(string dev in ttys)
			{
				serialPorts.Add(dev.Replace("/", "\\")); //Replace forward slash to play nicely with gui.		
			}
		}
	}