Program 4: Tool Tips, Help, and Data Controls
Student Learning Objectives
- Demonstrate the use of Tool Tips in a Windows Application
- Demonstrate the use of a Context Sensitive Help in a Windows Application with the What's This? Help Button
- Demonstrate the use of a status bar to provide context-sensitive messages related to the screen item in focus
- Demonstrate the use of a HTML file to provide a online help
- Demonstrate the use of an Access database and the ability to add a new record
- Demonstrate the use of a DataGridView to display the contents of an Access database
Assignment
Create an Access database named Program4.mdd that includes one table (Courses) that stores information regarding computer science courses at CWU.
- Add five fields (columns) to the Courses table for the
Id (AutoNumber primary key)
Department (Text: e.g. CS)
CourseNumber (Text: e.g. 110)
Credits (Number: e.g. 4)
Title (Text: e.g. "Programming Fundamentals 1")
- Add at least ten computer science courses to your database
Create a C# Windows application with a MainForm with two buttons: (1) View All Course and (2) Add New Course
- Clicking on the View All Courses button should open a new form (non-modal) which contains a
DataGridView displaying all the courses in an easily navigable table layout.
- Note: I expect you to create the contents of this form using Visual Studio Designer and selecting the DataGridView from your Courses Data Source drop down list and dragging your Courses object from the Data Sources window onto this form.
- Add a Close button to close this form and a Refresh button which refreshes the DataGridView from the database without closing the form.
- Clicking on the Add New Course button brings up a custom modal Dialog Box to add one new course to the database
- Note: you are expected to create this form based on your own design and controls, this is not intended to be generated automatically from the Details view on the Courses Data Source
- Include tool tips, context-sensitive help, and online help to aid users in using your dialog box
- Include a OK button (which saves the user entered course data as a new row in the database and closes the modal dialog box, returning DialogResult.OK
- Include a Cancel button which returns DialogResult.Cancel
- Include a Help button that opens the user's default Web browser to a minimalist help page (use relative addressing)
- Use alignment, layout, a logical tab, order and access keys to aid usability and accessibility
Adding a New Course
The dataSet.Courses object (in memory) has an AddCoursesRow method that you can use to add a row to the database. The parameters to the method are the field values (excluding the auto-increment primary key) for the new record
this.program4DataSet.Courses.AddCoursesRow(dept, number, credits, title);
The AddCoursesRow method will add the row to the in-memory dataset. To save the changes, call the Update method for your coursesTableAdapter object
Submission Requirements
- Print out three screen snapshots of your program in action: one of your Mainform, one of your AddNewCourse dialog box, and one of your ViewAllCourses window. (use ALT-PrintScreen and paste into Word).
- The project will be checked online so be sure your solution is stored in your cs446 account in folder
U:\Programs\nnProgram4 where nn is your student account number
- Write your name, cs446 account number, and your completion time on your screen capture printout(s). Identify any problems remaining to help with grading.
Grading Criteria
50 points maximum
The assignment will be scored using the following criteria:
- 30 points - Functionality
- MainForm's (5)
- View All Courses button is working correctly and opens up a non-modal window to display all courses contained in the database (2)
- Add New Courses button is working correctly and opens up a modal dialog box to allow the user to add a new course to the database (3)
- View All Courses button is working correctly and neatly displayed in a DataGridView (10)
- Courses are displayed correctly in a DataGridView (4)
- Binding Navigator, docked to the top of the window is available for browsing the DataGridView (2)
- Close button closes the form (1)
- Refresh button updates the data shown in the DataGridview without closing the form (3)
- Add New Course Dialog Box is working correctly with new courses added correctly to the database (15)
- Uses Tool tips for user input (3)
- Provides Context sensitive help with the Form's "What's This" help button (3)
- Alerts users via the status bar with context-sensitive messages related to the screen item in focus (3)
- Opens a browser with HTML online help when the user clicks the Help button (3)
(Note: the contents of the help file may be minimal HELP)
- 15 points - Design of IDE
- Design, Placement, and Layout of controls
- The controls on your appliation appear reasonably complete (3)
- Your design of the GUI interface is attractive and easy to use (3)
- The controls are placed and arranged to promote usability (3)
- All input controls are clearly labeled
- All controls are sized appropriately for the expected input data
- All controls are aligned vertically and horizontally to reduce complexity
- All windows have appropriate title bars (3)
- View All Courses form is non-modal; Add New Course Dialog box is modal (3)
- 5 points - MS Access Database
- MS Access database created correctly with the required fields and types