COP4226, Homework 3
Due Wednesday, November 14 (late 6am 11/15)
Zip your entire project and upload on the web. Exclude the
Debug and Release directories.
Submitting
Homework Online.
Be sure to include your control library in your uploaded file.
Create a Single Instance, Single Document Interface application.
Avoid long methods. Each method that you create should be short, to promote
encapsulation. If you have a method that is longer than 25 lines, then it
probably needs to be divided into smaller methods.
Do not create a new data structure if one that already exists will
solve the problem.
Extra Credit (due 11/11)
Single Instance Application
- Allow serialization and deserialization of the document.
- Use a SaveFileDialog for serailizing. Add a default extension of your choice.
- Use an OpenFileDialog for deseraializing. Show only files with your extension. Allow for another option to display all files.
- Allow printing and print preview of the document.
- Print the information for each word that is in the document: text,
location, font.
- Print the information in columns.
- Fill each page with the maximum number of lines that will fit within the actual margin bounds. Each line will contain the above information. Tabs will be helpful.
- Print a header on each page that contains the course aligned
to the left and the name of the assignment aligned to the
right. The header should be outside the actual margin bounds and within the actual page bounds.
- Print a footer on each page that contains your name centered
and the page number aligned to the right. The footer should be outside the actual margin bounds and within the actual page bounds.
- Use different fonts for the header, footer and content of the
page. Use a serif font, a sans serif font and a monospace font.
For one of them, use a generic font family. Make the
header font bold; make the footer font italic.
- When printing is chosen, open a print dialog. Allow the user to print selections and ranges.
- Create two views for the application.
- Paint view. Display all words so that they fit within the client area and do not overlap each other. Add a vertical scroll bar, if necessary. Display each word at its location, using its font. Changes to the document should reflect in this view.
- Be able to right click any word in the Paint View and open a dialog that can change the text, location and font.
- Only allow one word for the text.
- Use data binding.
- Add next and previous buttons that will navigate through the words in the document.
- Be able to move the dialog by using the arrow keys. Maintain the default handling of the arrow keys, too.
- Add Oath and About dialogs to the application.
- Add a toolbar for print, print preview, paste from clipboard
, search. Search should only be visible when the Paint View is active. It should appear directly below the main menu for the application. You
may need to change the docking order in order to make it appear correctly.
Application Demo: Demo