COP4226, Homework 3
Due Monday, November 10 (late 6am 11/11)
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.
Single Instance Application
Create a single instance application.
- Use an application context that displays a message box every two minutes that the application is running. The message box should indicate the total time that the application has been running and how many times a new instance of the application has been requested.
- When a new instance of the application is started, add each command line argument to the document. If the insert key is off, then clear the document first.
Document and Data Classes
- Create a data class for a word. Use encapsulation so that other classes do not know the implementation details of the data class. The data class should have the following properties, at least:
- Text
- Location
- Font( including font size and font family)
- Shear. Allow for shearing along both axes.
- Create a document class to store the words. Use encapsulation so the other classes do not know the implementation details of the document.
Main Form
- Use your control library as in other assignments. Base the main form on the base form from the previous assignment.
- Add Oath and About dialogs to the application.
- Add appropriate menu items for all the functions in the assignment, including, file open, file save, file save as, file new, close, paste.
- If the document has been saved before, then the save menu item should save again under the same name.
- If the document has never been saved, then the save item should not be enabled.
- Add a toolbar for all the menu options.
- The toolstrip 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.
- Enable the paste icon when the correct type of data is in the clipboard.
- Enable the save dialog when the document has changed since the last save
- Add a status bar that indicates the state of the insert key and caps lock key.
- Allow drag and drop of text. Allow copy of text from the clipboard. In both cases, split the text into words. Add the new text to the document. If the insert key is off, then clear the document of words first.
- Allow serialization and deserialization of the document.
- Use a SaveFileDialog for serializing.
- If the user does not specify an extension, add a default extension of your choice.
- Only show files that match your extension in
- In addition to being able to show your files, allow for an option to list all files
- Use an OpenFileDialog for deserializing.
- Show only files with your extension.
- Allow for another option to display all files
- Create two views for the application. Use a tab control for the two views.
- 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, with its shear, using its font.
- Changes to the document should reflect in this view.
- Grid View. Display all the words in a grid view.
- Do not allow the text to be changed.
- Allow all other properties to be changed.
- Changes to the grid view should change the underlying document.
- Changes to the document should reflect in this view.
- Use data binding.
- Allow new words to be added. Text should be modifiable when adding a new row.
- You do not have to validate new data. Just be sure to enter valid data.
- 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. Disable the default handling of the arrow keys.
- Add help info and tooltips for the dialog.