Hi all
I've recently written a program that writes and then runs batch files based on whether or not a checkbox was checked (e.g. there was a list of software with a checkbox for each one).
In terms of logic, there was an if loop for an 'Install' button that said if (for example) Flash Player checkbox is checked, write to a batch file, if Adobe Acrobat checkbox is checked, write to a batch file etc. all the way through the software options and then it saved and ran the batch file. The text that was written were silent install commands and switches in the forms of strings.
Anyway, I got this working fine which was all well and good. However, as the silent install text that was written to a batch file was hard coded into the program as strings, it's not very scalable. It works well for the current software choices, however there's no option to add additional ones and so on.
So, here comes version 2 of the program.
So far, I've ditched the checkboxes and have created 2 listboxes. I think the way to do this is to have the the first one populated by a List/array (which will contain the software names as strings), and the user then selects one and moves it into the second listbox via a button. Once they've 'added' all they want to the second listbox they click the Install button, which has an event that then checks what is in Listbox 2 and generate/runs the batch file as before.
I'd also want the user to be able to add and store software options and the silent install switches required (so as 2 strings I would guess - actually, 3 as they need to enter the file path/location of the installer too). Are these Lists too?
I'd also like 'Templates' which, when selected, automatically adds certain software to the second Listbox. Again, being able to add and save new templates would be cool.
I'm not asking people to write the program for me, obviously. I just need to know if I'm on the right track and if anyone has any recommended methods of doing this? I'm inexperienced at programming so I'll be learning as I go along but it's all good, I like a challenge. As long as I get the basic logic right, I can see where I go from there.
Screenshot below:
http://i1113.photobucket.com/albums/k503/csf90/v2_mockup.jpg
Thanks!