Check if size option is active before using it to determine which generator to use. (fixes #19)
Not necessary to check if the option is limited at this point, since we abort anyway if one of them is limited.
Converted while-loops to foreach-loops.
Removed unnecessary boxing of int
Do not programmatically set the state of the folding net button to pressed. (fixes #18)

The original reason for doing this was probably cosmetic, but it causes the listener to be fired twice. The first time this has no effect, but after that two folding nets are written: one to the filename in the dialog when showing and one to the filename in the dialog when pressing OK.