Vix-175 : Serial port handling: no serial ports in the system causes exceptions

The exception was occuring in the buttonOk_click event when it was looking for the port name. This should not have been hit because validation should have failed since there were no serial ports. I found that the validate method in the serialportconfig.cs file would return true in the event that the validation failed. I changed the default to return false if you have no ports and if you do have ports it will go through the validation looking for port, baudrate and databits. If you have these values it returns true else it returns false.

The buttonOk_click event will now work correctly, since you have no port information your only option is to cancel out of the dialog box