Question: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Lab2 { public partial class Lab2

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Lab2 {    public partial class Lab2 : Form    {        public Lab2()        {            InitializeComponent();        }         private void resetMenuStrip_Click(object sender, EventArgs e)        {            LengthButton.Checked = false;            AreaButton.Checked = false;            VolumeButton.Checked = false;            inputValue.Clear();            outputValue.Clear();            inputValue.Focus();         }         private void exitMenuStrip_Click(object sender, EventArgs e)        {            this.Close();        }         private void LengthButton_CheckedChanged(object sender, EventArgs e)        {            inputValue.Focus();            inputComboBox.Items.Clear();            outputComboBox.Items.Clear();            inputComboBox.ResetText();            outputComboBox.ResetText();            inputComboBox.Items.Add("Centimeter");            inputComboBox.Items.Add("Meter");            inputComboBox.Items.Add("Kilometer");            outputComboBox.Items.Add("Centimeter");            outputComboBox.Items.Add("Meter");            outputComboBox.Items.Add("Kilometer");        }         private void AreaButton_CheckedChanged(object sender, EventArgs e)        {            inputValue.Focus();            inputComboBox.Items.Clear();            outputComboBox.Items.Clear();            inputComboBox.ResetText();            outputComboBox.ResetText();            inputComboBox.Items.Add("Square Centimeter");            inputComboBox.Items.Add("Square Meter");            inputComboBox.Items.Add("Square Kilometer");            outputComboBox.Items.Add("Square Centimeter");            outputComboBox.Items.Add("Square Meter");            outputComboBox.Items.Add("Square Kilometer");         }         private void VolumeButton_CheckedChanged(object sender, EventArgs e)        {            inputValue.Focus();            inputComboBox.Items.Clear();            outputComboBox.Items.Clear();            inputComboBox.ResetText();            outputComboBox.ResetText();            inputComboBox.Items.Add("Gallons");            inputComboBox.Items.Add("Quarts");            inputComboBox.Items.Add("Liter");            outputComboBox.Items.Add("Gallons");            outputComboBox.Items.Add("Quarts");            outputComboBox.Items.Add("Liter");        }         private void inputComboBox_SelectedIndexChanged(object sender, EventArgs e)        {     }        private void outputComboBox_SelectedIndexChanged(object sender, EventArgs e)        {         } }    }

Need help with the inputComboBox and ouputComboBox, with the code.

 

Design "Unit Converter" Windows Forms Application which uses the following controls: three group boxes, three radio buttons, two text boxes, two combo boxes, and a menu strip as shown in figure below. Please note that this unit converter contains three units' categories: length, area, and volume. A unit category is selected by clicking/checking an appropriate radio button. When a radio button is checked the corresponding unit's options will be available in both combo boxes for the user to select. In addition, all existing inputs/selections/results in both text boxes and combo boxes should be deleted, and the focus should be set on the input text box. It is required to have at least three units for each unit category. After selecting the unit category, the user should enter a value into the input text box and select a unit in the combo box contained in the group box "Convert FROM". The user should then select the unit in the second combo box to which the previously entered value will be converted and the result of the unit's conversion will be shown in the second text box. Please note that the result of the conversion will be computed and displayed when a unit is selected in a combo box. The "Reset" menu strip item will clear both text boxes and set focus on the input text box, while the "Exit" menu strip item will terminate the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Creating interactive and engaging games is a fascinating aspect of programming allowing developers to combine logic user interface design and user experience to craft enjoyable experiences In this con... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!