This course GUI Project is designed to help you practice using your skills. Each week, you will learn important concepts. Then, you will apply these concepts to build an amazing course project over the next seven weeks. What’s more, this project will have a Graphical User Interface (GUI) instead of using the console. This course project has two parts. For the first couple of weeks, you will be create a basic GUI and learn how to work with GUI controls while practicing basic programming concepts. After that, you will create an object oriented project.
Part 1: Scenario
Lucky you! Your manager has put you in charge of the lyrics videos for the monthly lip synch contest. Each contestant “sings” along with a song of their choice, prompted by the lyrics in the video. Essentially, there is a long list of songs, along with associated URLs and other information. Your manager has some basic functionality in mind, such as the ability to add and remove songs, as well as create playlists and show the videos. The application must run fast, and be updated with new features over time. Maintenance is key!
NOTE: For this GUI project, we strongly suggest keeping a Notepad or MS Word document handy, containing the names of a few songs and associated video URLs. The URLs can be local video files on your hard drive, or videos on web-based sites such as YouTube.com.
Adding more event handlers to your controls, and writing utility methods
Objectives for GUI project
- Create a method (a function in this case) to return true if the user entered non-empty input for the “Add Song” button, or false if not.
- Create a method (another function) to return true if a song title is found, or false if it is not
- Use string.Contains to determine if a song title is contained in a the text of a Listbox
- Activate tabbing from one control to another
So far, with your GUI application you are able to add songs to your library. This week, the goal is to determine if a given song is in your library. At this point, your “library” is your songList ListBox. In addition, you will create two “utility methods,” which are called from your event handlers. The advantage of, for example, pulling the text box validation code out of the “Add Song” button’s event handler is that it can then be used by other methods as well. Finally, you will address that annoying need to click on each textbox in order to input song information.
- Create the ValidInput() function. Here you will take the input validation code from your AddButton_Click event handler method and use it to make an independent method that returns true if all of the fields are non-empty and false if at least one is empty. As a side effect, it pops up a MessageBox indicating the first empty field that it finds.
Do you remember the flowchart from Week 2? As a reminder, here it is, representing the logic from the AddButton_Click event handler.
For GUI Project Computer Science help please click here