Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C#: Overview This solution simply manages a list of donut flavors. Maintain a list of donut types for Drogo's Delicious Donuts. Use ListBox to hold

C#:
image text in transcribed
image text in transcribed
Overview This solution simply manages a list of donut flavors. Maintain a list of donut types for Drogo's Delicious Donuts. Use ListBox to hold the donut types and create the following menu of processing actions: File Manage List Help Open and Load Open and Add Save File Add Donut Type Remove Donut Type --Cot Donut Types Clear List Exit The donut list should be kept in alphabetical order at all times. Be sure to include access keys for all menu items; create Shortcut keys for menu items where described in parentheses below Open and Load (Ctrl 0) uses an OpenFileDialog to get a text file name from the user. (The file will contain a list of donut types, one per line.) Delete all current donuts from the ListBox, then add then read the ones from the file into the ListBox. Do NOT allow duplicated entries to be put into the list (for example, if "Maple Bar" is already in the list and then is encountered a second time, just ignore the duplicate). Handle possible exceptions using Try...Catch. Select the first item in the list. Open and Add (CtrlA) uses an OpenFileDialog to get a text file name from the user. (The file will contain a list of donut types, one per line.) Add these donuts to those already in the ListBox. Do NOT allow duplicated entries to be put into the list (for example, if "Maple Bar" is already in the list and then is encountered a second time, just ignore the duplicate). Handle possible exceptions using Try...Catch. Select the first item in the list. Save File (Ctrl S) uses a SaveFileDialog to get a text file name from the user. It writes the contents of the ListBox of donut types, one per line, to this file. Handle possible exceptions using Try...Catch. IF the list is empty, use a message box to tell the user of this error and DO NOT proceed with the save process. When done, select the first item in the list. Exit (CtrlQ) -if the list is not empty, ask the user if they want to save the current donut list. If they say yes, save before exiting (see Save File for applicable code). Then exit the solution

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_2

Step: 3

blur-text-image_3

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

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions