KSP-CKAN/CKAN — pull request #536 by mgsdk (2014-12-09 08:05:50+00:00)
Title: Fix for adding instances to the GUI list with a default named instance

When using the GUI, adding a new instance if the list already has an instance with the default name results in an error: **"System.ArgumentException: An element with the same key already exists in the dictionary."**

This will append a number in parenthesis ranging from 1 to 999 (Though I suspect no-one will ever have this many instances with the same name). Failing that, the current local time will be used. As a final resort, an exception will be thrown.

This may also be useful for checking renames, but I do not dare try to hand-edit the Visual Studio Designer auto-generated code (MonoDevelop does not seem to containt a working WinForms GUI editor). Else, this could be used for validation of the TextBox input as well.