Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi I'm not familiar with using Microsoft Visual C# Express 2010. Please help me with this project and provide instructions. Intro to Visual Programming -
Hi I'm not familiar with using Microsoft Visual C# Express 2010.
Please help me with this project and provide instructions.
Intro to Visual Programming - CS 114/IST 140 Storm - Page 1 Project 6-Movin rallnotion Figure 1 Figure 2 Figure 3 In this project you will use all the tools in your programming arsenal to create an application that allows the user to enter and/or retrieve information about her/his movie collection. The movie information stored in the collection "database" will include the Movie title, Year, Running Time, Rating (1 to 4), Genre, and Format. Project Objectives: - UI Design - Use of SaveFileDialog and OpenFileDialog Controls - Use of multiple forms - Single-dimension Arrays - Use of Form Load and Closed event - Array population from a file handlers - Array navigation - Reading from and writing data to a file - Use of parallel arrays - End of file detection - Use of ComboBox Requirements: - For array declaration, assume there will not be more than 100 movies in your collection - Use of SaveFileDialog and OpenFileDialog to store and load your movie list 1. Name your file movie.txt 2. Have the file in you project root directory when submitting 3. Have it populated with at least 4 movies when submitting Startup Form (Figure 1) - A startup form will launch either the read movies in a collection (input) or add movies to a collection (output) form Read Movie Data (Input) Form (Figure 2) - Movie data will be read from a file to a parallel array before being accessed by navigation buttons - Buttons 1. Next - Displays the next movie and all relevant data in the collection using a parallel array 2. Previous - Displays the previous movie and all relevant data in the collection using a parallel array 3. Exit-Closes the modal form - Enable and disable Next and Previous buttons as it relates to the position in the movie collection - Display the current movie position and total movies in the collection - Display a message notifying the user when s/ he has reached the end of the movie collection - A Form_Load event handler that uses an Open dialog box to allow the user to select the movie data file s/he wants to open - A Form_Closed event handler that closes the movie data file Add Movie Data (Output) Form (Figure 3) - User entered data on this form will be saved to a file - Form will have the following buttons: 1. Save-writes the movie data to a file - Messagebox will be displayed telling user the was successfully added to collection - Form will be cleared - Focus will be set to movie title textbox 2. Clear-resets form to startup state 3. Exit-Closes the modal form - A Form_Load event handler that uses the SaveFileDialog Control to allow the user to select where s/he wants to save the movie data file - Use a Radio Button for selecting rating - Use check Boxes for selecting genre (you must have at least 4 genres to choose from) - Use a combo box for selecting format (LaserDisk, VHS, DVD, Blu-Ray, Video File, Streaming) ***User input validation for adding movies is NOT REQUIRED for this project (ex: a year does not have to be a number) Programming Challenge... Based on the movie data file path, create a folder called "pics" to store movie artwork that will be displayed on the form when a movie is selected. Assuming your PictureBox control is picMovielmage, the following code loads the image into the PictureBox: picMovielmage.Image = Image. FromFile() Note that the path to your pics folder is robust (not hardcoded) and based on the root path to your data file. For simplicity, artwork should have the same name as your movie title with a .jpg extension. This challenge is just for fun and not a project requirement. Intro to Visual Programming - CS 114/IST 140 Storm-Page 3 HINTS Don't let ths one fool you! While it might seem like the most "complicated" project, the only real tricks you need to figure out are loading movies into parallel arrays then navigating them. Writing to a file 1. Pretty self-explanatory this one is. Just append each movie response to your movie text file 2. Use a variable to store the movie title so you can use it in the confirmation message box. None of the other movie information will need stored in a variable as it can be directly written to the file. Reading from the file things 1. Declare (parallel) arrays for each movie category 2. On form load, read to the end of the movie file with each line going into its "category" array 3. Once the file is "dumped" into the arrays, you are done with the movie text file. Movie collection navigation is done using the contents of the parallel arrays 4. Counting things a. You will need to keep track of your current position in an array so declare a variable for it b. You will need to keep track of how many movies you have so declare a variable for it c. Increase your total movie counter in the loop that adds each line of data to your parallel arrays d. Remember the total number of movies is 1 more than the upper index of an array View Movies outline (if your program structure does not look like this, you might be overcomplicating it): //Declare global variables for StreamReader, parallel arrays, totalMovies and currentPosition // When the form loads Dialog to select file If the file exists Loop to the end of the file Add text file lines to parallel arrays (use ReadLine(), just not to a form label Increase your movie counter Close the movie file, you will not use it anymore Populate the form labels from the parallel arrays Else Message saying file does not exist //Next button Compare current position to total movies, if there are still more movies Populate the form labels from the parallel arrays Update current position Otherwise Message saying this is the last movie Disable Next button Intro to Visual Programming - CS 114/IST 140 Storm - Page 4 / /Back Button See if you are at the first movie Disable Back button Otherwise Populate the form labels from the parallel arrays Update current positionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started