Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Project 5: Printing Address Labels. 2 Assignment Write a Windows forms program to display and print a set of address labels. Input from a csv file.

Similar presentations


Presentation on theme: "1 Project 5: Printing Address Labels. 2 Assignment Write a Windows forms program to display and print a set of address labels. Input from a csv file."— Presentation transcript:

1 1 Project 5: Printing Address Labels

2 2 Assignment Write a Windows forms program to display and print a set of address labels. Input from a csv file. Use Windows graphics to draw the labels. Show the labels In order of Zip Code, Last Name, First Name Top to bottom, then left to right 4 labels across by 12 top to bottom (OK if a few addresses overlap edge of label)

3 3 Main Menu Provide a File menu with an Open command. Use Open File Dialog control to permit user to select CSV file to open. Provide Print and Print Preview commands Print pages as shown on the form. Provide a PrintDialog for the print command Permit user to select From and To pages. Commands enabled only when there is something to print.

4 4 Main Menu Provide a “View” menu with commands: Previous Page Next Page Also an Exit command. All commands should be enabled only if applicable.

5 5 Sample Data File A sample data file is available in the Downloads area of the class web site: http://www.cse.usf.edu/~turnerr/Software_Systems_Development/ Downloads/addresses.csv http://www.cse.usf.edu/~turnerr/Software_Systems_Development/ Downloads/addresses.csv

6 6 Example: The Form

7 7 Print Preview

8 8 Implementation Hints Think carefully about an object-oriented design. What are the classes? What are their responsibilities? Attributes and operations? The same methods should paint the form and print the page. Graphics parameter determines which it does. Different calls pass different Graphics objects to paint the form and print the page.

9 9 Implementation Hints After class design is sketched out Start with minimal implementation and add functionality in small steps. Try to reuse code from in-class example. Be sure each step is working correctly, and you understand it, before adding next step. Revise class definitions as needed.

10 10 Implementation Hints Implement Open command. Read Addresses file. Build List Sort List by zip code, last name, first name. Display first page of labels on Form1. Add Print command for first page only. Implement Next Page and Previous Page commands. Show any page on form. Add ability to print all pages. Add PrintDialog Permit user to specify which pages to print. Permit user to cancel Print command Add Print Preview

11 11 Ground Rules You may work with one other person. OK to work alone if you prefer. If you do work as a pair Both members are expected to contribute. Submit a single program. Both members should understand the program in detail. Do not share your code with other students. Before or after submitting the project. OK to discuss the project. Do not copy any other student’s work. Don’t look at anyone else’s program. Don’t let anyone look at your program.

12 12 Ground Rules Except for code posted on the class web site Do not copy code from the Internet or any other source. Write your own code.

13 13 Due Date Project is due by 11:59 PM Wednesday night, March 30. Deliverables: Project Folder (zipped) Zip the project folder and submit a single file. Use the Windows “Send to Compressed File” command. DO NOT use RAR. If you work with another student, include both names in the assignment comments. Other student submit Blackboard comment only with both names. End of Presentation


Download ppt "1 Project 5: Printing Address Labels. 2 Assignment Write a Windows forms program to display and print a set of address labels. Input from a csv file."

Similar presentations


Ads by Google