[C#]Mini PokeDex Windows Forms, Dex form won't open, no VS errors.

(ISSUE SOLVED) Hello, I am working on my C# skills and wanted to try making a mini Pokedex app that is based on Windows Forms.

The program is supposed to accept a value 1-9 and then open a second form to display the info for that Pokemon. It opens an error form if it is outside that range.

The error form part works.

When I enter a number 1-9, instead of the Dex form opening, nothing happens.

EDIT: Removed a while loop on DexEntry form so it opens now. Need to get the usrInput from Form1 to be read on DexEntry now.

EDIT 2: Solved my issue by using arguments and constructors. Added the usrInput to line 28 on MainForm and then added int poke to line 21 on DexEntry form. Reuploaded to repo if you want to see it working!

Leaving up for any help this could provide to someone.

GitHub: https://github.com/leetskeet/MiniDex/tree/master/MiniDex

(Did not compile, sorry, so you have to open this as a project in Visual Studio 2015.)

There is now a .exe in the bin/Debug folder :)

Posted Dec 12, 2017, 4:28 AM UTC · edited

63
dani3l92•

Nice starter Project :) Maybe you can modify the screen output so that the informations are shown in the pokedex (like this https://www.google.de/search?safe=off&rlz=1C1GGRV_deDE748DE748&biw=1745&bih=950&tbm=isch&sa=1&ei=q5QvWsXIEILJwQLpoo4g&q=pokedex+1+generation&oq=pokedex+1+ge&gs_l=psy-ab.3.0.0j0i30k1j0i8i30k1l8.9132.13595.0.14546.7.6.1.0.0.0.146.579.4j2.6.0....0...1c.1.64.psy-ab..0.7.583...0i67k1j0i5i30k1.0.0rIBJ4KEyYA#imgrc=pV6fzZ01EE626M:) And maybe you could use an api like pokeapi to fill your pokedex (this would be a nice training btw)

1
brightboyOP•

Thank you! I have been working through a C# book with a friend who is in a class, so I built this around the requirements he had for a project. It had to have multiple forms, an array, if statement, switch statement, methods, and a loop. Hence the second form to display the Dex info :)

But going forward, I will probably tinker it to use the single form since I've proven the concept.

I still need to add a loop though, so was thinking of adding a while loop for no click on submit that cycles through the pictures on the main screen.

Definitely going to look into the api to expand my knowledge.

Thank you for the suggestions! :)

1
dani3l92•

etskeet/MiniDex/tree/master/MiniDex

(Did not compile, sorry, so you have to open this as a project in Visual Studio 2015.)

There is now a .exe in the bin/Debug folder :)

maybe you can use a backgroundworker objekt and a while loop to make a blink effect on one of the "color spots" on the top? would be easy :)

1