Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# Windows Form Topics: ListBoxes, Multiple forms, Passing data to a form, Passing data between controls Students will create an application that allows the user

C# Windows Form

Topics: ListBoxes, Multiple forms, Passing data to a form, Passing data between controls

Students will create an application that allows the user to create entities and sort them into one of two groups. The application allows for moving entities between the two groups and removing them as needed. A modal window can be opened to show how many items are in each group. Saving and loading will also be supported in this application.

You will need the same style of user input as you had in lab one, but one additional type of user input control will be required, bringing the total up to 4. The Clear button will still need to be present with the same functionality. You also will still need a menu bar with a File menu containing Save, Load, and Exit as in the previous assignment, and there will be a new top level menu called Stats with a single Display command under it. Your application will have two ListBoxes, and allow the user to add an object with the current user input values to either ListBox of their choice. The user is then able to remove individual objects from either ListBox or move an object from one ListBox to the other. The Save and Load options will now keep track of what objects are in the ListBox instead of what is currently in the user input controls. The SaveFileDialog and OpenFileDialog classes should be used so the user is able to select the file name and path for the saved data. The separate Stats menu will have a Display option. Stats->Display menu option should bring up a modal dialog that displays the number of objects in each of the list boxes.

Follow these guidelines to produce this application:

User Input

  • 4 unique user input controls in a group box.

  • A button that clears all of the user input controls.

  • Some combination of controls that allows the user to store the current input in either one of two list boxes.

  • Adding an object to a listbox should also clear the input controls.

List Boxes

  • Two distinct ListBoxes should be present.

  • Selecting an item in one of the list boxes should populate the user input controls with that objects values.

  • Objects stored in the ListBoxes should display a sensible string representation of the object. This string does not need to have every field from the object in it.

  • The user should have the ability to move a selected item from one ListBox to the other.

  • The user should be able to remove a selected item from either ListBox.

  • Multiple selections should be disabled.

Menu Strip

  • Should contain to separate menus with the following: a File menu with Load,Save,Exit, and a Stats menu with Display.

  • Exit should close the application.

  • Save should save the current state of the two ListBoxes to a file keeping track of every field in the stored objects as well as which box that each object is stored in. This does not need to keep track of if an item was selected.

  • Load should be able to take what you saved out and populate both list boxes with all of the objects that they had previously.

  • The Stats->Display option should display a separate modal dialog that simply displays the total number of objects in each of the two ListBoxes.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

ISBN: 978-0764535376

More Books

Students also viewed these Databases questions