C# // Visual Studio // Custom Event Handlers with Multiple Windows Forms // Radio Buttons & Image Lists

Instructions:

Topics: hiding/showing controls, StatusStrip, custom event arguments, radio buttons

Images Link:  Download attatched file to get the images you’ll be using for this code exercise.

Students will create an application that uses a dialog to create a spaceship object to populate a ListView. This ListView will be able to display in either large or small icon mode using a menu option to switch between them. Selecting a spaceship in the ListView will give the user the ability to modify that object’s values and apply those changes.

You will be creating two forms, the main window with a ListView, MenuStrip, and StatusStrip, and a dialog window with some user input fields for making a spaceship object. The inputs needed for the spaceship are a TextBox for name, a numericUpDown for crew size, a checkbox for indicating active duty, and a set of 3 radio buttons for selecting the type of ship (Cruiser, Destroyer, or Freighter). There should be three buttons on this dialog:  OK, Cancel, and Apply. OK and Cancel will always be visible, but the Apply button will only appear when attempting to modify an item from the ListView. The OK button will add a ListViewItem with the current input to the main window’s ListView, and the Cancel button will close the window without changing anything in the main window.  The Apply button  should use a custom EventHandler and custom event arguments to modify the selected item in the main window’s ListView to have the current input values in the dialog. The main window’s MenuStrip should have three separate menus: File, Ship, and View.  Each of these menus will have the following options: File->Clear to clear the ListView, File->Exit to exit the application, Ship->New to open a dialog to make a new spaceship without the Apply button being visible, View->Large to make the ListView use LargeIcon mode, and View->Small to make the ListView use SmallIcon mode. The currently selected icon mode should have a checkmark displayed next to it. The StatusStrip should appear at the bottom of the window and have a single ToolStripStatusLabel showing the current number of items in the ListView. There should be unique images for each of the 3 ships with a large 32×32 and a small 16×16. Double-clicking an item in the ListView should bring up the spaceship dialog with the Apply button visible and the field pre-populated with the selected item’s current values.

Follow these guidelines for this application:

User Input Dialog

  • Radio buttons are used for ship selection that function as radio buttons should (only one option selectable at a time).

  • Apply button should only be visible when opened by double clicking a ListViewItem.

  • A TextBox for name, NumericUpDown for crew size, and CheckBox for active duty are present for additional user input about the spaceship.

  • OK and Cancel buttons should always be present on this dialog.

ListView/Main Window

  • ListView exists, set to dock/fill the parent container, and can be toggled between LargeIcon and SmallIcon mode.

  • A StatusStrip is present at the bottom of the window that always displays the current Item count of the ListView.

  • Double clicking a ListViewItem brings up the spaceship dialog as does selecting the Ship->New MenuStrip option.

  • 3 Unique images are used in the ListView that correspond to the three ship types. Large(32×32) and Small(16×16) image lists are used for this purpose.

Events

  • When the Apply button is pressed, a custom EventArgs class is used with an EventHandler to pass the updated spaceship information to the main window. The updated spaceship fields are used to update the currently selected spaceship.

  • When the OK button is pressed, a new spaceship with the current input values is added to the ListView and the spaceship dialog is closed.

  • When the Cancel button is pressed, the spaceship dialog closes without affecting the main window’s controls.

Extra Information

Go back through your code and check for the following:

  • Your application must compile and must not crash when starting up.

  • All variables and methods are named appropriately.

  • Input controls are appropriately labeled.

  • Any information being output to the user should be clear and concise.

  • Make sure nothing accesses an object that doesn’t exist.

  • Add comments to your code to indicate that you know what each line does.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with MyStudyWriters
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Psychology
Thank you!
Customer 452545, February 6th, 2021
Business Studies
Thank you very much for a good job done and a quick turn around time.
Customer 452615, March 31st, 2021
Business and administrative studies
excellent paper
Customer 452773, March 3rd, 2023
Business and administrative studies
Excellent job
Customer 452773, March 17th, 2023
English 101
IThank you
Customer 452631, April 6th, 2021
Criminal Justice
The paper was not accused of plagiarism and was written very well. I will let you know the grade once it is graded. Thank you
Customer 452671, April 26th, 2021
Business and administrative studies
excellent work
Customer 452773, March 12th, 2023
Sociology
THANK YOUUUUU
Customer 452591, March 18th, 2021
ACC543MANAGERIALACCOUNTINGANDLEGALASPECTS
excellent
Customer 452773, January 25th, 2024
Criminal Justice
This has been the greatest help while I am recovering from an illness. Thank your team so much.
Customer 452671, May 2nd, 2021
Social Work and Human Services
Great work I would love to continue working with this writer thought out the 11 week course.
Customer 452667, May 30th, 2021
Business and administrative studies
great job as always
Customer 452773, February 26th, 2023
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Close

Sometimes it is hard to do all the work on your own

Let us help you get a good grade on your paper. Get professional help and free up your time for more important courses. Let us handle your;

  • Dissertations and Thesis
  • Essays
  • All Assignments

  • Research papers
  • Terms Papers
  • Online Classes
Live ChatWhatsApp