C# Menustrip, dialogs and exe files
Hello! This is my first Windows Forms project and I need some help.
This is what the program looks like (it's nothing fancy, it's my first project):
(I can't get an URL to work so I can't show the program apparently :S)
The problem I have currently is that I don't know how to write a code that will allow the user to first pick a game genre (FPS, RPG, RTS and so on), then enter in the name of the game. And then after that select the game's exe file and save it in the program (remember). After everything's sorted the user should be able to click the game name in the MenuStrip and the exe file should be ran.
What I basically have is a MenuStrip with ToolStripMenuItems such as FPS, RTS, RPG, MMO and Others. I've been trying for quite some time to figure out how to write the code but I'm hitting dead ends all the time.
So, the code should make it possible for the user to:
1. Choose genre (From the ToolStripMenuItems)
2. Enter in game name (Create new ToolStripMenuItem)
3. Choose exe file to associate with the ToolStripMenuItem we created by entering in the game name (OpenFileDialog?)
4. Save it in the program
5. Run the exe file when the user clicks the item
FPS - RTS - RPG - MMO - Others
CoD 4 RA3 Diablo WoW Pacman
Something like that. I have the genres but I want the user to be making the game entries and associating them with an exe file. I also want the program to be used, so I want the program to save all of it and don't remove anything unless the user removes them himself. I'm also really unsure how to proceed with it, make a button to do all of the code here or using textboxes to get the names to work properly... oh well, I'm hoping your expertise will enlighten me. ^^
I'm not even sure it's possible to create this kind of code anymore, I'm goin 'nuts.
I would post the code but I'm afraid it won't help you any, just several attempts made by me which all have failed.
I hope I'm not asking for too much, I know I haven't supplied you with any code but since the code is my problem I can't really give you any. :/
I appreciate any help I can get on this matter, it might even be easy for you to create a working code for this. Is it possible to create a class out of it by the way?, making it a method or something. Again, I'm sorry for not being able to help much, I just really want to get into programming, and by creating this program I'll be able to bring this into other future projects as well. I love programming because it's pretty much endless. You think you're done with a program but then you think "but what if I added that...? That'd be awesome!" and once you're done with that you'll want to add even more. :)
If I've described anything poorly please let me know and I'll do my best to help. (I'm from Sweden).
|All times are GMT +5.5. The time now is 02:17.|